0 txs
11 calls
constructor
constructor()
functions
DEFAULT_PROTOCOL_REWARD_BPS
viewfunction DEFAULT_PROTOCOL_REWARD_BPS() view returns (uint256)
getRoyaltyInfoWithCap
viewfunction getRoyaltyInfoWithCap(address collection, uint256 tokenId, uint256 amountInWei) view returns (address creator, uint256 royaltyAmount)
MAX_BPS
viewfunction MAX_BPS() view returns (uint256)
MAX_PROTOCOL_REWARD_BPS
viewfunction MAX_PROTOCOL_REWARD_BPS() view returns (uint256)
MAX_ROYALTY_BPS
viewfunction MAX_ROYALTY_BPS() view returns (uint256)
nextOfferId
viewfunction nextOfferId() view returns (uint256)
offers
viewfunction offers(uint256) view returns (uint256 offerId, address payer, address collection, uint256 tokenId, uint256 amount, uint256 priceInWei, uint256 expiresAt, address tokenRecipient, bool accepted)
owner
viewfunction owner() view returns (address)
pendingOwner
viewfunction pendingOwner() view returns (address)
protocolRewardBps
viewfunction protocolRewardBps() view returns (uint256)
proxiableUUID
viewfunction proxiableUUID() view returns (bytes32)
SEND_VALUE_GAS_LIMIT_MULTIPLE_RECIPIENTS
viewfunction SEND_VALUE_GAS_LIMIT_MULTIPLE_RECIPIENTS() view returns (uint256)
SEND_VALUE_GAS_LIMIT_SINGLE_RECIPIENT
viewfunction SEND_VALUE_GAS_LIMIT_SINGLE_RECIPIENT() view returns (uint256)
treasury
viewfunction treasury() view returns (address)
UPGRADE_INTERFACE_VERSION
viewfunction UPGRADE_INTERFACE_VERSION() view returns (string)
validateOfferWithId
viewfunction validateOfferWithId(uint256 offerId, uint256 tokenId, address seller) view returns (uint8)
weth
viewfunction weth() view returns (address)
acceptOffer
nonpayablefunction acceptOffer(uint256 offerId, uint256 tokenId, address paymentRecipient)
acceptOwnership
nonpayablefunction acceptOwnership()
createOffer
payablefunction createOffer(address collection, uint256 tokenId, uint256 amount, uint256 priceInWei, uint256 expiresAt, address tokenRecipient) payable returns (uint256 offerId)
initialize
nonpayablefunction initialize(address _admin, address _weth, address _treasury)
ownerSetProtocolRewardBps
nonpayablefunction ownerSetProtocolRewardBps(uint256 _protocolRewardBps)
ownerSetTreasury
nonpayablefunction ownerSetTreasury(address _treasury)
ownerWithdrawETH
nonpayablefunction ownerWithdrawETH(address to, uint256 amount)
renounceOwnership
nonpayablefunction renounceOwnership()
transferOwnership
nonpayablefunction transferOwnership(address newOwner)
upgradeToAndCall
payablefunction upgradeToAndCall(address newImplementation, bytes data) payable
events
ETHWithdrawn
event ETHWithdrawn(address indexed owner, address indexed to, uint256 amount)
ETHWithdrawnToWETH
event ETHWithdrawnToWETH(address indexed user, uint256 amount)
Initialized
event Initialized(uint64 version)
OfferAccepted
event OfferAccepted(address indexed acceptor, uint256 indexed offerId, uint256 indexed tokenId, address paymentRecipient, address tokenRecipient, address payer)
OfferCreated
event OfferCreated(address indexed payer, address indexed collection, uint256 tokenId, uint256 amount, uint256 priceInWei, uint256 expiresAt, address tokenRecipient, uint256 indexed offerId)
OfferPaymentsSent
event OfferPaymentsSent(uint256 indexed offerId, address protocolRewardRecipient, uint256 protocolRewardAmount, address royaltyRecipient, uint256 royaltyAmount, address paymentRecipient, uint256 paymentAmount)
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
OwnershipTransferStarted
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner)
ProtocolRewardBpsSet
event ProtocolRewardBpsSet(address indexed owner, uint256 protocolRewardBps)
TreasurySet
event TreasurySet(address indexed owner, address treasury)
Upgraded
event Upgraded(address indexed implementation)
errors
AddressEmptyCode
error AddressEmptyCode(address target)
ERC1967InvalidImplementation
error ERC1967InvalidImplementation(address implementation)
ERC1967NonPayable
error ERC1967NonPayable()
FailedCall
error FailedCall()
InvalidInitialization
error InvalidInitialization()
InvalidProtocolRewardBps
error InvalidProtocolRewardBps(uint256 protocolRewardBps)
NotInitializing
error NotInitializing()
OfferAcceptAlreadyAccepted
error OfferAcceptAlreadyAccepted(uint256 offerId)
OfferAcceptExpired
error OfferAcceptExpired(uint256 offerId, uint256 expiresAt, uint256 currentTime)
OfferAcceptIdNotValid
error OfferAcceptIdNotValid(uint256 offerId)
OfferAcceptNotFromOwner
error OfferAcceptNotFromOwner(uint256 offerId, address offerAcceptor)
OfferAcceptTokenIdMismatched
error OfferAcceptTokenIdMismatched(uint256 offerId, address collection, uint256 offerTokenId, uint256 acceptTokenId)
OfferAcceptWETHTransferFailed
error OfferAcceptWETHTransferFailed(uint256 offerId, address from, address to, uint256 amount)
OwnableInvalidOwner
error OwnableInvalidOwner(address owner)
OwnableUnauthorizedAccount
error OwnableUnauthorizedAccount(address account)
UUPSUnauthorizedCallContext
error UUPSUnauthorizedCallContext()
UUPSUnsupportedProxiableUUID
error UUPSUnsupportedProxiableUUID(bytes32 slot)
creation bytecode
0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d4565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100725760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d15780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051611e386100fd600039600081816112d80152818161130101526114420152611e386000f3fe6080604052600436106101a05760003560e01c806367836c38116100ec578063b40ad8da1161008a578063e30c397811610064578063e30c39781461051c578063f2fde38b14610531578063f7a9b40e14610551578063fd967f471461056857600080fd5b8063b40ad8da146104e7578063b47db76114610252578063c0c53b8b146104fc57600080fd5b80638a72ea6a116100c65780638a72ea6a146103b35780638da5cb5b1461048157806393307c4b14610496578063ad3cb1cc146104a957600080fd5b806367836c3814610373578063715018a61461038957806379ba50971461039e57600080fd5b80634f1ef286116101595780635e4db5a1116101335780635e4db5a1146102ee5780635f5d06551461030e5780635fb017851461032557806361d027b31461035257600080fd5b80634f1ef286146102af57806352d1902d146102c25780635ccb1390146102d757600080fd5b806303ab56ac146101ac57806307ae6a5d146101ce5780632e01b8a3146101ee57806331375242146102325780633dca40e6146102525780633fc8cef31461027657600080fd5b366101a757005b600080fd5b3480156101b857600080fd5b506101cc6101c73660046119e8565b61057e565b005b3480156101da57600080fd5b506101cc6101e9366004611a16565b6105f0565b3480156101fa57600080fd5b5061020e610209366004611a4f565b6107da565b604080516001600160a01b0390931683526020830191909152015b60405180910390f35b34801561023e57600080fd5b506101cc61024d366004611a84565b610897565b34801561025e57600080fd5b5061026861138881565b604051908152602001610229565b34801561028257600080fd5b506103e854610297906001600160a01b031681565b6040516001600160a01b039091168152602001610229565b6101cc6102bd366004611ab7565b6108f0565b3480156102ce57600080fd5b5061026861090f565b3480156102e357600080fd5b506102686203345081565b3480156102fa57600080fd5b506101cc610309366004611b83565b61092c565b34801561031a57600080fd5b506102686103ea5481565b34801561033157600080fd5b50610345610340366004611a16565b610996565b6040516102299190611bc5565b34801561035e57600080fd5b506103e954610297906001600160a01b031681565b34801561037f57600080fd5b50610268614e2081565b34801561039557600080fd5b506101cc610a37565b3480156103aa57600080fd5b506101cc610a4b565b3480156103bf57600080fd5b5061042d6103ce3660046119e8565b6103eb602052600090815260409020805460018201546002830154600384015460048501546005860154600687015460079097015495966001600160a01b0395861696948616959394929391929091811690600160a01b900460ff1689565b60408051998a526001600160a01b0398891660208b0152968816968901969096526060880194909452608087019290925260a086015260c085015290911660e0830152151561010082015261012001610229565b34801561048d57600080fd5b50610297610a93565b6102686104a4366004611bed565b610ac8565b3480156104b557600080fd5b506104da604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516102299190611c6f565b3480156104f357600080fd5b5061026860fa81565b34801561050857600080fd5b506101cc610517366004611ca2565b610d08565b34801561052857600080fd5b50610297610e58565b34801561053d57600080fd5b506101cc61054c366004611a84565b610e81565b34801561055d57600080fd5b506102686103e75481565b34801561057457600080fd5b5061026861271081565b610586610f06565b6113888111156105b15760405163998dc1b560e01b8152600481018290526024015b60405180910390fd5b6103e781905560405181815233907f61143574fbcb9f5bdb303e42eb4fb569e32f40d192cac50f82c5dcb60ca7d8f4906020015b60405180910390a250565b60008381526103eb60209081526040808320815161012081018352815480825260018301546001600160a01b039081169583019590955260028301548516938201939093526003820154606082015260048201546080820152600582015460a0820152600682015460c082015260079091015492831660e0820152600160a01b90920460ff1615156101008301529091036106a157604051635215e02960e11b8152600481018590526024016105a8565b6106ab8184610f38565b60008481526103eb6020526040808220600701805460ff60a01b1916600160a01b1790558281015160e084015160808501519251637921219560e11b81523360048201526001600160a01b03918216602482015260448101889052606481019390935260a0608484015260a48301939093529182169063f242432a9060c401600060405180830381600087803b15801561074457600080fd5b505af1158015610758573d6000803e3d6000fd5b505050506107668284611066565b8385336001600160a01b03167f2dc2e57214af402f4196774f1e428d8453075ed9f1d2dc37892f1673bd06cb51868660e0015187602001516040516107cb939291906001600160a01b0393841681529183166020830152909116604082015260600190565b60405180910390a45050505050565b60405163152a902d60e11b8152600481018390526024810182905260009081906001600160a01b03861690632a55205a906044016040805180830381865afa925050508015610846575060408051601f3d908101601f1916820190925261084391810190611ce2565b60015b6108555750600090508061088f565b81935060006127106113888761086b9190611d26565b6108759190611d3d565b9050808211156108875780935061088b565b8193505b5050505b935093915050565b61089f610f06565b6103e980546001600160a01b0319166001600160a01b03831690811790915560405190815233907f21eb548722a564f6e09f039f7aa858ae94c911910f3823b37af2250eeca4f403906020016105e5565b6108f86112cd565b61090182611372565b61090b828261137a565b5050565b6000610919611437565b50600080516020611de383398151915290565b610934610f06565b6103e8546109529083908390614e20906001600160a01b0316611480565b6040518181526001600160a01b0383169033907fc81b1761d304f16ef2aeae3a8611d9bd1d618adfff67d5157365cfb1251395329060200160405180910390a35050565b60008381526103eb602090815260408083208151610120810183528154815260018201546001600160a01b039081169482019490945260028201548416928101929092526003810154606083015260048101546080830152600581015460a0830152600681015460c08301526007015491821660e0820152600160a01b90910460ff161515610100820152610a2c8185856115ff565b9150505b9392505050565b610a3f610f06565b610a4960006116dc565b565b3380610a55610e58565b6001600160a01b031614610a875760405163118cdaa760e01b81526001600160a01b03821660048201526024016105a8565b610a90816116dc565b50565b6000807f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005b546001600160a01b031692915050565b6103ea5460408051610120810182528281523360208083018281526001600160a01b038c8116858701818152606087018e8152608088018e815260a089018e815260c08a018e81528d871660e08c0190815260006101008d018181528f82526103eb909b528d90209b518c55975160018c0180549189166001600160a01b0319928316179055945160028c0180549189169190961617909455915160038a015551600489015551600588015551600687015591516007909501805493511515600160a01b026001600160a81b031990941695909116949094179190911790925591518392907fb52d03f658f2b5770408afe451ccdb703fdb28e6503e00c938eb24e5a55159f490610c09908b908b908b908b908b909485526020850193909352604084019190915260608301526001600160a01b0316608082015260a00190565b60405180910390a46103ea8054906000610c2283611d5f565b90915550506103e85460408051630d0e30db60e41b815290516001600160a01b0390921691829163d0e30db091349160048082019260009290919082900301818588803b158015610c7257600080fd5b505af1158015610c86573d6000803e3d6000fd5b505060405163a9059cbb60e01b81523360048201523460248201526001600160a01b038516935063a9059cbb925060440190506020604051808303816000875af1158015610cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfc9190611d78565b50509695505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff16600081158015610d4e5750825b905060008267ffffffffffffffff166001148015610d6b5750303b155b905081158015610d79575080155b15610d975760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610dc157845460ff60401b1916600160401b1785555b610dca88611714565b60fa6103e7556103e880546001600160a01b03808a166001600160a01b0319928316179092556103e980549289169290911691909117905560016103ea558315610e4e57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b6000807f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c00610ab8565b610e89610f06565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b0319166001600160a01b0383169081178255610ecd610a93565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a35050565b33610f0f610a93565b6001600160a01b031614610a495760405163118cdaa760e01b81523360048201526024016105a8565b6000610f458383336115ff565b90506001816004811115610f5b57610f5b611baf565b03610f7f578251604051634f341c8960e11b815260048101919091526024016105a8565b6002816004811115610f9357610f93611baf565b03610fc757825160c084015160405163105fa94d60e01b8152600481019290925260248201524260448201526064016105a8565b6003816004811115610fdb57610fdb611baf565b036110235782516040808501516060860151915163abd98b9d60e01b815260048101939093526001600160a01b031660248301526044820152606481018390526084016105a8565b600481600481111561103757611037611baf565b03611061578251604051639dac6cfd60e01b815260048101919091523360248201526044016105a8565b505050565b600082608001518360a0015161107c9190611d26565b905060006127106103e754836110929190611d26565b61109c9190611d3d565b90506000806110b486604001518760600151866107da565b90925090506000816110c68587611d9a565b6110d09190611d9a565b6103e85460208901516040516323b872dd60e01b81526001600160a01b039182166004820152306024820152604481018990529293506000929116906323b872dd906064016020604051808303816000875af1158015611134573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111589190611d78565b90508061119e57875160208901516040516316af99ef60e21b815260048101929092526001600160a01b03166024820152306044820152606481018790526084016105a8565b6103e854604051632e1a7d4d60e01b8152600481018890526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b1580156111e557600080fd5b505af11580156111f9573d6000803e3d6000fd5b50506103e9546103e85461122193506001600160a01b0391821692508891614e209116611480565b6103e85461123f9085908590614e20906001600160a01b0316611480565b6103e85461125d9088908490614e20906001600160a01b0316611480565b87516103e954604080516001600160a01b039283168152602081018990528783168183015260608101879052918a16608083015260a08201859052517f13301ac831290e440725ce63600763944fd412bab740a7fb7928786c67224e5a9181900360c00190a25050505050505050565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148061135457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316611348600080516020611de3833981519152546001600160a01b031690565b6001600160a01b031614155b15610a495760405163703e46dd60e11b815260040160405180910390fd5b610a90610f06565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156113d4575060408051601f3d908101601f191682019092526113d191810190611dad565b60015b6113fc57604051634c9c8ce360e01b81526001600160a01b03831660048201526024016105a8565b600080516020611de3833981519152811461142d57604051632a87526960e21b8152600481018290526024016105a8565b6110618383611725565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610a495760405163703e46dd60e11b815260040160405180910390fd5b82156115f9576000846001600160a01b0316848490604051600060405180830381858888f193505050503d80600081146114d6576040519150601f19603f3d011682016040523d82523d6000602084013e6114db565b606091505b50509050806115f757846001600160a01b03167f2823e3637ea8509e3c8d2952daf226923faff0c5aace787abc93c00cb094a11b8560405161151f91815260200190565b60405180910390a26000829050806001600160a01b031663d0e30db0866040518263ffffffff1660e01b81526004016000604051808303818588803b15801561156757600080fd5b505af115801561157b573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038a81166004830152602482018a90528516935063a9059cbb925060440190506020604051808303816000875af11580156115d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f49190611d78565b50505b505b50505050565b60008361010001511561161457506001610a30565b8360c0015142111561162857506002610a30565b8284606001511415801561163f5750606084015115155b1561164c57506003610a30565b6040848101519051627eeac760e11b81526001600160a01b0384811660048301526024820186905282169062fdd58e90604401602060405180830381865afa15801561169c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116c09190611dad565b6000036116d1576004915050610a30565b506000949350505050565b7f237e158222e3e6968b72b9db0d8043aacf074ad9f650f0d1606b4d82ee432c0080546001600160a01b031916815561090b8261177b565b61171c6117ec565b610a9081611835565b61172e82611867565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a28051156117735761106182826118cc565b61090b611944565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff16610a4957604051631afcd79f60e31b815260040160405180910390fd5b61183d6117ec565b6001600160a01b038116610a8757604051631e4fbdf760e01b8152600060048201526024016105a8565b806001600160a01b03163b60000361189d57604051634c9c8ce360e01b81526001600160a01b03821660048201526024016105a8565b600080516020611de383398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b0316846040516118e99190611dc6565b600060405180830381855af49150503d8060008114611924576040519150601f19603f3d011682016040523d82523d6000602084013e611929565b606091505b5091509150611939858383611963565b925050505b92915050565b3415610a495760405163b398979f60e01b815260040160405180910390fd5b60608261197857611973826119bf565b610a30565b815115801561198f57506001600160a01b0384163b155b156119b857604051639996b31560e01b81526001600160a01b03851660048201526024016105a8565b5080610a30565b8051156119cf5780518082602001fd5b60405163d6bda27560e01b815260040160405180910390fd5b6000602082840312156119fa57600080fd5b5035919050565b6001600160a01b0381168114610a9057600080fd5b600080600060608486031215611a2b57600080fd5b83359250602084013591506040840135611a4481611a01565b809150509250925092565b600080600060608486031215611a6457600080fd5b8335611a6f81611a01565b95602085013595506040909401359392505050565b600060208284031215611a9657600080fd5b8135610a3081611a01565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611aca57600080fd5b8235611ad581611a01565b9150602083013567ffffffffffffffff811115611af157600080fd5b8301601f81018513611b0257600080fd5b803567ffffffffffffffff811115611b1c57611b1c611aa1565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715611b4b57611b4b611aa1565b604052818152828201602001871015611b6357600080fd5b816020840160208301376000602083830101528093505050509250929050565b60008060408385031215611b9657600080fd5b8235611ba181611a01565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b6020810160058310611be757634e487b7160e01b600052602160045260246000fd5b91905290565b60008060008060008060c08789031215611c0657600080fd5b8635611c1181611a01565b95506020870135945060408701359350606087013592506080870135915060a0870135611c3d81611a01565b809150509295509295509295565b60005b83811015611c66578181015183820152602001611c4e565b50506000910152565b6020815260008251806020840152611c8e816040850160208701611c4b565b601f01601f19169190910160400192915050565b600080600060608486031215611cb757600080fd5b8335611cc281611a01565b92506020840135611cd281611a01565b91506040840135611a4481611a01565b60008060408385031215611cf557600080fd5b8251611d0081611a01565b6020939093015192949293505050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761193e5761193e611d10565b600082611d5a57634e487b7160e01b600052601260045260246000fd5b500490565b600060018201611d7157611d71611d10565b5060010190565b600060208284031215611d8a57600080fd5b81518015158114610a3057600080fd5b8181038181111561193e5761193e611d10565b600060208284031215611dbf57600080fd5b5051919050565b60008251611dd8818460208701611c4b565b919091019291505056fe360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca2646970667358221220322af2214b3ddb486c4b7492510fb3f50f6db9297c60a9d7ba8f19ecd72edd4664736f6c634300081a0033