0 txs
0 calls
constructor
No constructor.
functions
DEFAULT_ADMIN_ROLE
viewfunction DEFAULT_ADMIN_ROLE() view returns (bytes32)
DISTRIBUTOR_ROLE
viewfunction DISTRIBUTOR_ROLE() view returns (bytes32)
escrowERC1155Reserves
viewfunction escrowERC1155Reserves(address token, uint256 tokenId) view returns (uint256)
escrowERC20Reserves
viewfunction escrowERC20Reserves(address token) view returns (uint256)
escrowERC721BalanceOf
viewfunction escrowERC721BalanceOf(address token) view returns (uint256)
escrowNativeBalance
viewfunction escrowNativeBalance() view returns (uint256)
getRoleAdmin
viewfunction getRoleAdmin(bytes32 role) view returns (bytes32)
hasRole
viewfunction hasRole(bytes32 role, address account) view returns (bool)
i_treasury
viewfunction i_treasury() view returns (address)
s_whitelistedTokens
viewfunction s_whitelistedTokens(address) view returns (bool)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
WITHDRAWER_ROLE
viewfunction WITHDRAWER_ROLE() view returns (bytes32)
addTokenToWhitelist
nonpayablefunction addTokenToWhitelist(address token)
distributeRewards
nonpayablefunction distributeRewards(address token, address to, uint256 amount, uint256 rewardTokenId, uint8 tokenType, uint256 rakeBps)
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
initialize
nonpayablefunction initialize(address _admin, address[] tokenAddr, address treasury)
onERC1155BatchReceived
nonpayablefunction onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) returns (bytes4)
onERC1155Received
nonpayablefunction onERC1155Received(address, address, uint256, uint256, bytes) returns (bytes4)
onERC721Received
nonpayablefunction onERC721Received(address, address, uint256, bytes) returns (bytes4)
removeTokenFromWhitelist
nonpayablefunction removeTokenFromWhitelist(address token)
renounceRole
nonpayablefunction renounceRole(bytes32 role, address callerConfirmation)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
withdrawFunds
nonpayablefunction withdrawFunds(address to, address token, uint256 tokenId, uint8 tokenType)
events
EscrowERC1155Transfer
event EscrowERC1155Transfer(address indexed token, address indexed to, uint256 amount, uint256 tokenId)
EscrowERC20Transfer
event EscrowERC20Transfer(address indexed token, address indexed to, uint256 amount, uint256 rake, address rakePayoutAddress)
EscrowERC721Transfer
event EscrowERC721Transfer(address indexed token, address indexed to, uint256 tokenId)
EscrowNativeTransfer
event EscrowNativeTransfer(address indexed to, uint256 amount, uint256 rake, address rakePayoutAddress)
Initialized
event Initialized(uint64 version)
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)
TokenRemovedFromWhitelist
event TokenRemovedFromWhitelist(address indexed token)
TokenWhitelisted
event TokenWhitelisted(address indexed token)
errors
AccessControlBadConfirmation
error AccessControlBadConfirmation()
AccessControlUnauthorizedAccount
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole)
Escrow__ERC20TransferFailed
error Escrow__ERC20TransferFailed()
Escrow__InsufficientEscrowBalance
error Escrow__InsufficientEscrowBalance()
Escrow__InvalidRakeBps
error Escrow__InvalidRakeBps()
Escrow__IsNotAContract
error Escrow__IsNotAContract()
Escrow__NativePayoutError
error Escrow__NativePayoutError()
Escrow__NativeRakeError
error Escrow__NativeRakeError()
Escrow__TokenNotWhitelisted
error Escrow__TokenNotWhitelisted()
Escrow__ZeroAddress
error Escrow__ZeroAddress()
InvalidInitialization
error InvalidInitialization()
NotInitializing
error NotInitializing()
creation bytecode
0x608060405234801561001057600080fd5b50611961806100206000396000f3fe6080604052600436106101385760003560e01c80637b585a0f116100b0578063d547741f1161006c578063d547741f146103a8578063d84c1b38146103c8578063dc5b68a6146103e8578063e263ebdb14610408578063f0bd87cc14610438578063f23a6e611461046c57005b80637b585a0f146101ba57806385f438c1146102db57806391d148541461030f578063a217fddf1461032f578063a89f50ca14610344578063bc197c811461037c57005b80632f2ff15d116100ff5780632f2ff15d14610228578063306275be1461024857806336568abe146102685780633b9c912c146102885780634d786c861461029b5780636e7347bd146102bb57005b806301ffc9a714610141578063150b7a021461017657806318fb5988146101ba5780631fcea2b1146101e8578063248a9ca31461020857005b3661013f57005b005b34801561014d57600080fd5b5061016161015c36600461130c565b610498565b60405190151581526020015b60405180910390f35b34801561018257600080fd5b506101a1610191366004611409565b630a85bd0160e11b949350505050565b6040516001600160e01b0319909116815260200161016d565b3480156101c657600080fd5b506101da6101d5366004611471565b6104a9565b60405190815260200161016d565b3480156101f457600080fd5b5061013f61020336600461149b565b610514565b34801561021457600080fd5b506101da6102233660046114fa565b6105de565b34801561023457600080fd5b5061013f610243366004611513565b610600565b34801561025457600080fd5b5061013f610263366004611471565b610622565b34801561027457600080fd5b5061013f610283366004611513565b610677565b34801561029457600080fd5b50476101da565b3480156102a757600080fd5b506101da6102b636600461153f565b6106af565b3480156102c757600080fd5b5061013f6102d6366004611569565b610726565b3480156102e757600080fd5b506101da7f779b9d7b1cefd23059ce3e2b194efb3183a6685dd830e8cbb723b0cbeb982b2881565b34801561031b57600080fd5b5061016161032a366004611513565b610814565b34801561033b57600080fd5b506101da600081565b34801561035057600080fd5b50600054610364906001600160a01b031681565b6040516001600160a01b03909116815260200161016d565b34801561038857600080fd5b506101a1610397366004611649565b63bc197c8160e01b95945050505050565b3480156103b457600080fd5b5061013f6103c3366004611513565b61084c565b3480156103d457600080fd5b5061013f6103e3366004611471565b610868565b3480156103f457600080fd5b5061013f6104033660046116f3565b6108ea565b34801561041457600080fd5b50610161610423366004611471565b60016020526000908152604090205460ff1681565b34801561044457600080fd5b506101da7f85faced7bde13e1a7dad704b895f006e704f207617d68166b31ba2d79624862d81565b34801561047857600080fd5b506101a16104873660046117ae565b63f23a6e6160e01b95945050505050565b60006104a382610aa8565b92915050565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156104f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a39190611813565b7f85faced7bde13e1a7dad704b895f006e704f207617d68166b31ba2d79624862d61053e81610acd565b60038360038111156105525761055261182c565b0361056757610562868684610ada565b6105d5565b600083600381111561057b5761057b61182c565b0361058c5761056287878785610cb2565b60018360038111156105a0576105a061182c565b036105b057610562878786610dd1565b60028360038111156105c4576105c461182c565b036105d5576105d587878787610ec4565b50505050505050565b600090815260008051602061190c833981519152602052604090206001015490565b610609826105de565b61061281610acd565b61061c8383610fc8565b50505050565b600061062d81610acd565b6001600160a01b038216600081815260016020526040808220805460ff19169055517fdd2e6d9f52cbe8f695939d018b7d4a216dc613a669876163ac548b916489d9179190a25050565b6001600160a01b03811633146106a05760405163334bd91960e11b815260040160405180910390fd5b6106aa828261106d565b505050565b604051627eeac760e11b8152306004820152602481018290526000906001600160a01b0384169062fdd58e90604401602060405180830381865afa1580156106fb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071f9190611813565b9392505050565b7f779b9d7b1cefd23059ce3e2b194efb3183a6685dd830e8cbb723b0cbeb982b2861075081610acd565b60038260038111156107645761076461182c565b0361077c574761077686826000610ada565b5061080d565b60008260038111156107905761079061182c565b036107af5760006107a0856104a9565b90506107768587836000610cb2565b60018260038111156107c3576107c361182c565b036107d8576107d3848685610dd1565b61080d565b60028260038111156107ec576107ec61182c565b0361080d5760006107fd85856106af565b905061080b85878387610ec4565b505b5050505050565b600091825260008051602061190c833981519152602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610855826105de565b61085e81610acd565b61061c838361106d565b600061087381610acd565b6001600160a01b03821661089a57604051637d8e84fb60e11b815260040160405180910390fd5b6001600160a01b0382166000818152600160208190526040808320805460ff1916909217909155517f6a65f90b1a644d2faac467a21e07e50e3f8fa5846e26231d30ae79a417d3d2629190a25050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156109305750825b905060008267ffffffffffffffff16600114801561094d5750303b155b90508115801561095b575080155b156109795760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156109a357845460ff60401b1916600160401b1785555b6001600160a01b0388166109ca57604051637d8e84fb60e11b815260040160405180910390fd5b6109d26110e9565b600080546001600160a01b0319166001600160a01b0388161781558751905b81811015610a4a5760018060008b8481518110610a1057610a10611842565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016109f1565b50610a5660008a610fc8565b50508315610a9e57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b60006001600160e01b03198216630271189760e51b14806104a357506104a3826110f3565b610ad78133611128565b50565b47821115610afb5760405163128cc8cb60e31b815260040160405180910390fd5b6001600160a01b038316610b2257604051637d8e84fb60e11b815260040160405180910390fd5b612710811115610b4557604051632355aba360e11b815260040160405180910390fd5b6000612710610b54838561186e565b610b5e9190611885565b90508015610bdc57600080546040516001600160a01b039091169083908381818185875af1925050503d8060008114610bb3576040519150601f19603f3d011682016040523d82523d6000602084013e610bb8565b606091505b5050905080610bda57604051630467ee4160e31b815260040160405180910390fd5b505b60006001600160a01b038516610bf283866118a7565b6040516188b891906000818181858888f193505050503d8060008114610c34576040519150601f19603f3d011682016040523d82523d6000602084013e610c39565b606091505b5050905080610c5b57604051638ab11ebf60e01b815260040160405180910390fd5b60005460408051868152602081018590526001600160a01b03928316818301529051918716917f0979277f47787ecf7a1b4e528bfba14b97995bbb72c658f5f7e7a9f06717e7239181900360600190a25050505050565b6001600160a01b03841660009081526001602052604090205460ff16610ceb5760405163047f4ba160e51b815260040160405180910390fd5b610cf4846104a9565b821115610d145760405163128cc8cb60e31b815260040160405180910390fd5b612710811115610d3757604051632355aba360e11b815260040160405180910390fd5b6000612710610d46838561186e565b610d509190611885565b90508015610d6257610d628582611169565b610d768585610d7184876118a7565b61117d565b60005460408051858152602081018490526001600160a01b03928316818301529051868316928816917f08862f7a12731744ea146764f13272f780dc8787f221a7a6e5a79dd375f6fc96919081900360600190a35050505050565b6001600160a01b03831660009081526001602052604090205460ff16610e0a5760405163047f4ba160e51b815260040160405180910390fd5b604051632142170760e11b81523060048201526001600160a01b038381166024830152604482018390528416906342842e0e90606401600060405180830381600087803b158015610e5a57600080fd5b505af1158015610e6e573d6000803e3d6000fd5b50505050816001600160a01b0316836001600160a01b03167f1bc448835df1a7a23cf40ba2717551720e93285eaa37fb13cff10c45a8d3a4c483604051610eb791815260200190565b60405180910390a3505050565b6001600160a01b03841660009081526001602052604090205460ff16610efd5760405163047f4ba160e51b815260040160405180910390fd5b604051637921219560e11b81523060048201526001600160a01b038481166024830152604482018390526064820184905260a06084830152600060a483015285169063f242432a9060c401600060405180830381600087803b158015610f6257600080fd5b505af1158015610f76573d6000803e3d6000fd5b505060408051858152602081018590526001600160a01b038088169450881692507f041ccca43be08a22a885b797e1206a98d1b4cd84f247260b5419c865a8118459910160405180910390a350505050565b600060008051602061190c833981519152610fe38484610814565b611063576000848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556110193390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019150506104a3565b60009150506104a3565b600060008051602061190c8339815191526110888484610814565b15611063576000848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a460019150506104a3565b6110f16112c3565b565b60006001600160e01b03198216637965db0b60e01b14806104a357506301ffc9a760e01b6001600160e01b03198316146104a3565b6111328282610814565b6111655760405163e2517d3f60e01b81526001600160a01b03821660048201526024810183905260440160405180910390fd5b5050565b6000546111659083906001600160a01b0316835b826001600160a01b03163b6000036111a857604051636327795d60e11b815260040160405180910390fd5b604080518082018252601981527f7472616e7366657228616464726573732c75696e74323536290000000000000060209182015281516001600160a01b0385811660248301526044808301869052845180840390910181526064909201845291810180516001600160e01b031663a9059cbb60e01b1790529151600092839287169161123491906118ba565b6000604051808303816000865af19150503d8060008114611271576040519150601f19603f3d011682016040523d82523d6000602084013e611276565b606091505b50915091508115806112a55750600081511180156112a55750808060200190518101906112a391906118e9565b155b1561080d5760405163246ff59760e11b815260040160405180910390fd5b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166110f157604051631afcd79f60e31b815260040160405180910390fd5b60006020828403121561131e57600080fd5b81356001600160e01b03198116811461071f57600080fd5b80356001600160a01b038116811461134d57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561139157611391611352565b604052919050565b600082601f8301126113aa57600080fd5b813567ffffffffffffffff8111156113c4576113c4611352565b6113d7601f8201601f1916602001611368565b8181528460208386010111156113ec57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561141f57600080fd5b61142885611336565b935061143660208601611336565b925060408501359150606085013567ffffffffffffffff81111561145957600080fd5b61146587828801611399565b91505092959194509250565b60006020828403121561148357600080fd5b61071f82611336565b80356004811061134d57600080fd5b60008060008060008060c087890312156114b457600080fd5b6114bd87611336565b95506114cb60208801611336565b945060408701359350606087013592506114e76080880161148c565b915060a087013590509295509295509295565b60006020828403121561150c57600080fd5b5035919050565b6000806040838503121561152657600080fd5b8235915061153660208401611336565b90509250929050565b6000806040838503121561155257600080fd5b61155b83611336565b946020939093013593505050565b6000806000806080858703121561157f57600080fd5b61158885611336565b935061159660208601611336565b9250604085013591506115ab6060860161148c565b905092959194509250565b600067ffffffffffffffff8211156115d0576115d0611352565b5060051b60200190565b600082601f8301126115eb57600080fd5b813560206116006115fb836115b6565b611368565b8083825260208201915060208460051b87010193508684111561162257600080fd5b602086015b8481101561163e5780358352918301918301611627565b509695505050505050565b600080600080600060a0868803121561166157600080fd5b61166a86611336565b945061167860208701611336565b9350604086013567ffffffffffffffff8082111561169557600080fd5b6116a189838a016115da565b945060608801359150808211156116b757600080fd5b6116c389838a016115da565b935060808801359150808211156116d957600080fd5b506116e688828901611399565b9150509295509295909350565b60008060006060848603121561170857600080fd5b61171184611336565b925060208085013567ffffffffffffffff81111561172e57600080fd5b8501601f8101871361173f57600080fd5b803561174d6115fb826115b6565b81815260059190911b8201830190838101908983111561176c57600080fd5b928401925b828410156117915761178284611336565b82529284019290840190611771565b80965050505050506117a560408501611336565b90509250925092565b600080600080600060a086880312156117c657600080fd5b6117cf86611336565b94506117dd60208701611336565b93506040860135925060608601359150608086013567ffffffffffffffff81111561180757600080fd5b6116e688828901611399565b60006020828403121561182557600080fd5b5051919050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176104a3576104a3611858565b6000826118a257634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156104a3576104a3611858565b6000825160005b818110156118db57602081860181015185830152016118c1565b506000920191825250919050565b6000602082840312156118fb57600080fd5b8151801515811461071f57600080fdfe02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800a26469706673582212203b0e5d64cbd1e8953bbe87757ac753459b81c21dd98a9b66ef67bf9dae12ebd964736f6c63430008160033