1 tx
24 calls
constructor
constructor(address productsModuleAddress_)
functions
isPurchaseAllowed
viewfunction isPurchaseAllowed(uint256, uint256, address, uint256, bytes, bytes) view returns (bool)
productPrice
viewfunction productPrice(uint256 slicerId, uint256 productId, address, uint256 quantity, address buyer, bytes) view returns (uint256 ethPrice, uint256 currencyPrice)
productsModuleAddress
viewfunction productsModuleAddress() view returns (address)
totalPurchases
viewfunction totalPurchases(address buyer, uint256 slicerId) view returns (uint256 purchases)
usdcPrices
viewfunction usdcPrices(uint256 slicerId, uint256 productId) view returns (uint256 usdcPrice, address token, uint88 tokenId, uint8 tokenType, address mintToken, uint96 mintTokenId)
onProductPurchase
payablefunction onProductPurchase(uint256 slicerId, uint256 productId, address buyer, uint256 quantity, bytes, bytes) payable
setProduct
nonpayablefunction setProduct(uint256 slicerId, uint256 productId, uint256 usdcPrice, address tokenDiscount, uint88 tokenDiscountId, uint8 tokenDiscountType, address mintToken, uint88 mintTokenId)
events
No events.
errors
NotAllowed
error NotAllowed()
NotProductOwner
error NotProductOwner()
NotPurchase
error NotPurchase()
NotSuccessful
error NotSuccessful()
WrongSlicer
error WrongSlicer()
creation bytecode
0x60a060405234801561001057600080fd5b50604051610d0c380380610d0c83398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051610c73610099600039600081816101ca0152818161026801526104170152610c736000f3fe6080604052600436106100705760003560e01c806395db93681161004e57806395db93681461016e578063a23fffb9146101a5578063d12ebada146101b8578063d7a3d0c81461020457600080fd5b8063252252f3146100755780634d953a36146100c05780637b9e27e8146100e2575b600080fd5b34801561008157600080fd5b506100ad610090366004610893565b600360209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b3480156100cc57600080fd5b506100e06100db3660046108d4565b610239565b005b3480156100ee57600080fd5b5061015c6100fd36600461095c565b600260208181526000938452604080852090915291835291208054600182015491909201546001600160a01b0380831692600160a01b8082046001600160581b031693600160f81b90920460ff1692821691046001600160601b031686565b6040516100b796959493929190610994565b34801561017a57600080fd5b50610195610189366004610aa5565b60019695505050505050565b60405190151581526020016100b7565b6100e06101b3366004610aa5565b61040c565b3480156101c457600080fd5b506101ec7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b7565b34801561021057600080fd5b5061022461021f366004610b35565b6105e9565b604080519283526020830191909152016100b7565b604051631cdd250160e31b81526004810189905260248101889052336044820152889088906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e6e9280890606401602060405180830381865afa1580156102af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d39190610ba2565b6102f0576040516335cd3b6d60e01b815260040160405180910390fd5b6040518060c00160405280898152602001886001600160a01b03168152602001876001600160581b031681526020018660018111156103315761033161097e565b81526001600160a01b038087166020808401919091526001600160581b0380881660409485015260008f8152600283528481208f8252835284902085518155918501516001808401805496880151909316600160a01b026001600160f81b03199096169190941617939093178084556060850151919391926001600160f81b0390911690600160f81b9084908111156103cc576103cc61097e565b0217905550608082015160a0909201516001600160601b0316600160a01b026001600160a01b039092169190911760029091015550505050505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610455576040516347322d0360e01b815260040160405180910390fd5b6001600160a01b038416600090815260036020908152604080832089845290915281208054859290610488908490610be1565b909155505060008681526002602090815260408083208884528252808320815160c081018352815481526001808301546001600160a01b03811695830195909552600160a01b85046001600160581b0316938201939093529290916060840191600160f81b900460ff16908111156105025761050261097e565b60018111156105135761051361097e565b8152600291909101546001600160a01b038082166020840152600160a01b9091046001600160601b0316604090920191909152608082015191925016156105e05760808082015160a0830151604051631607e8a560e31b81526001600160a01b0389811660048301526001600160601b03909216602482015260448101939093526000608484015260648301879052169063b03f45289060a401600060405180830381600087803b1580156105c757600080fd5b505af11580156105db573d6000803e3d6000fd5b505050505b50505050505050565b60008681526002602090815260408083208884528252808320815160c081018352815481526001808301546001600160a01b03811695830195909552600160a01b85046001600160581b031693820193909352849384939192916060840191600160f81b900460ff16908111156106625761066261097e565b60018111156106735761067361097e565b8152600291909101546001600160a01b03808216602080850191909152600160a01b9092046001600160601b03166040909301929092528201519192501615806107d4576000826060015160018111156106cf576106cf61097e565b0361074d5760208201516040516370a0823160e01b81526001600160a01b038881166004830152909116906370a0823190602401602060405180830381865afa158015610720573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107449190610bfa565b151590506107d4565b60208201516040808401519051627eeac760e11b81526001600160a01b0389811660048301526001600160581b03909216602482015291169062fdd58e90604401602060405180830381865afa1580156107ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107cf9190610bfa565b151590505b8015610840576001600160a01b03861660009081526003602090815260408083208d84529091528120549003610840576000610811600189610c13565b60008c81526002602090815260408083208e84529091529020546108359190610c26565b93509350505061086c565b60008a81526002602090815260408083208c8452909152812054610865908990610c26565b9350935050505b965096945050505050565b80356001600160a01b038116811461088e57600080fd5b919050565b600080604083850312156108a657600080fd5b6108af83610877565b946020939093013593505050565b80356001600160581b038116811461088e57600080fd5b600080600080600080600080610100898b0312156108f157600080fd5b88359750602089013596506040890135955061090f60608a01610877565b945061091d60808a016108bd565b935060a08901356002811061093157600080fd5b925061093f60c08a01610877565b915061094d60e08a016108bd565b90509295985092959890939650565b6000806040838503121561096f57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b8681526001600160a01b0386811660208301526001600160581b038616604083015260c0820190600286106109d957634e487b7160e01b600052602160045260246000fd5b8560608401528085166080840152506001600160601b03831660a0830152979650505050505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610a2957600080fd5b813567ffffffffffffffff80821115610a4457610a44610a02565b604051601f8301601f19908116603f01168101908282118183101715610a6c57610a6c610a02565b81604052838152866020858801011115610a8557600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060c08789031215610abe57600080fd5b8635955060208701359450610ad560408801610877565b935060608701359250608087013567ffffffffffffffff80821115610af957600080fd5b610b058a838b01610a18565b935060a0890135915080821115610b1b57600080fd5b50610b2889828a01610a18565b9150509295509295509295565b60008060008060008060c08789031215610b4e57600080fd5b8635955060208701359450610b6560408801610877565b935060608701359250610b7a60808801610877565b915060a087013567ffffffffffffffff811115610b9657600080fd5b610b2889828a01610a18565b600060208284031215610bb457600080fd5b81518015158114610bc457600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610bf457610bf4610bcb565b92915050565b600060208284031215610c0c57600080fd5b5051919050565b81810381811115610bf457610bf4610bcb565b8082028115828204841417610bf457610bf4610bcb56fea26469706673582212207edfc16d26cad69b04f7492e58a07fa00073eff6c81a6d77eaa448f12ebfca8564736f6c63430008130033000000000000000000000000b9d5b99d5d0fa04dd7eb2b0cd7753317c2ea1a84