Address Contract Verified
Address
0x2098C186D7bfd9d8161E3f60945241f605Eeb2e2
Balance
0 ETH
Nonce
1
Code Size
24067 bytes
Creator
0xF096D4e0...B0e9 at tx 0xe60f442d...1ee16c
Indexed Transactions
0
Contract Bytecode
24067 bytes
0x6080604052600436106103035760003560e01c806370a0823111610190578063a22cb465116100dc578063d4e99d6511610095578063ddcd63691161006f578063ddcd636914610c10578063e33b7de314610c4d578063e985e9c514610c78578063f2fde38b14610cb55761034a565b8063d4e99d6514610b6b578063d761402214610b96578063d79779b214610bd35761034a565b8063a22cb46514610a49578063a945bf8014610a72578063b88d4fde14610a9d578063c7f8d01a14610ac6578063c87b56dd14610af1578063ce7c2ac214610b2e5761034a565b806395d89b41116101495780639970ff15116101235780639970ff15146109a95780639a39b5c6146109e65780639fb17e3414610a11578063a1978fa714610a2d5761034a565b806395d89b41146109165780639852595c1461094157806398d5fdca1461097e5761034a565b806370a0823114610808578063715018a6146108455780637caa481b1461085c5780638ac1e161146108855780638b83209b146108ae5780638da5cb5b146108eb5761034a565b80633940e9ee1161024f57806354c06aee116102085780635bc34f71116101e25780635bc34f711461074c5780635e6b248a146107775780636352211e146107a05780636c0360eb146107dd5761034a565b806354c06aee146106bb57806355f804b3146106e65780635a23dd991461070f5761034a565b80633940e9ee146105ad5780633a98ef39146105d85780633fcf79dc14610603578063406072a91461062c57806342842e0e1461066957806348b75044146106925761034a565b80630a302530116102bc5780631cac5549116102965780631cac5549146104e157806323b872dd1461051e57806325c2c020146105475780632675a2ac146105705761034a565b80630a3025301461046257806318160ddd1461048d57806319165587146104b85761034a565b80630186d1371461034f57806301ffc9a71461036b57806306866325146103a857806306fdde03146103d1578063081812fc146103fc578063095ea7b3146104395761034a565b3661034a577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be770610331610cde565b3460405161034092919061404e565b60405180910390a1005b600080fd5b610369600480360381019061036491906140f0565b610ce6565b005b34801561037757600080fd5b50610392600480360381019061038d9190614195565b611045565b60405161039f91906141dd565b60405180910390f35b3480156103b457600080fd5b506103cf60048036038101906103ca91906140f0565b6110d7565b005b3480156103dd57600080fd5b506103e66113b4565b6040516103f39190614291565b60405180910390f35b34801561040857600080fd5b50610423600480360381019061041e91906142df565b611446565b604051610430919061430c565b60405180910390f35b34801561044557600080fd5b50610460600480360381019061045b9190614353565b6114c5565b005b34801561046e57600080fd5b50610477611609565b60405161048491906143ac565b60405180910390f35b34801561049957600080fd5b506104a261160f565b6040516104af91906143c7565b60405180910390f35b3480156104c457600080fd5b506104df60048036038101906104da9190614420565b611626565b005b3480156104ed57600080fd5b506105086004803603810190610503919061444d565b6117d0565b60405161051591906143c7565b60405180910390f35b34801561052a57600080fd5b506105456004803603810190610540919061447a565b6117e8565b005b34801561055357600080fd5b5061056e600480360381019061056991906144f9565b611b0a565b005b34801561057c57600080fd5b506105976004803603810190610592919061444d565b611b90565b6040516105a491906143c7565b60405180910390f35b3480156105b957600080fd5b506105c2611ba8565b6040516105cf91906143c7565b60405180910390f35b3480156105e457600080fd5b506105ed611bad565b6040516105fa91906143c7565b60405180910390f35b34801561060f57600080fd5b5061062a60048036038101906106259190614526565b611bb7565b005b34801561063857600080fd5b50610653600480360381019061064e91906145a4565b611cf9565b60405161066091906143c7565b60405180910390f35b34801561067557600080fd5b50610690600480360381019061068b919061447a565b611d80565b005b34801561069e57600080fd5b506106b960048036038101906106b491906145a4565b611da0565b005b3480156106c757600080fd5b506106d0612058565b6040516106dd91906143ac565b60405180910390f35b3480156106f257600080fd5b5061070d60048036038101906107089190614714565b61205e565b005b34801561071b57600080fd5b506107366004803603810190610731919061475d565b6120f4565b60405161074391906141dd565b60405180910390f35b34801561075857600080fd5b50610761612152565b60405161076e9190614834565b60405180910390f35b34801561078357600080fd5b5061079e600480360381019061079991906144f9565b612165565b005b3480156107ac57600080fd5b506107c760048036038101906107c291906142df565b6121eb565b6040516107d4919061430c565b60405180910390f35b3480156107e957600080fd5b506107f26121fd565b6040516107ff9190614291565b60405180910390f35b34801561081457600080fd5b5061082f600480360381019061082a919061444d565b61228b565b60405161083c91906143c7565b60405180910390f35b34801561085157600080fd5b5061085a612343565b005b34801561086857600080fd5b50610883600480360381019061087e9190614874565b6123cb565b005b34801561089157600080fd5b506108ac60048036038101906108a791906144f9565b6124ba565b005b3480156108ba57600080fd5b506108d560048036038101906108d091906142df565b612540565b6040516108e2919061430c565b60405180910390f35b3480156108f757600080fd5b50610900612588565b60405161090d919061430c565b60405180910390f35b34801561092257600080fd5b5061092b6125b2565b6040516109389190614291565b60405180910390f35b34801561094d57600080fd5b506109686004803603810190610963919061444d565b612644565b60405161097591906143c7565b60405180910390f35b34801561098a57600080fd5b5061099361268d565b6040516109a091906143c7565b60405180910390f35b3480156109b557600080fd5b506109d060048036038101906109cb919061475d565b61271c565b6040516109dd91906141dd565b60405180910390f35b3480156109f257600080fd5b506109fb61277a565b604051610a0891906143ac565b60405180910390f35b610a2b6004803603810190610a2691906142df565b612780565b005b610a476004803603810190610a4291906148a1565b612979565b005b348015610a5557600080fd5b50610a706004803603810190610a6b919061492d565b612ca2565b005b348015610a7e57600080fd5b50610a87612e19565b604051610a9491906143c7565b60405180910390f35b348015610aa957600080fd5b50610ac46004803603810190610abf9190614a0e565b612e1f565b005b348015610ad257600080fd5b50610adb612e92565b604051610ae891906143c7565b60405180910390f35b348015610afd57600080fd5b50610b186004803603810190610b1391906142df565b612e98565b604051610b259190614291565b60405180910390f35b348015610b3a57600080fd5b50610b556004803603810190610b50919061444d565b612f14565b604051610b6291906143c7565b60405180910390f35b348015610b7757600080fd5b50610b80612f5d565b604051610b8d91906143c7565b60405180910390f35b348015610ba257600080fd5b50610bbd6004803603810190610bb8919061475d565b612f62565b604051610bca91906141dd565b60405180910390f35b348015610bdf57600080fd5b50610bfa6004803603810190610bf59190614a91565b612fc0565b604051610c0791906143c7565b60405180910390f35b348015610c1c57600080fd5b50610c376004803603810190610c32919061444d565b613009565b604051610c4491906143c7565b60405180910390f35b348015610c5957600080fd5b50610c62613021565b604051610c6f91906143c7565b60405180910390f35b348015610c8457600080fd5b50610c9f6004803603810190610c9a9190614abe565b61302b565b604051610cac91906141dd565b60405180910390f35b348015610cc157600080fd5b50610cdc6004803603810190610cd7919061444d565b6130bf565b005b600033905090565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610d54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4b90614b4a565b60405180910390fd5b60016005811115610d6857610d676147bd565b5b601060009054906101000a900460ff166005811115610d8a57610d896147bd565b5b1480610dc85750610d99612588565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610e07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfe90614bb6565b60405180910390fd5b610e1233838361271c565b610e51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4890614c22565b60405180910390fd5b600180601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e9e9190614c71565b1115610edf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed690614d39565b60405180910390fd5b60c06001610eeb61160f565b610ef59190614c71565b1115610f36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2d90614da5565b60405180910390fd5b601454341015610f7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f7290614e11565b60405180910390fd5b6001601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610fcb9190614c71565b92505081905550610fdd3360016131b6565b3373ffffffffffffffffffffffffffffffffffffffff167feff9f077f1207b83027e08031c59a0419e4c4cb703fbaf5d6cce18939af070dc600161101f61160f565b6110299190614e31565b6001604051611039929190614eaa565b60405180910390a25050565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806110a057506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806110d05750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611145576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113c90614b4a565b60405180910390fd5b60046005811115611159576111586147bd565b5b601060009054906101000a900460ff16600581111561117b5761117a6147bd565b5b146111bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b290614f1f565b60405180910390fd5b6111c6338383612f62565b611205576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111fc90614f8b565b60405180910390fd5b60de600161121161160f565b61121b9190614c71565b111561125c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125390614da5565b60405180910390fd5b600180601860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112a99190614c71565b11156112ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e19061501d565b60405180910390fd5b6001601860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461133a9190614c71565b9250508190555061134c3360016131b6565b3373ffffffffffffffffffffffffffffffffffffffff167feff9f077f1207b83027e08031c59a0419e4c4cb703fbaf5d6cce18939af070dc600161138e61160f565b6113989190614e31565b60016040516113a8929190614eaa565b60405180910390a25050565b6060600280546113c39061506c565b80601f01602080910402602001604051908101604052809291908181526020018280546113ef9061506c565b801561143c5780601f106114115761010080835404028352916020019161143c565b820191906000526020600020905b81548152906001019060200180831161141f57829003601f168201915b5050505050905090565b6000611451826131d4565b611487576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006114d0826121eb565b90508073ffffffffffffffffffffffffffffffffffffffff166114f1613233565b73ffffffffffffffffffffffffffffffffffffffff16146115545761151d81611518613233565b61302b565b611553576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b60115481565b600061161961323b565b6001546000540303905090565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054116116a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169f9061510f565b60405180910390fd5b60006116b2613021565b476116bd9190614c71565b905060006116d483836116cf86612644565b613240565b905060008103611719576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611710906151a1565b60405180910390fd5b80600c60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117689190614c71565b9250508190555080600a60008282546117819190614c71565b9250508190555061179283826132ae565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b05683826040516117c3929190615216565b60405180910390a1505050565b60186020528060005260406000206000915090505481565b60006117f3826133a2565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461185a576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806118668461346e565b9150915061187c8187611877613233565b613495565b6118c8576118918661188c613233565b61302b565b6118c7576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361192e576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61193b86868660016134d9565b801561194657600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550611a14856119f08888876134df565b7c020000000000000000000000000000000000000000000000000000000017613507565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603611a9a5760006001850190506000600460008381526020019081526020016000205403611a98576000548114611a97578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611b028686866001613532565b505050505050565b611b12610cde565b73ffffffffffffffffffffffffffffffffffffffff16611b30612588565b73ffffffffffffffffffffffffffffffffffffffff1614611b86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7d9061528b565b60405180910390fd5b8060118190555050565b60166020528060005260406000206000915090505481565b60de81565b6000600954905090565b611bbf610cde565b73ffffffffffffffffffffffffffffffffffffffff16611bdd612588565b73ffffffffffffffffffffffffffffffffffffffff1614611c33576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2a9061528b565b60405180910390fd5b60de82611c3e61160f565b611c489190614c71565b1115611c89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c80906152f7565b60405180910390fd5b611c9381836131b6565b8073ffffffffffffffffffffffffffffffffffffffff167feff9f077f1207b83027e08031c59a0419e4c4cb703fbaf5d6cce18939af070dc83611cd461160f565b611cde9190614e31565b84604051611ced929190615317565b60405180910390a25050565b6000600f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611d9b83838360405180602001604052806000815250612e1f565b505050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411611e22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e199061510f565b60405180910390fd5b6000611e2d83612fc0565b8373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611e66919061430c565b602060405180830381865afa158015611e83573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea79190615355565b611eb19190614c71565b90506000611ec98383611ec48787611cf9565b613240565b905060008103611f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f05906151a1565b60405180910390fd5b80600f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611f9a9190614c71565b9250508190555080600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ff09190614c71565b92505081905550612002848483613538565b8373ffffffffffffffffffffffffffffffffffffffff167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a848360405161204a92919061404e565b60405180910390a250505050565b60125481565b612066610cde565b73ffffffffffffffffffffffffffffffffffffffff16612084612588565b73ffffffffffffffffffffffffffffffffffffffff16146120da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d19061528b565b60405180910390fd5b80601990805190602001906120f0929190613f51565b5050565b6000612149612102856135be565b848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506135ee565b90509392505050565b601060009054906101000a900460ff1681565b61216d610cde565b73ffffffffffffffffffffffffffffffffffffffff1661218b612588565b73ffffffffffffffffffffffffffffffffffffffff16146121e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d89061528b565b60405180910390fd5b8060138190555050565b60006121f6826133a2565b9050919050565b6019805461220a9061506c565b80601f01602080910402602001604051908101604052809291908181526020018280546122369061506c565b80156122835780601f1061225857610100808354040283529160200191612283565b820191906000526020600020905b81548152906001019060200180831161226657829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036122f2576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b61234b610cde565b73ffffffffffffffffffffffffffffffffffffffff16612369612588565b73ffffffffffffffffffffffffffffffffffffffff16146123bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123b69061528b565b60405180910390fd5b6123c96000613605565b565b6123d3610cde565b73ffffffffffffffffffffffffffffffffffffffff166123f1612588565b73ffffffffffffffffffffffffffffffffffffffff1614612447576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161243e9061528b565b60405180910390fd5b80601060006101000a81548160ff0219169083600581111561246c5761246b6147bd565b5b02179055507f6681b482253041a793a0d9c11f85c74822e7f2774e90b5ddfcb9090c33b098c5601060009054906101000a900460ff166040516124af9190614834565b60405180910390a150565b6124c2610cde565b73ffffffffffffffffffffffffffffffffffffffff166124e0612588565b73ffffffffffffffffffffffffffffffffffffffff1614612536576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161252d9061528b565b60405180910390fd5b8060128190555050565b6000600d828154811061255657612555615382565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546125c19061506c565b80601f01602080910402602001604051908101604052809291908181526020018280546125ed9061506c565b801561263a5780601f1061260f5761010080835404028352916020019161263a565b820191906000526020600020905b81548152906001019060200180831161261d57829003601f168201915b5050505050905090565b6000600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600260058111156126a3576126a26147bd565b5b601060009054906101000a900460ff1660058111156126c5576126c46147bd565b5b14806127045750600160058111156126e0576126df6147bd565b5b601060009054906101000a900460ff166005811115612702576127016147bd565b5b145b15612713576014549050612719565b60155490505b90565b600061277161272a856135be565b848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506136cb565b90509392505050565b60135481565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146127ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127e590614b4a565b60405180910390fd5b60036005811115612802576128016147bd565b5b601060009054906101000a900460ff166005811115612824576128236147bd565b5b14612864576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161285b906153fd565b60405180910390fd5b60c08161286f61160f565b6128799190614c71565b11156128ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128b190614da5565b60405180910390fd5b806015546128c8919061541d565b34101561290a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161290190614e11565b60405180910390fd5b61291433826131b6565b3373ffffffffffffffffffffffffffffffffffffffff167feff9f077f1207b83027e08031c59a0419e4c4cb703fbaf5d6cce18939af070dc8261295561160f565b61295f9190614e31565b8360405161296e929190615317565b60405180910390a250565b3373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146129e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129de90614b4a565b60405180910390fd5b600260058111156129fb576129fa6147bd565b5b601060009054906101000a900460ff166005811115612a1d57612a1c6147bd565b5b14612a5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a54906154c3565b60405180910390fd5b612a683384846120f4565b612aa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a9e9061552f565b60405180910390fd5b600281601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612af49190614c71565b1115612b35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b2c906155c1565b60405180910390fd5b60c081612b4061160f565b612b4a9190614c71565b1115612b8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b8290614da5565b60405180910390fd5b80601454612b99919061541d565b341015612bdb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bd290614e11565b60405180910390fd5b80601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612c2a9190614c71565b92505081905550612c3b33826131b6565b3373ffffffffffffffffffffffffffffffffffffffff167feff9f077f1207b83027e08031c59a0419e4c4cb703fbaf5d6cce18939af070dc82612c7c61160f565b612c869190614e31565b83604051612c95929190615317565b60405180910390a2505050565b612caa613233565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612d0e576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060076000612d1b613233565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16612dc8613233565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612e0d91906141dd565b60405180910390a35050565b60155481565b612e2a8484846117e8565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612e8c57612e55848484846136e2565b612e8b576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b60145481565b6060612ea3826131d4565b612ee2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ed990615653565b60405180910390fd5b6019612eed83613832565b604051602001612efe92919061578f565b6040516020818303038152906040529050919050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60c081565b6000612fb7612f70856135be565b848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050613992565b90509392505050565b6000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60176020528060005260406000206000915090505481565b6000600a54905090565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6130c7610cde565b73ffffffffffffffffffffffffffffffffffffffff166130e5612588565b73ffffffffffffffffffffffffffffffffffffffff161461313b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131329061528b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036131aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131a190615830565b60405180910390fd5b6131b381613605565b50565b6131d08282604051806020016040528060008152506139a9565b5050565b6000816131df61323b565b111580156131ee575060005482105b801561322c575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b600090565b600081600954600b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205485613291919061541d565b61329b919061587f565b6132a59190614e31565b90509392505050565b804710156132f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132e8906158fc565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff16826040516133179061594d565b60006040518083038185875af1925050503d8060008114613354576040519150601f19603f3d011682016040523d82523d6000602084013e613359565b606091505b505090508061339d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613394906159d4565b60405180910390fd5b505050565b600080829050806133b161323b565b11613437576000548110156134365760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603613434575b6000810361342a576004600083600190039350838152602001908152602001600020549050613400565b8092505050613469565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e86134f6868684613a46565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6135b98363a9059cbb60e01b848460405160240161355792919061404e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050613a4f565b505050565b6000816040516020016135d19190615a3c565b604051602081830303815290604052805190602001209050919050565b60006135fd8260125485613b16565b905092915050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006136da8260115485613b16565b905092915050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a02613708613233565b8786866040518563ffffffff1660e01b815260040161372a9493929190615aac565b6020604051808303816000875af192505050801561376657506040513d601f19601f820116820180604052508101906137639190615b0d565b60015b6137df573d8060008114613796576040519150601f19603f3d011682016040523d82523d6000602084013e61379b565b606091505b5060008151036137d7576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b606060008203613879576040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905061398d565b600082905060005b600082146138ab57808061389490615b3a565b915050600a826138a4919061587f565b9150613881565b60008167ffffffffffffffff8111156138c7576138c66145e9565b5b6040519080825280601f01601f1916602001820160405280156138f95781602001600182028036833780820191505090505b5090505b60008514613986576001826139129190614e31565b9150600a856139219190615b82565b603061392d9190614c71565b60f81b81838151811061394357613942615382565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8561397f919061587f565b94506138fd565b8093505050505b919050565b60006139a18260135485613b16565b905092915050565b6139b38383613b2d565b60008373ffffffffffffffffffffffffffffffffffffffff163b14613a4157600080549050600083820390505b6139f360008683806001019450866136e2565b613a29576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181106139e0578160005414613a3e57600080fd5b50505b505050565b60009392505050565b6000613ab1826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16613cff9092919063ffffffff16565b9050600081511115613b115780806020019051810190613ad19190615bc8565b613b10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b0790615c67565b60405180910390fd5b5b505050565b600082613b238584613d17565b1490509392505050565b600080549050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603613b99576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008203613bd3576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613be060008483856134d9565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550613c5783613c4860008660006134df565b613c5185613d8c565b17613507565b60046000838152602001908152602001600020819055506000819050600083830190505b818060010192508573ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4808210613c7b57806000819055505050613cfa6000848385613532565b505050565b6060613d0e8484600085613d9c565b90509392505050565b60008082905060005b8451811015613d81576000858281518110613d3e57613d3d615382565b5b60200260200101519050808311613d6057613d598382613eb0565b9250613d6d565b613d6a8184613eb0565b92505b508080613d7990615b3a565b915050613d20565b508091505092915050565b60006001821460e11b9050919050565b606082471015613de1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613dd890615cf9565b60405180910390fd5b613dea85613ec7565b613e29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613e2090615d65565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051613e529190615db6565b60006040518083038185875af1925050503d8060008114613e8f576040519150601f19603f3d011682016040523d82523d6000602084013e613e94565b606091505b5091509150613ea4828286613eea565b92505050949350505050565b600082600052816020526040600020905092915050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60608315613efa57829050613f4a565b600083511115613f0d5782518084602001fd5b816040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613f419190614291565b60405180910390fd5b9392505050565b828054613f5d9061506c565b90600052602060002090601f016020900481019282613f7f5760008555613fc6565b82601f10613f9857805160ff1916838001178555613fc6565b82800160010185558215613fc6579182015b82811115613fc5578251825591602001919060010190613faa565b5b509050613fd39190613fd7565b5090565b5b80821115613ff0576000816000905550600101613fd8565b5090565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061401f82613ff4565b9050919050565b61402f81614014565b82525050565b6000819050919050565b61404881614035565b82525050565b60006040820190506140636000830185614026565b614070602083018461403f565b9392505050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126140b0576140af61408b565b5b8235905067ffffffffffffffff8111156140cd576140cc614090565b5b6020830191508360208202830111156140e9576140e8614095565b5b9250929050565b6000806020838503121561410757614106614081565b5b600083013567ffffffffffffffff81111561412557614124614086565b5b6141318582860161409a565b92509250509250929050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6141728161413d565b811461417d57600080fd5b50565b60008135905061418f81614169565b92915050565b6000602082840312156141ab576141aa614081565b5b60006141b984828501614180565b91505092915050565b60008115159050919050565b6141d7816141c2565b82525050565b60006020820190506141f260008301846141ce565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015614232578082015181840152602081019050614217565b83811115614241576000848401525b50505050565b6000601f19601f8301169050919050565b6000614263826141f8565b61426d8185614203565b935061427d818560208601614214565b61428681614247565b840191505092915050565b600060208201905081810360008301526142ab8184614258565b905092915050565b6142bc81614035565b81146142c757600080fd5b50565b6000813590506142d9816142b3565b92915050565b6000602082840312156142f5576142f4614081565b5b6000614303848285016142ca565b91505092915050565b60006020820190506143216000830184614026565b92915050565b61433081614014565b811461433b57600080fd5b50565b60008135905061434d81614327565b92915050565b6000806040838503121561436a57614369614081565b5b60006143788582860161433e565b9250506020614389858286016142ca565b9150509250929050565b6000819050919050565b6143a681614393565b82525050565b60006020820190506143c1600083018461439d565b92915050565b60006020820190506143dc600083018461403f565b92915050565b60006143ed82613ff4565b9050919050565b6143fd816143e2565b811461440857600080fd5b50565b60008135905061441a816143f4565b92915050565b60006020828403121561443657614435614081565b5b60006144448482850161440b565b91505092915050565b60006020828403121561446357614462614081565b5b60006144718482850161433e565b91505092915050565b60008060006060848603121561449357614492614081565b5b60006144a18682870161433e565b93505060206144b28682870161433e565b92505060406144c3868287016142ca565b9150509250925092565b6144d681614393565b81146144e157600080fd5b50565b6000813590506144f3816144cd565b92915050565b60006020828403121561450f5761450e614081565b5b600061451d848285016144e4565b91505092915050565b6000806040838503121561453d5761453c614081565b5b600061454b858286016142ca565b925050602061455c8582860161433e565b9150509250929050565b600061457182614014565b9050919050565b61458181614566565b811461458c57600080fd5b50565b60008135905061459e81614578565b92915050565b600080604083850312156145bb576145ba614081565b5b60006145c98582860161458f565b92505060206145da8582860161433e565b9150509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61462182614247565b810181811067ffffffffffffffff821117156146405761463f6145e9565b5b80604052505050565b6000614653614077565b905061465f8282614618565b919050565b600067ffffffffffffffff82111561467f5761467e6145e9565b5b61468882614247565b9050602081019050919050565b82818337600083830152505050565b60006146b76146b284614664565b614649565b9050828152602081018484840111156146d3576146d26145e4565b5b6146de848285614695565b509392505050565b600082601f8301126146fb576146fa61408b565b5b813561470b8482602086016146a4565b91505092915050565b60006020828403121561472a57614729614081565b5b600082013567ffffffffffffffff81111561474857614747614086565b5b614754848285016146e6565b91505092915050565b60008060006040848603121561477657614775614081565b5b60006147848682870161433e565b935050602084013567ffffffffffffffff8111156147a5576147a4614086565b5b6147b18682870161409a565b92509250509250925092565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600681106147fd576147fc6147bd565b5b50565b600081905061480e826147ec565b919050565b600061481e82614800565b9050919050565b61482e81614813565b82525050565b60006020820190506148496000830184614825565b92915050565b6006811061485c57600080fd5b50565b60008135905061486e8161484f565b92915050565b60006020828403121561488a57614889614081565b5b60006148988482850161485f565b91505092915050565b6000806000604084860312156148ba576148b9614081565b5b600084013567ffffffffffffffff8111156148d8576148d7614086565b5b6148e48682870161409a565b935093505060206148f7868287016142ca565b9150509250925092565b61490a816141c2565b811461491557600080fd5b50565b60008135905061492781614901565b92915050565b6000806040838503121561494457614943614081565b5b60006149528582860161433e565b925050602061496385828601614918565b9150509250929050565b600067ffffffffffffffff821115614988576149876145e9565b5b61499182614247565b9050602081019050919050565b60006149b16149ac8461496d565b614649565b9050828152602081018484840111156149cd576149cc6145e4565b5b6149d8848285614695565b509392505050565b600082601f8301126149f5576149f461408b565b5b8135614a0584826020860161499e565b91505092915050565b60008060008060808587031215614a2857614a27614081565b5b6000614a368782880161433e565b9450506020614a478782880161433e565b9350506040614a58878288016142ca565b925050606085013567ffffffffffffffff811115614a7957614a78614086565b5b614a85878288016149e0565b91505092959194509250565b600060208284031215614aa757614aa6614081565b5b6000614ab58482850161458f565b91505092915050565b60008060408385031215614ad557614ad4614081565b5b6000614ae38582860161433e565b9250506020614af48582860161433e565b9150509250929050565b7f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000600082015250565b6000614b34601e83614203565b9150614b3f82614afe565b602082019050919050565b60006020820190508181036000830152614b6381614b27565b9050919050565b7f546865204f472073616c65206973206e6f74206f70656e2e0000000000000000600082015250565b6000614ba0601883614203565b9150614bab82614b6a565b602082019050919050565b60006020820190508181036000830152614bcf81614b93565b9050919050565b7f4e6f74204f472e00000000000000000000000000000000000000000000000000600082015250565b6000614c0c600783614203565b9150614c1782614bd6565b602082019050919050565b60006020820190508181036000830152614c3b81614bff565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614c7c82614035565b9150614c8783614035565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614cbc57614cbb614c42565b5b828201905092915050565b7f596f752063616e206f6e6c79206d696e742031204e46542077697468204f472060008201527f726f6c6500000000000000000000000000000000000000000000000000000000602082015250565b6000614d23602483614203565b9150614d2e82614cc7565b604082019050919050565b60006020820190508181036000830152614d5281614d16565b9050919050565b7f4d617820737570706c7920657863656564656400000000000000000000000000600082015250565b6000614d8f601383614203565b9150614d9a82614d59565b602082019050919050565b60006020820190508181036000830152614dbe81614d82565b9050919050565b7f4e6f7420656e6f75676820455448000000000000000000000000000000000000600082015250565b6000614dfb600e83614203565b9150614e0682614dc5565b602082019050919050565b60006020820190508181036000830152614e2a81614dee565b9050919050565b6000614e3c82614035565b9150614e4783614035565b925082821015614e5a57614e59614c42565b5b828203905092915050565b6000819050919050565b6000819050919050565b6000614e94614e8f614e8a84614e65565b614e6f565b614035565b9050919050565b614ea481614e79565b82525050565b6000604082019050614ebf600083018561403f565b614ecc6020830184614e9b565b9392505050565b7f54686520467265654d696e742073616c65206973206e6f74206f70656e2e0000600082015250565b6000614f09601e83614203565b9150614f1482614ed3565b602082019050919050565b60006020820190508181036000830152614f3881614efc565b9050919050565b7f596f7520646f6e277420686176652046726565206d696e742e00000000000000600082015250565b6000614f75601983614203565b9150614f8082614f3f565b602082019050919050565b60006020820190508181036000830152614fa481614f68565b9050919050565b7f596f752063616e206f6e6c79206d696e742031204e465420776974682046726560008201527f654d696e7420726f6c6500000000000000000000000000000000000000000000602082015250565b6000615007602a83614203565b915061501282614fab565b604082019050919050565b6000602082019050818103600083015261503681614ffa565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061508457607f821691505b6020821081036150975761509661503d565b5b50919050565b7f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060008201527f7368617265730000000000000000000000000000000000000000000000000000602082015250565b60006150f9602683614203565b91506151048261509d565b604082019050919050565b60006020820190508181036000830152615128816150ec565b9050919050565b7f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060008201527f647565207061796d656e74000000000000000000000000000000000000000000602082015250565b600061518b602b83614203565b91506151968261512f565b604082019050919050565b600060208201905081810360008301526151ba8161517e565b9050919050565b60006151dc6151d76151d284613ff4565b614e6f565b613ff4565b9050919050565b60006151ee826151c1565b9050919050565b6000615200826151e3565b9050919050565b615210816151f5565b82525050565b600060408201905061522b6000830185615207565b615238602083018461403f565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000615275602083614203565b91506152808261523f565b602082019050919050565b600060208201905081810360008301526152a481615268565b9050919050565b7f4d617820737570706c792065786365656465642e000000000000000000000000600082015250565b60006152e1601483614203565b91506152ec826152ab565b602082019050919050565b60006020820190508181036000830152615310816152d4565b9050919050565b600060408201905061532c600083018561403f565b615339602083018461403f565b9392505050565b60008151905061534f816142b3565b92915050565b60006020828403121561536b5761536a614081565b5b600061537984828501615340565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f546865207075626c69632073616c65206973206e6f74206f70656e2e00000000600082015250565b60006153e7601c83614203565b91506153f2826153b1565b602082019050919050565b60006020820190508181036000830152615416816153da565b9050919050565b600061542882614035565b915061543383614035565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561546c5761546b614c42565b5b828202905092915050565b7f54686520574c2073616c65206973206e6f74206f70656e2e0000000000000000600082015250565b60006154ad601883614203565b91506154b882615477565b602082019050919050565b600060208201905081810360008301526154dc816154a0565b9050919050565b7f4e6f7420574c2e00000000000000000000000000000000000000000000000000600082015250565b6000615519600783614203565b9150615524826154e3565b602082019050919050565b600060208201905081810360008301526155488161550c565b9050919050565b7f596f752063616e206f6e6c79206d696e742032204e465473207769746820574c60008201527f20726f6c65000000000000000000000000000000000000000000000000000000602082015250565b60006155ab602583614203565b91506155b68261554f565b604082019050919050565b600060208201905081810360008301526155da8161559e565b9050919050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b600061563d602f83614203565b9150615648826155e1565b604082019050919050565b6000602082019050818103600083015261566c81615630565b9050919050565b600081905092915050565b60008190508160005260206000209050919050565b600081546156a08161506c565b6156aa8186615673565b945060018216600081146156c557600181146156d657615709565b60ff19831686528186019350615709565b6156df8561567e565b60005b83811015615701578154818901526001820191506020810190506156e2565b838801955050505b50505092915050565b600061571d826141f8565b6157278185615673565b9350615737818560208601614214565b80840191505092915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000600082015250565b6000615779600583615673565b915061578482615743565b600582019050919050565b600061579b8285615693565b91506157a78284615712565b91506157b28261576c565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061581a602683614203565b9150615825826157be565b604082019050919050565b600060208201905081810360008301526158498161580d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061588a82614035565b915061589583614035565b9250826158a5576158a4615850565b5b828204905092915050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b60006158e6601d83614203565b91506158f1826158b0565b602082019050919050565b60006020820190508181036000830152615915816158d9565b9050919050565b600081905092915050565b50565b600061593760008361591c565b915061594282615927565b600082019050919050565b60006159588261592a565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b60006159be603a83614203565b91506159c982615962565b604082019050919050565b600060208201905081810360008301526159ed816159b1565b9050919050565b60008160601b9050919050565b6000615a0c826159f4565b9050919050565b6000615a1e82615a01565b9050919050565b615a36615a3182614014565b615a13565b82525050565b6000615a488284615a25565b60148201915081905092915050565b600081519050919050565b600082825260208201905092915050565b6000615a7e82615a57565b615a888185615a62565b9350615a98818560208601614214565b615aa181614247565b840191505092915050565b6000608082019050615ac16000830187614026565b615ace6020830186614026565b615adb604083018561403f565b8181036060830152615aed8184615a73565b905095945050505050565b600081519050615b0781614169565b92915050565b600060208284031215615b2357615b22614081565b5b6000615b3184828501615af8565b91505092915050565b6000615b4582614035565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615b7757615b76614c42565b5b600182019050919050565b6000615b8d82614035565b9150615b9883614035565b925082615ba857615ba7615850565b5b828206905092915050565b600081519050615bc281614901565b92915050565b600060208284031215615bde57615bdd614081565b5b6000615bec84828501615bb3565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000615c51602a83614203565b9150615c5c82615bf5565b604082019050919050565b60006020820190508181036000830152615c8081615c44565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000615ce3602683614203565b9150615cee82615c87565b604082019050919050565b60006020820190508181036000830152615d1281615cd6565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000615d4f601d83614203565b9150615d5a82615d19565b602082019050919050565b60006020820190508181036000830152615d7e81615d42565b9050919050565b6000615d9082615a57565b615d9a818561591c565b9350615daa818560208601614214565b80840191505092915050565b6000615dc28284615d85565b91508190509291505056fea26469706673582212208be76a2a2b6b687b0d1fbe1d439b79b88e8087da975e9ace17f93fe1b5b7487864736f6c634300080d0033
Verified Source Code Full Match
Compiler: v0.8.13+commit.abaa5c0e
EVM: london
Optimization: No
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);
}
}
Counters.sol 43 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}
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);
}
}
IERC721A.sol 277 lines
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of an ERC721A compliant contract.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* The caller cannot approve to their own address.
*/
error ApproveToCaller();
/**
* Cannot query the balance for the zero address.
*/
error BalanceQueryForZeroAddress();
/**
* Cannot mint to the zero address.
*/
error MintToZeroAddress();
/**
* The quantity of tokens minted must be more than zero.
*/
error MintZeroQuantity();
/**
* The token does not exist.
*/
error OwnerQueryForNonexistentToken();
/**
* The caller must own the token or be an approved operator.
*/
error TransferCallerNotOwnerNorApproved();
/**
* The token must be owned by `from`.
*/
error TransferFromIncorrectOwner();
/**
* Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
*/
error TransferToNonERC721ReceiverImplementer();
/**
* Cannot transfer to the zero address.
*/
error TransferToZeroAddress();
/**
* The token does not exist.
*/
error URIQueryForNonexistentToken();
/**
* The `quantity` minted with ERC2309 exceeds the safety limit.
*/
error MintERC2309QuantityExceedsLimit();
/**
* The `extraData` cannot be set on an unintialized ownership slot.
*/
error OwnershipNotInitializedForExtraData();
struct TokenOwnership {
// The address of the owner.
address addr;
// Keeps track of the start time of ownership with minimal overhead for tokenomics.
uint64 startTimestamp;
// Whether the token has been burned.
bool burned;
// Arbitrary data similar to `startTimestamp` that can be set through `_extraData`.
uint24 extraData;
}
/**
* @dev Returns the total amount of tokens stored by the contract.
*
* Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
*/
function totalSupply() external view returns (uint256);
// ==============================
// 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);
// ==============================
// IERC721
// ==============================
/**
* @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 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 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);
// ==============================
// IERC721Metadata
// ==============================
/**
* @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);
// ==============================
// IERC2309
// ==============================
/**
* @dev Emitted when tokens in `fromTokenId` to `toTokenId` (inclusive) is transferred from `from` to `to`,
* as defined in the ERC2309 standard. See `_mintERC2309` for more details.
*/
event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}
SafeERC20.sol 99 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
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);
}
}
}
}
IERC20.sol 82 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
B3ARMARKETisERC721A.sol 261 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import "./ERC721A/ERC721A.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
contract B3ARMARKETisERC721A is ERC721A, Ownable, PaymentSplitter {
using Strings for uint;
enum Step {
SaleNotStarted,
OGSale,
WhitelistSale,
PublicSale,
FreeMint,
SoldOut
}
Step public currentStep;
bytes32 public ogMerkleRoot; // OG merkle root
bytes32 public wlMerkleRoot; // Whitelist merkle root
bytes32 public fmMerkleRoot; // FreeMint merkle root
uint public wlPrice = 0.00625 ether;
uint public publicPrice = 0.0125 ether;
mapping(address => uint) public mintByWalletOG;
mapping(address => uint) public mintByWalletWL;
mapping(address => uint) public mintByWalletFM;
uint public constant sale_supply = 192;
uint public constant total_supply = 222;
string public baseURI;
event stepUpdated(Step currentStep);
event newMint(address indexed owner, uint256 startId, uint256 number);
/*
* @notice Initializes the contract with the given parameters.
* @param baseURI The base token URI of the token.
* @param rootOfMerkle The root of the merkle tree.
* @param teamMembers The team members of the token.
*/
constructor(string memory _baseURI, bytes32 _ogMerkleRoot, bytes32 _wlMerkleRoot, bytes32 _fmMerkleRoot, address[] memory _team, uint[] memory _teamShares)
ERC721A("B3AR MARKET", "B3AR")
PaymentSplitter(_team, _teamShares)
{
baseURI = _baseURI;
ogMerkleRoot = _ogMerkleRoot;
wlMerkleRoot = _wlMerkleRoot;
fmMerkleRoot = _fmMerkleRoot;
}
/*
* @notice Modifier to check if the sender is not a contract
*/
modifier callerIsUser() {
require(tx.origin == msg.sender, "The caller is another contract");
_;
}
/*
* @notice OG mint function
* @param _proof Merkle Proof for OG
*/
function OGMint(bytes32[] calldata _proof) external payable callerIsUser {
require(currentStep == Step.OGSale || msg.sender == owner(), "The OG sale is not open.");
require(isOG(msg.sender, _proof), "Not OG.");
require(mintByWalletOG[msg.sender] + 1 <= 1, "You can only mint 1 NFT with OG role");
require(totalSupply() + 1 <= sale_supply, "Max supply exceeded");
require(msg.value >= wlPrice, "Not enough ETH");
mintByWalletOG[msg.sender] += 1;
_safeMint(msg.sender, 1);
emit newMint(msg.sender, totalSupply() - 1, 1);
}
/*
* @notice WL mint function
* @param _proof Merkle Proof for WL
* @param _amount The amount of tokens to mint. (max 2)
*/
function WLMint(bytes32[] calldata _proof, uint256 _amount) external payable callerIsUser {
require(currentStep == Step.WhitelistSale, "The WL sale is not open.");
require(isWhitelisted(msg.sender, _proof), "Not WL.");
require(mintByWalletWL[msg.sender] + _amount <= 2, "You can only mint 2 NFTs with WL role");
require(totalSupply() + _amount <= sale_supply, "Max supply exceeded");
require(msg.value >= wlPrice * _amount, "Not enough ETH");
mintByWalletWL[msg.sender] += _amount;
_safeMint(msg.sender, _amount);
emit newMint(msg.sender, totalSupply() - _amount, _amount);
}
/*
* @notice public mint function
* @param _amount The amount of tokens to mint. (no limit)
*/
function PublicMint(uint256 _amount) external payable callerIsUser {
require(currentStep == Step.PublicSale, "The public sale is not open.");
require(totalSupply() + _amount <= sale_supply, "Max supply exceeded");
require(msg.value >= publicPrice * _amount, "Not enough ETH");
_safeMint(msg.sender, _amount);
emit newMint(msg.sender, totalSupply() - _amount, _amount);
}
/*
* @notice FreeMint mint function
* @param _proof Merkle Proof for FreeMint
*/
function FreeMint(bytes32[] calldata _proof) external callerIsUser {
require(currentStep == Step.FreeMint, "The FreeMint sale is not open.");
require(isFreeMint(msg.sender, _proof), "You don't have Free mint.");
require(totalSupply() + 1 <= total_supply, "Max supply exceeded");
require(mintByWalletFM[msg.sender] + 1 <= 1, "You can only mint 1 NFT with FreeMint role");
mintByWalletFM[msg.sender] += 1;
_safeMint(msg.sender, 1);
emit newMint(msg.sender, totalSupply() - 1, 1);
}
/*
* @notice Owner mint function (WILL BE NEVER USED IF USERS CLAIM THEIR FREE MINTS
* @param _count The number of NFTs to mint
* @param _to The address to mint the NFTs to
*/
function mintForOwner(uint _count, address _to) external onlyOwner {
require(totalSupply() + _count <= total_supply, "Max supply exceeded.");
_safeMint(_to, _count);
emit newMint(_to, totalSupply() - _count, _count);
}
/*
* @notice update step
* @param _step step to update
*/
function updateStep(Step _step) external onlyOwner {
currentStep = _step;
emit stepUpdated(currentStep);
}
/*
* @notice set base token URI
* @param _baseURI string
*/
function setBaseURI(string memory _baseURI) public onlyOwner {
baseURI = _baseURI;
}
/*
* @notice set wl merkle root
* @param _merkleRoot bytes32
*/
function setOGMerkleRoot(bytes32 _ogMerkleRoot) public onlyOwner {
ogMerkleRoot = _ogMerkleRoot;
}
/*
* @notice set wl merkle root
* @param _merkleRoot bytes32
*/
function setWlMerkleRoot(bytes32 _wlMerkleRoot) public onlyOwner {
wlMerkleRoot = _wlMerkleRoot;
}
/*
* @notice set fm merkle root
* @param _merkleRoot bytes32
*/
function setFMMerkleRoot(bytes32 _fmMerkleRoot) public onlyOwner {
fmMerkleRoot = _fmMerkleRoot;
}
/*
* @notice return token URI
* @param _tokenId uint256 id of token
*/
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
require(_exists(_tokenId),"ERC721Metadata: URI query for nonexistent token");
return string(abi.encodePacked(baseURI, _tokenId.toString(), ".json"));
}
/*
* @notice return current price
*/
function getPrice() public view returns (uint) {
if (currentStep == Step.WhitelistSale || currentStep == Step.OGSale) {
return wlPrice;
} else {
return publicPrice;
}
}
/*
* @notice know if user is OG
* @param _account address of user
* @param proof Merkle proof
*/
function isOG(address _account, bytes32[] calldata proof) public view returns(bool) {
return _verifyOG(_leaf(_account), proof);
}
/*
* @notice know if user is whitelisted
* @param _account address of user
* @param proof Merkle proof
*/
function isWhitelisted(address _account, bytes32[] calldata proof) public view returns(bool) {
return _verifyWL(_leaf(_account), proof);
}
/*
* @notice know if user is free mint
* @param _account address of user
* @param proof Merkle proof
*/
function isFreeMint(address _account, bytes32[] calldata proof) public view returns(bool) {
return _verifyFM(_leaf(_account), proof);
}
/*
* @notice get merkle _leaf
* @param _account address of user
*/
function _leaf(address _account) internal pure returns(bytes32) {
return keccak256(abi.encodePacked(_account));
}
/*
* @notice verify if user is whitelisted OG
* @param leaf bytes32 leaf of merkle tree
* @param proof bytes32 Merkle proof
*/
function _verifyOG(bytes32 leaf, bytes32[] memory proof) internal view returns(bool) {
return MerkleProof.verify(proof, ogMerkleRoot, leaf);
}
/*
* @notice verify if user is whitelisted
* @param leaf bytes32 leaf of merkle tree
* @param proof bytes32 Merkle proof
*/
function _verifyWL(bytes32 leaf, bytes32[] memory proof) internal view returns(bool) {
return MerkleProof.verify(proof, wlMerkleRoot, leaf);
}
/*
* @notice verify if user is free mint
* @param leaf bytes32 leaf of merkle tree
* @param proof bytes32 Merkle proof
*/
function _verifyFM(bytes32 leaf, bytes32[] memory proof) internal view returns(bool) {
return MerkleProof.verify(proof, fmMerkleRoot, leaf);
}
}
MerkleProof.sol 65 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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.
*
* WARNING: You should avoid using leaf values that are 64 bytes long prior to
* hashing, or use a hash function other than keccak256 for hashing leaves.
* This is because the concatenation of a sorted pair of internal nodes in
* the merkle tree could be reinterpreted as a leaf value.
*/
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 Merkle 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)
}
}
}
PaymentSplitter.sol 189 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)
pragma solidity ^0.8.0;
import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../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.
*
* NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
* tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
* to run tests before sending real value to this contract.
*/
contract PaymentSplitter is Context {
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event ERC20PaymentReleased(IERC20 indexed token, 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;
mapping(IERC20 => uint256) private _erc20TotalReleased;
mapping(IERC20 => mapping(address => uint256)) private _erc20Released;
/**
* @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 virtual {
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 total amount of `token` already released. `token` should be the address of an IERC20
* contract.
*/
function totalReleased(IERC20 token) public view returns (uint256) {
return _erc20TotalReleased[token];
}
/**
* @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 amount of `token` tokens already released to a payee. `token` should be the address of an
* IERC20 contract.
*/
function released(IERC20 token, address account) public view returns (uint256) {
return _erc20Released[token][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 = _pendingPayment(account, totalReceived, released(account));
require(payment != 0, "PaymentSplitter: account is not due payment");
_released[account] += payment;
_totalReleased += payment;
Address.sendValue(account, payment);
emit PaymentReleased(account, payment);
}
/**
* @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
* percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
* contract.
*/
function release(IERC20 token, address account) public virtual {
require(_shares[account] > 0, "PaymentSplitter: account has no shares");
uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
uint256 payment = _pendingPayment(account, totalReceived, released(token, account));
require(payment != 0, "PaymentSplitter: account is not due payment");
_erc20Released[token][account] += payment;
_erc20TotalReleased[token] += payment;
SafeERC20.safeTransfer(token, account, payment);
emit ERC20PaymentReleased(token, account, payment);
}
/**
* @dev internal logic for computing the pending payment of an `account` given the token historical balances and
* already released amounts.
*/
function _pendingPayment(
address account,
uint256 totalReceived,
uint256 alreadyReleased
) private view returns (uint256) {
return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
}
/**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/
function _addPayee(address account, uint256 shares_) private {
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_);
}
}
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;
}
}
ERC721A.sol 951 lines
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import './IERC721A.sol';
/**
* @dev ERC721 token receiver interface.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard,
* including the Metadata extension. Built to optimize for lower gas during batch mints.
*
* Assumes serials are sequentially minted starting at `_startTokenId()`
* (defaults to 0, e.g. 0, 1, 2, 3..).
*
* Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
*
* Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// Reference type for token approval.
struct TokenApprovalRef {
address value;
}
// Mask of an entry in packed address data.
uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
// The bit position of `numberMinted` in packed address data.
uint256 private constant BITPOS_NUMBER_MINTED = 64;
// The bit position of `numberBurned` in packed address data.
uint256 private constant BITPOS_NUMBER_BURNED = 128;
// The bit position of `aux` in packed address data.
uint256 private constant BITPOS_AUX = 192;
// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
// The bit position of `startTimestamp` in packed ownership.
uint256 private constant BITPOS_START_TIMESTAMP = 160;
// The bit mask of the `burned` bit in packed ownership.
uint256 private constant BITMASK_BURNED = 1 << 224;
// The bit position of the `nextInitialized` bit in packed ownership.
uint256 private constant BITPOS_NEXT_INITIALIZED = 225;
// The bit mask of the `nextInitialized` bit in packed ownership.
uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225;
// The bit position of `extraData` in packed ownership.
uint256 private constant BITPOS_EXTRA_DATA = 232;
// Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
uint256 private constant BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
// The mask of the lower 160 bits for addresses.
uint256 private constant BITMASK_ADDRESS = (1 << 160) - 1;
// The maximum `quantity` that can be minted with `_mintERC2309`.
// This limit is to prevent overflows on the address data entries.
// For a limit of 5000, a total of 3.689e15 calls to `_mintERC2309`
// is required to cause an overflow, which is unrealistic.
uint256 private constant MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
// The tokenId of the next token to be minted.
uint256 private _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See `_packedOwnershipOf` implementation for details.
//
// Bits Layout:
// - [0..159] `addr`
// - [160..223] `startTimestamp`
// - [224] `burned`
// - [225] `nextInitialized`
// - [232..255] `extraData`
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
}
/**
* @dev Returns the starting token ID.
* To change the starting token ID, please override this function.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Returns the next token ID to be minted.
*/
function _nextTokenId() internal view virtual returns (uint256) {
return _currentIndex;
}
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see `_totalMinted`.
*/
function totalSupply() public view virtual override returns (uint256) {
// Counter underflow is impossible as _burnCounter cannot be incremented
// more than `_currentIndex - _startTokenId()` times.
unchecked {
return _currentIndex - _burnCounter - _startTokenId();
}
}
/**
* @dev Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view virtual returns (uint256) {
// Counter underflow is impossible as _currentIndex does not decrement,
// and it is initialized to `_startTokenId()`
unchecked {
return _currentIndex - _startTokenId();
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return _burnCounter;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
// The interface IDs are constants representing the first 4 bytes of the XOR of
// all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165
// e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`
return
interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
if (owner == address(0)) revert BalanceQueryForZeroAddress();
return _packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view virtual returns (uint256) {
return (_packedAddressData[owner] >> BITPOS_NUMBER_MINTED) & BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view virtual returns (uint256) {
return (_packedAddressData[owner] >> BITPOS_NUMBER_BURNED) & BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view virtual returns (uint64) {
return uint64(_packedAddressData[owner] >> BITPOS_AUX);
}
/**
* Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal virtual {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX);
_packedAddressData[owner] = packed;
}
/**
* Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
uint256 curr = tokenId;
unchecked {
if (_startTokenId() <= curr)
if (curr < _currentIndex) {
uint256 packed = _packedOwnerships[curr];
// If not burned.
if (packed & BITMASK_BURNED == 0) {
// Invariant:
// There will always be an ownership that has an address and is not burned
// before an ownership that does not have an address and is not burned.
// Hence, curr will not underflow.
//
// We can directly compare the packed value.
// If the address is zero, packed is zero.
while (packed == 0) {
packed = _packedOwnerships[--curr];
}
return packed;
}
}
}
revert OwnerQueryForNonexistentToken();
}
/**
* Returns the unpacked `TokenOwnership` struct from `packed`.
*/
function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
ownership.addr = address(uint160(packed));
ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP);
ownership.burned = packed & BITMASK_BURNED != 0;
ownership.extraData = uint24(packed >> BITPOS_EXTRA_DATA);
}
/**
* Returns the unpacked `TokenOwnership` struct at `index`.
*/
function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around in the collection over time.
*/
function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
/**
* @dev Packs ownership data into a single uint256.
*/
function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, BITMASK_ADDRESS)
// `owner | (block.timestamp << BITPOS_START_TIMESTAMP) | flags`.
result := or(owner, or(shl(BITPOS_START_TIMESTAMP, timestamp()), flags))
}
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) revert URIQueryForNonexistentToken();
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, it can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
/**
* @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
*/
function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
// For branchless setting of the `nextInitialized` flag.
assembly {
// `(quantity == 1) << BITPOS_NEXT_INITIALIZED`.
result := shl(BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
}
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ownerOf(tokenId);
if (_msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
revert ApprovalCallerNotOwnerNorApproved();
}
_tokenApprovals[tokenId].value = to;
emit Approval(owner, to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();
return _tokenApprovals[tokenId].value;
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
if (operator == _msgSenderERC721A()) revert ApproveToCaller();
_operatorApprovals[_msgSenderERC721A()][operator] = approved;
emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, '');
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
transferFrom(from, to, tokenId);
if (to.code.length != 0)
if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return
_startTokenId() <= tokenId &&
tokenId < _currentIndex && // If within bounds,
_packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned.
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal virtual {
_safeMint(to, quantity, '');
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* See {_mint}.
*
* Emits a {Transfer} event for each mint.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal virtual {
_mint(to, quantity);
unchecked {
if (to.code.length != 0) {
uint256 end = _currentIndex;
uint256 index = end - quantity;
do {
if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
revert TransferToNonERC721ReceiverImplementer();
}
} while (index < end);
// Reentrancy protection.
if (_currentIndex != end) revert();
}
}
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event for each mint.
*/
function _mint(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are incredibly unrealistic.
// `balance` and `numberMinted` have a maximum limit of 2**64.
// `tokenId` has a maximum limit of 2**256.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
uint256 tokenId = startTokenId;
uint256 end = startTokenId + quantity;
do {
emit Transfer(address(0), to, tokenId++);
} while (tokenId < end);
_currentIndex = end;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* This function is intended for efficient minting only during contract creation.
*
* It emits only one {ConsecutiveTransfer} as defined in
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
* instead of a sequence of {Transfer} event(s).
*
* Calling this function outside of contract creation WILL make your contract
* non-compliant with the ERC721 standard.
* For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
* {ConsecutiveTransfer} event is only permissible during contract creation.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {ConsecutiveTransfer} event.
*/
function _mintERC2309(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (to == address(0)) revert MintToZeroAddress();
if (quantity == 0) revert MintZeroQuantity();
if (quantity > MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are unrealistic due to the above check for `quantity` to be below the limit.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);
_currentIndex = startTokenId + quantity;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Returns the storage slot and value for the approved address of `tokenId`.
*/
function _getApprovedAddress(uint256 tokenId)
private
view
returns (uint256 approvedAddressSlot, address approvedAddress)
{
TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
// The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`.
assembly {
approvedAddressSlot := tokenApproval.slot
approvedAddress := sload(approvedAddressSlot)
}
}
/**
* @dev Returns whether the `approvedAddress` is equals to `from` or `msgSender`.
*/
function _isOwnerOrApproved(
address approvedAddress,
address from,
address msgSender
) private pure returns (bool result) {
assembly {
// Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean.
from := and(from, BITMASK_ADDRESS)
// Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
msgSender := and(msgSender, BITMASK_ADDRESS)
// `msgSender == from || msgSender == approvedAddress`.
result := or(eq(msgSender, from), eq(msgSender, approvedAddress))
}
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedAddress(tokenId);
// The nested ifs save around 20+ gas over a compound boolean condition.
if (!_isOwnerOrApproved(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
if (to == address(0)) revert TransferToZeroAddress();
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
unchecked {
// We can directly increment and decrement the balances.
--_packedAddressData[from]; // Updates: `balance -= 1`.
++_packedAddressData[to]; // Updates: `balance += 1`.
// Updates:
// - `address` to the next owner.
// - `startTimestamp` to the timestamp of transfering.
// - `burned` to `false`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
to,
BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, to, tokenId);
_afterTokenTransfers(from, to, tokenId, 1);
}
/**
* @dev Equivalent to `_burn(tokenId, false)`.
*/
function _burn(uint256 tokenId) internal virtual {
_burn(tokenId, false);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);
address from = address(uint160(prevOwnershipPacked));
(uint256 approvedAddressSlot, address approvedAddress) = _getApprovedAddress(tokenId);
if (approvalCheck) {
// The nested ifs save around 20+ gas over a compound boolean condition.
if (!_isOwnerOrApproved(approvedAddress, from, _msgSenderERC721A()))
if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
}
_beforeTokenTransfers(from, address(0), tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// Updates:
// - `balance -= 1`.
// - `numberBurned += 1`.
//
// We can directly decrement the balance, and increment the number burned.
// This is equivalent to `packed -= 1; packed += 1 << BITPOS_NUMBER_BURNED;`.
_packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1;
// Updates:
// - `address` to the last owner.
// - `startTimestamp` to the timestamp of burning.
// - `burned` to `true`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
from,
(BITMASK_BURNED | BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, address(0), tokenId);
_afterTokenTransfers(from, address(0), tokenId, 1);
// Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
unchecked {
_burnCounter++;
}
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
bytes4 retval
) {
return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert TransferToNonERC721ReceiverImplementer();
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
/**
* @dev Directly sets the extra data for the ownership data `index`.
*/
function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
uint256 packed = _packedOwnerships[index];
if (packed == 0) revert OwnershipNotInitializedForExtraData();
uint256 extraDataCasted;
// Cast `extraData` with assembly to avoid redundant masking.
assembly {
extraDataCasted := extraData
}
packed = (packed & BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << BITPOS_EXTRA_DATA);
_packedOwnerships[index] = packed;
}
/**
* @dev Returns the next extra data for the packed ownership data.
* The returned result is shifted into position.
*/
function _nextExtraData(
address from,
address to,
uint256 prevOwnershipPacked
) private view returns (uint256) {
uint24 extraData = uint24(prevOwnershipPacked >> BITPOS_EXTRA_DATA);
return uint256(_extraData(from, to, extraData)) << BITPOS_EXTRA_DATA;
}
/**
* @dev Called during each token transfer to set the 24bit `extraData` field.
* Intended to be overridden by the cosumer contract.
*
* `previousExtraData` - the value of `extraData` before transfer.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _extraData(
address from,
address to,
uint24 previousExtraData
) internal view virtual returns (uint24) {}
/**
* @dev Hook that is called before a set of serially-ordered token ids are about to be transferred.
* This includes minting.
* And also called before burning one token.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token ids have been transferred.
* This includes minting.
* And also called after one token has been burned.
*
* startTokenId - the first token id to be transferred
* quantity - the amount to be transferred
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Returns the message sender (defaults to `msg.sender`).
*
* If you are writing GSN compatible contracts, you need to override this function.
*/
function _msgSenderERC721A() internal view virtual returns (address) {
return msg.sender;
}
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function _toString(uint256 value) internal pure virtual returns (string memory ptr) {
assembly {
// The maximum value of a uint256 contains 78 digits (1 byte per digit),
// but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
// We will need 1 32-byte word to store the length,
// and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
ptr := add(mload(0x40), 128)
// Update the free memory pointer to allocate.
mstore(0x40, ptr)
// Cache the end of the memory to calculate the length later.
let end := ptr
// We write the string from the rightmost digit to the leftmost digit.
// The following is essentially a do-while loop that also handles the zero case.
// Costs a bit more than early returning for the zero case,
// but cheaper in terms of deployment and overall runtime costs.
for {
// Initialize and perform the first pass without check.
let temp := value
// Move the pointer 1 byte leftwards to point to an empty character slot.
ptr := sub(ptr, 1)
// Write the character to the pointer. 48 is the ASCII index of '0'.
mstore8(ptr, add(48, mod(temp, 10)))
temp := div(temp, 10)
} temp {
// Keep dividing `temp` until zero.
temp := div(temp, 10)
} {
// Body of the for loop.
ptr := sub(ptr, 1)
mstore8(ptr, add(48, mod(temp, 10)))
}
let length := sub(end, ptr)
// Move the pointer 32 bytes leftwards to make room for the length.
ptr := sub(ptr, 32)
// Store the length.
mstore(ptr, length)
}
}
}
Read Contract
balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
currentStep 0x5bc34f71 → uint8
fmMerkleRoot 0x9a39b5c6 → bytes32
getApproved 0x081812fc → address
getPrice 0x98d5fdca → uint256
isApprovedForAll 0xe985e9c5 → bool
isFreeMint 0xd7614022 → bool
isOG 0x9970ff15 → bool
isWhitelisted 0x5a23dd99 → bool
mintByWalletFM 0x1cac5549 → uint256
mintByWalletOG 0x2675a2ac → uint256
mintByWalletWL 0xddcd6369 → uint256
name 0x06fdde03 → string
ogMerkleRoot 0x0a302530 → bytes32
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
payee 0x8b83209b → address
publicPrice 0xa945bf80 → uint256
released 0x406072a9 → uint256
released 0x9852595c → uint256
sale_supply 0xd4e99d65 → uint256
shares 0xce7c2ac2 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalReleased 0xd79779b2 → uint256
totalReleased 0xe33b7de3 → uint256
totalShares 0x3a98ef39 → uint256
totalSupply 0x18160ddd → uint256
total_supply 0x3940e9ee → uint256
wlMerkleRoot 0x54c06aee → bytes32
wlPrice 0xc7f8d01a → uint256
Write Contract 19 functions
These functions modify contract state and require a wallet transaction to execute.
FreeMint 0x06866325
bytes32[] _proof
OGMint 0x0186d137
bytes32[] _proof
PublicMint 0x9fb17e34
uint256 _amount
WLMint 0xa1978fa7
bytes32[] _proof
uint256 _amount
approve 0x095ea7b3
address to
uint256 tokenId
mintForOwner 0x3fcf79dc
uint256 _count
address _to
release 0x19165587
address account
release 0x48b75044
address token
address account
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
setBaseURI 0x55f804b3
string _baseURI
setFMMerkleRoot 0x5e6b248a
bytes32 _fmMerkleRoot
setOGMerkleRoot 0x25c2c020
bytes32 _ogMerkleRoot
setWlMerkleRoot 0x8ac1e161
bytes32 _wlMerkleRoot
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
updateStep 0x7caa481b
uint8 _step
Recent Transactions
No transactions found for this address