0 txs
2 calls
constructor
No constructor.
functions
ADMIN_ROLE
viewfunction ADMIN_ROLE() view returns (bytes32)
ALLOWED_ROLE
viewfunction ALLOWED_ROLE() view returns (bytes32)
DEFAULT_ADMIN_ROLE
viewfunction DEFAULT_ADMIN_ROLE() view returns (bytes32)
getRoleAdmin
viewfunction getRoleAdmin(bytes32 role) view returns (bytes32)
getTokenPrice
viewfunction getTokenPrice() view returns (uint256)
getTotalWithdrawnAmount
viewfunction getTotalWithdrawnAmount(address user) view returns (uint256)
getUserInfo
viewfunction getUserInfo(address user) view returns (uint256 pending, uint256 totalEarned, uint256 lastClaimed, uint256 withdrawalCount)
getUserWithdrawalByIndex
viewfunction getUserWithdrawalByIndex(address user, uint256 index) view returns (uint256 amount, uint256 claimedAmount, uint256 timestamp, uint256 blockNumber)
getUserWithdrawalHistory
viewfunction getUserWithdrawalHistory(address user) view returns (tuple[])
hasRole
viewfunction hasRole(bytes32 role, address account) view returns (bool)
lastClaimedAt
viewfunction lastClaimedAt(address) view returns (uint256)
owner
viewfunction owner() view returns (address)
pendingCommission
viewfunction pendingCommission(address) view returns (uint256)
priceContract
viewfunction priceContract() view returns (address)
proxiableUUID
viewfunction proxiableUUID() view returns (bytes32)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
totalEarnings
viewfunction totalEarnings(address) view returns (uint256)
UPGRADE_INTERFACE_VERSION
viewfunction UPGRADE_INTERFACE_VERSION() view returns (string)
WITHDRAW_ROLE
viewfunction WITHDRAW_ROLE() view returns (bytes32)
withdrawalHistory
viewfunction withdrawalHistory(address, uint256) view returns (uint256 amount, uint256 claimedAmount, uint256 timestamp, uint256 blockNumber)
claim
nonpayablefunction claim()
deleteToken
nonpayablefunction deleteToken(address token)
depositCommissions
nonpayablefunction depositCommissions(address[] users, uint256[] amounts)
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
initialize
nonpayablefunction initialize()
renounceOwnership
nonpayablefunction renounceOwnership()
renounceRole
nonpayablefunction renounceRole(bytes32 role, address callerConfirmation)
restoreAdmin
nonpayablefunction restoreAdmin(address account)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
setPriceContract
nonpayablefunction setPriceContract(address _priceContract)
setRewardToken
nonpayablefunction setRewardToken(address token)
transferOwnership
nonpayablefunction transferOwnership(address newOwner)
upgradeToAndCall
payablefunction upgradeToAndCall(address newImplementation, bytes data) payable
withdrawETH
nonpayablefunction withdrawETH(address to, uint256 amount)
withdrawToken
nonpayablefunction withdrawToken(address token, address to, uint256 amount)
events
ClaimedCommission
event ClaimedCommission(address indexed user, uint256 amount)
DepositETH
event DepositETH(address indexed from, uint256 amount)
DepositToken
event DepositToken(address indexed token, address indexed from, uint256 amount)
Initialized
event Initialized(uint64 version)
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
RoleAdminChanged
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)
RoleGranted
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
RoleRevoked
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
TokenDeleted
event TokenDeleted(address indexed token, uint256 amountBurned)
Upgraded
event Upgraded(address indexed implementation)
WithdrawETH
event WithdrawETH(address indexed to, uint256 amount)
WithdrawToken
event WithdrawToken(address indexed token, address indexed to, uint256 amount)
errors
AccessControlBadConfirmation
error AccessControlBadConfirmation()
AccessControlUnauthorizedAccount
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole)
AddressEmptyCode
error AddressEmptyCode(address target)
ERC1967InvalidImplementation
error ERC1967InvalidImplementation(address implementation)
ERC1967NonPayable
error ERC1967NonPayable()
FailedCall
error FailedCall()
InvalidInitialization
error InvalidInitialization()
NotInitializing
error NotInitializing()
OwnableInvalidOwner
error OwnableInvalidOwner(address owner)
OwnableUnauthorizedAccount
error OwnableUnauthorizedAccount(address account)
UUPSUnauthorizedCallContext
error UUPSUnauthorizedCallContext()
UUPSUnsupportedProxiableUUID
error UUPSUnsupportedProxiableUUID(bytes32 slot)
creation bytecode
0x60a08060405234602957306080526120cd908161002e8239608051818181610d0501526110ab0152f35b5f80fdfe60806040526004361015610046575b3615610018575f80fd5b6040513481527fced5d8bf10823804603bba066e4f53aa6e8f6f4be68bf0114cf7a0e52183e4e960203392a2005b5f3560e01c806301e336671461174357806301ffc9a7146116ed578063248a9ca3146116ae57806326a40c99146116775780632f2ff15d1461162d57806336568abe146115e95780634782f7791461150c5780634a56c9a71461148d5780634b94f50e146113cb5780634e71d92d146112605780634f1ef2861461102f5780634f402a2814610d5957806352d1902d14610cf35780635fdd8b1214610cbb5780636386c1c714610c56578063715018a614610bef57806375b238fc14610bb55780638129fc1c146109e957806385117005146109b15780638aee8127146109285780638da5cb5b146108f457806391d148541461089f578063a217fddf14610885578063ad3cb1cc14610827578063ae372ec1146107ff578063b63cc906146107cc578063be2aa24814610703578063bf777e6414610640578063c59e65da146105ae578063d32f715414610574578063d547741f14610525578063e02023a1146104eb578063f069f712146102fd578063f2fde38b146102d25763fb6a5ff80361000e57346102ce5760203660031901126102ce576001600160a01b036101ec61182e565b165f52600360205260405f2080549067ffffffffffffffff82116102ba576040519161021e60208260051b01846118a3565b8083526020830180925f5260205f205f915b83831061029c578486604051918291602083019060208452518091526040830191905f5b818110610262575050500390f35b9193509160206080600192606087518051835284810151858401526040810151604084015201516060820152019401910191849392610254565b600460206001926102ac85611a6a565b815201920192019190610230565b634e487b7160e01b5f52604160045260245ffd5b5f80fd5b346102ce5760203660031901126102ce576102fb6102ee61182e565b6102f6611efb565b611a9c565b005b346102ce5760203660031901126102ce5761031661182e565b335f9081525f516020611ff85f395f51905f52602052604090205460ff1680156104cb575b610344906119c3565b6040516370a0823160e01b81523060048201526001600160a01b039190911690602081602481855afa908115610454575f91610499575b50801561045f5760405163a9059cbb60e01b815261dead6004820152602481018290526020816044815f875af1908115610454575f91610425575b50156103e95760207ff82179c2776d6e4e426f55785510df9d73840c03de3b278288c026dd395876ba91604051908152a2005b60405162461bcd60e51b8152602060048201526014602482015273109d5c9b881d1c985b9cd9995c8819985a5b195960621b6044820152606490fd5b610447915060203d60201161044d575b61043f81836118a3565b81019061194f565b836103b6565b503d610435565b6040513d5f823e3d90fd5b60405162461bcd60e51b81526020600482015260126024820152714e6f20746f6b656e20746f2064656c65746560701b6044820152606490fd5b90506020813d6020116104c3575b816104b4602093836118a3565b810103126102ce57518261037b565b3d91506104a7565b505f5160206120185f395f51905f52546001600160a01b0316331461033b565b346102ce575f3660031901126102ce5760206040517f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec8152f35b346102ce5760403660031901126102ce576102fb600435610544611844565b9061056f61056a825f525f5160206120585f395f51905f52602052600160405f20015490565b611b0d565b611e5f565b346102ce575f3660031901126102ce5760206040517fd5dc6b389d0dd5687ab5bd9338f760ebeaff2d2852a93a9a9ebaebbfefc763ac8152f35b346102ce5760203660031901126102ce576105c761182e565b335f9081525f516020611ff85f395f51905f52602052604090205460ff168015610620575b6105f5906119c3565b6001600160a01b0316610609811515611a1f565b6001600160601b0360a01b60065416176006555f80f35b505f5160206120185f395f51905f52546001600160a01b031633146105ec565b346102ce5760203660031901126102ce5761065961182e565b6001600160a01b03165f908152600360205260408120805467ffffffffffffffff81116102ba576040519161069460208360051b01846118a3565b81835260208301905f5260205f205f915b8383106106e5575f85875b81518310156106da576106d26001916020808660051b86010151015190611a5d565b9201916106b0565b602090604051908152f35b600460206001926106f585611a6a565b8152019201920191906106a5565b346102ce5760403660031901126102ce5761071c61182e565b6001600160a01b03165f8181526003602052604090205460243591908210156107915761075d91610757915f52600360205260405f2061185a565b50611a6a565b80516020808301516040808501516060958601518251958652938501929092528301529181019190915280608081015b0390f35b60405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b6044820152606490fd5b346102ce5760203660031901126102ce576102fb6107e861182e565b6107f0611efb565b6107f981611b53565b50611bef565b346102ce575f3660031901126102ce576006546040516001600160a01b039091168152602090f35b346102ce575f3660031901126102ce57604080519061084681836118a3565b600582526020820191640352e302e360dc1b83528151928391602083525180918160208501528484015e5f828201840152601f01601f19168101030190f35b346102ce575f3660031901126102ce5760206040515f8152f35b346102ce5760403660031901126102ce576108b8611844565b6004355f525f5160206120585f395f51905f5260205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b346102ce575f3660031901126102ce575f5160206120185f395f51905f52546040516001600160a01b039091168152602090f35b346102ce5760203660031901126102ce5761094161182e565b335f9081525f516020611ff85f395f51905f52602052604090205460ff168015610991575b61096f906119c3565b600580546001600160a01b0319166001600160a01b0392909216919091179055005b505f5160206120185f395f51905f52546001600160a01b03163314610966565b346102ce5760203660031901126102ce576001600160a01b036109d261182e565b165f526002602052602060405f2054604051908152f35b346102ce575f3660031901126102ce575f5160206120785f395f51905f525460ff8160401c16159067ffffffffffffffff811680159081610bad575b6001149081610ba3575b159081610b9a575b50610b8b5767ffffffffffffffff1981166001175f5160206120785f395f51905f525581610b5f575b50610a69611f2e565b610a71611f2e565b610a7a33611a9c565b610a82611f2e565b610a8a611f2e565b610a9333611b53565b50610a9d33611bef565b50610aa733611c82565b50610ab133611d3b565b507355d398326f99059ff775485246999027b31979556001600160601b0360a01b600554161760055573671f8c6d387b0291fd1b24e93dd9599225a6aea76001600160601b0360a01b6004541617600455610b0857005b68ff0000000000000000195f5160206120785f395f51905f5254165f5160206120785f395f51905f52557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff191668010000000000000001175f5160206120785f395f51905f525581610a60565b63f92ee8a960e01b5f5260045ffd5b90501583610a37565b303b159150610a2f565b839150610a25565b346102ce575f3660031901126102ce5760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b346102ce575f3660031901126102ce57610c07611efb565b5f5160206120185f395f51905f5280546001600160a01b031981169091555f906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346102ce5760203660031901126102ce576001600160a01b03610c7761182e565b165f90815260016020908152604080832054600283528184205484845282852054600385529483902054835192835293820152908101929092526060820152608090f35b346102ce5760203660031901126102ce576001600160a01b03610cdc61182e565b165f526001602052602060405f2054604051908152f35b346102ce575f3660031901126102ce577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163003610d4a5760206040515f5160206120385f395f51905f528152f35b63703e46dd60e11b5f5260045ffd5b346102ce5760403660031901126102ce5760043567ffffffffffffffff81116102ce57610d8a9036906004016118e1565b9060243567ffffffffffffffff81116102ce57610dab9036906004016118e1565b335f9081525f516020611ff85f395f51905f526020526040902054909391929060ff16801561100f575b610dde906119c3565b838203610fd8576006546040516361fcdc8160e01b81525f95909391602090859060049082906001600160a01b03165afa938415610454575f94610fa4575b505f955b828710610e2a57005b610e506001600160a01b03610e48610e438a87896119fb565b611a0b565b161515611a1f565b610e5b8783886119fb565b3515610f6e57610e6c8783886119fb565b35620186a0810290808204620186a01490151715610f5a5785610e8e916119a5565b6001600160a01b03610ea4610e438a87896119fb565b165f526001602052610ebb60405f20918254611a5d565b9055610ec88783886119fb565b35620186a0810290808204620186a01490151715610f5a5785610eea916119a5565b6001600160a01b03610f00610e438a87896119fb565b165f526002602052610f1760405f20918254611a5d565b9055610f248783886119fb565b35620186a0810290808204620186a01490151715610f5a57600191610f4c87610f52936119a5565b90611a5d565b960195610e21565b634e487b7160e01b5f52601160045260245ffd5b60405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606490fd5b9093506020813d602011610fd0575b81610fc0602093836118a3565b810103126102ce57519286610e1d565b3d9150610fb3565b60405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606490fd5b505f5160206120185f395f51905f52546001600160a01b03163314610dd5565b60403660031901126102ce5761104361182e565b6024359067ffffffffffffffff82116102ce57366023830112156102ce57816004013590611070826118c5565b9161107e60405193846118a3565b808352602083019336602483830101116102ce57815f926024602093018737840101526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630811490811561123e575b50610d4a576110e3611efb565b6040516352d1902d60e01b81526001600160a01b0382169390602081600481885afa5f918161120a575b506111255784634c9c8ce360e01b5f5260045260245ffd5b805f5160206120385f395f51905f528692036111f85750823b156111e6575f5160206120385f395f51905f5280546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a28251156111cd575f80916102fb945190845af43d156111c5573d916111a9836118c5565b926111b760405194856118a3565b83523d5f602085013e611f59565b606091611f59565b505050346111d757005b63b398979f60e01b5f5260045ffd5b634c9c8ce360e01b5f5260045260245ffd5b632a87526960e21b5f5260045260245ffd5b9091506020813d602011611236575b81611226602093836118a3565b810103126102ce5751908661110d565b3d9150611219565b5f5160206120385f395f51905f52546001600160a01b031614159050846110d6565b346102ce575f3660031901126102ce57335f52600160205260405f2054335f52600360205260405f2060405161129581611887565b82815260208101918383526040820142815260608301914383528054680100000000000000008110156102ba576112d19160018201815561185a565b9490946113b85760039351855551600185015551600284015551910155335f5260016020525f6040812055335f525f60205262015180420460405f205560018060a01b03600554166020604051809263a9059cbb60e01b8252815f8161135088336004840160209093929193604081019460018060a01b031681520152565b03925af180156104545761136b915f91611399575b50611967565b6040519081527f59a23cdee2db30c278dee5db50258247e5f8de6b161f57f326aa358a6402047760203392a2005b6113b2915060203d60201161044d5761043f81836118a3565b83611365565b634e487b7160e01b5f525f60045260245ffd5b346102ce575f3660031901126102ce576006546001600160a01b0316801561144f576020600491604051928380926361fcdc8160e01b82525afa8015610454575f9061141c57602090604051908152f35b506020813d602011611447575b81611436602093836118a3565b810103126102ce57602090516106da565b3d9150611429565b60405162461bcd60e51b8152602060048201526016602482015275141c9a58d94818dbdb9d1c9858dd081b9bdd081cd95d60521b6044820152606490fd5b346102ce5760403660031901126102ce576114a661182e565b6001600160a01b03165f9081526003602052604090208054602435908110156102ce576114d29161185a565b50805461078d6001830154926003600282015491015490604051948594859094939260609260808301968352602083015260408201520152565b346102ce5760403660031901126102ce576004356001600160a01b038116908190036102ce57335f9081525f516020611fd85f395f51905f5260205260409020546024359061155d9060ff16611912565b8047106115b3575f818381156115a9575b5f92839283928392f1156104545760207f566e45b1c8057e725bf62796a7f1d37ae294393cab069725a09daddd1af98b7991604051908152a2005b6108fc925061156e565b60405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b6044820152606490fd5b346102ce5760403660031901126102ce57611602611844565b336001600160a01b0382160361161e576102fb90600435611e5f565b63334bd91960e11b5f5260045ffd5b346102ce5760403660031901126102ce576102fb60043561164c611844565b9061167261056a825f525f5160206120585f395f51905f52602052600160405f20015490565b611dce565b346102ce5760203660031901126102ce576001600160a01b0361169861182e565b165f525f602052602060405f2054604051908152f35b346102ce5760203660031901126102ce5760206116e56004355f525f5160206120585f395f51905f52602052600160405f20015490565b604051908152f35b346102ce5760203660031901126102ce5760043563ffffffff60e01b81168091036102ce57602090637965db0b60e01b8114908115611732575b506040519015158152f35b6301ffc9a760e01b14905082611727565b346102ce5760603660031901126102ce5761175c61182e565b611764611844565b335f9081525f516020611fd85f395f51905f52602052604090205460443592906117909060ff16611912565b60405163a9059cbb60e01b81526001600160a01b0383811660048301526024820185905291909116916020826044815f875af1908115610454576117fe6020927f037238854fe57fbf51f09946f854fc3916fe83938d6521f09bd05463839f1304945f916118115750611967565b6040519485526001600160a01b031693a3005b6118289150843d861161044d5761043f81836118a3565b87611365565b600435906001600160a01b03821682036102ce57565b602435906001600160a01b03821682036102ce57565b8054821015611873575f5260205f209060021b01905f90565b634e487b7160e01b5f52603260045260245ffd5b6080810190811067ffffffffffffffff8211176102ba57604052565b90601f8019910116810190811067ffffffffffffffff8211176102ba57604052565b67ffffffffffffffff81116102ba57601f01601f191660200190565b9181601f840112156102ce5782359167ffffffffffffffff83116102ce576020808501948460051b0101116102ce57565b1561191957565b60405162461bcd60e51b815260206004820152600e60248201526d2737ba103bb4ba34323930bbb2b960911b6044820152606490fd5b908160209103126102ce575180151581036102ce5790565b1561196e57565b60405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606490fd5b81156119af570490565b634e487b7160e01b5f52601260045260245ffd5b156119ca57565b60405162461bcd60e51b81526020600482015260096024820152682737ba1030b236b4b760b91b6044820152606490fd5b91908110156118735760051b0190565b356001600160a01b03811681036102ce5790565b15611a2657565b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606490fd5b91908201809211610f5a57565b90604051611a7781611887565b6060600382948054845260018101546020850152600281015460408501520154910152565b6001600160a01b03168015611afa575f5160206120185f395f51905f5280546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3565b631e4fbdf760e01b5f525f60045260245ffd5b5f8181525f5160206120585f395f51905f526020908152604080832033845290915290205460ff1615611b3d5750565b63e2517d3f60e01b5f523360045260245260445ffd5b6001600160a01b0381165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff16611bea576001600160a01b03165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d60205260408120805460ff191660011790553391905f516020611fb85f395f51905f528180a4600190565b505f90565b6001600160a01b0381165f9081525f516020611ff85f395f51905f52602052604090205460ff16611bea576001600160a01b03165f8181525f516020611ff85f395f51905f5260205260408120805460ff191660011790553391907fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775905f516020611fb85f395f51905f529080a4600190565b6001600160a01b0381165f9081527f9ac31c3181a57e2db5ed7b59b5c0ba9562eca5797e5cb0b5516cdaa24d42b3b3602052604090205460ff16611bea576001600160a01b03165f8181527f9ac31c3181a57e2db5ed7b59b5c0ba9562eca5797e5cb0b5516cdaa24d42b3b360205260408120805460ff191660011790553391907fd5dc6b389d0dd5687ab5bd9338f760ebeaff2d2852a93a9a9ebaebbfefc763ac905f516020611fb85f395f51905f529080a4600190565b6001600160a01b0381165f9081525f516020611fd85f395f51905f52602052604090205460ff16611bea576001600160a01b03165f8181525f516020611fd85f395f51905f5260205260408120805460ff191660011790553391907f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec905f516020611fb85f395f51905f529080a4600190565b5f8181525f5160206120585f395f51905f52602090815260408083206001600160a01b038616845290915290205460ff16611e59575f8181525f5160206120585f395f51905f52602090815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291905f516020611fb85f395f51905f529080a4600190565b50505f90565b5f8181525f5160206120585f395f51905f52602090815260408083206001600160a01b038616845290915290205460ff1615611e59575f8181525f5160206120585f395f51905f52602090815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a4600190565b5f5160206120185f395f51905f52546001600160a01b03163303611f1b57565b63118cdaa760e01b5f523360045260245ffd5b60ff5f5160206120785f395f51905f525460401c1615611f4a57565b631afcd79f60e31b5f5260045ffd5b90611f7d5750805115611f6e57602081519101fd5b63d6bda27560e01b5f5260045ffd5b81511580611fae575b611f8e575090565b639996b31560e01b5f9081526001600160a01b0391909116600452602490fd5b50803b15611f8656fe2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5823e0d66e2a96f24807757f427eb1484ce655ac5deec6b013f8a4f8afa2963fb16e88c42fd4e48df2dd6a2eabd6bc9aec654ec170056b470819f8892cc6431c9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800f0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a2646970667358221220f5ffd13f6a7847ec3b74feb211cd7d8262d3baea1a7977942b1c2fab42eac0a764736f6c634300081e0033