434 txs
5.6k calls
constructor
constructor(address owner, address marketplace)
functions
DEFAULT_ADMIN_ROLE
viewfunction DEFAULT_ADMIN_ROLE() view returns (bytes32)
getPlatformBalance
viewfunction getPlatformBalance() view returns (uint256)
getRoleAdmin
viewfunction getRoleAdmin(bytes32 role) view returns (bytes32)
getUserBalance
viewfunction getUserBalance(address user) view returns (uint256)
hasRole
viewfunction hasRole(bytes32 role, address account) view returns (bool)
MARKETPLACE_ROLE
viewfunction MARKETPLACE_ROLE() view returns (bytes32)
OWNER_ROLE
viewfunction OWNER_ROLE() view returns (bytes32)
platformBalance
viewfunction platformBalance() view returns (uint256)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
userBalances
viewfunction userBalances(address user) view returns (uint256 balance)
addMarketplace
nonpayablefunction addMarketplace(address marketplace)
addOwner
nonpayablefunction addOwner(address owner)
addPlatformBalance
payablefunction addPlatformBalance() payable
addUserBalance
payablefunction addUserBalance(address user) payable
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
removeMarketplace
nonpayablefunction removeMarketplace(address marketplace)
removeOwner
nonpayablefunction removeOwner(address owner)
renounceRole
nonpayablefunction renounceRole(bytes32 role, address callerConfirmation)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
withdrawPlatformBalance
nonpayablefunction withdrawPlatformBalance(address to)
withdrawUserBalance
nonpayablefunction withdrawUserBalance(address user)
events
PlatformBalanceAdded
event PlatformBalanceAdded(uint256 amount, uint256 timestamp)
PlatformBalanceWithdrawn
event PlatformBalanceWithdrawn(address indexed to, uint256 amount, uint256 timestamp)
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)
UserBalanceAdded
event UserBalanceAdded(address indexed user, uint256 amount, uint256 timestamp)
UserBalanceWithdrawn
event UserBalanceWithdrawn(address indexed user, uint256 amount, uint256 timestamp)
errors
AccessControlBadConfirmation
error AccessControlBadConfirmation()
AccessControlUnauthorizedAccount
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole)
InsufficientBalance
error InsufficientBalance()
InvalidAddress
error InvalidAddress()
NoBalanceToWithdraw
error NoBalanceToWithdraw()
NotMarketplace
error NotMarketplace()
NotOwner
error NotOwner()
NotUser
error NotUser()
TransferFailed
error TransferFailed()
creation bytecode
0x60803461007f57601f610ef938819003918201601f19168301916001600160401b0383118484101761008457808492604094855283398101031261007f5780610069610059602061005261006f9561009a565b930161009a565b91610063816100ae565b5061012a565b506101e6565b50604051610c1a908161027f8239f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361007f57565b6001600160a01b0381166000908152600080516020610ed9833981519152602052604090205460ff16610124576001600160a01b03166000818152600080516020610ed983398151915260205260408120805460ff19166001179055339190600080516020610e998339815191528180a4600190565b50600090565b6001600160a01b03811660009081527fd329ff8a035c3ce5df2b0dae604d660c0d8783bf7e64be00c1d10db96c0b87b4602052604090205460ff16610124576001600160a01b031660008181527fd329ff8a035c3ce5df2b0dae604d660c0d8783bf7e64be00c1d10db96c0b87b460205260408120805460ff191660011790553391907fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e90600080516020610e998339815191529080a4600190565b6001600160a01b0381166000908152600080516020610eb9833981519152602052604090205460ff16610124576001600160a01b03166000818152600080516020610eb983398151915260205260408120805460ff191660011790553391907f0ea61da3a8a09ad801432653699f8c1860b1ae9d2ea4a141fadfd63227717bc890600080516020610e998339815191529080a460019056fe6080806040526004361015610028575b5036156100205761001e61074f565b005b61001e61074f565b60003560e01c90816301ffc9a71461063557508063173825d91461060c57806317a38a42146105a3578063248a9ca31461056e57806326224c64146104065780632f2ff15d1461052e57806336568abe146104e857806340b4eb3b1461044057806347734892146104065780635a55d7a41461030657806362a5dbbc1461022d5780637065cb48146102dd57806371771330146102b457806391d1485414610267578063a217fddf1461024b578063ba9bf7571461022d578063c3439f3f14610204578063d3bed04d146101b8578063d547741f14610173578063e58378bb1461014a5763f89fba3f1461011c573861000f565b346101455760203660031901126101455761001e610138610688565b610140610793565b6108ab565b600080fd5b34610145576000366003190112610145576020604051600080516020610b658339815191528152f35b346101455760403660031901126101455761001e60043561019261069e565b906101b36101ae82600052600060205260016040600020015490565b6107e6565b61092f565b6000366003190112610145576101d0346002546106b4565b6002557fe0d1d9ab5c80a75a7c68311ecbe724236e520b52520d8f30bd169ed52ba88fa260408051348152426020820152a1005b34610145576000366003190112610145576020604051600080516020610b858339815191528152f35b34610145576000366003190112610145576020600254604051908152f35b3461014557600036600319011261014557602060405160008152f35b346101455760403660031901126101455761028061069e565b600435600052600060205260406000209060018060a01b0316600052602052602060ff604060002054166040519015158152f35b346101455760203660031901126101455761001e6102d0610688565b6102d8610793565b610a2c565b346101455760203660031901126101455761001e6102f9610688565b610301610793565b6109a6565b346101455760203660031901126101455761031f610688565b336000908152600080516020610b45833981519152602052604090205460ff16156103df576002549081156103ce576001600160a01b03169081156103bd576000600255600080808084865af161037461070f565b50156103ac5760407f92403922143ccba44a74c6fd69999a7826c149bc49ddef8f446ba1f81eb13f31918151908152426020820152a2005b6312171d8360e31b60005260046000fd5b63e6c4247b60e01b60005260046000fd5b63177b02e160e31b60005260046000fd5b63e2517d3f60e01b60005233600452600080516020610b6583398151915260245260446000fd5b34610145576020366003190112610145576001600160a01b03610427610688565b1660005260016020526020604060002054604051908152f35b34610145576020366003190112610145576001600160a01b03610461610688565b163381036104d75780600052600160205260406000205480156103ce5781600052600160205260006040812055600080808084865af161049f61070f565b50156103ac5760407f3ca3ddc8731801ab3fa85c0149a62fa318268f89f3d17fe86db5ed74981bcca9918151908152426020820152a2005b637aafae9760e01b60005260046000fd5b346101455760403660031901126101455761050161069e565b336001600160a01b0382160361051d5761001e9060043561092f565b63334bd91960e11b60005260046000fd5b346101455760403660031901126101455761001e60043561054d61069e565b906105696101ae82600052600060205260016040600020015490565b610ab2565b3461014557602036600319011261014557602061059b600435600052600060205260016040600020015490565b604051908152f35b6020366003190112610145576001600160a01b036105bf610688565b1680600052600160205260406000206105d93482546106b4565b90557f47ba1eab22b42e5c193271afd12bc0653be184b2c738bf8e6af125b01553c05e60408051348152426020820152a2005b346101455760203660031901126101455761001e610628610688565b610630610793565b610821565b34610145576020366003190112610145576004359063ffffffff60e01b821680920361014557602091637965db0b60e01b8114908115610677575b5015158152f35b6301ffc9a760e01b14905083610670565b600435906001600160a01b038216820361014557565b602435906001600160a01b038216820361014557565b919082018092116106c157565b634e487b7160e01b600052601160045260246000fd5b90601f8019910116810190811067ffffffffffffffff8211176106f957604052565b634e487b7160e01b600052604160045260246000fd5b3d1561074a573d9067ffffffffffffffff82116106f9576040519161073e601f8201601f1916602001846106d7565b82523d6000602084013e565b606090565b303b156101455760405163d3bed04d60e01b815260008160048134305af180156107875761077a5750565b6000610785916106d7565b565b6040513d6000823e3d90fd5b3360009081527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604090205460ff16156107cc57565b63e2517d3f60e01b60005233600452600060245260446000fd5b60008181526020818152604080832033845290915290205460ff16156108095750565b63e2517d3f60e01b6000523360045260245260446000fd5b6001600160a01b0381166000908152600080516020610b45833981519152602052604090205460ff16156108a5576001600160a01b03166000818152600080516020610b4583398151915260205260408120805460ff19169055339190600080516020610b6583398151915290600080516020610bc58339815191529080a4600190565b50600090565b6001600160a01b0381166000908152600080516020610ba5833981519152602052604090205460ff16156108a5576001600160a01b03166000818152600080516020610ba583398151915260205260408120805460ff19169055339190600080516020610b8583398151915290600080516020610bc58339815191529080a4600190565b6000818152602081815260408083206001600160a01b038616845290915290205460ff161561099f576000818152602081815260408083206001600160a01b0395909516808452949091528120805460ff1916905533929190600080516020610bc58339815191529080a4600190565b5050600090565b6001600160a01b0381166000908152600080516020610b45833981519152602052604090205460ff166108a5576001600160a01b03166000818152600080516020610b4583398151915260205260408120805460ff19166001179055339190600080516020610b6583398151915290600080516020610b258339815191529080a4600190565b6001600160a01b0381166000908152600080516020610ba5833981519152602052604090205460ff166108a5576001600160a01b03166000818152600080516020610ba583398151915260205260408120805460ff19166001179055339190600080516020610b8583398151915290600080516020610b258339815191529080a4600190565b6000818152602081815260408083206001600160a01b038616845290915290205460ff1661099f576000818152602081815260408083206001600160a01b0395909516808452949091528120805460ff1916600117905533929190600080516020610b258339815191529080a460019056fe2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0dd329ff8a035c3ce5df2b0dae604d660c0d8783bf7e64be00c1d10db96c0b87b4b19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e0ea61da3a8a09ad801432653699f8c1860b1ae9d2ea4a141fadfd63227717bc8da104853dc3972fb943ce0ee89200279d8af13db255ed28fb43e685524f21b19f6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171ba26469706673582212204b13a5c30eeda2f3950114f21de279412a086c9b1231385e92e614aa32729aff64736f6c634300081b00332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0dda104853dc3972fb943ce0ee89200279d8af13db255ed28fb43e685524f21b19ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb50000000000000000000000002697efce331b946d1a0ceb2bb0db5989ceafddd20000000000000000000000002697efce331b946d1a0ceb2bb0db5989ceafddd2