Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xf5bd904a5Ac6E9fcc67Aa323A1e8FDa04fbd744A
Balance 0.002500 ETH
Nonce 1
Code Size 16262 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

16262 bytes
0x6080604052600436106102255760003560e01c806370a0823111610123578063a1165f5d116100ab578063c87b56dd1161006f578063c87b56dd146107e6578063d5abeb0114610823578063e5a4756c1461084e578063e985e9c514610877578063f2fde38b146108b457610225565b8063a1165f5d14610701578063a22cb4651461072c578063a40d36cd14610755578063b88d4fde14610780578063c23dc68f146107a957610225565b80638462151c116100f25780638462151c146106155780638da5cb5b1461065257806395d89b411461067d57806399a2557a146106a8578063a0712d68146106e557610225565b806370a082311461056f578063715018a6146105ac5780637c928fe9146105c35780637ec4a659146105ec57610225565b806337a66d85116101b15780635bbb2177116101755780635bbb2177146104745780635c975abb146104b157806362b99ad4146104dc5780636352211e14610507578063639814e01461054457610225565b806337a66d85146103c95780633ccfd60b146103e057806342842e0e146103f757806344a0d68a146104205780635503a0e81461044957610225565b80630964617e116101f85780630964617e146102f857806313faede61461032157806316ba10e01461034c57806318160ddd1461037557806323b872dd146103a057610225565b806301ffc9a71461022a57806306fdde0314610267578063081812fc14610292578063095ea7b3146102cf575b600080fd5b34801561023657600080fd5b50610251600480360381019061024c9190612b85565b6108dd565b60405161025e9190612bcd565b60405180910390f35b34801561027357600080fd5b5061027c61096f565b6040516102899190612c81565b60405180910390f35b34801561029e57600080fd5b506102b960048036038101906102b49190612cd9565b610a01565b6040516102c69190612d47565b60405180910390f35b3480156102db57600080fd5b506102f660048036038101906102f19190612d8e565b610a7d565b005b34801561030457600080fd5b5061031f600480360381019061031a9190612cd9565b610bbe565b005b34801561032d57600080fd5b50610336610bd0565b6040516103439190612ddd565b60405180910390f35b34801561035857600080fd5b50610373600480360381019061036e9190612f2d565b610bd6565b005b34801561038157600080fd5b5061038a610bf8565b6040516103979190612ddd565b60405180910390f35b3480156103ac57600080fd5b506103c760048036038101906103c29190612f76565b610c0f565b005b3480156103d557600080fd5b506103de610f34565b005b3480156103ec57600080fd5b506103f5610f68565b005b34801561040357600080fd5b5061041e60048036038101906104199190612f76565b610fb9565b005b34801561042c57600080fd5b5061044760048036038101906104429190612cd9565b610fd9565b005b34801561045557600080fd5b5061045e610feb565b60405161046b9190612c81565b60405180910390f35b34801561048057600080fd5b5061049b60048036038101906104969190613091565b611079565b6040516104a8919061323d565b60405180910390f35b3480156104bd57600080fd5b506104c661113a565b6040516104d39190612bcd565b60405180910390f35b3480156104e857600080fd5b506104f161114d565b6040516104fe9190612c81565b60405180910390f35b34801561051357600080fd5b5061052e60048036038101906105299190612cd9565b6111db565b60405161053b9190612d47565b60405180910390f35b34801561055057600080fd5b506105596111ed565b6040516105669190612ddd565b60405180910390f35b34801561057b57600080fd5b506105966004803603810190610591919061325f565b6111f3565b6040516105a39190612ddd565b60405180910390f35b3480156105b857600080fd5b506105c16112ac565b005b3480156105cf57600080fd5b506105ea60048036038101906105e59190612cd9565b6112c0565b005b3480156105f857600080fd5b50610613600480360381019061060e9190612f2d565b6114e8565b005b34801561062157600080fd5b5061063c6004803603810190610637919061325f565b61150a565b604051610649919061334a565b60405180910390f35b34801561065e57600080fd5b50610667611654565b6040516106749190612d47565b60405180910390f35b34801561068957600080fd5b5061069261167e565b60405161069f9190612c81565b60405180910390f35b3480156106b457600080fd5b506106cf60048036038101906106ca919061336c565b611710565b6040516106dc919061334a565b60405180910390f35b6106ff60048036038101906106fa9190612cd9565b611924565b005b34801561070d57600080fd5b50610716611b9c565b6040516107239190612ddd565b60405180910390f35b34801561073857600080fd5b50610753600480360381019061074e91906133eb565b611ba2565b005b34801561076157600080fd5b5061076a611d1a565b6040516107779190612ddd565b60405180910390f35b34801561078c57600080fd5b506107a760048036038101906107a291906134cc565b611d20565b005b3480156107b557600080fd5b506107d060048036038101906107cb9190612cd9565b611d93565b6040516107dd91906135a4565b60405180910390f35b3480156107f257600080fd5b5061080d60048036038101906108089190612cd9565b611dfd565b60405161081a9190612c81565b60405180910390f35b34801561082f57600080fd5b50610838611ea7565b6040516108459190612ddd565b60405180910390f35b34801561085a57600080fd5b5061087560048036038101906108709190612cd9565b611ead565b005b34801561088357600080fd5b5061089e600480360381019061089991906135bf565b611ebf565b6040516108ab9190612bcd565b60405180910390f35b3480156108c057600080fd5b506108db60048036038101906108d6919061325f565b611f53565b005b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061093857506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806109685750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60606002805461097e9061362e565b80601f01602080910402602001604051908101604052809291908181526020018280546109aa9061362e565b80156109f75780601f106109cc576101008083540402835291602001916109f7565b820191906000526020600020905b8154815290600101906020018083116109da57829003601f168201915b5050505050905090565b6000610a0c82611fd7565b610a42576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610a88826111db565b90508073ffffffffffffffffffffffffffffffffffffffff16610aa9612036565b73ffffffffffffffffffffffffffffffffffffffff1614610b0c57610ad581610ad0612036565b611ebf565b610b0b576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b610bc661203e565b80600e8190555050565b600d5481565b610bde61203e565b8060119080519060200190610bf4929190612a27565b5050565b6000610c026120bc565b6001546000540303905090565b6000610c1a826120c1565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610c81576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610c8d8461218f565b91509150610ca38187610c9e612036565b6121b1565b610cef57610cb886610cb3612036565b611ebf565b610cee576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610d56576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d6386868660016121f5565b8015610d6e57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815460010191905081905550610e3c85610e188888876121fb565b7c020000000000000000000000000000000000000000000000000000000017612223565b600460008681526020019081526020016000208190555060007c020000000000000000000000000000000000000000000000000000000084161415610ec4576000600185019050600060046000838152602001908152602001600020541415610ec2576000548114610ec1578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610f2c868686600161224e565b505050505050565b610f3c61203e565b600f60009054906101000a900460ff1615600f60006101000a81548160ff021916908315150217905550565b610f7061203e565b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610fb6573d6000803e3d6000fd5b50565b610fd483838360405180602001604052806000815250611d20565b505050565b610fe161203e565b80600d8190555050565b60118054610ff89061362e565b80601f01602080910402602001604051908101604052809291908181526020018280546110249061362e565b80156110715780601f1061104657610100808354040283529160200191611071565b820191906000526020600020905b81548152906001019060200180831161105457829003601f168201915b505050505081565b606060008251905060008167ffffffffffffffff81111561109d5761109c612e02565b5b6040519080825280602002602001820160405280156110d657816020015b6110c3612aad565b8152602001906001900390816110bb5790505b50905060005b82811461112f576111068582815181106110f9576110f8613660565b5b6020026020010151611d93565b82828151811061111957611118613660565b5b60200260200101819052508060010190506110dc565b508092505050919050565b600f60009054906101000a900460ff1681565b6010805461115a9061362e565b80601f01602080910402602001604051908101604052809291908181526020018280546111869061362e565b80156111d35780601f106111a8576101008083540402835291602001916111d3565b820191906000526020600020905b8154815290600101906020018083116111b657829003601f168201915b505050505081565b60006111e6826120c1565b9050919050565b600b5481565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561125b576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6112b461203e565b6112be6000612254565b565b60026009541415611306576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112fd906136db565b60405180910390fd5b60026009819055503373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161461137c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137390613747565b60405180910390fd5b600f60009054906101000a900460ff16156113cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c3906137b3565b60405180910390fd5b600e54816113d8610bf8565b6113e29190613802565b1115611423576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141a906138a4565b60405180910390fd5b600b5481611430336111f3565b61143a9190613802565b111561147b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161147290613910565b60405180910390fd5b60008111801561148d5750600c548111155b6114cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c39061397c565b60405180910390fd5b6114dd6114d761231a565b82612322565b600160098190555050565b6114f061203e565b8060109080519060200190611506929190612a27565b5050565b6060600080600061151a856111f3565b905060008167ffffffffffffffff81111561153857611537612e02565b5b6040519080825280602002602001820160405280156115665781602001602082028036833780820191505090505b509050611571612aad565b600061157b6120bc565b90505b8386146116465761158e81612340565b915081604001511561159f5761163b565b600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff16146115df57816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561163a578083878060010198508151811061162d5761162c613660565b5b6020026020010181815250505b5b80600101905061157e565b508195505050505050919050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606003805461168d9061362e565b80601f01602080910402602001604051908101604052809291908181526020018280546116b99061362e565b80156117065780601f106116db57610100808354040283529160200191611706565b820191906000526020600020905b8154815290600101906020018083116116e957829003601f168201915b5050505050905090565b606081831061174b576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008061175661236b565b90506117606120bc565b8510156117725761176f6120bc565b94505b8084111561177e578093505b6000611789876111f3565b9050848610156117ac5760008686039050818110156117a6578091505b506117b1565b600090505b60008167ffffffffffffffff8111156117cd576117cc612e02565b5b6040519080825280602002602001820160405280156117fb5781602001602082028036833780820191505090505b5090506000821415611813578094505050505061191d565b600061181e88611d93565b90506000816040015161183357816000015190505b60008990505b8881141580156118495750848714155b1561190f5761185781612340565b925082604001511561186857611904565b600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff16146118a857826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561190357808488806001019950815181106118f6576118f5613660565b5b6020026020010181815250505b5b806001019050611839565b508583528296505050505050505b9392505050565b6002600954141561196a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611961906136db565b60405180910390fd5b60026009819055503373ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146119e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d790613747565b60405180910390fd5b600f60009054906101000a900460ff1615611a30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a27906137b3565b60405180910390fd5b600b5481611a3d336111f3565b611a479190613802565b1115611a88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7f90613910565b60405180910390fd5b600081118015611a9a5750600c548111155b611ad9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad09061397c565b60405180910390fd5b600a5481611ae5610bf8565b611aef9190613802565b1115611b30576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b27906139e8565b60405180910390fd5b80600d54611b3e9190613a08565b341015611b80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7790613aae565b60405180910390fd5b611b91611b8b61231a565b82612322565b600160098190555050565b600e5481565b611baa612036565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611c0f576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060076000611c1c612036565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611cc9612036565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611d0e9190612bcd565b60405180910390a35050565b600c5481565b611d2b848484610c0f565b60008373ffffffffffffffffffffffffffffffffffffffff163b14611d8d57611d5684848484612374565b611d8c576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b611d9b612aad565b611da3612aad565b611dab6120bc565b831080611dbf5750611dbb61236b565b8310155b15611dcd5780915050611df8565b611dd683612340565b9050806040015115611deb5780915050611df8565b611df4836124d4565b9150505b919050565b6060611e0882611fd7565b611e47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3e90613b40565b60405180910390fd5b6000611e516124f4565b90506000815111611e715760405180602001604052806000815250611e9f565b80611e7b84612586565b6011604051602001611e8f93929190613c30565b6040516020818303038152906040525b915050919050565b600a5481565b611eb561203e565b80600c8190555050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611f5b61203e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611fcb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fc290613cd3565b60405180910390fd5b611fd481612254565b50565b600081611fe26120bc565b11158015611ff1575060005482105b801561202f575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b600033905090565b61204661231a565b73ffffffffffffffffffffffffffffffffffffffff16612064611654565b73ffffffffffffffffffffffffffffffffffffffff16146120ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120b190613d3f565b60405180910390fd5b565b600090565b600080829050806120d06120bc565b11612158576000548110156121575760006004600083815260200190815260200160002054905060007c010000000000000000000000000000000000000000000000000000000082161415612155575b600081141561214b576004600083600190039350838152602001908152602001600020549050612120565b809250505061218a565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000806000600690508360005280602052604060002092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e86122128686846126e7565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6000600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b61233c8282604051806020016040528060008152506126f0565b5050565b612348612aad565b612364600460008481526020019081526020016000205461278d565b9050919050565b60008054905090565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261239a612036565b8786866040518563ffffffff1660e01b81526004016123bc9493929190613db4565b602060405180830381600087803b1580156123d657600080fd5b505af192505050801561240757506040513d601f19601f820116820180604052508101906124049190613e15565b60015b612481573d8060008114612437576040519150601f19603f3d011682016040523d82523d6000602084013e61243c565b606091505b50600081511415612479576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b6124dc612aad565b6124ed6124e8836120c1565b61278d565b9050919050565b6060601080546125039061362e565b80601f016020809104026020016040519081016040528092919081815260200182805461252f9061362e565b801561257c5780601f106125515761010080835404028352916020019161257c565b820191906000526020600020905b81548152906001019060200180831161255f57829003601f168201915b5050505050905090565b606060008214156125ce576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506126e2565b600082905060005b600082146126005780806125e990613e42565b915050600a826125f99190613eba565b91506125d6565b60008167ffffffffffffffff81111561261c5761261b612e02565b5b6040519080825280601f01601f19166020018201604052801561264e5781602001600182028036833780820191505090505b5090505b600085146126db576001826126679190613eeb565b9150600a856126769190613f1f565b60306126829190613802565b60f81b81838151811061269857612697613660565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a856126d49190613eba565b9450612652565b8093505050505b919050565b60009392505050565b6126fa8383612843565b60008373ffffffffffffffffffffffffffffffffffffffff163b1461278857600080549050600083820390505b61273a6000868380600101945086612374565b612770576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81811061272757816000541461278557600080fd5b50505b505050565b612795612aad565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b600080549050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156128b0576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008214156128eb576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6128f860008483856121f5565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555061296f8361296060008660006121fb565b61296985612a17565b17612223565b60046000838152602001908152602001600020819055506000819050600083830190505b818060010192508573ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a480821061299357806000819055505050612a12600084838561224e565b505050565b60006001821460e11b9050919050565b828054612a339061362e565b90600052602060002090601f016020900481019282612a555760008555612a9c565b82601f10612a6e57805160ff1916838001178555612a9c565b82800160010185558215612a9c579182015b82811115612a9b578251825591602001919060010190612a80565b5b509050612aa99190612afc565b5090565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b5b80821115612b15576000816000905550600101612afd565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b612b6281612b2d565b8114612b6d57600080fd5b50565b600081359050612b7f81612b59565b92915050565b600060208284031215612b9b57612b9a612b23565b5b6000612ba984828501612b70565b91505092915050565b60008115159050919050565b612bc781612bb2565b82525050565b6000602082019050612be26000830184612bbe565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612c22578082015181840152602081019050612c07565b83811115612c31576000848401525b50505050565b6000601f19601f8301169050919050565b6000612c5382612be8565b612c5d8185612bf3565b9350612c6d818560208601612c04565b612c7681612c37565b840191505092915050565b60006020820190508181036000830152612c9b8184612c48565b905092915050565b6000819050919050565b612cb681612ca3565b8114612cc157600080fd5b50565b600081359050612cd381612cad565b92915050565b600060208284031215612cef57612cee612b23565b5b6000612cfd84828501612cc4565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612d3182612d06565b9050919050565b612d4181612d26565b82525050565b6000602082019050612d5c6000830184612d38565b92915050565b612d6b81612d26565b8114612d7657600080fd5b50565b600081359050612d8881612d62565b92915050565b60008060408385031215612da557612da4612b23565b5b6000612db385828601612d79565b9250506020612dc485828601612cc4565b9150509250929050565b612dd781612ca3565b82525050565b6000602082019050612df26000830184612dce565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612e3a82612c37565b810181811067ffffffffffffffff82111715612e5957612e58612e02565b5b80604052505050565b6000612e6c612b19565b9050612e788282612e31565b919050565b600067ffffffffffffffff821115612e9857612e97612e02565b5b612ea182612c37565b9050602081019050919050565b82818337600083830152505050565b6000612ed0612ecb84612e7d565b612e62565b905082815260208101848484011115612eec57612eeb612dfd565b5b612ef7848285612eae565b509392505050565b600082601f830112612f1457612f13612df8565b5b8135612f24848260208601612ebd565b91505092915050565b600060208284031215612f4357612f42612b23565b5b600082013567ffffffffffffffff811115612f6157612f60612b28565b5b612f6d84828501612eff565b91505092915050565b600080600060608486031215612f8f57612f8e612b23565b5b6000612f9d86828701612d79565b9350506020612fae86828701612d79565b9250506040612fbf86828701612cc4565b9150509250925092565b600067ffffffffffffffff821115612fe457612fe3612e02565b5b602082029050602081019050919050565b600080fd5b600061300d61300884612fc9565b612e62565b905080838252602082019050602084028301858111156130305761302f612ff5565b5b835b8181101561305957806130458882612cc4565b845260208401935050602081019050613032565b5050509392505050565b600082601f83011261307857613077612df8565b5b8135613088848260208601612ffa565b91505092915050565b6000602082840312156130a7576130a6612b23565b5b600082013567ffffffffffffffff8111156130c5576130c4612b28565b5b6130d184828501613063565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61310f81612d26565b82525050565b600067ffffffffffffffff82169050919050565b61313281613115565b82525050565b61314181612bb2565b82525050565b600062ffffff82169050919050565b61315f81613147565b82525050565b60808201600082015161317b6000850182613106565b50602082015161318e6020850182613129565b5060408201516131a16040850182613138565b5060608201516131b46060850182613156565b50505050565b60006131c68383613165565b60808301905092915050565b6000602082019050919050565b60006131ea826130da565b6131f481856130e5565b93506131ff836130f6565b8060005b8381101561323057815161321788826131ba565b9750613222836131d2565b925050600181019050613203565b5085935050505092915050565b6000602082019050818103600083015261325781846131df565b905092915050565b60006020828403121561327557613274612b23565b5b600061328384828501612d79565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6132c181612ca3565b82525050565b60006132d383836132b8565b60208301905092915050565b6000602082019050919050565b60006132f78261328c565b6133018185613297565b935061330c836132a8565b8060005b8381101561333d57815161332488826132c7565b975061332f836132df565b925050600181019050613310565b5085935050505092915050565b6000602082019050818103600083015261336481846132ec565b905092915050565b60008060006060848603121561338557613384612b23565b5b600061339386828701612d79565b93505060206133a486828701612cc4565b92505060406133b586828701612cc4565b9150509250925092565b6133c881612bb2565b81146133d357600080fd5b50565b6000813590506133e5816133bf565b92915050565b6000806040838503121561340257613401612b23565b5b600061341085828601612d79565b9250506020613421858286016133d6565b9150509250929050565b600067ffffffffffffffff82111561344657613445612e02565b5b61344f82612c37565b9050602081019050919050565b600061346f61346a8461342b565b612e62565b90508281526020810184848401111561348b5761348a612dfd565b5b613496848285612eae565b509392505050565b600082601f8301126134b3576134b2612df8565b5b81356134c384826020860161345c565b91505092915050565b600080600080608085870312156134e6576134e5612b23565b5b60006134f487828801612d79565b945050602061350587828801612d79565b935050604061351687828801612cc4565b925050606085013567ffffffffffffffff81111561353757613536612b28565b5b6135438782880161349e565b91505092959194509250565b6080820160008201516135656000850182613106565b5060208201516135786020850182613129565b50604082015161358b6040850182613138565b50606082015161359e6060850182613156565b50505050565b60006080820190506135b9600083018461354f565b92915050565b600080604083850312156135d6576135d5612b23565b5b60006135e485828601612d79565b92505060206135f585828601612d79565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061364657607f821691505b6020821081141561365a576136596135ff565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006136c5601f83612bf3565b91506136d08261368f565b602082019050919050565b600060208201905081810360008301526136f4816136b8565b9050919050565b7f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000600082015250565b6000613731601e83612bf3565b915061373c826136fb565b602082019050919050565b6000602082019050818103600083015261376081613724565b9050919050565b7f54686520636f6e74726163742069732070617573656421000000000000000000600082015250565b600061379d601783612bf3565b91506137a882613767565b602082019050919050565b600060208201905081810360008301526137cc81613790565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061380d82612ca3565b915061381883612ca3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561384d5761384c6137d3565b5b828201905092915050565b7f46726565206d696e747320657868617573746564210000000000000000000000600082015250565b600061388e601583612bf3565b915061389982613858565b602082019050919050565b600060208201905081810360008301526138bd81613881565b9050919050565b7f5045525f57414c4c45545f4c494d49545f524541434845440000000000000000600082015250565b60006138fa601883612bf3565b9150613905826138c4565b602082019050919050565b60006020820190508181036000830152613929816138ed565b9050919050565b7f496e76616c6964206d696e7420616d6f756e7421000000000000000000000000600082015250565b6000613966601483612bf3565b915061397182613930565b602082019050919050565b6000602082019050818103600083015261399581613959565b9050919050565b7f4d617820737570706c7920657863656564656421000000000000000000000000600082015250565b60006139d2601483612bf3565b91506139dd8261399c565b602082019050919050565b60006020820190508181036000830152613a01816139c5565b9050919050565b6000613a1382612ca3565b9150613a1e83612ca3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613a5757613a566137d3565b5b828202905092915050565b7f496e73756666696369656e742066756e64732100000000000000000000000000600082015250565b6000613a98601383612bf3565b9150613aa382613a62565b602082019050919050565b60006020820190508181036000830152613ac781613a8b565b9050919050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000613b2a602f83612bf3565b9150613b3582613ace565b604082019050919050565b60006020820190508181036000830152613b5981613b1d565b9050919050565b600081905092915050565b6000613b7682612be8565b613b808185613b60565b9350613b90818560208601612c04565b80840191505092915050565b60008190508160005260206000209050919050565b60008154613bbe8161362e565b613bc88186613b60565b94506001821660008114613be35760018114613bf457613c27565b60ff19831686528186019350613c27565b613bfd85613b9c565b60005b83811015613c1f57815481890152600182019150602081019050613c00565b838801955050505b50505092915050565b6000613c3c8286613b6b565b9150613c488285613b6b565b9150613c548284613bb1565b9150819050949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613cbd602683612bf3565b9150613cc882613c61565b604082019050919050565b60006020820190508181036000830152613cec81613cb0565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613d29602083612bf3565b9150613d3482613cf3565b602082019050919050565b60006020820190508181036000830152613d5881613d1c565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000613d8682613d5f565b613d908185613d6a565b9350613da0818560208601612c04565b613da981612c37565b840191505092915050565b6000608082019050613dc96000830187612d38565b613dd66020830186612d38565b613de36040830185612dce565b8181036060830152613df58184613d7b565b905095945050505050565b600081519050613e0f81612b59565b92915050565b600060208284031215613e2b57613e2a612b23565b5b6000613e3984828501613e00565b91505092915050565b6000613e4d82612ca3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613e8057613e7f6137d3565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613ec582612ca3565b9150613ed083612ca3565b925082613ee057613edf613e8b565b5b828204905092915050565b6000613ef682612ca3565b9150613f0183612ca3565b925082821015613f1457613f136137d3565b5b828203905092915050565b6000613f2a82612ca3565b9150613f3583612ca3565b925082613f4557613f44613e8b565b5b82820690509291505056fea26469706673582212208ba6d29835b39dad1825f217f9dbebb309bd8301b3cd91711b493e9c590ff10264736f6c63430008090033

Verified Source Code Partial Match

Compiler: v0.8.9+commit.e5eed63a EVM: london Optimization: No
Nasciimigos.sol 1819 lines
// SPDX-License-Identifier: MIT

// File: @openzeppelin/contracts/security/ReentrancyGuard.sol
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// File: @openzeppelin/contracts/utils/Strings.sol


// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // 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);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}


// File: @openzeppelin/contracts/utils/Context.sol


// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol


// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;


/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// File: erc721a/contracts/IERC721A.sol


// 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);
}

// File: erc721a/contracts/ERC721A.sol


// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;


/**
 * @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 {
    // 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 => address) 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 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 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 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 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 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 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 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 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 {
        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 returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal {
        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 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 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 override {
        address owner = ownerOf(tokenId);

        if (_msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                revert ApprovalCallerNotOwnerNorApproved();
            }

        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @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 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 {
        _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 {
        _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 {
        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 {
        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)
    {
        mapping(uint256 => address) storage tokenApprovalsPtr = _tokenApprovals;
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`.
        assembly {
            // Compute the slot.
            mstore(0x00, tokenId)
            mstore(0x20, tokenApprovalsPtr.slot)
            approvedAddressSlot := keccak256(0x00, 0x40)
            // Load the slot's value from storage.
            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 {
        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 bo...

// [truncated — 65504 bytes total]

Read Contract

balanceOf 0x70a08231 → uint256
cost 0x13faede6 → uint256
explicitOwnershipOf 0xc23dc68f → tuple
explicitOwnershipsOf 0x5bbb2177 → tuple[]
freeMintsAvailable 0xa1165f5d → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
maxPerAddress 0x639814e0 → uint256
maxPerTX 0xa40d36cd → uint256
maxSupply 0xd5abeb01 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
tokensOfOwner 0x8462151c → uint256[]
tokensOfOwnerIn 0x99a2557a → uint256[]
totalSupply 0x18160ddd → uint256
uriPrefix 0x62b99ad4 → string
uriSuffix 0x5503a0e8 → string

Write Contract 16 functions

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

approve 0x095ea7b3
address to
uint256 tokenId
freeMint 0x7c928fe9
uint256 _mintAmount
mint 0xa0712d68
uint256 _mintAmount
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
setCost 0x44a0d68a
uint256 _cost
setFreeMintsAvailable 0x0964617e
uint256 _freeMintsAvailable
setMaxPerTX 0xe5a4756c
uint256 _maxPerTX
setPaused 0x37a66d85
No parameters
setUriPrefix 0x7ec4a659
string _uriPrefix
setUriSuffix 0x16ba10e0
string _uriSuffix
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address