Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x94bcCFcBeFd6102b953A85AFB81236958c10FEed
Balance 0.080000 ETH
Nonce 1
Code Size 11761 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

11761 bytes
0x6080604052600436106102535760003560e01c806370a0823111610138578063b534a5c4116100b0578063e33b7de311610077578063e33b7de3146107bb578063e5c389cd146107d0578063e966d512146107f0578063e985e9c514610803578063f0292a0314610823578063f2fde38b1461083957005b8063b534a5c414610712578063b88d4fde14610732578063ba41b0c614610752578063c87b56dd14610765578063ce7c2ac21461078557005b80638b83209b116100ff5780638b83209b1461065c5780638d859f3e1461067c5780638da5cb5b1461069257806395d89b41146106a75780639852595c146106bc578063a22cb465146106f257005b806370a08231146105ae578063715018a6146105e85780637cb64759146105fd5780637f608d031461061d5780637f75c3151461063d57005b80633a98ef39116101cb5780634f64b2be116101925780634f64b2be146104fe5780634f6ccce71461051e57806350c5a00c1461053e57806360d938dc146105545780636352211e1461056e5780636790a9de1461058e57005b80633a98ef391461045c57806342842e0e14610471578063438b6300146104915780634a994eef146104be5780634d44660c146104de57005b8063095ea7b31161021a578063095ea7b3146103a357806318160ddd146103c357806319165587146103e657806323b872dd146104065780632f745c591461042657806332cb6b0c1461044657005b806301ffc9a71461029e578063022914a7146102d357806306fdde0314610329578063077796271461034b578063081812fc1461036b57005b3661029c577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b005b3480156102aa57600080fd5b506102be6102b93660046123ed565b610859565b60405190151581526020015b60405180910390f35b3480156102df57600080fd5b5061030e6102ee36600461241f565b60016020526000908152604090205461ffff808216916201000090041682565b6040805161ffff9384168152929091166020830152016102ca565b34801561033557600080fd5b5061033e610884565b6040516102ca9190612494565b34801561035757600080fd5b506102be61036636600461241f565b610916565b34801561037757600080fd5b5061038b6103863660046124a7565b610973565b6040516001600160a01b0390911681526020016102ca565b3480156103af57600080fd5b5061029c6103be3660046124c0565b6109f2565b3480156103cf57600080fd5b506103d8610afc565b6040519081526020016102ca565b3480156103f257600080fd5b5061029c61040136600461241f565b610b0b565b34801561041257600080fd5b5061029c6104213660046124ec565b610cdf565b34801561043257600080fd5b506103d86104413660046124c0565b610d10565b34801561045257600080fd5b506103d860125481565b34801561046857600080fd5b50600b546103d8565b34801561047d57600080fd5b5061029c61048c3660046124ec565b610ddc565b34801561049d57600080fd5b506104b16104ac36600461241f565b610df7565b6040516102ca919061252d565b3480156104ca57600080fd5b5061029c6104d9366004612581565b610ee4565b3480156104ea57600080fd5b506102be6104f9366004612601565b610f3e565b34801561050a57600080fd5b5061038b6105193660046124a7565b610fba565b34801561052a57600080fd5b506103d86105393660046124a7565b610fe4565b34801561054a57600080fd5b506103d860115481565b34801561056057600080fd5b506014546102be9060ff1681565b34801561057a57600080fd5b5061038b6105893660046124a7565b611060565b34801561059a57600080fd5b5061029c6105a9366004612696565b6110b5565b3480156105ba57600080fd5b506103d86105c936600461241f565b6001600160a01b031660009081526001602052604090205461ffff1690565b3480156105f457600080fd5b5061029c611104565b34801561060957600080fd5b5061029c6106183660046124a7565b61113f565b34801561062957600080fd5b5061029c610638366004612701565b611173565b34801561064957600080fd5b506014546102be90610100900460ff1681565b34801561066857600080fd5b5061038b6106773660046124a7565b6111c6565b34801561068857600080fd5b506103d860135481565b34801561069e57600080fd5b5061038b6111db565b3480156106b357600080fd5b5061033e6111ea565b3480156106c857600080fd5b506103d86106d736600461241f565b6001600160a01b03166000908152600e602052604090205490565b3480156106fe57600080fd5b5061029c61070d366004612581565b6111f9565b34801561071e57600080fd5b5061029c61072d36600461271d565b611265565b34801561073e57600080fd5b5061029c61074d3660046127c7565b6112e3565b61029c6107603660046128a6565b61131b565b34801561077157600080fd5b5061033e6107803660046124a7565b611626565b34801561079157600080fd5b506103d86107a036600461241f565b6001600160a01b03166000908152600d602052604090205490565b3480156107c757600080fd5b50600c546103d8565b3480156107dc57600080fd5b5061029c6107eb3660046128d8565b6116c1565b61029c6107fe36600461290a565b61177d565b34801561080f57600080fd5b506102be61081e366004612969565b61198c565b34801561082f57600080fd5b506103d860105481565b34801561084557600080fd5b5061029c61085436600461241f565b6119ba565b60006001600160e01b0319821663780e9d6360e01b148061087e575061087e82611a18565b92915050565b606060048054610893906129a2565b80601f01602080910402602001604051908101604052809291908181526020018280546108bf906129a2565b801561090c5780601f106108e15761010080835404028352916020019161090c565b820191906000526020600020905b8154815290600101906020018083116108ef57829003601f168201915b5050505050905090565b6000336109216111db565b6001600160a01b0316146109505760405162461bcd60e51b8152600401610947906129dc565b60405180910390fd5b506001600160a01b03811660009081526009602052604090205460ff165b919050565b600061097e82611a68565b6109d65760405162461bcd60e51b815260206004820152602360248201527f4552433732313a20717565727920666f72206e6f6e6578697374656e7420746f60448201526235b2b760e91b6064820152608401610947565b506000908152600660205260409020546001600160a01b031690565b60006109fd82611060565b9050806001600160a01b0316836001600160a01b031603610a6b5760405162461bcd60e51b815260206004820152602260248201527f455243373231423a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b6064820152608401610947565b336001600160a01b0382161480610a875750610a87813361198c565b610aed5760405162461bcd60e51b815260206004820152603160248201527f455243373231423a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527008185c1c1c9bdd995908199bdc88185b1b607a1b6064820152608401610947565b610af78383611ab0565b505050565b6000610b06611b1e565b905090565b6001600160a01b0381166000908152600d6020526040902054610b7f5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610947565b6000600c5447610b8f9190612a27565b6001600160a01b0383166000908152600e6020908152604080832054600b54600d909352908320549394509192610bc69085612a3f565b610bd09190612a74565b610bda9190612a88565b905080600003610c405760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610947565b6001600160a01b0383166000908152600e6020526040902054610c64908290612a27565b6001600160a01b0384166000908152600e6020526040902055600c54610c8b908290612a27565b600c55610c988382611b3d565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610ce93382611c56565b610d055760405162461bcd60e51b815260040161094790612a9f565b610af7838383611cdb565b60008060005b600054811015610d7e5760008181548110610d3357610d33612ae8565b6000918252602090912001546001600160a01b0390811690861603610d6e57838203610d6257915061087e9050565b610d6b82612afe565b91505b610d7781612afe565b9050610d16565b5060405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c65423a206f776e657220696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610947565b610af7838383604051806020016040528060008152506112e3565b6001600160a01b0381166000908152600160205260408120546060919061ffff16806001600160401b03811115610e3057610e306127b1565b604051908082528060200260200182016040528015610e59578160200160208202803683370190505b50925060005b600054811015610edc5760008181548110610e7c57610e7c612ae8565b6000918252602090912001546001600160a01b0390811690861603610ecc57808484610ea781612afe565b955081518110610eb957610eb9612ae8565b6020908102919091010152828214610edc575b610ed581612afe565b9050610e5f565b505050919050565b33610eed6111db565b6001600160a01b031614610f135760405162461bcd60e51b8152600401610947906129dc565b6001600160a01b03919091166000908152600960205260409020805460ff1916911515919091179055565b6000805b82811015610fad576000848483818110610f5e57610f5e612ae8565b9050602002013581548110610f7557610f75612ae8565b6000918252602090912001546001600160a01b03868116911614610f9d576000915050610fb3565b610fa681612afe565b9050610f42565b50600190505b9392505050565b60008181548110610fca57600080fd5b6000918252602090912001546001600160a01b0316905081565b6000610fee610afc565b82106110535760405162461bcd60e51b815260206004820152602e60248201527f455243373231456e756d657261626c65423a20717565727920666f72206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610947565b60035461087e9083612a27565b600061106b82611a68565b6110875760405162461bcd60e51b815260040161094790612b17565b6000828154811061109a5761109a612ae8565b6000918252602090912001546001600160a01b031692915050565b3360009081526009602052604090205460ff166110e45760405162461bcd60e51b815260040161094790612b5b565b6110f06015858561233e565b506110fd6016838361233e565b5050505050565b3361110d6111db565b6001600160a01b0316146111335760405162461bcd60e51b8152600401610947906129dc565b61113d6000611dda565b565b336111486111db565b6001600160a01b03161461116e5760405162461bcd60e51b8152600401610947906129dc565b600a55565b3360009081526009602052604090205460ff166111a25760405162461bcd60e51b815260040161094790612b5b565b6014805461ffff191692151561ff0019169290921761010091151591909102179055565b6000600f828154811061109a5761109a612ae8565b6008546001600160a01b031690565b606060058054610893906129a2565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60005b838110156112da576112ca878787878581811061128757611287612ae8565b9050602002013586868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506112e392505050565b6112d381612afe565b9050611268565b50505050505050565b6112ed3383611c56565b6113095760405162461bcd60e51b815260040161094790612a9f565b61131584848484611e2c565b50505050565b82600010801561132d57506011548311155b6113745760405162461bcd60e51b81526020600482015260186024820152774d45466176657273653a206f7264657220746f6f2062696760401b6044820152606401610947565b826013546113829190612a3f565b3410156113dd5760405162461bcd60e51b8152602060048201526024808201527f4d45466176657273653a2065746865722073656e74206973206e6f7420636f726044820152631c9958dd60e21b6064820152608401610947565b6010543360009081526001602052604090205461140590859062010000900461ffff16612a27565b11156114535760405162461bcd60e51b815260206004820152601a60248201527f4d45466176657273653a20646f6e2774206265206772656564790000000000006044820152606401610947565b600061145d610afc565b60125490915061146d8583612a27565b111561148b5760405162461bcd60e51b815260040161094790612b85565b601454610100900460ff166115635760145460ff161561151b576040516bffffffffffffffffffffffff193360601b1660208201526115169060340160405160208183030381529060405280519060200120848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611e5f92505050565b611563565b60405162461bcd60e51b815260206004820152601d60248201527f4d45466176657273653a2073616c65206973206e6f74206163746976650000006044820152606401610947565b336000908152600160205260408120805486929061158690849061ffff16612bc9565b82546101009290920a61ffff818102199093169183160217909155336000908152600160205260409020805487935090916002916115cc91859162010000900416612bc9565b92506101000a81548161ffff021916908361ffff16021790555060005b848110156110fd5761161633836115ff81612afe565b945060405180602001604052806000815250611ebd565b61161f81612afe565b90506115e9565b606061163182611a68565b61168c5760405162461bcd60e51b815260206004820152602660248201527f4d45466176657273653a20717565727920666f72206e6f6e6578697374656e74604482015265103a37b5b2b760d11b6064820152608401610947565b601561169783611ef0565b60166040516020016116ab93929190612c88565b6040516020818303038152906040529050919050565b3360009081526009602052604090205460ff166116f05760405162461bcd60e51b815260040161094790612b5b565b6116f8610afc565b8310156117695760405162461bcd60e51b815260206004820152603960248201527f4d45466176657273653a2073706563696669656420737570706c79206973206c6044820152786f776572207468616e2063757272656e742062616c616e636560381b6064820152608401610947565b601193909355601291909155601055601355565b3360009081526009602052604090205460ff166117ac5760405162461bcd60e51b815260040161094790612b5b565b82811461181b5760405162461bcd60e51b815260206004820152603760248201527f4d45466176657273653a206d7573742070726f7669646520657175616c207175604482015276616e74697469657320616e6420726563697069656e747360481b6064820152608401610947565b6000805b8481101561184f5785858281811061183957611839612ae8565b905060200201358201915080600101905061181f565b50600061185a610afc565b905060125482820111156118805760405162461bcd60e51b815260040161094790612b85565b60005b838110156112da57600087878381811061189f5761189f612ae8565b905060200201351115611984578686828181106118be576118be612ae8565b90506020020135600160008787858181106118db576118db612ae8565b90506020020160208101906118f0919061241f565b6001600160a01b0316815260208101919091526040016000908120805461ffff19811661ffff9182169490940116929092179091555b87878381811061193857611938612ae8565b905060200201358110156119825761197a86868481811061195b5761195b612ae8565b9050602002016020810190611970919061241f565b6001850194611ff0565b600101611926565b505b600101611883565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b336119c36111db565b6001600160a01b0316146119e95760405162461bcd60e51b8152600401610947906129dc565b6001600160a01b0381166000908152600960205260409020805460ff19166001179055611a1581612081565b50565b60006001600160e01b031982166380ac58cd60e01b1480611a4957506001600160e01b03198216635b5e139f60e01b145b8061087e57506301ffc9a760e01b6001600160e01b031983161461087e565b600080548210801561087e575060006001600160a01b031660008381548110611a9357611a93612ae8565b6000918252602090912001546001600160a01b0316141592915050565b600081815260066020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611ae582611060565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000600354600254611b309190612a27565b600054610b069190612a88565b80471015611b8d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610947565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611bda576040519150601f19603f3d011682016040523d82523d6000602084013e611bdf565b606091505b5050905080610af75760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610947565b6000611c6182611a68565b611c7d5760405162461bcd60e51b815260040161094790612b17565b6000611c8883611060565b9050806001600160a01b0316846001600160a01b03161480611cc35750836001600160a01b0316611cb884610973565b6001600160a01b0316145b80611cd35750611cd3818561198c565b949350505050565b826001600160a01b0316611cee82611060565b6001600160a01b031614611d575760405162461bcd60e51b815260206004820152602a60248201527f455243373231423a207472616e73666572206f6620746f6b656e20746861742060448201526934b9903737ba1037bbb760b11b6064820152608401610947565b611d61838361211e565b611d6c600082611ab0565b8160008281548110611d8057611d80612ae8565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611e37848484611cdb565b611e43848484846121c9565b6113155760405162461bcd60e51b815260040161094790612cbb565b600a54611e6c82846122ca565b14611eb95760405162461bcd60e51b815260206004820181905260248201527f4d65726b6c652050726f6f6620766572696669636174696f6e206661696c65646044820152606401610947565b5050565b611ec78383611ff0565b611ed460008484846121c9565b610af75760405162461bcd60e51b815260040161094790612cbb565b606081600003611f175750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611f415780611f2b81612afe565b9150611f3a9050600a83612a74565b9150611f1b565b6000816001600160401b03811115611f5b57611f5b6127b1565b6040519080825280601f01601f191660200182016040528015611f85576020820181803683370190505b5090505b8415611cd357611f9a600183612a88565b9150611fa7600a86612d0e565b611fb2906030612a27565b60f81b818381518110611fc757611fc7612ae8565b60200101906001600160f81b031916908160001a905350611fe9600a86612a74565b9450611f89565b604080516020810182526001600160a01b038481168083526000805460018101825581805293517f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e56390940180546001600160a01b03191694909316939093179091559151839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b3361208a6111db565b6001600160a01b0316146120b05760405162461bcd60e51b8152600401610947906129dc565b6001600160a01b0381166121155760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610947565b611a1581611dda565b6001600160a01b03821615612172576001600160a01b038216600090815260016020526040812080549091906121579061ffff16612d22565b91906101000a81548161ffff021916908361ffff1602179055505b6001600160a01b03811615611eb9576001600160a01b038116600090815260016020526040812080549091906121ab9061ffff16612d40565b91906101000a81548161ffff021916908361ffff1602179055505050565b60006001600160a01b0384163b156122bf57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061220d903390899088908890600401612d61565b6020604051808303816000875af1925050508015612248575060408051601f3d908101601f1916820190925261224591810190612d9e565b60015b6122a5573d808015612276576040519150601f19603f3d011682016040523d82523d6000602084013e61227b565b606091505b50805160000361229d5760405162461bcd60e51b815260040161094790612cbb565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611cd3565b506001949350505050565b600081815b84518110156123365760008582815181106122ec576122ec612ae8565b602002602001015190508083116123125760008381526020829052604090209250612323565b600081815260208490526040902092505b508061232e81612afe565b9150506122cf565b509392505050565b82805461234a906129a2565b90600052602060002090601f01602090048101928261236c57600085556123b2565b82601f106123855782800160ff198235161785556123b2565b828001600101855582156123b2579182015b828111156123b2578235825591602001919060010190612397565b506123be9291506123c2565b5090565b5b808211156123be57600081556001016123c3565b6001600160e01b031981168114611a1557600080fd5b6000602082840312156123ff57600080fd5b8135610fb3816123d7565b6001600160a01b0381168114611a1557600080fd5b60006020828403121561243157600080fd5b8135610fb38161240a565b60005b8381101561245757818101518382015260200161243f565b838111156113155750506000910152565b6000815180845261248081602086016020860161243c565b601f01601f19169290920160200192915050565b602081526000610fb36020830184612468565b6000602082840312156124b957600080fd5b5035919050565b600080604083850312156124d357600080fd5b82356124de8161240a565b946020939093013593505050565b60008060006060848603121561250157600080fd5b833561250c8161240a565b9250602084013561251c8161240a565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b8181101561256557835183529284019291840191600101612549565b50909695505050505050565b8035801515811461096e57600080fd5b6000806040838503121561259457600080fd5b823561259f8161240a565b91506125ad60208401612571565b90509250929050565b60008083601f8401126125c857600080fd5b5081356001600160401b038111156125df57600080fd5b6020830191508360208260051b85010111156125fa57600080fd5b9250929050565b60008060006040848603121561261657600080fd5b83356126218161240a565b925060208401356001600160401b0381111561263c57600080fd5b612648868287016125b6565b9497909650939450505050565b60008083601f84011261266757600080fd5b5081356001600160401b0381111561267e57600080fd5b6020830191508360208285010111156125fa57600080fd5b600080600080604085870312156126ac57600080fd5b84356001600160401b03808211156126c357600080fd5b6126cf88838901612655565b909650945060208701359150808211156126e857600080fd5b506126f587828801612655565b95989497509550505050565b6000806040838503121561271457600080fd5b61259f83612571565b6000806000806000806080878903121561273657600080fd5b86356127418161240a565b955060208701356127518161240a565b945060408701356001600160401b038082111561276d57600080fd5b6127798a838b016125b6565b9096509450606089013591508082111561279257600080fd5b5061279f89828a01612655565b979a9699509497509295939492505050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156127dd57600080fd5b84356127e88161240a565b935060208501356127f88161240a565b92506040850135915060608501356001600160401b038082111561281b57600080fd5b818701915087601f83011261282f57600080fd5b813581811115612841576128416127b1565b604051601f8201601f19908116603f01168101908382118183101715612869576128696127b1565b816040528281528a602084870101111561288257600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806000604084860312156128bb57600080fd5b8335925060208401356001600160401b0381111561263c57600080fd5b600080600080608085870312156128ee57600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000806040858703121561292057600080fd5b84356001600160401b038082111561293757600080fd5b612943888389016125b6565b9096509450602087013591508082111561295c57600080fd5b506126f5878288016125b6565b6000806040838503121561297c57600080fd5b82356129878161240a565b915060208301356129978161240a565b809150509250929050565b600181811c908216806129b657607f821691505b6020821081036129d657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115612a3a57612a3a612a11565b500190565b6000816000190483118215151615612a5957612a59612a11565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612a8357612a83612a5e565b500490565b600082821015612a9a57612a9a612a11565b500390565b60208082526029908201527f455243373231423a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b600060018201612b1057612b10612a11565b5060010190565b60208082526024908201527f455243373231423a20717565727920666f72206e6f6e6578697374656e74207460408201526337b5b2b760e11b606082015260800190565b60208082526010908201526f496e76616c69642064656c656761746560801b604082015260600190565b60208082526024908201527f4d45466176657273653a206d696e742f6f72646572206578636565647320737560408201526370706c7960e01b606082015260800190565b600061ffff808316818516808303821115612be657612be6612a11565b01949350505050565b8054600090600181811c9080831680612c0957607f831692505b60208084108203612c2a57634e487b7160e01b600052602260045260246000fd5b818015612c3e5760018114612c4f57612c7c565b60ff19861689528489019650612c7c565b60008881526020902060005b86811015612c745781548b820152908501908301612c5b565b505084890196505b50505050505092915050565b6000612c948286612bef565b8451612ca481836020890161243c565b612cb081830186612bef565b979650505050505050565b60208082526033908201527f455243373231423a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b600082612d1d57612d1d612a5e565b500690565b600061ffff821680612d3657612d36612a11565b6000190192915050565b600061ffff808316818103612d5757612d57612a11565b6001019392505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d9490830184612468565b9695505050505050565b600060208284031215612db057600080fd5b8151610fb3816123d756fea2646970667358221220745cf0a94b7e8bbff26da57e232a858e8b8a793cda94b948ba1ff6a73ff9e4da64736f6c634300080d0033

Verified Source Code Partial Match

Compiler: v0.8.13+commit.abaa5c0e EVM: london Optimization: Yes (100 runs)
MEFaverse.sol 137 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Strings.sol";
import './Blimpie/Delegated.sol';
import './Blimpie/Merkle.sol';
import './Blimpie/ERC721Batch.sol';
import './Blimpie/PaymentSplitterMod.sol';

contract MEFaverse is Delegated, ERC721Batch, Merkle, PaymentSplitterMod {
  using Strings for uint256;

  uint public MAX_MINT   = 2;
  uint public MAX_ORDER  = 2;
  uint public MAX_SUPPLY = 8500;
  uint public PRICE      = 0.08 ether;

  bool public isPresaleActive = false;
  bool public isMainsaleActive = false;

  string private _tokenURIPrefix;
  string private _tokenURISuffix;

  address[] private _accounts = [
    0xE57048340ddf7a28244E1cdC63AA9056187E2665,
    0xbE8Fdf8Ca08c10082b8aD24e2Eb01592153dC8B2,
    0x5B7556FA084116e33aaeB273a511Fdfb35BE0DA0,
    0x42a06F7bB64fd3B862A74e5BcBADc3CFb3F907a4,
    0xf092E151480c9CBf372de602E6c8d048C212a979,
    0x3ff0D4b04D8ef29198C7F8ce597F6FCbA0aF3931,
    0x557e5F91f60dc99aB499F6ffdbedFfBa44b441D9
  ];

  uint[] private _shares = [
    40,
    23,
     8,
    10,
     5,
     4,
    10
  ];

  constructor()
    Delegated()
    ERC721B("MEFaverse", "MEF", 0)
    PaymentSplitterMod( _accounts, _shares ){
  }

  //safety first
  fallback() external payable {}


  //view: IERC721Metadata
  function tokenURI( uint tokenId ) external view override returns( string memory ){
    require(_exists(tokenId), "MEFaverse: query for nonexistent token");
    return string(abi.encodePacked(_tokenURIPrefix, tokenId.toString(), _tokenURISuffix));
  }

  //payable
  function mint( uint quantity, bytes32[] calldata proof ) external payable {
    require( 0 < quantity && quantity <= MAX_ORDER,  "MEFaverse: order too big"             );
    require( msg.value >= PRICE * quantity,          "MEFaverse: ether sent is not correct" );
    require( owners[msg.sender].purchased + quantity <= MAX_MINT, "MEFaverse: don't be greedy" );

    uint supply = totalSupply();
    require( supply + quantity <= MAX_SUPPLY, "MEFaverse: mint/order exceeds supply" );

    if( isMainsaleActive ){
      //no-op
      
    }
    else if( isPresaleActive ){
      verifyProof( keccak256( abi.encodePacked( msg.sender ) ), proof );
    }
    else{
      revert( "MEFaverse: sale is not active" );
    }

    owners[msg.sender].balance += uint16(quantity);
    owners[msg.sender].purchased += uint16(quantity);
    for( uint i; i < quantity; ++i ){
      _safeMint( msg.sender, supply++, "" );
    }
  }


  //onlyDelegates
  function mintTo(uint[] calldata quantity, address[] calldata recipient) external payable onlyDelegates{
    require(quantity.length == recipient.length, "MEFaverse: must provide equal quantities and recipients" );

    unchecked{
      uint totalQuantity;
      for(uint i; i < quantity.length; ++i){
        totalQuantity += quantity[i];
      }
      uint supply = totalSupply();
      require( supply + totalQuantity <= MAX_SUPPLY, "MEFaverse: mint/order exceeds supply" );

      for(uint i; i < recipient.length; ++i){
        if( quantity[i] > 0 ){
          owners[recipient[i]].balance += uint16(quantity[i]);
          for( uint j; j < quantity[i]; ++j ){
            _mint( recipient[i], supply++ );
          }
        }
      }
    }
  }

  function setActive(bool isPresaleActive_, bool isMainsaleActive_) external onlyDelegates{
    isPresaleActive = isPresaleActive_;
    isMainsaleActive = isMainsaleActive_;
  }

  function setBaseURI(string calldata _newPrefix, string calldata _newSuffix) external onlyDelegates{
    _tokenURIPrefix = _newPrefix;
    _tokenURISuffix = _newSuffix;
  }

  function setConfig(uint maxOrder, uint maxSupply, uint maxMint, uint price) external onlyDelegates{
    require( maxSupply >= totalSupply(), "MEFaverse: specified supply is lower than current balance" );
    MAX_ORDER  = maxOrder;
    MAX_SUPPLY = maxSupply;
    MAX_MINT   = maxMint;
    PRICE      = price;
  }


  //private
  function _mint( address to, uint tokenId ) internal override {
    tokens.push( Token( to ) );
    emit Transfer( address(0), to, tokenId );
  }
}
Merkle.sol 19 lines
// SPDX-License-Identifier: BSD-3

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import './Delegated.sol';

contract Merkle is Delegated{
  bytes32 internal merkleRoot;

  function setMerkleRoot( bytes32 merkleRoot_ ) external onlyOwner{
    merkleRoot = merkleRoot_;
  }

  function verifyProof(bytes32 leaf, bytes32[] memory proof) internal view{
    require( MerkleProof.processProof( proof, leaf ) == merkleRoot, "Merkle Proof verification failed" );
  }
}
ERC721B.sol 216 lines
// SPDX-License-Identifier: BSD-3-Clause

pragma solidity ^0.8.0;

/****************************************
 * @author: squeebo_nft         *
 ****************************************
 *   Blimpie-FF721 provides low-gas  *
 *     mints + transfers        *
 ****************************************/

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";


abstract contract ERC721B is Context, ERC165, IERC721, IERC721Metadata {
  using Address for address;

  struct Owner{
    uint16 balance;
    uint16 purchased;
  }

  struct Token{
    address owner;
  }

  Token[] public tokens;
  mapping(address => Owner) public owners;

  uint internal _burned;
  uint internal _offset;
  string private _name;
  string private _symbol;

  mapping(uint => address) internal _tokenApprovals;
  mapping(address => mapping(address => bool)) private _operatorApprovals;

  constructor(string memory name_, string memory symbol_, uint offset_ ){
    _name = name_;
    _symbol = symbol_;

    _offset = offset_;
    for(uint i; i < _offset; ++i ){
      tokens.push();
    }
  }

  //public view
  function balanceOf(address owner) external view override returns( uint balance ){
    return owners[owner].balance;
  }

  function name() external view override returns( string memory name_ ){
    return _name;
  }

  function ownerOf(uint tokenId) public view override returns( address owner ){
    require(_exists(tokenId), "ERC721B: query for nonexistent token");
    return tokens[tokenId].owner;
  }

  function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns( bool isSupported ){
    return
      interfaceId == type(IERC721).interfaceId ||
      interfaceId == type(IERC721Metadata).interfaceId ||
      super.supportsInterface(interfaceId);
  }

  function symbol() external view override returns( string memory symbol_ ){
    return _symbol;
  }

  function totalSupply() public view virtual returns (uint) {
    return tokens.length - (_burned + _offset);
  }


  //approvals
  function approve(address to, uint tokenId) external override {
    address owner = ownerOf(tokenId);
    require(to != owner, "ERC721B: approval to current owner");

    require(
      _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
      "ERC721B: caller is not owner nor approved for all"
    );

    _approve(to, tokenId);
  }

  function getApproved(uint tokenId) public view override returns( address approver ){
    require(_exists(tokenId), "ERC721: query for nonexistent token");
    return _tokenApprovals[tokenId];
  }

  function isApprovedForAll(address owner, address operator) public view override returns( bool isApproved ){
    return _operatorApprovals[owner][operator];
  }

  function setApprovalForAll(address operator, bool approved) external override {
    _operatorApprovals[_msgSender()][operator] = approved;
    emit ApprovalForAll(_msgSender(), operator, approved);
  }


  //transfers
  function safeTransferFrom(address from, address to, uint tokenId) external override{
    safeTransferFrom(from, to, tokenId, "");
  }

  function safeTransferFrom(address from, address to, uint tokenId, bytes memory _data) public override {
    require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721B: caller is not owner nor approved");
    _safeTransfer(from, to, tokenId, _data);
  }

  function transferFrom(address from, address to, uint tokenId) external override {
    //solhint-disable-next-line max-line-length
    require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721B: caller is not owner nor approved");
    _transfer(from, to, tokenId);
  }


  //internal
  function _approve(address to, uint tokenId) internal{
    _tokenApprovals[tokenId] = to;
    emit Approval(ownerOf(tokenId), to, tokenId);
  }

  function _beforeTokenTransfer(address from, address to) internal virtual {
    if( from != address(0) )
      --owners[from].balance;

    if( to != address(0) )
      ++owners[to].balance;
  }


  function _burn(uint tokenId) internal {
    address owner = ownerOf(tokenId);

    _beforeTokenTransfer(owner, address(0));

    // Clear approvals
    _approve(address(0), tokenId);
    tokens[tokenId].owner = address(0);

    emit Transfer(owner, address(0), tokenId);
  }

  function _checkOnERC721Received(address from, address to, uint tokenId, bytes memory _data) private returns( bool ){
    if (to.isContract()) {
      try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
        return retval == IERC721Receiver.onERC721Received.selector;
      } catch (bytes memory reason) {
        if (reason.length == 0) {
          revert("ERC721B: transfer to non ERC721Receiver implementer");
        } else {
          assembly {
            revert(add(32, reason), mload(reason))
          }
        }
      }
    } else {
      return true;
    }
  }

  function _exists(uint tokenId) internal view returns( bool ){
    return tokenId < tokens.length && tokens[tokenId].owner != address(0);
  }

  function _isApprovedOrOwner(address spender, uint tokenId) internal view returns( bool isApproved ){
    require(_exists(tokenId), "ERC721B: query for nonexistent token");
    address owner = ownerOf(tokenId);
    return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
  }

  function _mint(address to, uint tokenId) internal virtual;

  function _next() internal view virtual returns(uint){
    return tokens.length + _offset;
  }

  function _safeMint(address to, uint tokenId) internal {
    _safeMint(to, tokenId, "");
  }

  function _safeMint(address to, uint tokenId, bytes memory _data) internal {
    _mint(to, tokenId);
    require(
      _checkOnERC721Received(address(0), to, tokenId, _data),
      "ERC721B: transfer to non ERC721Receiver implementer"
    );
  }

  function _safeTransfer(address from, address to, uint tokenId, bytes memory _data) internal{
    _transfer(from, to, tokenId);
    require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721B: transfer to non ERC721Receiver implementer");
  }

  function _transfer(address from, address to, uint tokenId) internal {
    require(ownerOf(tokenId) == from, "ERC721B: transfer of token that is not own");
    _beforeTokenTransfer(from, to);

    // Clear approvals from the previous owner
    _approve(address(0), tokenId);
    tokens[tokenId].owner = to;

    emit Transfer(from, to, tokenId);
  }
}
Delegated.sol 37 lines
// SPDX-License-Identifier: BSD-3-Clause

pragma solidity ^0.8.0;

/***********************
* @author: squeebo_nft *
************************/

import "@openzeppelin/contracts/access/Ownable.sol";

contract Delegated is Ownable{
  mapping(address => bool) internal _delegates;

  constructor(){
    _delegates[owner()] = true;
  }

  modifier onlyDelegates {
    require(_delegates[msg.sender], "Invalid delegate" );
    _;
  }

  //onlyOwner
  function isDelegate( address addr ) external view onlyOwner returns ( bool ){
    return _delegates[addr];
  }

  function setDelegate( address addr, bool isDelegate_ ) external onlyOwner{
    _delegates[addr] = isDelegate_;
  }

  function transferOwnership(address newOwner) public virtual override onlyOwner {
    _delegates[newOwner] = true;
    super.transferOwnership( newOwner );
  }
}
ERC721Batch.sol 45 lines
// SPDX-License-Identifier: BSD-3-Clause

pragma solidity ^0.8.0;

/****************************************
 * @author: squeebo_nft                 *
 ****************************************
 *   Blimpie-FF721 provides low-gas     *
 *       mints + transfers              *
 ****************************************/

import "../Blimpie/IERC721Batch.sol";
import "./ERC721EnumerableB.sol";

abstract contract ERC721Batch is ERC721EnumerableB, IERC721Batch {
  function isOwnerOf( address account, uint[] calldata tokenIds ) external view override returns( bool ){
    for(uint i; i < tokenIds.length; ++i ){
      if( account != tokens[ tokenIds[i] ].owner )
        return false;
    }

    return true;
  }

  function transferBatch( address from, address to, uint[] calldata tokenIds, bytes calldata data ) external override{
    for(uint i; i < tokenIds.length; ++i ){
      safeTransferFrom( from, to, tokenIds[i], data );
    }
  }

  function walletOfOwner( address account ) external view override returns( uint[] memory wallet ){
    uint count;
    uint quantity = owners[ account ].balance;
    wallet = new uint[]( quantity );
    for( uint i; i < tokens.length; ++i ){
      if( account == tokens[i].owner ){
        wallet[ count++ ] = i;
        if( count == quantity )
          break;
      }
    }
    return wallet;
  }
}
IERC721Batch.sol 9 lines
// SPDX-License-Identifier: BSD-3-Clause

pragma solidity ^0.8.0;

interface IERC721Batch {
  function isOwnerOf( address account, uint[] calldata tokenIds ) external view returns( bool );
  function transferBatch( address from, address to, uint[] calldata tokenIds, bytes calldata data ) external;
  function walletOfOwner( address account ) external view returns( uint[] memory );
}
ERC721EnumerableB.sol 42 lines
// SPDX-License-Identifier: BSD-3-Clause

pragma solidity ^0.8.0;

/****************************************
 * @author: squeebo_nft                 *
 ****************************************
 *   Blimpie-ERC721 provides low-gas    *
 *       mints + transfers              *
 ****************************************/

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "./ERC721B.sol";

abstract contract ERC721EnumerableB is ERC721B, IERC721Enumerable {
  function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC165, ERC721B) returns( bool isSupported ){
    return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
  }

  function tokenOfOwnerByIndex( address owner, uint index ) external view override returns( uint tokenId ){
    uint count;
    for( uint i; i < tokens.length; ++i ){
      if( owner == tokens[i].owner ){
        if( count == index )
          return i;
        else
          ++count;
      }
    }

    revert("ERC721EnumerableB: owner index out of bounds");
  }

  function tokenByIndex( uint index ) external view override returns( uint tokenId ){
    require( index < totalSupply(), "ERC721EnumerableB: query for nonexistent token");
    return index + _offset;
  }

  function totalSupply() public view override( ERC721B, IERC721Enumerable ) returns( uint ){
    return ERC721B.totalSupply();
  }
}
PaymentSplitterMod.sol 138 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 */
contract PaymentSplitterMod is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = address(this).balance + _totalReleased;
        uint256 payment = (totalReceived * _shares[account]) / _totalShares - _released[account];
        require(payment != 0, "PaymentSplitter: account is not due payment");

        _released[account] = _released[account] + payment;
        _totalReleased = _totalReleased + payment;

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    function _addPayee(address account, uint256 shares_) internal {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }

    function _resetCounters() internal {
        _totalReleased = 0;
        for(uint i; i < _payees.length; ++i ){
            _released[ _payees[i] ] = 0;
        }
    }

    function _setPayee( uint index, address account, uint newShares ) internal {
        _totalShares = _totalShares - _shares[ account ] + newShares;
        _shares[ account ] = newShares;
        _payees[ index ] = account;
    }
}
Address.sol 222 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.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 functionCall(target, data, "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");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// 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;
    }
}
Strings.sol 67 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @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] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}
Ownable.sol 76 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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);
    }
}
IERC721.sol 143 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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 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);

    /**
     * @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;
}
ERC165.sol 29 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.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;
    }
}
IERC165.sol 25 lines
// SPDX-License-Identifier: MIT
// 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);
}
IERC721Receiver.sol 27 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}
MerkleProof.sol 60 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}
IERC721Metadata.sol 27 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.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);
}
IERC721Enumerable.sol 29 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.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);
}

Read Contract

MAX_MINT 0xf0292a03 → uint256
MAX_ORDER 0x50c5a00c → uint256
MAX_SUPPLY 0x32cb6b0c → uint256
PRICE 0x8d859f3e → uint256
balanceOf 0x70a08231 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isDelegate 0x07779627 → bool
isMainsaleActive 0x7f75c315 → bool
isOwnerOf 0x4d44660c → bool
isPresaleActive 0x60d938dc → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
owners 0x022914a7 → uint16, uint16
payee 0x8b83209b → address
released 0x9852595c → uint256
shares 0xce7c2ac2 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
tokens 0x4f64b2be → address
totalReleased 0xe33b7de3 → uint256
totalShares 0x3a98ef39 → uint256
totalSupply 0x18160ddd → uint256
walletOfOwner 0x438b6300 → uint256[]

Write Contract 16 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address to
uint256 tokenId
mint 0xba41b0c6
uint256 quantity
bytes32[] proof
mintTo 0xe966d512
uint256[] quantity
address[] recipient
release 0x19165587
address account
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setActive 0x7f608d03
bool isPresaleActive_
bool isMainsaleActive_
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x6790a9de
string _newPrefix
string _newSuffix
setConfig 0xe5c389cd
uint256 maxOrder
uint256 maxSupply
uint256 maxMint
uint256 price
setDelegate 0x4a994eef
address addr
bool isDelegate_
setMerkleRoot 0x7cb64759
bytes32 merkleRoot_
transferBatch 0xb534a5c4
address from
address to
uint256[] tokenIds
bytes data
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address