2 txs
11.3k calls
constructor
constructor()
functions
accounts
viewfunction accounts(string) view returns (uint256 total, bool approved)
APPROVER_ROLE
viewfunction APPROVER_ROLE() view returns (bytes32)
buyers
viewfunction buyers(address) view returns (uint256 total, bool approved)
DEFAULT_ADMIN_ROLE
viewfunction DEFAULT_ADMIN_ROLE() view returns (bytes32)
getData
viewfunction getData(address buyer) view returns (tuple)
getData
viewfunction getData(string account) view returns (tuple)
getRoleAdmin
viewfunction getRoleAdmin(bytes32 role) view returns (bytes32)
getRoleMember
viewfunction getRoleMember(bytes32 role, uint256 index) view returns (address)
getRoleMemberCount
viewfunction getRoleMemberCount(bytes32 role) view returns (uint256)
hasRole
viewfunction hasRole(bytes32 role, address account) view returns (bool)
INCREMENT_TOTAL_ROLE
viewfunction INCREMENT_TOTAL_ROLE() view returns (bytes32)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
grantRole
nonpayablefunction grantRole(bytes32 role, address account)
increment
nonpayablefunction increment(address buyer, string account, uint256 purchase)
overwrite
nonpayablefunction overwrite(address buyer, uint256 total)
overwrite
nonpayablefunction overwrite(string account, uint256 total)
renounceRole
nonpayablefunction renounceRole(bytes32 role, address account)
revokeRole
nonpayablefunction revokeRole(bytes32 role, address account)
setApproved
nonpayablefunction setApproved(address buyer, bool approved)
setApproved
nonpayablefunction setApproved(string account, bool approved)
events
AccountApprovalSet
event AccountApprovalSet(string account, bool approved)
AccountTotalSet
event AccountTotalSet(string account, uint256 total)
BuyerApprovalSet
event BuyerApprovalSet(address indexed buyer, bool approved)
BuyerTotalSet
event BuyerTotalSet(address indexed buyer, uint256 total)
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)
TotalIncremented
event TotalIncremented(address indexed buyer, string account, uint256 purchase)
errors
No errors.
creation bytecode
0x608060405234801561001057600080fd5b5061001c600033610021565b610154565b61002b8282610048565b600082815260016020526040902061004390826100e7565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166100e3576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556100a23390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006100fc836001600160a01b038416610105565b90505b92915050565b600081815260018301602052604081205461014c575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556100ff565b5060006100ff565b611439806101636000396000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c806391d14854116100cd578063b06c0c0111610081578063ca15c87311610066578063ca15c873146103f4578063d547741f14610407578063ed0051e61461041a57600080fd5b8063b06c0c01146103ba578063c3034d6c146103e157600080fd5b8063a217fddf116100b2578063a217fddf1461038c578063a72ae0fa14610394578063ae55c888146103a757600080fd5b806391d148541461032b57806397a993aa1461036257600080fd5b806336568abe116101245780634245962b116101095780634245962b146102c657806384cfb680146102ed5780639010d07c1461030057600080fd5b806336568abe1461023c57806338266b221461024f57600080fd5b80632f2ff15d116101555780632f2ff15d146101ca57806330390414146101df5780633144564b1461022957600080fd5b806301ffc9a714610171578063248a9ca314610199575b600080fd5b61018461017f366004610e92565b61042d565b60405190151581526020015b60405180910390f35b6101bc6101a7366004610ebc565b60009081526020819052604090206001015490565b604051908152602001610190565b6101dd6101d8366004610ef1565b610471565b005b6102146101ed366004610f33565b80516020818301810180516003825292820191909301209152805460019091015460ff1682565b60408051928352901515602083015201610190565b6101dd610237366004610fec565b61049b565b6101dd61024a366004610ef1565b610500565b6102a961025d366004611016565b6040805180820190915260008082526020820152506001600160a01b03166000908152600260209081526040918290208251808401909352805483526001015460ff1615159082015290565b604080518251815260209283015115159281019290925201610190565b6101bc7f408a36151f841709116a4e8aca4e0202874f7f54687dcb863b1ea4672dc9d8cf81565b6101dd6102fb366004611041565b610591565b61031361030e36600461106b565b610616565b6040516001600160a01b039091168152602001610190565b610184610339366004610ef1565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b610214610370366004611016565b6002602052600090815260409020805460019091015460ff1682565b6101bc600081565b6101dd6103a23660046110d6565b610635565b6102a96103b5366004611130565b610714565b6101bc7f47dfadf7158223a95bb1182ccfe3c1806b50c7b5a2beffea23b0651ee19c76f281565b6101dd6103ef366004611172565b61076d565b6101bc610402366004610ebc565b61080d565b6101dd610415366004610ef1565b610824565b6101dd6104283660046111c6565b610849565b60006001600160e01b031982167f5a05180f00000000000000000000000000000000000000000000000000000000148061046b575061046b826108ab565b92915050565b60008281526020819052604090206001015461048c81610912565b610496838361091f565b505050565b60006104a681610912565b6001600160a01b03831660008181526002602052604090819020849055517f7df48d533524a6c0dac1e24b05a2426679b39e618e03e78a7eb0a1ecf7d42a20906104f39085815260200190565b60405180910390a2505050565b6001600160a01b03811633146105835760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b61058d8282610941565b5050565b7f408a36151f841709116a4e8aca4e0202874f7f54687dcb863b1ea4672dc9d8cf6105bb81610912565b6001600160a01b038316600081815260026020908152604091829020600101805460ff191686151590811790915591519182527fba406d61be81f5c27e298ab460b935c3fe1715ff6284d18fda894b1af0fe7ac091016104f3565b600082815260016020526040812061062e9083610963565b9392505050565b7f47dfadf7158223a95bb1182ccfe3c1806b50c7b5a2beffea23b0651ee19c76f261065f81610912565b6001600160a01b03851660009081526002602052604081208054849290610687908490611228565b9250508190555081600385856040516106a192919061123b565b908152602001604051809103902060000160008282546106c19190611228565b92505081905550846001600160a01b03167fd7a3a0d2d306fd0b2f19fea51808b78bbf4461698f158c6c7d746447bb293d7785858560405161070593929190611274565b60405180910390a25050505050565b60408051808201909152600080825260208201526003838360405161073a92919061123b565b9081526040805191829003602090810183208383019092528154835260019091015460ff16151590820152905092915050565b7f408a36151f841709116a4e8aca4e0202874f7f54687dcb863b1ea4672dc9d8cf61079781610912565b81600385856040516107aa92919061123b565b908152604051908190036020018120600101805492151560ff19909316929092179091557f69c97e0eb5c1e48a8e511aa1d615b5eec6771a306f07335c491258efd40ad809906107ff90869086908690611298565b60405180910390a150505050565b600081815260016020526040812061046b9061096f565b60008281526020819052604090206001015461083f81610912565b6104968383610941565b600061085481610912565b816003858560405161086792919061123b565b908152604051908190036020018120919091557f537af964ea4b270b2d9ca273938db397e991e340e25c4dfd743c36c1d092857f906107ff90869086908690611274565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061046b57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461046b565b61091c8133610979565b50565b61092982826109ec565b60008281526001602052604090206104969082610a8a565b61094b8282610a9f565b60008281526001602052604090206104969082610b1e565b600061062e8383610b33565b600061046b825490565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661058d576109aa81610b5d565b6109b5836020610b6f565b6040516020016109c69291906112e2565b60408051601f198184030181529082905262461bcd60e51b825261057a91600401611363565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661058d576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610a463390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061062e836001600160a01b038416610d50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff161561058d576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061062e836001600160a01b038416610d9f565b6000826000018281548110610b4a57610b4a611396565b9060005260206000200154905092915050565b606061046b6001600160a01b03831660145b60606000610b7e8360026113ac565b610b89906002611228565b67ffffffffffffffff811115610ba157610ba1610f1d565b6040519080825280601f01601f191660200182016040528015610bcb576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110610c0257610c02611396565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110610c4d57610c4d611396565b60200101906001600160f81b031916908160001a9053506000610c718460026113ac565b610c7c906001611228565b90505b6001811115610d01577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110610cbd57610cbd611396565b1a60f81b828281518110610cd357610cd3611396565b60200101906001600160f81b031916908160001a90535060049490941c93610cfa816113c3565b9050610c7f565b50831561062e5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161057a565b6000818152600183016020526040812054610d975750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561046b565b50600061046b565b60008181526001830160205260408120548015610e88576000610dc36001836113da565b8554909150600090610dd7906001906113da565b9050818114610e3c576000866000018281548110610df757610df7611396565b9060005260206000200154905080876000018481548110610e1a57610e1a611396565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610e4d57610e4d6113ed565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061046b565b600091505061046b565b600060208284031215610ea457600080fd5b81356001600160e01b03198116811461062e57600080fd5b600060208284031215610ece57600080fd5b5035919050565b80356001600160a01b0381168114610eec57600080fd5b919050565b60008060408385031215610f0457600080fd5b82359150610f1460208401610ed5565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600060208284031215610f4557600080fd5b813567ffffffffffffffff811115610f5c57600080fd5b8201601f81018413610f6d57600080fd5b803567ffffffffffffffff811115610f8757610f87610f1d565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610fb657610fb6610f1d565b604052818152828201602001861015610fce57600080fd5b81602084016020830137600091810160200191909152949350505050565b60008060408385031215610fff57600080fd5b61100883610ed5565b946020939093013593505050565b60006020828403121561102857600080fd5b61062e82610ed5565b80358015158114610eec57600080fd5b6000806040838503121561105457600080fd5b61105d83610ed5565b9150610f1460208401611031565b6000806040838503121561107e57600080fd5b50508035926020909101359150565b60008083601f84011261109f57600080fd5b50813567ffffffffffffffff8111156110b757600080fd5b6020830191508360208285010111156110cf57600080fd5b9250929050565b600080600080606085870312156110ec57600080fd5b6110f585610ed5565b9350602085013567ffffffffffffffff81111561111157600080fd5b61111d8782880161108d565b9598909750949560400135949350505050565b6000806020838503121561114357600080fd5b823567ffffffffffffffff81111561115a57600080fd5b6111668582860161108d565b90969095509350505050565b60008060006040848603121561118757600080fd5b833567ffffffffffffffff81111561119e57600080fd5b6111aa8682870161108d565b90945092506111bd905060208501611031565b90509250925092565b6000806000604084860312156111db57600080fd5b833567ffffffffffffffff8111156111f257600080fd5b6111fe8682870161108d565b909790965060209590950135949350505050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561046b5761046b611212565b8183823760009101908152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152600061128860408301858761124b565b9050826020830152949350505050565b6040815260006112ac60408301858761124b565b90508215156020830152949350505050565b60005b838110156112d95781810151838201526020016112c1565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161131a8160178501602088016112be565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516113578160288401602088016112be565b01602801949350505050565b60208152600082518060208401526113828160408501602087016112be565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761046b5761046b611212565b6000816113d2576113d2611212565b506000190190565b8181038181111561046b5761046b611212565b634e487b7160e01b600052603160045260246000fdfea26469706673582212204013dfae79cb5a8c508d70f43afe5a1db8c33b7cfc09da1a28792f44bee4883864736f6c634300081c0033