0 txs
0 calls
constructor
No constructor.
functions
calculateRewards
viewfunction calculateRewards(address[] _winners, uint256 _prizePool) view returns (uint256[])
estimateRewardForRank
viewfunction estimateRewardForRank(uint256 _rank, uint256 _currentPrizePool, uint256 _currentEntryFeeBonusPool, address _prizeToken, address _entryFeeToken, uint256, uint256 _expectedWinnerCount) view returns (uint256 estimatedMainReward, uint256 estimatedEntryTokenReward)
getDistributionType
purefunction getDistributionType() pure returns (string)
tournamentConfigs
viewfunction tournamentConfigs(address) view returns (bool isInitialized)
validateDistribution
viewfunction validateDistribution() view returns (bool)
initializeTournamentConfig
nonpayablefunction initializeTournamentConfig(bytes _config)
updateTournamentConfig
nonpayablefunction updateTournamentConfig(address tournament, bytes _config)
events
ConfigurationUpdated
event ConfigurationUpdated(address indexed tournament, uint256[] weights)
TournamentConfigured
event TournamentConfigured(address indexed tournament, uint256[] weights)
errors
ArrayLengthMismatch
error ArrayLengthMismatch()
InvalidWeights
error InvalidWeights()
NotTournamentOwner
error NotTournamentOwner()
NoWinnersProvided
error NoWinnersProvided()
TournamentAlreadyConfigured
error TournamentAlreadyConfigured()
TournamentNotConfigured
error TournamentNotConfigured()
ZeroScore
error ZeroScore(address participant)
creation bytecode
0x60808060405234601557610a05908161001b8239f35b600080fdfe6080604052600436101561001257600080fd5b60003560e01c80634da0e77c1461055a5780638ffd0cf1146104fe57806391277dfa146104bc5780639a6e9b1314610497578063a83e3c3b146102c2578063be721f3d146102415763c635a00b1461006957600080fd5b3461023c57604036600319011261023c576004356001600160401b03811161023c573660238201121561023c5780600401356100ac6100a78261075a565b6106e3565b916024602084848152019260051b8201019036821161023c57602401915b81831061021c578360243590336000526000602052604060002060ff6001820154161561020b578151156101fa5780549151918083106101f3575b6101116100a78461075a565b92808452610121601f199161075a565b013660208501376000916000905b8282106101a9575050838210908161019f575b5061015a575b604051806101568482610771565b0390f35b820391821161018957610179610156926101738361081a565b51610851565b6101828261081a565b5282610148565b634e487b7160e01b600052601160045260246000fd5b9050151584610142565b90926101eb6001916127106101ce6101c18887610871565b90549060031b1c8a61085e565b046101d9878961083d565b526101e4868861083d565b5190610851565b93019061012f565b5081610105565b6305568ffd60e31b60005260046000fd5b633890a11b60e11b60005260046000fd5b82356001600160a01b038116810361023c578152602092830192016100ca565b600080fd5b3461023c57600036600319011261023c57604061025d816106e3565b90600d82526c1d1bdc1e0b5dd95a59da1d1959609a1b6020830152805180926020825280519081602084015260005b8281106102ab5750506000828201840152601f01601f19168101030190f35b60208282018101518783018701528694500161028c565b3461023c57602036600319011261023c576004356001600160401b03811161023c576102f5610304913690600401610708565b602080825183010191016107ab565b80511561033f57600090815b815183101561035057610323838361083d565b5190811561033f5760019161033791610851565b920191610310565b63108cef9d60e31b60005260046000fd5b6127100361033f5733600052600060205260ff6001604060002001541661048657604080519081016001600160401b03811182821017610470576040528181526020810190600182523360005260006020526040600020905180519060018060401b03821161047057600160401b8211610470578254828455808310610447575b5060200182600052602060002060005b838110610433578686600187019051151560ff801983541691161790557fd9775cadc4d12c72ea0af9e2da8b2d2a087c6cdaa5f8cb66ca96ba25deaef1c76040518061042e339482610771565b0390a2005b6001906020845194019381840155016103e1565b8360005282602060002091820191015b81811061046457506103d1565b60008155600101610457565b634e487b7160e01b600052604160045260246000fd5b6383e8504760e01b60005260046000fd5b3461023c57600036600319011261023c5760206104b261094e565b6040519015158152f35b3461023c57602036600319011261023c576001600160a01b036104dd6106cd565b166000526000602052602060ff600160406000200154166040519015158152f35b3461023c5760e036600319011261023c576064356001600160a01b038116810361023c576084356001600160a01b038116810361023c5760409161054e9160c43591604435602435600435610889565b82519182526020820152f35b3461023c57604036600319011261023c576105736106cd565b6024356001600160401b03811161023c57610592903690600401610708565b33600052600060205260ff600160406000200154161561020b57806020806105bf935183010191016107ab565b9081511561033f57600091825b81518410156105fb576105df848361083d565b5190811561033f576001916105f391610851565b9301926105cc565b61271083910361033f573360009081526020819052604090208251906001600160401b03821161047057600160401b82116104705780548282558083106106a4575b506020840190600052602060002060005b838110610690576040516001600160a01b038616907fd35501c3ccba4d01f26d86302a9657b22f1dced04d06482aa42142206f0a8b4b908061042e8a82610771565b60019060208451940193818401550161064e565b8160005282602060002091820191015b8181106106c1575061063d565b600081556001016106b4565b600435906001600160a01b038216820361023c57565b6040519190601f01601f191682016001600160401b0381118382101761047057604052565b81601f8201121561023c578035906001600160401b03821161047057610737601f8301601f19166020016106e3565b928284526020838301011161023c57816000926020809301838601378301015290565b6001600160401b0381116104705760051b60200190565b602060408183019282815284518094520192019060005b8181106107955750505090565b8251845260209384019390920191600101610788565b60208183031261023c578051906001600160401b03821161023c57019080601f8301121561023c5781516107e16100a78261075a565b9260208085848152019260051b82010192831161023c57602001905b82821061080a5750505090565b81518152602091820191016107fd565b8051156108275760200190565b634e487b7160e01b600052603260045260246000fd5b80518210156108275760209160051b010190565b9190820180921161018957565b8181029291811591840414171561018957565b80548210156108275760005260206000200190600090565b959490939592919233600052600060205260406000209160ff6001840154161561020b578115908115610943575b8115610939575b5061092a576000198101908111610189576108df6108ed9161271093610871565b90549060031b1c809561085e565b04946001600160a01b039182169116141580610921575b1561091a57612710916109169161085e565b0490565b5050600090565b50801515610904565b50505050509050600090600090565b90508111386108be565b8354831191506108b7565b336000526000602052604060002060ff6001820154161580156109c6575b6109c057600080918054905b81841061099057505061271091500361033f57600190565b909161099c8483610871565b90549060031b1c90811561033f576001916109b691610851565b9301929190610978565b50600090565b5080541561096c56fea2646970667358221220d93dc1c7baef0867faea3c098cf25bc94801e698805c8d539569407af88183a664736f6c634300081b0033