0 txs
1 call
constructor
constructor(address productsModuleAddress)
functions
configureProductSchema
purefunction configureProductSchema() pure returns (string)
configureProductTypeSchema
purefunction configureProductTypeSchema() pure returns (string)
configureSlicerSchema
purefunction configureSlicerSchema() pure returns (string)
discounts
viewfunction discounts(uint256 slicerId, uint256 productId, uint256 variantId, uint256) view returns (address nft, uint80 discount, uint8 minQuantity, uint8 nftType, uint256 tokenId)
productPrice
viewfunction productPrice(uint256 slicerId, uint256 productId, uint256 variantId, address, uint256 basePrice, uint256, address buyer, bytes) view returns (uint256)
productPriceSchema
purefunction productPriceSchema() pure returns (string)
PRODUCTS_MODULE
viewfunction PRODUCTS_MODULE() view returns (address)
productTypeDiscounts
viewfunction productTypeDiscounts(uint256 slicerId, uint256 productTypeId, uint256) view returns (address nft, uint80 discount, uint8 minQuantity, uint8 nftType, uint256 tokenId)
productTypePrice
viewfunction productTypePrice(uint256 slicerId, uint256 productTypeId, address, uint256 basePrice, uint256, address buyer, bytes) view returns (uint256)
productTypePriceSchema
purefunction productTypePriceSchema() pure returns (string)
slicerDiscounts
viewfunction slicerDiscounts(uint256 slicerId, uint256) view returns (address nft, uint80 discount, uint8 minQuantity, uint8 nftType, uint256 tokenId)
slicerProductPrice
viewfunction slicerProductPrice(uint256 slicerId, address, uint256 basePrice, uint256, address buyer, bytes) view returns (uint256)
slicerProductPriceSchema
purefunction slicerProductPriceSchema() pure returns (string)
supportsInterface
viewfunction supportsInterface(bytes4 interfaceId) view returns (bool)
configureProduct
nonpayablefunction configureProduct(uint256 slicerId, uint256 productId, uint256 variantId, bytes params)
configureProductType
nonpayablefunction configureProductType(uint256 slicerId, uint256 productTypeId, bytes params)
configureSlicer
nonpayablefunction configureSlicer(uint256 slicerId, bytes params)
events
ProductConfigured
event ProductConfigured(uint256 slicerId, uint256 productId, uint256 variantId, bytes params)
ProductTypeConfigured
event ProductTypeConfigured(uint256 slicerId, uint256 productTypeId, bytes params)
SlicerConfigured
event SlicerConfigured(uint256 slicerId, bytes params)
errors
DiscountsNotDescending
error DiscountsNotDescending((address nft, uint80 discount, uint8 minQuantity, uint8 nftType, uint256 tokenId) nft)
InvalidMinQuantity
error InvalidMinQuantity()
InvalidRelativeAmount
error InvalidRelativeAmount()
NotAuthorized
error NotAuthorized(bytes32 rolesMask)
WrongCurrency
error WrongCurrency()
creation bytecode
0x60a060405234801561000f575f5ffd5b50604051611ded380380611ded83398101604081905261002e9161003f565b6001600160a01b031660805261006c565b5f6020828403121561004f575f5ffd5b81516001600160a01b0381168114610065575f5ffd5b9392505050565b608051611d546100995f395f81816101f20152818161065c015281816108230152610bf60152611d545ff3fe608060405234801561000f575f5ffd5b5060043610610115575f3560e01c80635696cee5116100ad578063a50d0b511161007d578063c9ba6e6011610063578063c9ba6e601461024c578063f11f31511461025f578063f50ad4ca14610272575f5ffd5b8063a50d0b511461017f578063ae8de20314610239575f5ffd5b80635696cee51461017f5780635eef7a61146101d257806388391fa0146101da5780639203f233146101ed575f5ffd5b8063300d7ae2116100e8578063300d7ae21461017f5780633a12925e146101865780633ef216ec1461019b5780635571123b146101bf575f5ffd5b806301ffc9a7146101195780630c0c9349146101415780630caacfc714610156578063181fd18b14610177575b5f5ffd5b61012c6101273660046114aa565b610285565b60405190151581526020015b60405180910390f35b610149610499565b604051610138919061153c565b61016961016436600461169e565b6104a8565b604051908152602001610138565b6101496105fe565b6060610149565b61019961019436600461172b565b61061e565b005b6101ae6101a936600461176f565b61070f565b604051610138959493929190611804565b6101996101cd366004611859565b6107e5565b6101496108de565b6101ae6101e83660046118af565b6108e8565b6102147f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610138565b6101696102473660046118d8565b6109b4565b6101ae61025a366004611951565b610afa565b61019961026d366004611971565b610bb8565b6101696102803660046119bd565b610cad565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061031757507fffffffff0000000000000000000000000000000000000000000000000000000082167f5a3c012200000000000000000000000000000000000000000000000000000000145b8061036357507fffffffff0000000000000000000000000000000000000000000000000000000082167fc507ae2800000000000000000000000000000000000000000000000000000000145b806103af57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0b80e95200000000000000000000000000000000000000000000000000000000145b806103fb57507fffffffff0000000000000000000000000000000000000000000000000000000082167f4d6ec3b000000000000000000000000000000000000000000000000000000000145b8061044757507fffffffff0000000000000000000000000000000000000000000000000000000082167ffd13a21800000000000000000000000000000000000000000000000000000000145b8061049357507fffffffff0000000000000000000000000000000000000000000000000000000082167f64fde83f00000000000000000000000000000000000000000000000000000000145b92915050565b60606104a36105fe565b905090565b5f888152602081815260408083208a84528252808320898452825280832080548251818502810185019093528083528493849084015b828210156105df575f8481526020908190206040805160a08101825260028602909201805473ffffffffffffffffffffffffffffffffffffffff8116845269ffffffffffffffffffff740100000000000000000000000000000000000000008204169484019490945260ff7e010000000000000000000000000000000000000000000000000000000000008504811692840192909252919260608401917f01000000000000000000000000000000000000000000000000000000000000009091041660018111156105b1576105b161179e565b60018111156105c2576105c261179e565b8152602001600182015481525050815260200190600101906104de565b5050505090506105f0848783610dfc565b9a9950505050505050505050565b6060604051806080016040528060598152602001611cef60599139905090565b6040517f11b0738e00000000000000000000000000000000000000000000000000000000815260048101839052600a602482015233604482015282907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906311b0738e906064015f6040518083038186803b1580156106b1575f5ffd5b505afa1580156106c3573d5f5f3e3d5ffd5b505050506106d18383610e2a565b7f82627b5399a46cef83329229f216b477af0738aee946f9e1c4e64dcaccf093a38383604051610702929190611a40565b60405180910390a1505050565b5f602052835f5260405f20602052825f5260405f20602052815f5260405f20818154811061073b575f80fd5b5f9182526020909120600290910201805460019091015473ffffffffffffffffffffffffffffffffffffffff8216955069ffffffffffffffffffff74010000000000000000000000000000000000000000830416945060ff7e010000000000000000000000000000000000000000000000000000000000008304811694507f0100000000000000000000000000000000000000000000000000000000000000909204909116915085565b6040517f11b0738e00000000000000000000000000000000000000000000000000000000815260048101859052600a602482015233604482015284907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906311b0738e906064015f6040518083038186803b158015610878575f5ffd5b505afa15801561088a573d5f5f3e3d5ffd5b5050505061089a85858585610e5b565b7fcdd8470c81c12ef7fe2fe67ef79d13684d94ff2008417cba55fdd025de21ec18858585856040516108cf9493929190611a58565b60405180910390a15050505050565b60606104a36108de565b6001602052825f5260405f20602052815f5260405f20818154811061090b575f80fd5b5f9182526020909120600290910201805460019091015473ffffffffffffffffffffffffffffffffffffffff8216945069ffffffffffffffffffff74010000000000000000000000000000000000000000830416935060ff7e010000000000000000000000000000000000000000000000000000000000008304811693507f01000000000000000000000000000000000000000000000000000000000000009092049091169085565b5f86815260026020908152604080832080548251818502810185019093528083528493849084015b82821015610add575f8481526020908190206040805160a08101825260028602909201805473ffffffffffffffffffffffffffffffffffffffff8116845269ffffffffffffffffffff740100000000000000000000000000000000000000008204169484019490945260ff7e010000000000000000000000000000000000000000000000000000000000008504811692840192909252919260608401917f0100000000000000000000000000000000000000000000000000000000000000909104166001811115610aaf57610aaf61179e565b6001811115610ac057610ac061179e565b8152602001600182015481525050815260200190600101906109dc565b505050509050610aee848783610dfc565b98975050505050505050565b6002602052815f5260405f208181548110610b13575f80fd5b5f9182526020909120600290910201805460019091015473ffffffffffffffffffffffffffffffffffffffff8216935069ffffffffffffffffffff74010000000000000000000000000000000000000000830416925060ff7e0100000000000000000000000000000000000000000000000000000000000083048116927f01000000000000000000000000000000000000000000000000000000000000009004169085565b6040517f11b0738e00000000000000000000000000000000000000000000000000000000815260048101849052600a602482015233604482015283907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906311b0738e906064015f6040518083038186803b158015610c4b575f5ffd5b505afa158015610c5d573d5f5f3e3d5ffd5b50505050610c6c848484610eb0565b7f5e619a4dac7be52d754a2dff044d000e51d5e015461ec542a3b22b88d4323aa8848484604051610c9f93929190611a86565b60405180910390a150505050565b5f878152600160209081526040808320898452825280832080548251818502810185019093528083528493849084015b82821015610dde575f8481526020908190206040805160a08101825260028602909201805473ffffffffffffffffffffffffffffffffffffffff8116845269ffffffffffffffffffff740100000000000000000000000000000000000000008204169484019490945260ff7e010000000000000000000000000000000000000000000000000000000000008504811692840192909252919260608401917f0100000000000000000000000000000000000000000000000000000000000000909104166001811115610db057610db061179e565b6001811115610dc157610dc161179e565b815260200160018201548152505081526020019060010190610cdd565b505050509050610def848783610dfc565b9998505050505050505050565b5f5f610e088386610ef8565b9050805f03610e175783610e21565b610e218482611170565b95945050505050565b5f828152600260205260408120610e409161146b565b5f828152600260205260409020610e579082611194565b5050565b5f8481526020818152604080832086845282528083208584529091528120610e829161146b565b5f8481526020818152604080832086845282528083208584529091529020610eaa9082611194565b50505050565b5f8381526001602090815260408083208584529091528120610ed19161146b565b5f8381526001602090815260408083208584529091529020610ef39082611194565b505050565b81516040805160a0810182525f8082526020820181905291810182905260608101829052608081018290529091905f5f5f5f5b8581101561116257888181518110610f4557610f45611aa4565b60200260200101519450600180811115610f6157610f6161179e565b85606001516001811115610f7757610f7761179e565b0361105157845173ffffffffffffffffffffffffffffffffffffffff8581169116141580610fa9575084608001518314155b1561104c57845160808601516040517efdd58e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b81166004830152602482019290925291169062fdd58e90604401602060405180830381865afa158015611025573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110499190611ad1565b91505b611122565b5f856060015160018111156110685761106861179e565b0361112257845173ffffffffffffffffffffffffffffffffffffffff8581169116146111225784516040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152909116906370a0823190602401602060405180830381865afa1580156110fb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061111f9190611ad1565b91505b846040015160ff16821061114e57846020015169ffffffffffffffffffff169650505050505050610493565b845160808601519094509250600101610f2b565b505f98975050505050505050565b5f612710828103906111828286611ae8565b61118c9190611b24565b949350505050565b5f818060200190518101906111a99190611b6f565b6040805160a0810182525f808252602082018190529181018290526060810182905260808101829052919250905f5b8351811015611463578381815181106111f3576111f3611aa4565b60200260200101519150612710826020015169ffffffffffffffffffff161115611249576040517ff36c960200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816040015160ff165f03611289576040517fe4c236aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156112e45782826020015169ffffffffffffffffffff1611156112e457816040517f441e389c0000000000000000000000000000000000000000000000000000000081526004016112db9190611c89565b60405180910390fd5b60208083018051885460018181018b555f8b815294909420865160029092020180549351604088015160ff167e01000000000000000000000000000000000000000000000000000000000000027fff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff69ffffffffffffffffffff92831674010000000000000000000000000000000000000000027fffff00000000000000000000000000000000000000000000000000000000000090971673ffffffffffffffffffffffffffffffffffffffff9095169490941795909517928316851782556060880151931697508694909384927effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9091167dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911617907f010000000000000000000000000000000000000000000000000000000000000090849081111561144b5761144b61179e565b021790555060809190910151600191820155016111d8565b505050505050565b5080545f8255600202905f5260205f2090810190611489919061148c565b50565b5b808211156114a6575f808255600182015560020161148d565b5090565b5f602082840312156114ba575f5ffd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146114e9575f5ffd5b9392505050565b5f81518084528060208401602086015e5f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f6114e960208301846114f0565b73ffffffffffffffffffffffffffffffffffffffff81168114611489575f5ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60405160a0810167ffffffffffffffff811182821017156115bf576115bf61156f565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561160c5761160c61156f565b604052919050565b5f82601f830112611623575f5ffd5b813567ffffffffffffffff81111561163d5761163d61156f565b61166e60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016115c5565b818152846020838601011115611682575f5ffd5b816020850160208301375f918101602001919091529392505050565b5f5f5f5f5f5f5f5f610100898b0312156116b6575f5ffd5b88359750602089013596506040890135955060608901356116d68161154e565b94506080890135935060a0890135925060c08901356116f48161154e565b915060e089013567ffffffffffffffff81111561170f575f5ffd5b61171b8b828c01611614565b9150509295985092959890939650565b5f5f6040838503121561173c575f5ffd5b82359150602083013567ffffffffffffffff811115611759575f5ffd5b61176585828601611614565b9150509250929050565b5f5f5f5f60808587031215611782575f5ffd5b5050823594602084013594506040840135936060013592509050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60028110611800577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b9052565b73ffffffffffffffffffffffffffffffffffffffff8616815269ffffffffffffffffffff8516602082015260ff8416604082015260a0810161184960608301856117cb565b8260808301529695505050505050565b5f5f5f5f6080858703121561186c575f5ffd5b843593506020850135925060408501359150606085013567ffffffffffffffff811115611897575f5ffd5b6118a387828801611614565b91505092959194509250565b5f5f5f606084860312156118c1575f5ffd5b505081359360208301359350604090920135919050565b5f5f5f5f5f5f60c087890312156118ed575f5ffd5b8635955060208701356118ff8161154e565b94506040870135935060608701359250608087013561191d8161154e565b915060a087013567ffffffffffffffff811115611938575f5ffd5b61194489828a01611614565b9150509295509295509295565b5f5f60408385031215611962575f5ffd5b50508035926020909101359150565b5f5f5f60608486031215611983575f5ffd5b8335925060208401359150604084013567ffffffffffffffff8111156119a7575f5ffd5b6119b386828701611614565b9150509250925092565b5f5f5f5f5f5f5f60e0888a0312156119d3575f5ffd5b873596506020880135955060408801356119ec8161154e565b9450606088013593506080880135925060a0880135611a0a8161154e565b915060c088013567ffffffffffffffff811115611a25575f5ffd5b611a318a828b01611614565b91505092959891949750929550565b828152604060208201525f61118c60408301846114f0565b848152836020820152826040820152608060608201525f611a7c60808301846114f0565b9695505050505050565b838152826020820152606060408201525f610e2160608301846114f0565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215611ae1575f5ffd5b5051919050565b8082028115828204841417610493577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f82611b57577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b805160028110611b6a575f5ffd5b919050565b5f60208284031215611b7f575f5ffd5b815167ffffffffffffffff811115611b95575f5ffd5b8201601f81018413611ba5575f5ffd5b805167ffffffffffffffff811115611bbf57611bbf61156f565b611bce60208260051b016115c5565b80828252602082019150602060a08402850101925086831115611bef575f5ffd5b6020840193505b82841015611a7c5760a08488031215611c0d575f5ffd5b611c1561159c565b8451611c208161154e565b8152602085015169ffffffffffffffffffff81168114611c3e575f5ffd5b6020820152604085015160ff81168114611c56575f5ffd5b6040820152611c6760608601611b5c565b606082015260808581015190820152825260a090930192602090910190611bf6565b5f60a08201905073ffffffffffffffffffffffffffffffffffffffff835116825269ffffffffffffffffffff602084015116602083015260ff60408401511660408301526060830151611cdf60608401826117cb565b5060809283015191909201529056fe2861646472657373206e66742c75696e74383020646973636f756e742c75696e7438206d696e5175616e746974792c75696e7438206e6674547970652c75696e7432353620746f6b656e4964295b5d20646973636f756e7473a164736f6c634300081e000a000000000000000000000000b9d5b99d5d0fa04dd7eb2b0cd7753317c2ea1a84