Address Contract Partially Verified
Address
0x8A07A1dE6c9ccd3aB5AF5Ad775ae74Abb8A48710
Balance
35.0000 ETH
Nonce
1
Code Size
17215 bytes
Creator
0x8e8772E3...B972 at tx 0xd72fed31...c499e5
Indexed Transactions
0
Contract Bytecode
17215 bytes
0x6080604052600436106104255760003560e01c806370a0823111610229578063b4d4261c1161012e578063df30e54b116100b6578063e985e9c51161007a578063e985e9c514610bd8578063ec34082614610c21578063f2fde38b14610c36578063f4ad071a14610c56578063f8c0fd2014610c7057600080fd5b8063df30e54b14610b49578063dfdedf6914610b69578063e6c6990a14610b89578063e757223014610ba3578063e8a3d48514610bc357600080fd5b8063cfc86f7b116100fd578063cfc86f7b14610ac9578063d547cfb714610ade578063d5cf5c7214610af3578063d7224ba014610b13578063d766401e14610b2957600080fd5b8063b4d4261c14610a61578063b88d4fde14610a74578063c87b56dd14610a94578063caa0f92a14610ab457600080fd5b80638da5cb5b116101b157806395d89b411161018057806395d89b41146109d7578063a1af10ca146109ec578063a22cb46514610a0c578063afe5608b14610a2c578063aff3e10b14610a4157600080fd5b80638da5cb5b146109735780638f4bb49714610991578063906a26e0146109ab57806393660a5c146109c157600080fd5b806379ab3c89116101f857806379ab3c89146108e957806380a75979146108fe57806383c81c411461091e578063853828b61461093e578063891bbe731461095357600080fd5b806370a0823114610870578063715018a614610890578063722edecd146108a557806377c858c1146108d657600080fd5b806338b903331161032f57806345c0f533116102b757806355f804b31161028657806355f804b3146107e657806362ca3c5c146108065780636352211e146108265780636ba9fd38146108465780636d3de8061461085b57600080fd5b806345c0f533146107525780634783f0ef146107865780634f6ccce7146107a6578063547520fe146107c657600080fd5b80633e3e0b12116102fe5780633e3e0b12146106c75780633ecb4051146106dc57806340ccc082146106f257806342842e0e1461071257806343696f181461073257600080fd5b806338b90333146106575780633c0032541461067e5780633deea144146106915780633e07311c146106b157600080fd5b80630fad0f51116103b2578063286c813711610381578063286c8137146105cb5780632913daa0146105eb5780632eb4a7ab146106015780632f745c5914610617578063330067861461063757600080fd5b80630fad0f511461057657806318160ddd1461042a5780631ddd1bf61461059557806323b872dd146105ab57600080fd5b806306fdde03116103f957806306fdde03146104c7578063081812fc146104e9578063095ea7b3146105215780630c834a38146105415780630ee7d0b01461056157600080fd5b80629a9b7b1461042a57806301ffc9a714610452578063043a2a40146104825780630644cefa146104b2575b600080fd5b34801561043657600080fd5b5061043f610c85565b6040519081526020015b60405180910390f35b34801561045e57600080fd5b5061047261046d366004613ede565b610c99565b6040519015158152602001610449565b34801561048e57600080fd5b5061047261049d366004613b3d565b600a6020526000908152604090205460ff1681565b6104c56104c0366004613d32565b610cc4565b005b3480156104d357600080fd5b506104dc610e28565b604051610449919061408c565b3480156104f557600080fd5b50610509610504366004613ec5565b610eba565b6040516001600160a01b039091168152602001610449565b34801561052d57600080fd5b506104c561053c366004613d32565b610f48565b34801561054d57600080fd5b506104c561055c366004613e8b565b6110a5565b34801561056d57600080fd5b506104c56110c0565b34801561058257600080fd5b50601d5461047290610100900460ff1681565b3480156105a157600080fd5b5061043f60145481565b3480156105b757600080fd5b506104c56105c6366004613b92565b6111d5565b3480156105d757600080fd5b5061043f6105e6366004613ec5565b611220565b3480156105f757600080fd5b5061043f60035481565b34801561060d57600080fd5b5061043f60175481565b34801561062357600080fd5b5061043f610632366004613d32565b611241565b34801561064357600080fd5b50610472610652366004613ca9565b6113b8565b34801561066357600080fd5b5061066c600281565b60405160ff9091168152602001610449565b6104c561068c366004613d5c565b61145f565b34801561069d57600080fd5b506104c56106ac366004613f59565b6115c5565b3480156106bd57600080fd5b5061043f60125481565b3480156106d357600080fd5b506104c5611885565b3480156106e857600080fd5b5061043f60165481565b3480156106fe57600080fd5b506104c561070d366004613d32565b611899565b34801561071e57600080fd5b506104c561072d366004613b92565b61191e565b34801561073e57600080fd5b506104c561074d366004613b3d565b611984565b34801561075e57600080fd5b5061043f7f00000000000000000000000000000000000000000000000000000000000007d081565b34801561079257600080fd5b506104c56107a1366004613ec5565b611a00565b3480156107b257600080fd5b5061043f6107c1366004613ec5565b611a30565b3480156107d257600080fd5b506104c56107e1366004613ec5565b611a98565b3480156107f257600080fd5b506104c5610801366004613f18565b611ac3565b34801561081257600080fd5b506104c5610821366004613ec5565b611adc565b34801561083257600080fd5b50610509610841366004613ec5565b611ae9565b34801561085257600080fd5b506104c5611afb565b34801561086757600080fd5b506104c5611b12565b34801561087c57600080fd5b5061043f61088b366004613b3d565b611b26565b34801561089c57600080fd5b506104c5611bb7565b3480156108b157600080fd5b506108c56108c0366004613b3d565b611bcb565b60405161044995949392919061409f565b6104c56108e4366004613db5565b611d6d565b3480156108f557600080fd5b506104c5611f21565b34801561090a57600080fd5b506104c5610919366004613ec5565b611f38565b34801561092a57600080fd5b506104c5610939366004613cfb565b611f45565b34801561094a57600080fd5b506104c5611f78565b34801561095f57600080fd5b5061050961096e366004613ec5565b611fbe565b34801561097f57600080fd5b506000546001600160a01b0316610509565b34801561099d57600080fd5b50601d546104729060ff1681565b3480156109b757600080fd5b5061043f60195481565b3480156109cd57600080fd5b5061043f60155481565b3480156109e357600080fd5b506104dc611fe8565b3480156109f857600080fd5b50610472610a07366004613b3d565b611ff7565b348015610a1857600080fd5b506104c5610a27366004613cfb565b612044565b348015610a3857600080fd5b506104c561214e565b348015610a4d57600080fd5b506104c5610a5c366004613f18565b61215e565b6104c5610a6f366004613e3e565b612172565b348015610a8057600080fd5b506104c5610a8f366004613bce565b612314565b348015610aa057600080fd5b506104dc610aaf366004613ec5565b6123b6565b348015610ac057600080fd5b5061043f612423565b348015610ad557600080fd5b506104dc61243d565b348015610aea57600080fd5b506104dc6124cb565b348015610aff57600080fd5b506104c5610b0e366004613ec5565b6124da565b348015610b1f57600080fd5b5061043f600b5481565b348015610b3557600080fd5b506104c5610b44366004613ec5565b6124e7565b348015610b5557600080fd5b506104c5610b64366004613e8b565b6124f4565b348015610b7557600080fd5b506104c5610b84366004613b3d565b612516565b348015610b9557600080fd5b506018546104729060ff1681565b348015610baf57600080fd5b5061043f610bbe366004613ec5565b61258a565b348015610bcf57600080fd5b506104dc61259d565b348015610be457600080fd5b50610472610bf3366004613b5f565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b348015610c2d57600080fd5b506104dc6125bd565b348015610c4257600080fd5b506104c5610c51366004613b3d565b6125ca565b348015610c6257600080fd5b50601a546104729060ff1681565b348015610c7c57600080fd5b506104c5612640565b6000610c946002546000190190565b905090565b60006001600160e01b0319821663ab1c6f4960e01b1480610cbe5750610cbe82612650565b92915050565b80610ce25760405163b562e8dd60e01b815260040160405180910390fd5b600354811115610d05576040516393eeb41560e01b815260040160405180910390fd5b601d5460ff16610d28576040516316851fc760e11b815260040160405180910390fd5b601d5460ff168015610d3c575060185460ff165b15610d5a576040516316851fc760e11b815260040160405180910390fd5b60195481610d66610c85565b610d709190614154565b118015610d7f5750601a5460ff165b15610d9d5760405163a9dd28bb60e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000007d081610dc7610c85565b610dd19190614154565b1115610df05760405163a4875a4960e01b815260040160405180910390fd5b610df98161258a565b3414610e185760405163078d696560e31b815260040160405180910390fd5b610e248282600061265b565b5050565b606060048054610e3790614218565b80601f0160208091040260200160405190810160405280929190818152602001828054610e6390614218565b8015610eb05780601f10610e8557610100808354040283529160200191610eb0565b820191906000526020600020905b815481529060010190602001808311610e9357829003601f168201915b5050505050905090565b6000610ec582612676565b610f2c5760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600860205260409020546001600160a01b031690565b81610f528161268c565b6000610f5d83611ae9565b9050806001600160a01b0316846001600160a01b03161415610fcc5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610f23565b6001600160a01b0384166000908152600a602052604090205460ff16156110065760405163d947c35f60e01b815260040160405180910390fd5b336001600160a01b038216148061102257506110228133610bf3565b6110945760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c000000000000006064820152608401610f23565b61109f848483612754565b50505050565b6110ad6127b0565b601a805460ff1916911515919091179055565b336000908152600f6020526040812080546110da90614218565b80601f016020809104026020016040519081016040528092919081815260200182805461110690614218565b80156111535780601f1061112857610100808354040283529160200191611153565b820191906000526020600020905b81548152906001019060200180831161113657829003601f168201915b50505050509050600e8160405161116a9190613ff0565b9081526040519081900360200190205460ff166111c95760405162461bcd60e51b815260206004820152601860248201527f596f7520617265206e6f7420616e20616666696c6961746500000000000000006044820152606401610f23565b6111d281612835565b50565b826daaeb6d7670e522a718067333cd4e3b15611215576001600160a01b03811633141561120c57611207848484612a37565b61109f565b61121581612dc4565b61109f848484612a37565b6011818154811061123057600080fd5b600091825260209091200154905081565b600061124c83611b26565b82106112a55760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610f23565b60006112af610c85565b905060008060005b83811015611358576000818152600660209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561130957805192505b876001600160a01b0316836001600160a01b03161415611345578684141561133757509350610cbe92505050565b8361134181614253565b9450505b508061135081614253565b9150506112b7565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b6064820152608401610f23565b6017546000906113db576040516363868c5560e11b815260040160405180910390fd5b6040516bffffffffffffffffffffffff19606086901b166020820152600090603401604051602081830303815290604052805190602001209050611456848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506017549150849050612ef7565b95945050505050565b60185460ff1615806114745750601d5460ff16155b15611492576040516309c7220160e31b815260040160405180910390fd5b61149d8483836113b8565b6114ba5760405163097b24df60e41b815260040160405180910390fd5b826114d85760405163b562e8dd60e01b815260040160405180910390fd5b6003548311156114fb576040516393eeb41560e01b815260040160405180910390fd5b60195483611507610c85565b6115119190614154565b1180156115205750601a5460ff165b1561153e5760405163a9dd28bb60e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000007d083611568610c85565b6115729190614154565b11156115915760405163a4875a4960e01b815260040160405180910390fd5b61159a8361258a565b34146115b95760405163078d696560e31b815260040160405180910390fd5b61109f8484600061265b565b6115cd6127b0565b826116095760405162461bcd60e51b815260206004820152600c60248201526b496e76616c696420636f646560a01b6044820152606401610f23565b6001600160a01b0382166116515760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610f23565b600081116116a15760405162461bcd60e51b815260206004820152601e60248201527f52617465206d7573742062652067726561746572207468616e207a65726f00006044820152606401610f23565b6001600160a01b0382166000908152600f6020526040902080546116c490614218565b1590506117135760405162461bcd60e51b815260206004820181905260248201527f416666696c69617465206164647265737320616c7265616479206578697374736044820152606401610f23565b600e8484604051611725929190613fe0565b9081526040519081900360200190205460ff16156117855760405162461bcd60e51b815260206004820152601d60248201527f416666696c6961746520636f646520616c7265616479206578697374730000006044820152606401610f23565b60006040518060a00160405280846001600160a01b0316815260200183815260200160008152602001600081526020016000815250905080600d86866040516117cf929190613fe0565b9081526040805160209281900383018120845181546001600160a01b0319166001600160a01b03909116178155928401516001808501919091559184015160028401556060840151600384015560809093015160049092019190915590600e9061183c9088908890613fe0565b9081526040805160209281900383019020805460ff1916931515939093179092556001600160a01b0385166000908152600f9091522061187d908686613a05565b505050505050565b61188d6127b0565b601d805460ff19169055565b6118a16127b0565b806118bf5760405163b562e8dd60e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000007d0816118e9610c85565b6118f39190614154565b11156119125760405163a4875a4960e01b815260040160405180910390fd5b610e248282600161265b565b826daaeb6d7670e522a718067333cd4e3b15611969576001600160a01b0381163314156119605761120784848460405180602001604052806000815250612314565b61196981612dc4565b61109f84848460405180602001604052806000815250612314565b61198c612f0d565b6001600160a01b0381166119b25760405162afb37360e31b815260040160405180910390fd5b6119bb81611ff7565b156119d957604051631002377360e01b815260040160405180910390fd5b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b611a086127b0565b601754811415611a2b5760405163a28a88c160e01b815260040160405180910390fd5b601755565b6000611a3a610c85565b8210611a945760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b6064820152608401610f23565b5090565b611aa06127b0565b80611abe576040516363868c5560e11b815260040160405180910390fd5b600355565b611acb6127b0565b611ad7601b8383613a05565b505050565b611ae46127b0565b601455565b6000611af482612f67565b5192915050565b611b036127b0565b601d805460ff19166001179055565b611b1a6127b0565b6018805460ff19169055565b60006001600160a01b038216611b925760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b6064820152608401610f23565b506001600160a01b03166000908152600760205260409020546001600160801b031690565b611bbf612f0d565b611bc96000613095565b565b60606000806000806000600f6000886001600160a01b03166001600160a01b031681526020019081526020016000208054611c0590614218565b80601f0160208091040260200160405190810160405280929190818152602001828054611c3190614218565b8015611c7e5780601f10611c5357610100808354040283529160200191611c7e565b820191906000526020600020905b815481529060010190602001808311611c6157829003601f168201915b50505050509050600e81604051611c959190613ff0565b9081526040519081900360200190205460ff16611cf45760405162461bcd60e51b815260206004820152601b60248201527f41646472657373206973206e6f7420616e20616666696c6961746500000000006044820152606401610f23565b6000600d82604051611d069190613ff0565b908152604080516020928190038301812060a08201835280546001600160a01b03168252600181015493820184905260028101549282018390526003810154606083018190526004909101546080909201829052949b929a50985096509194509092505050565b60185460ff161580611d825750601d5460ff16155b15611da0576040516309c7220160e31b815260040160405180910390fd5b611dab8685856113b8565b611dc85760405163097b24df60e41b815260040160405180910390fd5b84611de65760405163b562e8dd60e01b815260040160405180910390fd5b600354851115611e09576040516393eeb41560e01b815260040160405180910390fd5b60195485611e15610c85565b611e1f9190614154565b118015611e2e5750601a5460ff165b15611e4c5760405163a9dd28bb60e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000007d085611e76610c85565b611e809190614154565b1115611e9f5760405163a4875a4960e01b815260040160405180910390fd5b611ea88561258a565b3414611ec75760405163078d696560e31b815260040160405180910390fd5b600e8282604051611ed9929190613fe0565b9081526040519081900360200190205460ff16611f095760405163fa4f231b60e01b815260040160405180910390fd5b611f15828234886130e5565b61187d8686600061265b565b611f296127b0565b6018805460ff19166001179055565b611f406127b0565b601555565b611f4d6127b0565b6001600160a01b03919091166000908152600a60205260409020805460ff1916911515919091179055565b611f806127b0565b600c544790600090611f9290836141d5565b905060008111611fb5576040516363868c5560e11b815260040160405180910390fd5b610e24816131c3565b60108181548110611fce57600080fd5b6000918252602090912001546001600160a01b0316905081565b606060058054610e3790614218565b60006001600160a01b03821661201f5760405162afb37360e31b815260040160405180910390fd5b506001600160a01b031660009081526001602081905260409091205460ff1615151490565b8161204e8161268c565b6001600160a01b0383163314156120a75760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c65720000000000006044820152606401610f23565b6001600160a01b0383166000908152600a602052604090205460ff16156120e15760405163d947c35f60e01b815260040160405180910390fd5b3360008181526009602090815260408083206001600160a01b03881680855290835292819020805460ff191687151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6121566127b0565b61188d611b12565b6121666127b0565b611ad7601c8383613a05565b826121905760405163b562e8dd60e01b815260040160405180910390fd5b6003548311156121b3576040516393eeb41560e01b815260040160405180910390fd5b601d5460ff166121d6576040516316851fc760e11b815260040160405180910390fd5b601d5460ff1680156121ea575060185460ff165b15612208576040516316851fc760e11b815260040160405180910390fd5b60195483612214610c85565b61221e9190614154565b11801561222d5750601a5460ff165b1561224b5760405163a9dd28bb60e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000007d083612275610c85565b61227f9190614154565b111561229e5760405163a4875a4960e01b815260040160405180910390fd5b6122a78361258a565b34146122c65760405163078d696560e31b815260040160405180910390fd5b600e82826040516122d8929190613fe0565b9081526040519081900360200190205460ff166123085760405163fa4f231b60e01b815260040160405180910390fd5b6115b9828234866130e5565b836daaeb6d7670e522a718067333cd4e3b1561237c576001600160a01b03811633141561237357612346858585612a37565b61235285858585613250565b61236e5760405162461bcd60e51b8152600401610f23906140d6565b6123af565b61237c81612dc4565b612387858585612a37565b61239385858585613250565b6123af5760405162461bcd60e51b8152600401610f23906140d6565b5050505050565b606060006123c26124cb565b905060006123ce61335d565b905060008251116123ee576040518060200160405280600081525061241b565b816123f88561336c565b8260405160200161240b9392919061400c565b6040516020818303038152906040525b949350505050565b60006124326002546000190190565b610c94906001614154565b601b805461244a90614218565b80601f016020809104026020016040519081016040528092919081815260200182805461247690614218565b80156124c35780601f10612498576101008083540402835291602001916124c3565b820191906000526020600020905b8154815290600101906020018083116124a657829003601f168201915b505050505081565b6060601b8054610e3790614218565b6124e26127b0565b601955565b6124ef6127b0565b601655565b6124fc6127b0565b601d80549115156101000261ff0019909216919091179055565b61251e612f0d565b6001600160a01b0381166125445760405162afb37360e31b815260040160405180910390fd5b61254d81611ff7565b6125695760405162afb37360e31b815260040160405180910390fd5b6001600160a01b03166000908152600160205260409020805460ff19169055565b6000610cbe82612598610c85565b613408565b60606040518060600160405280603581526020016142d560359139905090565b601c805461244a90614218565b6125d2612f0d565b6001600160a01b0381166126375760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610f23565b6111d281613095565b6126486127b0565b611b03611f21565b6000610cbe8261346d565b611ad7838383604051806020016040528060008152506134d8565b600081600111158015610cbe5750506002541190565b6daaeb6d7670e522a718067333cd4e3b156111d257604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c61711349060440160206040518083038186803b1580156126f457600080fd5b505afa158015612708573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061272c9190613ea8565b6111d257604051633b79c77360e21b81526001600160a01b0382166004820152602401610f23565b60008281526008602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600080546001600160a01b03163390811491906127cc90611ff7565b905081806127d75750805b610e245760405162461bcd60e51b815260206004820152602960248201527f5465616d3a2063616c6c6572206973206e6f7420746865206f776e6572206f726044820152681034b7102a32b0b69760b91b6064820152608401610f23565b600e816040516128459190613ff0565b9081526040519081900360200190205460ff166128a45760405162461bcd60e51b815260206004820152601860248201527f416666696c6961746520646f6573206e6f7420657869737400000000000000006044820152606401610f23565b6000600d826040516128b69190613ff0565b90815260405190819003602001902060028101548154919250906001600160a01b0316816129305760405162461bcd60e51b815260206004820152602160248201527f416666696c6961746520646f6573206e6f74206861766520612062616c616e636044820152606560f81b6064820152608401610f23565b6001600160a01b0381166129785760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610f23565b6000816001600160a01b03168360405160006040518083038185875af1925050503d80600081146129c5576040519150601f19603f3d011682016040523d82523d6000602084013e6129ca565b606091505b5050905080612a0f5760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b6044820152606401610f23565b6000846002018190555082600c6000828254612a2b91906141d5565b90915550505050505050565b6000612a4282612f67565b80519091506000906001600160a01b0316336001600160a01b03161480612a79575033612a6e84610eba565b6001600160a01b0316145b80612a8b57508151612a8b9033610bf3565b905080612af55760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610f23565b846001600160a01b031682600001516001600160a01b031614612b695760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b6064820152608401610f23565b6001600160a01b038416612bcd5760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610f23565b612bda85858560016137b2565b612bea6000848460000151612754565b6001600160a01b0385166000908152600760205260408120805460019290612c1c9084906001600160801b03166141ad565b82546101009290920a6001600160801b038181021990931691831602179091556001600160a01b03861660009081526007602052604081208054600194509092612c6891859116614129565b82546001600160801b039182166101009390930a9283029190920219909116179055506040805180820182526001600160a01b0380871682526001600160401b03428116602080850191825260008981526006909152948520935184549151909216600160a01b026001600160e01b03199091169190921617179055612cef846001614154565b6000818152600660205260409020549091506001600160a01b0316612d7e57612d1781612676565b15612d7e5760408051808201825284516001600160a01b0390811682526020808701516001600160401b039081168285019081526000878152600690935294909120925183549451909116600160a01b026001600160e01b03199094169116179190911790555b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461187d565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c61711349060440160206040518083038186803b158015612e0e57600080fd5b505afa158015612e22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e469190613ea8565b8015612ed85750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c61711349060440160206040518083038186803b158015612ea057600080fd5b505afa158015612eb4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ed89190613ea8565b6111d257604051633b79c77360e21b8152336004820152602401610f23565b600082612f04858461382b565b14949350505050565b6000546001600160a01b03163314611bc95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610f23565b60408051808201909152600080825260208201528180600111158015612f8e575060025481105b15613035576000818152600660209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215612fdf579392505050565b50600019016000818152600660209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215613030579392505050565b612fdf565b60405162461bcd60e51b815260206004820152602f60248201527f455243373231413a20756e61626c6520746f2064657465726d696e652074686560448201526e1037bbb732b91037b3103a37b5b2b760891b6064820152608401610f23565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600e84846040516130f7929190613fe0565b9081526040519081900360200190205460ff161561109f576000600d8585604051613123929190613fe0565b9081526020016040518091039020905060006064826001015485613147919061418e565b613151919061416c565b9050828260040160008282546131679190614154565b92505081905550808260020160008282546131829190614154565b925050819055508082600301600082825461319d9190614154565b9250508190555080600c60008282546131b69190614154565b9091555050505050505050565b60005b601254811015610e245761323e601082815481106131e6576131e6614284565b9060005260206000200160009054906101000a90046001600160a01b031660646011848154811061321957613219614284565b90600052602060002001548561322f919061418e565b613239919061416c565b613897565b8061324881614253565b9150506131c6565b60006001600160a01b0384163b1561335257604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061329490339089908890889060040161404f565b602060405180830381600087803b1580156132ae57600080fd5b505af19250505080156132de575060408051601f3d908101601f191682019092526132db91810190613efb565b60015b613338573d80801561330c576040519150601f19603f3d011682016040523d82523d6000602084013e613311565b606091505b5080516133305760405162461bcd60e51b8152600401610f23906140d6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061241b565b506001949350505050565b6060601c8054610e3790614218565b606060006133798361392d565b60010190506000816001600160401b038111156133985761339861429a565b6040519080825280601f01601f1916602001820160405280156133c2576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846133fb57613400565b6133cc565b509392505050565b60008060165483613419919061416c565b60145490915060005b828110156134625760646015548361343a919061418e565b613444919061416c565b61344e9083614154565b91508061345a81614253565b915050613422565b50611456858261418e565b60006001600160e01b031982166380ac58cd60e01b148061349e57506001600160e01b03198216635b5e139f60e01b145b806134b957506001600160e01b0319821663780e9d6360e01b145b80610cbe57506301ffc9a760e01b6001600160e01b0319831614610cbe565b6002546001600160a01b03851661353b5760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610f23565b61354481612676565b156135915760405162461bcd60e51b815260206004820152601d60248201527f455243373231413a20746f6b656e20616c7265616479206d696e7465640000006044820152606401610f23565b826135f3576003548411156135f35760405162461bcd60e51b815260206004820152602260248201527f455243373231413a207175616e7469747920746f206d696e7420746f6f2068696044820152610ced60f31b6064820152608401610f23565b61360060008683876137b2565b6001600160a01b0385166000908152600760209081526040918290208251808401845290546001600160801b038082168352600160801b909104169181019190915281518083019092528051909190819061365c908890614129565b6001600160801b03168152602001856136755786613678565b60005b83602001516136879190614129565b6001600160801b039081169091526001600160a01b0380891660008181526007602090815260408083208751978301518716600160801b029790961696909617909455845180860186529182526001600160401b034281168386019081528883526006909552948120915182549451909516600160a01b026001600160e01b031990941694909216939093179190911790915582905b868110156137a65760405182906001600160a01b038a16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461376a6000898488613250565b6137865760405162461bcd60e51b8152600401610f23906140d6565b8161379081614253565b925050808061379e90614253565b91505061371d565b50600255505050505050565b601d54610100900460ff1615611207576001600160a01b038416156112075760405162461bcd60e51b815260206004820152602960248201527f5472616e736665727320617265206e6f74207065726d697474656420617420746044820152681a19481b5bdb595b9d60ba1b6064820152608401610f23565b600081815b845181101561340057600085828151811061384d5761384d614284565b602002602001015190508083116138735760008381526020829052604090209250613884565b600081815260208490526040902092505b508061388f81614253565b915050613830565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146138e4576040519150601f19603f3d011682016040523d82523d6000602084013e6138e9565b606091505b5050905080611ad75760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610f23565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061396c5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310613998576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106139b657662386f26fc10000830492506010015b6305f5e10083106139ce576305f5e100830492506008015b61271083106139e257612710830492506004015b606483106139f4576064830492506002015b600a8310610cbe5760010192915050565b828054613a1190614218565b90600052602060002090601f016020900481019282613a335760008555613a79565b82601f10613a4c5782800160ff19823516178555613a79565b82800160010185558215613a79579182015b82811115613a79578235825591602001919060010190613a5e565b50611a949291505b80821115611a945760008155600101613a81565b80356001600160a01b0381168114613aac57600080fd5b919050565b60008083601f840112613ac357600080fd5b5081356001600160401b03811115613ada57600080fd5b6020830191508360208260051b8501011115613af557600080fd5b9250929050565b60008083601f840112613b0e57600080fd5b5081356001600160401b03811115613b2557600080fd5b602083019150836020828501011115613af557600080fd5b600060208284031215613b4f57600080fd5b613b5882613a95565b9392505050565b60008060408385031215613b7257600080fd5b613b7b83613a95565b9150613b8960208401613a95565b90509250929050565b600080600060608486031215613ba757600080fd5b613bb084613a95565b9250613bbe60208501613a95565b9150604084013590509250925092565b60008060008060808587031215613be457600080fd5b613bed85613a95565b9350613bfb60208601613a95565b92506040850135915060608501356001600160401b0380821115613c1e57600080fd5b818701915087601f830112613c3257600080fd5b813581811115613c4457613c4461429a565b604051601f8201601f19908116603f01168101908382118183101715613c6c57613c6c61429a565b816040528281528a6020848701011115613c8557600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080600060408486031215613cbe57600080fd5b613cc784613a95565b925060208401356001600160401b03811115613ce257600080fd5b613cee86828701613ab1565b9497909650939450505050565b60008060408385031215613d0e57600080fd5b613d1783613a95565b91506020830135613d27816142b0565b809150509250929050565b60008060408385031215613d4557600080fd5b613d4e83613a95565b946020939093013593505050565b60008060008060608587031215613d7257600080fd5b613d7b85613a95565b93506020850135925060408501356001600160401b03811115613d9d57600080fd5b613da987828801613ab1565b95989497509550505050565b60008060008060008060808789031215613dce57600080fd5b613dd787613a95565b95506020870135945060408701356001600160401b0380821115613dfa57600080fd5b613e068a838b01613ab1565b90965094506060890135915080821115613e1f57600080fd5b50613e2c89828a01613afc565b979a9699509497509295939492505050565b60008060008060608587031215613e5457600080fd5b613e5d85613a95565b93506020850135925060408501356001600160401b03811115613e7f57600080fd5b613da987828801613afc565b600060208284031215613e9d57600080fd5b8135613b58816142b0565b600060208284031215613eba57600080fd5b8151613b58816142b0565b600060208284031215613ed757600080fd5b5035919050565b600060208284031215613ef057600080fd5b8135613b58816142be565b600060208284031215613f0d57600080fd5b8151613b58816142be565b60008060208385031215613f2b57600080fd5b82356001600160401b03811115613f4157600080fd5b613f4d85828601613afc565b90969095509350505050565b60008060008060608587031215613f6f57600080fd5b84356001600160401b03811115613f8557600080fd5b613f9187828801613afc565b9095509350613fa4905060208601613a95565b9396929550929360400135925050565b60008151808452613fcc8160208601602086016141ec565b601f01601f19169290920160200192915050565b8183823760009101908152919050565b600082516140028184602087016141ec565b9190910192915050565b6000845161401e8184602089016141ec565b8451908301906140328183602089016141ec565b84519101906140458183602088016141ec565b0195945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061408290830184613fb4565b9695505050505050565b602081526000613b586020830184613fb4565b60a0815260006140b260a0830188613fb4565b90508560208301528460408301528360608301528260808301529695505050505050565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b60006001600160801b0380831681851680830382111561414b5761414b61426e565b01949350505050565b600082198211156141675761416761426e565b500190565b60008261418957634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156141a8576141a861426e565b500290565b60006001600160801b03838116908316818110156141cd576141cd61426e565b039392505050565b6000828210156141e7576141e761426e565b500390565b60005b838110156142075781810151838201526020016141ef565b8381111561109f5750506000910152565b600181811c9082168061422c57607f821691505b6020821081141561424d57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156142675761426761426e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146111d257600080fd5b6001600160e01b0319811681146111d257600080fdfe697066733a2f2f516d58486d577578445153524b364a596168587a474b37756d3574423563794861687761436879426a3244514e77a264697066735822122013bec15537f6e54f9f8d4a7efee224977473e847dc899c97caf396ce2e75b78764736f6c63430008070033
Verified Source Code Partial Match
Compiler: v0.8.7+commit.e28d00a7
EVM: london
Optimization: Yes (200 runs)
MetaMafiosoContract.sol 2292 lines
pragma solidity ^0.8.0;
//
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
/**
* @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;
}
}
//
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
/**
* @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. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling 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);
}
}
//
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}
//
error TransactionCapExceeded ();
error PublicMintingClosed ();
error ExcessiveOwnedMints ();
error MintZeroQuantity ();
error InvalidPayment ();
error SoftCapExceeded ();
error CapExceeded ();
error IsAlreadyUnveiled ();
error ValueCannotBeZero ();
error CannotBeNullAddress ();
error NoStateChange ();
error PublicMintClosed ();
error AllowlistMintClosed ();
error AddressNotAllowlisted ();
error AllowlistDropTimeHasNotPassed ();
error PublicDropTimeHasNotPassed ();
error DropTimeNotInFuture ();
error ClaimModeDisabled ();
error IneligibleRedemptionContract ();
error TokenAlreadyRedeemed ();
error InvalidOwnerForRedemption ();
error InvalidApprovalForRedemption ();
error ERC721RestrictedApprovalAddressRestricted ();
error NotMaintainer ();
error InvalidTeamAddress ();
error DuplicateTeamAddress ();
error AffiliateNotFound ();
//
/**
* Teams is a contract implementation to extend upon Ownable that allows multiple controllers
* of a single contract to modify specific mint settings but not have overall ownership of the contract.
* This will easily allow cross-collaboration via Mintplex.xyz.
**/
abstract contract Teams is Ownable {
mapping(address => bool) internal team;
/**
* @dev Adds an address to the team. Allows them to execute protected functions
* @param _address the ETH address to add, cannot be 0x and cannot be in team already
**/
function addToTeam(address _address) public onlyOwner {
if (_address == address(0)) revert InvalidTeamAddress();
if (inTeam(_address)) revert DuplicateTeamAddress();
team[_address] = true;
}
/**
* @dev Removes an address to the team.
* @param _address the ETH address to remove, cannot be 0x and must be in team
**/
function removeFromTeam(address _address) public onlyOwner {
if (_address == address(0)) revert InvalidTeamAddress();
if (!inTeam(_address)) revert InvalidTeamAddress();
team[_address] = false;
}
/**
* @dev Check if an address is valid and active in the team
* @param _address ETH address to check for truthiness
**/
function inTeam(address _address) public view returns (bool) {
if (_address == address(0)) revert InvalidTeamAddress();
return team[_address] == true;
}
/**
* @dev Throws if called by any account other than the owner or team member.
*/
function _onlyTeamOrOwner() private view {
bool _isOwner = owner() == _msgSender();
bool _isTeam = inTeam(_msgSender());
require(_isOwner || _isTeam, "Team: caller is not the owner or in Team.");
}
modifier onlyTeamOrOwner() {
_onlyTeamOrOwner();
_;
}
}
//
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
/**
* @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);
}
//
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
/**
* @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;
}
}
//
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)
/**
* @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);
}
//
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
/**
* @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);
}
//
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)
/**
* @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);
}
//
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
/**
* @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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [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://consensys.net/diligence/blog/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.8.0/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);
}
}
}
//
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
/**
* @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) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 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 256, 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 << 3) < value ? 1 : 0);
}
}
}
//
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}
//
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
/**
* @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 `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
}
/**
* @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);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}
//
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
/**
* @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);
}
//
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 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);
}
//
abstract contract OperatorFilterer {
error OperatorNotAllowed(address operator);
IOperatorFilterRegistry constant operatorFilterRegistry =
IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);
constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
// If an inheriting token contract is deployed to a network without the registry deployed, the modifier
// will not revert, but the contract will need to be registered with the registry once it is deployed in
// order for the modifier to filter addresses.
if (address(operatorFilterRegistry).code.length > 0) {
if (subscribe) {
operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
} else {
if (subscriptionOrRegistrantToCopy != address(0)) {
operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
} else {
operatorFilterRegistry.register(address(this));
}
}
}
}
function _onlyAllowedOperator(address from) private view {
if (
!(operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender) &&
operatorFilterRegistry.isOperatorAllowed(address(this), from))
) {
revert OperatorNotAllowed(msg.sender);
}
}
modifier onlyAllowedOperator(address from) virtual {
// Check registry code length to facilitate testing in environments without a deployed registry.
if (address(operatorFilterRegistry).code.length > 0) {
// 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) {
_;
return;
}
_onlyAllowedOperator(from);
}
_;
}
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) {
if (!operatorFilterRegistry.isOperatorAllowed(address(this), operator)) {
revert OperatorNotAllowed(operator);
}
}
}
}
//
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at _sta...
// [truncated — 85525 bytes total]
Read Contract
CONTRACT_VERSION 0x38b90333 → uint8
INCREMENT_BATCH 0x3ecb4051 → uint256
INCREMENT_PERCENT 0x93660a5c → uint256
PRICE_BASE 0x1ddd1bf6 → uint256
_baseTokenExtension 0xec340826 → string
_baseTokenURI 0xcfc86f7b → string
affiliateStatus 0x722edecd → string, uint256, uint256, uint256, uint256
balanceOf 0x70a08231 → uint256
baseTokenURI 0xd547cfb7 → string
collectionSize 0x45c0f533 → uint256
contractURI 0xe8a3d485 → string
currentTokenId 0x009a9b7b → uint256
getApproved 0x081812fc → address
getNextTokenId 0xcaa0f92a → uint256
getPrice 0xe7572230 → uint256
inTeam 0xa1af10ca → bool
isAllowlisted 0x33006786 → bool
isApprovedForAll 0xe985e9c5 → bool
maxBatchSize 0x2913daa0 → uint256
merkleRoot 0x2eb4a7ab → bytes32
mintingOpen 0x8f4bb497 → bool
name 0x06fdde03 → string
nextOwnerToExplicitlySet 0xd7224ba0 → uint256
onlyAllowlistMode 0xe6c6990a → bool
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
payableAddressCount 0x3e07311c → uint256
payableAddresses 0x891bbe73 → address
payableFees 0x286c8137 → uint256
restrictedApprovalAddresses 0x043a2a40 → bool
softCap 0x906a26e0 → uint256
softCapEnforced 0xf4ad071a → bool
soulbound 0x0fad0f51 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
Write Contract 34 functions
These functions modify contract state and require a wallet transaction to execute.
addAffiliate 0x3deea144
string _code
address _address
uint256 _rate
addToTeam 0x43696f18
address _address
affiliateWithdraw 0x0ee7d0b0
No parameters
approve 0x095ea7b3
address to
uint256 tokenId
closeAllowlistMint 0xafe5608b
No parameters
disableAllowlistOnlyMode 0x6d3de806
No parameters
enableAllowlistOnlyMode 0x79ab3c89
No parameters
mintToAdminV2 0x40ccc082
address _to
uint256 _qty
mintToMultiple 0x0644cefa
address _to
uint256 _amount
mintToMultipleAF 0xb4d4261c
address _to
uint256 _amount
string _code
mintToMultipleAL 0x3c003254
address _to
uint256 _amount
bytes32[] _merkleProof
mintToMultipleALAF 0x77c858c1
address _to
uint256 _amount
bytes32[] _merkleProof
string _code
openAllowlistMint 0xf8c0fd20
No parameters
openMinting 0x6ba9fd38
No parameters
removeFromTeam 0xdfdedf69
address _address
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
setApprovalRestriction 0x83c81c41
address _address
bool _isRestricted
setBaseTokenExtension 0xaff3e10b
string baseExtension
setBaseURI 0x55f804b3
string baseURI
setMaxMint 0x547520fe
uint256 _newMaxMint
setPriceBase 0x62ca3c5c
uint256 _feeInWei
setPriceIncrementBatch 0xd766401e
uint256 _incrementBatch
setPriceIncrementPercent 0x80a75979
uint256 _incrementPercent
setSoftCap 0xd5cf5c72
uint256 _softCap
setSoftCapEnforced 0x0c834a38
bool _enforced
setSoulbound 0xdf30e54b
bool _sb
stopMinting 0x3e3e0b12
No parameters
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
updateMerkleRoot 0x4783f0ef
bytes32 _newMerkleRoot
withdrawAll 0x853828b6
No parameters
Token Balances (1)
View Transfers →Recent Transactions
No transactions found for this address