Address Contract Partially Verified
Address
0xc4f0ee96676D3de800b9725eb628DE1C5a0CBea1
Balance
0 ETH
Nonce
1
Code Size
16915 bytes
Creator
0x1d05cf6c...5ad6 at tx 0x1ced1a58...ff8397
Indexed Transactions
0
Contract Bytecode
16915 bytes
0x608060405234801561001057600080fd5b506004361061027f5760003560e01c806370a082311161015c578063c87b56dd116100ce578063ec9cbb4411610087578063ec9cbb441461060a578063eee608a414610613578063f07e7fd014610636578063f2fde38b14610649578063fc05ea681461065c578063fe2a3bf31461066f57600080fd5b8063c87b56dd14610571578063dc78ac1c14610584578063e4a233e114610597578063e8a3d4851461059f578063e985e9c5146105a7578063ea211d7c146105e357600080fd5b80638ef79e91116101205780638ef79e911461050a57806395d89b411461051d5780639fbf39cd14610525578063a22cb46514610538578063b48837031461054b578063b88d4fde1461055e57600080fd5b806370a08231146104b6578063715018a6146104c95780637ca5ea89146104d1578063883356d9146104e55780638da5cb5b146104f957600080fd5b80632f745c59116101f55780634b602673116101b95780634b602673146104035780634f6ccce71461042857806362fe21311461043b5780636352211e1461045c57806363e602301461046f578063641b18e9146104a357600080fd5b80632f745c59146103a45780633f6805ba146103b757806342842e0e146103ca57806343deaf76146103dd57806345aeefde146103f057600080fd5b80630cfcb5f1116102475780630cfcb5f114610314578063114ba8ee1461032757806312d907b91461033a57806318160ddd1461034d57806323b872dd1461035f5780632a55205a1461037257600080fd5b806301ffc9a71461028457806303120506146102ac57806306fdde03146102c1578063081812fc146102d6578063095ea7b314610301575b600080fd5b610297610292366004613497565b61068f565b60405190151581526020015b60405180910390f35b6102bf6102ba3660046134d7565b6106ba565b005b6102c96106e3565b6040516102a39190613542565b6102e96102e4366004613555565b610775565b6040516001600160a01b0390911681526020016102a3565b6102bf61030f36600461356e565b61079c565b6102bf6103223660046136c1565b6107b5565b6102bf6103353660046134d7565b610928565b6102bf61034836600461372a565b610952565b6008545b6040519081526020016102a3565b6102bf61036d36600461384b565b610a43565b610385610380366004613887565b610a68565b604080516001600160a01b0390931683526020830191909152016102a3565b6103516103b236600461356e565b610b28565b600c546102e9906001600160a01b031681565b6102bf6103d836600461384b565b610bbe565b6102bf6103eb3660046138a9565b610be3565b6102bf6103fe3660046134d7565b610cef565b610416610411366004613555565b610d98565b6040516102a3969594939291906139f5565b610351610436366004613555565b610f64565b61044e610449366004613555565b610ff7565b6040516102a3929190613a4d565b6102e961046a366004613555565b61109c565b6102c960405180604001604052806015815260200174466572616c66696c6545786869626974696f6e563360581b81525081565b6103516104b1366004613887565b6110fc565b6103516104c43660046134d7565b611149565b6102bf6111cf565b600c5461029790600160a81b900460ff1681565b600c5461029790600160a01b900460ff1681565b600a546001600160a01b03166102e9565b6102bf610518366004613a66565b6111e3565b6102c9611220565b6102bf610533366004613a9a565b61122f565b6102bf610546366004613bab565b6112a0565b610351610559366004613555565b6112b4565b6102bf61056c366004613be2565b61132c565b6102c961057f366004613555565b611359565b6102bf6105923660046134d7565b6114bf565b600f54610351565b6102c96114eb565b6102976105b5366004613c5d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6103517f00000000000000000000000000000000000000000000000000000000000005dc81565b61035161271081565b6102976106213660046134d7565b600b6020526000908152604090205460ff1681565b6015546102e9906001600160a01b031681565b6102bf6106573660046134d7565b6114fa565b6102bf61066a366004613c87565b611573565b61035161067d366004613555565b60009081526012602052604090205490565b60006001600160e01b0319821663780e9d6360e01b14806106b457506106b482611855565b92915050565b6106c261187a565b6001600160a01b03166000908152600b60205260409020805460ff19169055565b6060600080546106f290613d17565b80601f016020809104026020016040519081016040528092919081815260200182805461071e90613d17565b801561076b5780601f106107405761010080835404028352916020019161076b565b820191906000526020600020905b81548152906001019060200180831161074e57829003601f168201915b5050505050905090565b6000610780826118d4565b506000908152600460205260409020546001600160a01b031690565b816107a681611924565b6107b083836119f6565b505050565b336000908152600b602052604090205460ff16806107dd5750600a546001600160a01b031633145b6107e657600080fd5b6107ef82611b06565b6108405760405162461bcd60e51b815260206004820152601c60248201527f617274776f726b2065646974696f6e206973206e6f7420666f756e640000000060448201526064015b60405180910390fd5b6013816040516108509190613d51565b9081526040519081900360200190205460ff16156108a95760405162461bcd60e51b81526020600482015260166024820152751a5c199cc81a59081a185cc81c9959da5cdd195c995960521b6044820152606401610837565b6000828152601160205260409081902090516013906108cc906001840190613de0565b908152604051908190036020018120805460ff191690556001906013906108f4908590613d51565b908152604051908190036020019020805491151560ff19909216919091179055600181016109228382613e3a565b50505050565b61093061187a565b601580546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600b602052604090205460ff168061097a5750600a546001600160a01b031633145b61098357600080fd5b60005b8151811015610a3f57610a2d8282815181106109a4576109a4613ef9565b6020026020010151600001518383815181106109c2576109c2613ef9565b6020026020010151602001518484815181106109e0576109e0613ef9565b6020026020010151604001518585815181106109fe576109fe613ef9565b602002602001015160600151868681518110610a1c57610a1c613ef9565b602002602001015160800151611b23565b80610a3781613f25565b915050610986565b5050565b826001600160a01b0381163314610a5d57610a5d33611924565b610922848484611f2f565b600080610a7484611b06565b610ada5760405162461bcd60e51b815260206004820152603160248201527f455243323938313a20717565727920726f79616c747920696e666f20666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610837565b600c546001600160a01b03169150612710610b157f00000000000000000000000000000000000000000000000000000000000005dc85613f3e565b610b1f9190613f55565b90509250929050565b6000610b3383611149565b8210610b955760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610837565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b826001600160a01b0381163314610bd857610bd833611924565b610922848484611f60565b336000908152600b602052604090205460ff1680610c0b5750600a546001600160a01b031633145b610c1457600080fd5b60005b8151811015610a3f57610cdc828281518110610c3557610c35613ef9565b602002602001015160400151838381518110610c5357610c53613ef9565b602002602001015160000151848481518110610c7157610c71613ef9565b602002602001015160200151858581518110610c8f57610c8f613ef9565b602002602001015160600151868681518110610cad57610cad613ef9565b602002602001015160800151878781518110610ccb57610ccb613ef9565b602002602001015160a00151611f7b565b5080610ce781613f25565b915050610c17565b336000908152600b602052604090205460ff1680610d175750600a546001600160a01b031633145b610d2057600080fd5b6001600160a01b038116610d765760405162461bcd60e51b815260206004820152601e60248201527f696e76616c696420726f79616c7479207061796f7574206164647265737300006044820152606401610837565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b601060205260009081526040902080548190610db390613d17565b80601f0160208091040260200160405190810160405280929190818152602001828054610ddf90613d17565b8015610e2c5780601f10610e0157610100808354040283529160200191610e2c565b820191906000526020600020905b815481529060010190602001808311610e0f57829003601f168201915b505050505090806001018054610e4190613d17565b80601f0160208091040260200160405190810160405280929190818152602001828054610e6d90613d17565b8015610eba5780601f10610e8f57610100808354040283529160200191610eba565b820191906000526020600020905b815481529060010190602001808311610e9d57829003601f168201915b505050505090806002018054610ecf90613d17565b80601f0160208091040260200160405190810160405280929190818152602001828054610efb90613d17565b8015610f485780601f10610f1d57610100808354040283529160200191610f48565b820191906000526020600020905b815481529060010190602001808311610f2b57829003601f168201915b5050505050908060030154908060040154908060050154905086565b6000610f6f60085490565b8210610fd25760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610837565b60088281548110610fe557610fe5613ef9565b90600052602060002001549050919050565b6011602052600090815260409020805460018201805491929161101990613d17565b80601f016020809104026020016040519081016040528092919081815260200182805461104590613d17565b80156110925780601f1061106757610100808354040283529160200191611092565b820191906000526020600020905b81548152906001019060200180831161107557829003601f168201915b5050505050905082565b6000818152600260205260408120546001600160a01b0316806106b45760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610837565b600082815260126020526040812054821061111657600080fd5b600083815260126020526040902080548390811061113657611136613ef9565b9060005260206000200154905092915050565b60006001600160a01b0382166111b35760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610837565b506001600160a01b031660009081526003602052604090205490565b6111d761187a565b6111e16000612284565b565b336000908152600b602052604090205460ff168061120b5750600a546001600160a01b031633145b61121457600080fd5b600d610a3f8282613e3a565b6060600180546106f290613d17565b336000908152600b602052604090205460ff16806112575750600a546001600160a01b031633145b61126057600080fd5b60005b8151811015610a3f5761128e82828151811061128157611281613ef9565b60200260200101516122d6565b8061129881613f25565b915050611263565b816112aa81611924565b6107b083836124bb565b60006112bf600f5490565b82106113195760405162461bcd60e51b8152602060048201526024808201527f617274776f726b733a20676c6f62616c20696e646578206f7574206f6620626f604482015263756e647360e01b6064820152608401610837565b600f8281548110610fe557610fe5613ef9565b836001600160a01b03811633146113465761134633611924565b611352858585856124c6565b5050505050565b606061136482611b06565b6113c85760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610837565b6000600d80546113d790613d17565b80601f016020809104026020016040519081016040528092919081815260200182805461140390613d17565b80156114505780601f1061142557610100808354040283529160200191611450565b820191906000526020600020905b81548152906001019060200180831161143357829003601f168201915b5050505050905080516000036114805750604080518082019091526007815266697066733a2f2f60c81b60208201525b80601160008581526020019081526020016000206001016040516020016114a8929190613f77565b604051602081830303815290604052915050919050565b6114c761187a565b6001600160a01b03166000908152600b60205260409020805460ff19166001179055565b6060600e80546106f290613d17565b61150261187a565b6001600160a01b0381166115675760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610837565b61157081612284565b50565b600c54600160a01b900460ff166115e25760405162461bcd60e51b815260206004820152602d60248201527f466572616c66696c6545786869626974696f6e56333a206e6f7420616c6c6f7760448201526c10313ab9371032b234ba34b7b760991b6064820152608401610837565b60005b8151811015610a3f5761161082828151811061160357611603613ef9565b6020026020010151611b06565b61162c5760405162461bcd60e51b815260040161083790613f9e565b61164f3383838151811061164257611642613ef9565b60200260200101516124f8565b61166b5760405162461bcd60e51b815260040161083790613fe2565b60006011600084848151811061168357611683613ef9565b60200260200101518152602001908152602001600020604051806040016040529081600082015481526020016001820180546116be90613d17565b80601f01602080910402602001604051908101604052809291908181526020018280546116ea90613d17565b80156117375780601f1061170c57610100808354040283529160200191611737565b820191906000526020600020905b81548152906001019060200180831161171a57829003601f168201915b5050505050815250509050601381602001516040516117569190613d51565b908152604051908190036020019020805460ff19169055825160119060009085908590811061178757611787613ef9565b602002602001015181526020019081526020016000206000808201600090556001820160006117b69190613433565b50506117da8383815181106117cd576117cd613ef9565b6020026020010151612577565b6117fc8383815181106117ef576117ef613ef9565b6020026020010151612790565b82828151811061180e5761180e613ef9565b60200260200101517fa5a44c7ed36966786612323ee2cb0cb453d4a9282b90c6befe72cde41d83f48860405160405180910390a2508061184d81613f25565b9150506115e5565b60006001600160e01b0319821663780e9d6360e01b14806106b457506106b482612833565b600a546001600160a01b031633146111e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610837565b6118dd81611b06565b6115705760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610837565b6015546001600160a01b03163b1561157057601554604051633185c44d60e21b81523060048201526001600160a01b0383811660248301529091169063c617113490604401602060405180830381865afa158015611986573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119aa9190614030565b6115705760405162461bcd60e51b815260206004820152601760248201527f6f70657261746f72206973206e6f7420616c6c6f7765640000000000000000006044820152606401610837565b6000611a018261109c565b9050806001600160a01b0316836001600160a01b031603611a6e5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610837565b336001600160a01b0382161480611a8a5750611a8a81336105b5565b611afc5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610837565b6107b08383612883565b6000908152600260205260409020546001600160a01b0316151590565b600085815260106020526040902060030154611b955760405162461bcd60e51b815260206004820152602b60248201527f466572616c66696c6545786869626974696f6e56333a20617274776f726b206960448201526a1cc81b9bdd08199bdd5b9960aa1b6064820152608401610837565b6000858152601060205260409020600581015460048201546003909201549091611bbe9161404d565b611bc8919061404d565b8410611c515760405162461bcd60e51b815260206004820152604c60248201527f466572616c66696c6545786869626974696f6e56333a2065646974696f6e206e60448201527f756d62657220657863656564207468652065646974696f6e2073697a65206f6660648201526b2074686520617274776f726b60a01b608482015260a401610837565b6001600160a01b038316611ca05760405162461bcd60e51b8152602060048201526016602482015275696e76616c696420617274697374206164647265737360501b6044820152606401610837565b6001600160a01b038216611cee5760405162461bcd60e51b8152602060048201526015602482015274696e76616c6964206f776e6572206164647265737360581b6044820152606401610837565b601381604051611cfe9190613d51565b9081526040519081900360200190205460ff1615611d575760405162461bcd60e51b81526020600482015260166024820152751a5c199cc81a59081a185cc81c9959da5cdd195c995960521b6044820152606401610837565b6000611d63858761404d565b60008181526011602052604090205490915015611dd95760405162461bcd60e51b815260206004820152602e60248201527f466572616c66696c6545786869626974696f6e56333a2074686520656469746960448201526d1bdb881a5cc8195e1a5cdd195b9d60921b6064820152608401610837565b604080518082018252828152602080820185815260008581526011909252929020815181559151909182916001820190611e139082613e3a565b505050600087815260126020818152604080842080546001818101835582875284872090910188905582518084019093528c8352948c90529282529154919290830191611e609190614060565b90526000838152601460209081526040918290208351815592015160019283015551601390611e90908690613d51565b908152604051908190036020019020805491151560ff19909216919091179055611eba85836128f1565b836001600160a01b0316856001600160a01b031614611eee57611eee8585846040518060200160405280600081525061290b565b8187856001600160a01b03167f4f21e8cd53f1df1da42ec94ba03f881c1185607b26e4dcb81941535157d73dd460405160405180910390a450505050505050565b611f3933826124f8565b611f555760405162461bcd60e51b815260040161083790614073565b6107b083838361293e565b6107b08383836040518060200160405280600081525061132c565b60008551600003611fc75760405162461bcd60e51b81526020600482015260166024820152757469746c652063616e206e6f7420626520656d70747960501b6044820152606401610837565b84516000036120185760405162461bcd60e51b815260206004820152601760248201527f6172746973742063616e206e6f7420626520656d7074790000000000000000006044820152606401610837565b86516000036120695760405162461bcd60e51b815260206004820152601c60248201527f66696e6765727072696e742063616e206e6f7420626520656d707479000000006044820152606401610837565b600084116120c55760405162461bcd60e51b815260206004820152602360248201527f65646974696f6e2073697a65206e6565647320746f206265206174206c65617360448201526274203160e81b6064820152608401610837565b6000876040516020016120d89190613542565b60408051601f19818403018152918152815160209283012060008181526010909352912060020180549192509061210e90613d17565b1590506121835760405162461bcd60e51b815260206004820152603b60248201527f616e20617274776f726b2077697468207468652073616d652066696e6765727060448201527f72696e742068617320616c7265616479207265676973746572656400000000006064820152608401610837565b6040805160c08101825288815260208082018990528183018b9052606082018890526080820187905260a08201869052600f8054600181019091557f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802018490556000848152601090915291909120815182919081906122029082613e3a565b50602082015160018201906122179082613e3a565b506040820151600282019061222c9082613e3a565b50606082015160038201556080820151600482015560a09091015160059091015560405182907f22350b25f1b72bb3621199a79abefeb4fcd77bb1e65638cd09350666e4db089190600090a250979650505050505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6122e38160400151611b06565b6122ff5760405162461bcd60e51b815260040161083790613f9e565b612311816000015182604001516124f8565b61232d5760405162461bcd60e51b815260040161083790613fe2565b80606001514211156123a05760405162461bcd60e51b815260206004820152603660248201527f466572616c66696c6545786869626974696f6e56333a20746865207472616e7360448201527519995c881c995c5d595cdd081a5cc8195e1c1a5c995960521b6064820152608401610837565b600081600001518260200151836040015184606001516040516020016123ed94939291906001600160a01b0394851681529290931660208301526040820152606081019190915260800190565b60405160208183030381529060405280519060200120905061242281836000015184608001518560a001518660c00151612aaf565b6124945760405162461bcd60e51b815260206004820152603d60248201527f466572616c66696c6545786869626974696f6e56333a20746865207472616e7360448201527f6665722072657175657374206973206e6f7420617574686f72697a65640000006064820152608401610837565b610a3f8260000151836020015184604001516040518060200160405280600081525061290b565b610a3f338383612b2f565b6124d033836124f8565b6124ec5760405162461bcd60e51b815260040161083790614073565b6109228484848461290b565b6000806125048361109c565b9050806001600160a01b0316846001600160a01b0316148061254b57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b8061256f5750836001600160a01b031661256484610775565b6001600160a01b0316145b949350505050565b60008181526014602090815260409182902082518084019093528054808452600190910154918301919091526126265760405162461bcd60e51b815260206004820152604860248201527f466572616c66696c6545786869626974696f6e56333a20617274776f726b494460448201527f206973206e6f20666f756e6420666f722074686520617274776f726b456469746064820152670d2dedc92dcc8caf60c31b608482015260a401610837565b8051600090815260126020526040902080546126bb5760405162461bcd60e51b815260206004820152604860248201527f466572616c66696c6545786869626974696f6e56333a206e6f2065646974696f60448201527f6e7320696e207468697320617274776f726b206f6620616c6c417274776f726b60648201526745646974696f6e7360c01b608482015260a401610837565b80546000906126cc90600190614060565b9050600082600184805490506126e29190614060565b815481106126f2576126f2613ef9565b90600052602060002001549050808385602001518154811061271657612716613ef9565b9060005260206000200181905550836020015183838154811061273b5761273b613ef9565b906000526020600020018190555082805480612759576127596140c0565b6000828152602080822083016000199081018390559092019092559581526014909552505060408320838155600101929092555050565b600061279b8261109c565b90506127ab816000846001612bfd565b6127b48261109c565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160e01b031982166380ac58cd60e01b148061286457506001600160e01b03198216635b5e139f60e01b145b806106b457506301ffc9a760e01b6001600160e01b03198316146106b4565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906128b88261109c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b610a3f828260405180602001604052806000815250612d36565b61291684848461293e565b61292284848484612d69565b6109225760405162461bcd60e51b8152600401610837906140d6565b826001600160a01b03166129518261109c565b6001600160a01b0316146129775760405162461bcd60e51b815260040161083790614128565b6001600160a01b0382166129d95760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610837565b6129e68383836001612bfd565b826001600160a01b03166129f98261109c565b6001600160a01b031614612a1f5760405162461bcd60e51b815260040161083790614128565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080612b14612b0c886040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b848787612e6a565b6001600160a01b039081169087161491505095945050505050565b816001600160a01b0316836001600160a01b031603612b905760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610837565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612c0984848484612e92565b6001811115612c785760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610837565b816001600160a01b038516612cd457612ccf81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612cf7565b836001600160a01b0316856001600160a01b031614612cf757612cf78582612f1a565b6001600160a01b038416612d1357612d0e81612fb7565b611352565b846001600160a01b0316846001600160a01b031614611352576113528482613066565b612d4083836130aa565b612d4d6000848484612d69565b6107b05760405162461bcd60e51b8152600401610837906140d6565b60006001600160a01b0384163b15612e5f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612dad90339089908890889060040161416d565b6020604051808303816000875af1925050508015612de8575060408051601f3d908101601f19168201909252612de5918101906141aa565b60015b612e45573d808015612e16576040519150601f19603f3d011682016040523d82523d6000602084013e612e1b565b606091505b508051600003612e3d5760405162461bcd60e51b8152600401610837906140d6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061256f565b506001949350505050565b6000806000612e7b87878787613225565b91509150612e88816132e9565b5095945050505050565b6001811115610922576001600160a01b03841615612ed8576001600160a01b03841660009081526003602052604081208054839290612ed2908490614060565b90915550505b6001600160a01b03831615610922576001600160a01b03831660009081526003602052604081208054839290612f0f90849061404d565b909155505050505050565b60006001612f2784611149565b612f319190614060565b600083815260076020526040902054909150808214612f84576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612fc990600190614060565b60008381526009602052604081205460088054939450909284908110612ff157612ff1613ef9565b90600052602060002001549050806008838154811061301257613012613ef9565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061304a5761304a6140c0565b6001900381819060005260206000200160009055905550505050565b600061307183611149565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166131005760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610837565b61310981611b06565b156131565760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610837565b613164600083836001612bfd565b61316d81611b06565b156131ba5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610837565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561325c57506000905060036132e0565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156132b0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166132d9576000600192509250506132e0565b9150600090505b94509492505050565b60008160048111156132fd576132fd6141c7565b036133055750565b6001816004811115613319576133196141c7565b036133665760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610837565b600281600481111561337a5761337a6141c7565b036133c75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610837565b60038160048111156133db576133db6141c7565b036115705760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610837565b50805461343f90613d17565b6000825580601f1061344f575050565b601f01602090049060005260206000209081019061157091905b8082111561347d5760008155600101613469565b5090565b6001600160e01b03198116811461157057600080fd5b6000602082840312156134a957600080fd5b81356134b481613481565b9392505050565b80356001600160a01b03811681146134d257600080fd5b919050565b6000602082840312156134e957600080fd5b6134b4826134bb565b60005b8381101561350d5781810151838201526020016134f5565b50506000910152565b6000815180845261352e8160208601602086016134f2565b601f01601f19169290920160200192915050565b6020815260006134b46020830184613516565b60006020828403121561356757600080fd5b5035919050565b6000806040838503121561358157600080fd5b61358a836134bb565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405160a081016001600160401b03811182821017156135d0576135d0613598565b60405290565b60405160c081016001600160401b03811182821017156135d0576135d0613598565b60405160e081016001600160401b03811182821017156135d0576135d0613598565b604051601f8201601f191681016001600160401b038111828210171561364257613642613598565b604052919050565b60006001600160401b0383111561366357613663613598565b613676601f8401601f191660200161361a565b905082815283838301111561368a57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126136b257600080fd5b6134b48383356020850161364a565b600080604083850312156136d457600080fd5b8235915060208301356001600160401b038111156136f157600080fd5b6136fd858286016136a1565b9150509250929050565b60006001600160401b0382111561372057613720613598565b5060051b60200190565b6000602080838503121561373d57600080fd5b82356001600160401b038082111561375457600080fd5b818501915085601f83011261376857600080fd5b813561377b61377682613707565b61361a565b81815260059190911b8301840190848101908883111561379a57600080fd5b8585015b8381101561383e578035858111156137b65760008081fd5b860160a0818c03601f19018113156137ce5760008081fd5b6137d66135ae565b8983013581526040808401358b83015260606137f38186016134bb565b82840152608091506138068286016134bb565b9083015291830135918883111561381d5760008081fd5b61382b8e8c858701016136a1565b908201528552505091860191860161379e565b5098975050505050505050565b60008060006060848603121561386057600080fd5b613869846134bb565b9250613877602085016134bb565b9150604084013590509250925092565b6000806040838503121561389a57600080fd5b50508035926020909101359150565b600060208083850312156138bc57600080fd5b82356001600160401b03808211156138d357600080fd5b818501915085601f8301126138e757600080fd5b81356138f561377682613707565b81815260059190911b8301840190848101908883111561391457600080fd5b8585015b8381101561383e5780358581111561392f57600080fd5b860160c0818c03601f190112156139465760008081fd5b61394e6135d6565b88820135878111156139605760008081fd5b61396e8d8b838601016136a1565b825250604080830135888111156139855760008081fd5b6139938e8c838701016136a1565b8b84015250606080840135898111156139ac5760008081fd5b6139ba8f8d838801016136a1565b83850152506080915081840135818401525060a0808401358284015260c0840135818401525050808552505086830192508681019050613918565b60c081526000613a0860c0830189613516565b8281036020840152613a1a8189613516565b90508281036040840152613a2e8188613516565b60608401969096525050608081019290925260a0909101529392505050565b82815260406020820152600061256f6040830184613516565b600060208284031215613a7857600080fd5b81356001600160401b03811115613a8e57600080fd5b61256f848285016136a1565b60006020808385031215613aad57600080fd5b82356001600160401b03811115613ac357600080fd5b8301601f81018513613ad457600080fd5b8035613ae261377682613707565b81815260e09182028301840191848201919088841115613b0157600080fd5b938501935b83851015613b915780858a031215613b1e5760008081fd5b613b266135f8565b613b2f866134bb565b8152613b3c8787016134bb565b8188015260408681013590820152606080870135908201526080808701359082015260a0808701359082015260c08087013560ff81168114613b7e5760008081fd5b9082015283529384019391850191613b06565b50979650505050505050565b801515811461157057600080fd5b60008060408385031215613bbe57600080fd5b613bc7836134bb565b91506020830135613bd781613b9d565b809150509250929050565b60008060008060808587031215613bf857600080fd5b613c01856134bb565b9350613c0f602086016134bb565b92506040850135915060608501356001600160401b03811115613c3157600080fd5b8501601f81018713613c4257600080fd5b613c518782356020840161364a565b91505092959194509250565b60008060408385031215613c7057600080fd5b613c79836134bb565b9150610b1f602084016134bb565b60006020808385031215613c9a57600080fd5b82356001600160401b03811115613cb057600080fd5b8301601f81018513613cc157600080fd5b8035613ccf61377682613707565b81815260059190911b82018301908381019087831115613cee57600080fd5b928401925b82841015613d0c57833582529284019290840190613cf3565b979650505050505050565b600181811c90821680613d2b57607f821691505b602082108103613d4b57634e487b7160e01b600052602260045260246000fd5b50919050565b60008251613d638184602087016134f2565b9190910192915050565b60008154613d7a81613d17565b60018281168015613d925760018114613da757613dd6565b60ff1984168752821515830287019450613dd6565b8560005260208060002060005b85811015613dcd5781548a820152908401908201613db4565b50505082870194505b5050505092915050565b60006134b48284613d6d565b601f8211156107b057600081815260208120601f850160051c81016020861015613e135750805b601f850160051c820191505b81811015613e3257828155600101613e1f565b505050505050565b81516001600160401b03811115613e5357613e53613598565b613e6781613e618454613d17565b84613dec565b602080601f831160018114613e9c5760008415613e845750858301515b600019600386901b1c1916600185901b178555613e32565b600085815260208120601f198616915b82811015613ecb57888601518255948401946001909101908401613eac565b5085821015613ee95787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613f3757613f37613f0f565b5060010190565b80820281158282048414176106b4576106b4613f0f565b600082613f7257634e487b7160e01b600052601260045260246000fd5b500490565b60008351613f898184602088016134f2565b613f9581840185613d6d565b95945050505050565b60208082526024908201527f4552433732313a20617274776f726b2065646974696f6e206973206e6f7420666040820152631bdd5b9960e21b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b60006020828403121561404257600080fd5b81516134b481613b9d565b808201808211156106b4576106b4613f0f565b818103818111156106b4576106b4613f0f565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b634e487b7160e01b600052603160045260246000fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906141a090830184613516565b9695505050505050565b6000602082840312156141bc57600080fd5b81516134b481613481565b634e487b7160e01b600052602160045260246000fdfea2646970667358221220e81a87f604a91e880d346b3fc2c55543bfb543038ecec5f4b9154202ffc21c0f64736f6c63430008130033
Verified Source Code Partial Match
Compiler: v0.8.19+commit.7dd6d404
EVM: paris
Optimization: Yes (200 runs)
FeralfileExhibitionV3_2.sol 2813 lines
// File: github/bitmark-inc/feralfile-exhibition-smart-contract/contracts/operator-filter-registry/IOperatorFilterRegistry.sol
pragma solidity ^0.8.13;
interface IOperatorFilterRegistry {
function isOperatorAllowed(address registrant, address operator) external view returns (bool);
function register(address registrant) external;
function registerAndSubscribe(address registrant, address subscription) external;
function registerAndCopyEntries(address registrant, address registrantToCopy) external;
function unregister(address addr) external;
function updateOperator(address registrant, address operator, bool filtered) external;
function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
function subscribe(address registrant, address registrantToSubscribe) external;
function unsubscribe(address registrant, bool copyExistingEntries) external;
function subscriptionOf(address addr) external returns (address registrant);
function subscribers(address registrant) external returns (address[] memory);
function subscriberAt(address registrant, uint256 index) external returns (address);
function copyEntriesOf(address registrant, address registrantToCopy) external;
function isOperatorFiltered(address registrant, address operator) external returns (bool);
function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
function filteredOperators(address addr) external returns (address[] memory);
function filteredCodeHashes(address addr) external returns (bytes32[] memory);
function filteredOperatorAt(address registrant, uint256 index) external returns (address);
function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
function isRegistered(address addr) external returns (bool);
function codeHashOf(address addr) external returns (bytes32);
}
// File: @openzeppelin/contracts/utils/Address.sol
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// File: @openzeppelin/contracts/interfaces/IERC2981.sol
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface for the NFT Royalty Standard.
*
* A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
* support for royalty payments across all NFT marketplaces and ecosystem participants.
*
* _Available since v4.5._
*/
interface IERC2981 is IERC165 {
/**
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
* exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
returns (address receiver, uint256 royaltyAmount);
}
// File: @openzeppelin/contracts/utils/introspection/ERC165.sol
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
// File: @openzeppelin/contracts/token/ERC721/IERC721.sol
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}
// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}
// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File: github/bitmark-inc/feralfile-exhibition-smart-contract/contracts/Authorizable.sol
pragma solidity >=0.4.22 <0.9.0;
contract Authorizable is Ownable {
mapping(address => bool) public trustees;
constructor() {}
modifier onlyAuthorized() {
require(trustees[msg.sender] || msg.sender == owner());
_;
}
function addTrustee(address _trustee) public onlyOwner {
trustees[_trustee] = true;
}
function removeTrustee(address _trustee) public onlyOwner {
delete trustees[_trustee];
}
}
// File: github/bitmark-inc/feralfile-exhibition-smart-contract/contracts/UpdateableOperatorFilterer.sol
pragma solidity ^0.8.13;
/**
* @title UpdateableOperatorFilterer
* @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
* registrant's entries in the OperatorFilterRegistry.
* @dev This smart contract is meant to be inherited by token contracts so they can use the following:
* - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
* - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
*/
abstract contract UpdateableOperatorFilterer is Authorizable {
error OperatorNotAllowed(address operator);
address constant DEFAULT_OPERATOR_FILTER_REGISTRY_ADDRESS =
address(0x000000000000AAeB6D7670E522A718067333cd4E);
address constant DEFAULT_SUBSCRIPTION =
address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);
IOperatorFilterRegistry public OperatorFilterRegistry =
IOperatorFilterRegistry(DEFAULT_OPERATOR_FILTER_REGISTRY_ADDRESS);
constructor() {
if (address(OperatorFilterRegistry).code.length > 0) {
OperatorFilterRegistry.registerAndSubscribe(
address(this),
DEFAULT_SUBSCRIPTION
);
}
}
modifier onlyAllowedOperator(address from) virtual {
// Allow spending tokens from addresses with balance
// Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
// from an EOA.
if (from != msg.sender) {
_checkFilterOperator(msg.sender);
}
_;
}
modifier onlyAllowedOperatorApproval(address operator) virtual {
_checkFilterOperator(operator);
_;
}
function _checkFilterOperator(address operator) internal view virtual {
// Check registry code length to facilitate testing in environments without a deployed registry.
if (address(OperatorFilterRegistry).code.length > 0) {
require(
OperatorFilterRegistry.isOperatorAllowed(
address(this),
operator
),
"operator is not allowed"
);
}
}
/**
* @notice update the operator filter registry
*/
function updateOperatorFilterRegistry(address operatorFilterRegisterAddress)
external
onlyOwner
{
OperatorFilterRegistry = IOperatorFilterRegistry(
operatorFilterRegisterAddress
);
}
}
// File: @openzeppelin/contracts/utils/Base64.sol
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides a set of functions to operate with Base64 strings.
*
* _Available since v4.5._
*/
library Base64 {
/**
* @dev Base64 Encoding/Decoding Table
*/
string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/**
* @dev Converts a `bytes` to its Bytes64 `string` representation.
*/
function encode(bytes memory data) internal pure returns (string memory) {
/**
* Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
* https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
*/
if (data.length == 0) return "";
// Loads the table into memory
string memory table = _TABLE;
// Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
// and split into 4 numbers of 6 bits.
// The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
// - `data.length + 2` -> Round up
// - `/ 3` -> Number of 3-bytes chunks
// - `4 *` -> 4 characters for each chunk
string memory result = new string(4 * ((data.length + 2) / 3));
/// @solidity memory-safe-assembly
assembly {
// Prepare the lookup table (skip the first "length" byte)
let tablePtr := add(table, 1)
// Prepare result pointer, jump over length
let resultPtr := add(result, 32)
// Run over the input, 3 bytes at a time
for {
let dataPtr := data
let endPtr := add(data, mload(data))
} lt(dataPtr, endPtr) {
} {
// Advance 3 bytes
dataPtr := add(dataPtr, 3)
let input := mload(dataPtr)
// To write each character, shift the 3 bytes (18 bits) chunk
// 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
// and apply logical AND with 0x3F which is the number of
// the previous character in the ASCII table prior to the Base64 Table
// The result is then added to the table to get the character to write,
// and finally write it in the result pointer but with a left shift
// of 256 (1 byte) - 8 (1 ASCII char) = 248 bits
mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
resultPtr := add(resultPtr, 1) // Advance
mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
resultPtr := add(resultPtr, 1) // Advance
mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
resultPtr := add(resultPtr, 1) // Advance
mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
resultPtr := add(resultPtr, 1) // Advance
}
// When data `bytes` is not exactly 3 bytes long
// it is padded with `=` characters at the end
switch mod(mload(data), 3)
case 1 {
mstore8(sub(resultPtr, 1), 0x3d)
mstore8(sub(resultPtr, 2), 0x3d)
}
case 2 {
mstore8(sub(resultPtr, 1), 0x3d)
}
}
return result;
}
}
// File: @openzeppelin/contracts/utils/math/Math.sol
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator
) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1);
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(
uint256 x,
uint256 y,
uint256 denominator,
Rounding rounding
) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10**64) {
value /= 10**64;
result += 64;
}
if (value >= 10**32) {
value /= 10**32;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}
// File: @openzeppelin/contracts/utils/Strings.sol
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}
// File: @openzeppelin/contracts/token/ERC721/ERC721.sol
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).i...
// [truncated — 100835 bytes total]
Read Contract
MAX_ROYALITY_BPS 0xec9cbb44 → uint256
OperatorFilterRegistry 0xf07e7fd0 → address
artworkEditions 0x62fe2131 → uint256, string
artworks 0x4b602673 → string, string, string, uint256, uint256, uint256
balanceOf 0x70a08231 → uint256
codeVersion 0x63e60230 → string
contractURI 0xe8a3d485 → string
getApproved 0x081812fc → address
getArtworkByIndex 0xb4883703 → uint256
getArtworkEditionByIndex 0x641b18e9 → uint256
isApprovedForAll 0xe985e9c5 → bool
isBridgeable 0x7ca5ea89 → bool
isBurnable 0x883356d9 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
royaltyInfo 0x2a55205a → address, uint256
royaltyPayoutAddress 0x3f6805ba → address
secondarySaleRoyaltyBPS 0xea211d7c → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalArtworks 0xe4a233e1 → uint256
totalEditionOfArtwork 0xfe2a3bf3 → uint256
totalSupply 0x18160ddd → uint256
trustees 0xeee608a4 → bool
Write Contract 17 functions
These functions modify contract state and require a wallet transaction to execute.
addTrustee 0xdc78ac1c
address _trustee
approve 0x095ea7b3
address operator
uint256 tokenId
authorizedTransfer 0xd94827e2
tuple[] transferParams_
batchMint 0x55f919fa
tuple[] mintParams_
burnEditions 0xfc05ea68
uint256[] editionIDs_
createArtworks 0xe0879141
tuple[] artworks_
removeTrustee 0x03120506
address _trustee
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes data
setApprovalForAll 0xa22cb465
address operator
bool approved
setRoyaltyPayoutAddress 0x45aeefde
address royaltyPayoutAddress_
setTokenBaseURI 0x8ef79e91
string baseURI_
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
updateArtworkEditionIPFSCid 0x0cfcb5f1
uint256 tokenId
string ipfsCID
updateOperatorFilterRegistry 0x114ba8ee
address operatorFilterRegisterAddress
Recent Transactions
No transactions found for this address