Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xbeAf6476f2Cddcece8Bd9f67Ee14B9DaF2120D6D
Balance 0.125000 ETH ($250.86)
Nonce 1
Code Size 21190 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

21190 bytes
0x60806040526004361061025b575f3560e01c80635e5f3ce411610143578063c7f8d01a116100b5578063e268e4d311610079578063e268e4d3146108ad578063e985e9c5146108d5578063efd0cbf914610911578063f2fde38b1461092d578063f4a0a52814610955578063f716aee91461097d5761025b565b8063c7f8d01a146107df578063c87b56dd14610809578063ccfdd2f814610845578063d1beca641461086d578063d7224ba0146108835761025b565b8063715018a611610107578063715018a61461070f5780638da5cb5b1461072557806395d89b411461074f578063a10866ef14610779578063a22cb4651461078f578063b88d4fde146107b75761025b565b80635e5f3ce4146106195780636352211e146106435780636817c76c1461067f5780636c0360eb146106a957806370a08231146106d35761025b565b80633627d3a1116101dc5780634618163e116101a05780634618163e146104ff5780634b980d67146105275780634d0df5fc146105515780634f6ccce71461058d57806350dc4656146105c957806355f804b3146105f15761025b565b80633627d3a1146104475780633ccfd60b1461046f5780633f3e4c111461048557806342842e0e146104ad578063453c2310146104d55761025b565b806323b872dd1161022357806323b872dd1461035357806327a699491461037b5780632ab4d052146103b75780632f745c59146103e15780633281fa3f1461041d5761025b565b806301ffc9a71461025f57806306fdde031461029b578063081812fc146102c5578063095ea7b31461030157806318160ddd14610329575b5f80fd5b34801561026a575f80fd5b5061028560048036038101906102809190613760565b6109a7565b60405161029291906137a5565b60405180910390f35b3480156102a6575f80fd5b506102af610af0565b6040516102bc9190613848565b60405180910390f35b3480156102d0575f80fd5b506102eb60048036038101906102e6919061389b565b610b80565b6040516102f89190613905565b60405180910390f35b34801561030c575f80fd5b5061032760048036038101906103229190613948565b610c01565b005b348015610334575f80fd5b5061033d610d18565b60405161034a9190613995565b60405180910390f35b34801561035e575f80fd5b50610379600480360381019061037491906139ae565b610d20565b005b348015610386575f80fd5b506103a1600480360381019061039c91906139fe565b610d30565b6040516103ae9190613995565b60405180910390f35b3480156103c2575f80fd5b506103cb610d45565b6040516103d89190613995565b60405180910390f35b3480156103ec575f80fd5b5061040760048036038101906104029190613948565b610d4b565b6040516104149190613995565b60405180910390f35b348015610428575f80fd5b50610431610f3a565b60405161043e91906137a5565b60405180910390f35b348015610452575f80fd5b5061046d60048036038101906104689190613948565b610f4d565b005b34801561047a575f80fd5b5061048361102e565b005b348015610490575f80fd5b506104ab60048036038101906104a6919061389b565b611357565b005b3480156104b8575f80fd5b506104d360048036038101906104ce91906139ae565b6113dd565b005b3480156104e0575f80fd5b506104e96113fc565b6040516104f69190613995565b60405180910390f35b34801561050a575f80fd5b506105256004803603810190610520919061389b565b611402565b005b348015610532575f80fd5b5061053b611682565b6040516105489190613995565b60405180910390f35b34801561055c575f80fd5b50610577600480360381019061057291906139fe565b611688565b6040516105849190613995565b60405180910390f35b348015610598575f80fd5b506105b360048036038101906105ae919061389b565b61169d565b6040516105c09190613995565b60405180910390f35b3480156105d4575f80fd5b506105ef60048036038101906105ea9190613a5c565b6116ef565b005b3480156105fc575f80fd5b5061061760048036038101906106129190613bb3565b611775565b005b348015610624575f80fd5b5061062d611804565b60405161063a91906137a5565b60405180910390f35b34801561064e575f80fd5b506106696004803603810190610664919061389b565b611816565b6040516106769190613905565b60405180910390f35b34801561068a575f80fd5b5061069361182a565b6040516106a09190613995565b60405180910390f35b3480156106b4575f80fd5b506106bd611830565b6040516106ca9190613848565b60405180910390f35b3480156106de575f80fd5b506106f960048036038101906106f491906139fe565b6118bc565b6040516107069190613995565b60405180910390f35b34801561071a575f80fd5b5061072361199f565b005b348015610730575f80fd5b50610739611a26565b6040516107469190613905565b60405180910390f35b34801561075a575f80fd5b50610763611a4e565b6040516107709190613848565b60405180910390f35b348015610784575f80fd5b5061078d611ade565b005b34801561079a575f80fd5b506107b560048036038101906107b09190613c24565b611b84565b005b3480156107c2575f80fd5b506107dd60048036038101906107d89190613d00565b611cff565b005b3480156107ea575f80fd5b506107f3611d5b565b6040516108009190613995565b60405180910390f35b348015610814575f80fd5b5061082f600480360381019061082a919061389b565b611d61565b60405161083c9190613848565b60405180910390f35b348015610850575f80fd5b5061086b6004803603810190610866919061389b565b611e05565b005b348015610878575f80fd5b50610881611e8b565b005b34801561088e575f80fd5b50610897611f33565b6040516108a49190613995565b60405180910390f35b3480156108b8575f80fd5b506108d360048036038101906108ce919061389b565b611f39565b005b3480156108e0575f80fd5b506108fb60048036038101906108f69190613d80565b611fbf565b60405161090891906137a5565b60405180910390f35b61092b6004803603810190610926919061389b565b61204d565b005b348015610938575f80fd5b50610953600480360381019061094e91906139fe565b61235e565b005b348015610960575f80fd5b5061097b6004803603810190610976919061389b565b612454565b005b348015610988575f80fd5b506109916124da565b60405161099e9190613dcd565b60405180910390f35b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610a7157507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610ad957507f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610ae95750610ae8826124e0565b5b9050919050565b606060018054610aff90613e13565b80601f0160208091040260200160405190810160405280929190818152602001828054610b2b90613e13565b8015610b765780601f10610b4d57610100808354040283529160200191610b76565b820191905f5260205f20905b815481529060010190602001808311610b5957829003601f168201915b5050505050905090565b5f610b8a82612549565b610bc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc090613eb3565b60405180910390fd5b60055f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f610c0b82611816565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7290613f41565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610c9a612555565b73ffffffffffffffffffffffffffffffffffffffff161480610cc95750610cc881610cc3612555565b611fbf565b5b610d08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cff90613fcf565b60405180910390fd5b610d1383838361255c565b505050565b5f8054905090565b610d2b83838361260b565b505050565b6012602052805f5260405f205f915090505481565b600f5481565b5f610d55836118bc565b8210610d96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8d9061405d565b60405180910390fd5b5f610d9f610d18565b90505f805f5b83811015610ef8575f60035f8381526020019081526020015f206040518060400160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020015f820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152505090505f73ffffffffffffffffffffffffffffffffffffffff16815f015173ffffffffffffffffffffffffffffffffffffffff1614610e8e57805f015192505b8773ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610ee457868403610ed5578195505050505050610f34565b8380610ee0906140a8565b9450505b508080610ef0906140a8565b915050610da5565b506040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f2b9061415f565b60405180910390fd5b92915050565b601060019054906101000a900460ff1681565b610f55612555565b73ffffffffffffffffffffffffffffffffffffffff16610f73611a26565b73ffffffffffffffffffffffffffffffffffffffff1614610fc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc0906141c7565b60405180910390fd5b600f5481610fd5610d18565b610fdf91906141e5565b1115611020576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101790614262565b60405180910390fd5b61102a8282612b9f565b5050565b611036612555565b73ffffffffffffffffffffffffffffffffffffffff16611054611a26565b73ffffffffffffffffffffffffffffffffffffffff16146110aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110a1906141c7565b60405180910390fd5b5f4790505f612710610e43836110c09190614280565b6110ca91906142ee565b90505f61271061031a846110de9190614280565b6110e891906142ee565b90505f61271061031a856110fc9190614280565b61110691906142ee565b90505f61271061031a8661111a9190614280565b61112491906142ee565b905060145f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f1935050505015801561118a573d5f803e3d5ffd5b5060155f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8390811502906040515f60405180830381858888f193505050501580156111ef573d5f803e3d5ffd5b5060165f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8490811502906040515f60405180830381858888f19350505050158015611254573d5f803e3d5ffd5b5060175f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8590811502906040515f60405180830381858888f193505050501580156112b9573d5f803e3d5ffd5b505f848484846112c991906141e5565b6112d391906141e5565b6112dd91906141e5565b866112e8919061431e565b905060185f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f1935050505015801561134e573d5f803e3d5ffd5b50505050505050565b61135f612555565b73ffffffffffffffffffffffffffffffffffffffff1661137d611a26565b73ffffffffffffffffffffffffffffffffffffffff16146113d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ca906141c7565b60405180910390fd5b80600f8190555050565b6113f783838360405180602001604052805f815250611cff565b505050565b600e5481565b600260095403611447576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143e9061439b565b60405180910390fd5b6002600981905550600e548160135f61145e612555565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546114a291906141e5565b11156114e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114da90614403565b60405180910390fd5b601060019054906101000a900460ff16611532576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115299061446b565b60405180910390fd5b600f548161153e610d18565b61154891906141e5565b1115611589576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158090614262565b60405180910390fd5b600d548111156115ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c5906144d3565b60405180910390fd5b8060135f6115da612555565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205461161e91906141e5565b60135f611629612555565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550611677611671612555565b82612b9f565b600160098190555050565b600d5481565b6013602052805f5260405f205f915090505481565b5f6116a6610d18565b82106116e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116de90614561565b60405180910390fd5b819050919050565b6116f7612555565b73ffffffffffffffffffffffffffffffffffffffff16611715611a26565b73ffffffffffffffffffffffffffffffffffffffff161461176b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611762906141c7565b60405180910390fd5b8060118190555050565b61177d612555565b73ffffffffffffffffffffffffffffffffffffffff1661179b611a26565b73ffffffffffffffffffffffffffffffffffffffff16146117f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e8906141c7565b60405180910390fd5b80600a9081611800919061471c565b5050565b60105f9054906101000a900460ff1681565b5f61182082612bbc565b5f01519050919050565b600b5481565b600a805461183d90613e13565b80601f016020809104026020016040519081016040528092919081815260200182805461186990613e13565b80156118b45780601f1061188b576101008083540402835291602001916118b4565b820191905f5260205f20905b81548152906001019060200180831161189757829003601f168201915b505050505081565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361192b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119229061485b565b60405180910390fd5b60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f9054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050919050565b6119a7612555565b73ffffffffffffffffffffffffffffffffffffffff166119c5611a26565b73ffffffffffffffffffffffffffffffffffffffff1614611a1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a12906141c7565b60405180910390fd5b611a245f612db5565b565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060028054611a5d90613e13565b80601f0160208091040260200160405190810160405280929190818152602001828054611a8990613e13565b8015611ad45780601f10611aab57610100808354040283529160200191611ad4565b820191905f5260205f20905b815481529060010190602001808311611ab757829003601f168201915b5050505050905090565b611ae6612555565b73ffffffffffffffffffffffffffffffffffffffff16611b04611a26565b73ffffffffffffffffffffffffffffffffffffffff1614611b5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b51906141c7565b60405180910390fd5b60105f9054906101000a900460ff161560105f6101000a81548160ff021916908315150217905550565b611b8c612555565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611bf9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf0906148c3565b60405180910390fd5b8060065f611c05612555565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611cae612555565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611cf391906137a5565b60405180910390a35050565b611d0a84848461260b565b611d1684848484612e78565b611d55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4c90614951565b60405180910390fd5b50505050565b600c5481565b6060611d6c82612549565b611dab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da2906149df565b60405180910390fd5b5f611db4612ffa565b90505f815111611dd25760405180602001604052805f815250611dfd565b80611ddc8461308a565b604051602001611ded929190614a37565b6040516020818303038152906040525b915050919050565b611e0d612555565b73ffffffffffffffffffffffffffffffffffffffff16611e2b611a26565b73ffffffffffffffffffffffffffffffffffffffff1614611e81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e78906141c7565b60405180910390fd5b80600d8190555050565b611e93612555565b73ffffffffffffffffffffffffffffffffffffffff16611eb1611a26565b73ffffffffffffffffffffffffffffffffffffffff1614611f07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611efe906141c7565b60405180910390fd5b601060019054906101000a900460ff1615601060016101000a81548160ff021916908315150217905550565b60075481565b611f41612555565b73ffffffffffffffffffffffffffffffffffffffff16611f5f611a26565b73ffffffffffffffffffffffffffffffffffffffff1614611fb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fac906141c7565b60405180910390fd5b80600e8190555050565b5f60065f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b600260095403612092576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120899061439b565b60405180910390fd5b600260098190555060105f9054906101000a900460ff166120e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120df90614aa4565b60405180910390fd5b600e548160135f6120f7612555565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205461213b91906141e5565b111561217c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217390614403565b60405180910390fd5b5f81116121be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121b590614b0c565b60405180910390fd5b600f54816121ca610d18565b6121d491906141e5565b1115612215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161220c90614262565b60405180910390fd5b600d5481111561225a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612251906144d3565b60405180910390fd5b3481600b546122699190614280565b11156122aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122a190614b9a565b60405180910390fd5b8060135f6122b6612555565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546122fa91906141e5565b60135f612305612555565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208190555061235361234d612555565b82612b9f565b600160098190555050565b612366612555565b73ffffffffffffffffffffffffffffffffffffffff16612384611a26565b73ffffffffffffffffffffffffffffffffffffffff16146123da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123d1906141c7565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612448576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161243f90614c28565b60405180910390fd5b61245181612db5565b50565b61245c612555565b73ffffffffffffffffffffffffffffffffffffffff1661247a611a26565b73ffffffffffffffffffffffffffffffffffffffff16146124d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c7906141c7565b60405180910390fd5b80600b8190555050565b60115481565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f805482109050919050565b5f33905090565b8260055f8481526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b5f61261582612bbc565b90505f815f015173ffffffffffffffffffffffffffffffffffffffff1661263a612555565b73ffffffffffffffffffffffffffffffffffffffff161480612696575061265f612555565b73ffffffffffffffffffffffffffffffffffffffff1661267e84610b80565b73ffffffffffffffffffffffffffffffffffffffff16145b806126b157506126b0825f01516126ab612555565b611fbf565b5b9050806126f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126ea90614cb6565b60405180910390fd5b8473ffffffffffffffffffffffffffffffffffffffff16825f015173ffffffffffffffffffffffffffffffffffffffff1614612764576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161275b90614d44565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036127d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127c990614dd2565b60405180910390fd5b6127df85858560016131e3565b6127ed5f84845f015161255c565b600160045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f8282829054906101000a90046fffffffffffffffffffffffffffffffff166128579190614e0b565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550600160045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f015f8282829054906101000a90046fffffffffffffffffffffffffffffffff166128f79190614e4e565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060405180604001604052808573ffffffffffffffffffffffffffffffffffffffff1681526020014267ffffffffffffffff1681525060035f8581526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151815f0160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050505f6001846129f691906141e5565b90505f73ffffffffffffffffffffffffffffffffffffffff1660035f8381526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603612b2f57612a6681612549565b15612b2e576040518060400160405280845f015173ffffffffffffffffffffffffffffffffffffffff168152602001846020015167ffffffffffffffff1681525060035f8381526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151815f0160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050505b5b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612b9786868660016131e9565b505050505050565b612bb8828260405180602001604052805f8152506131ef565b5050565b612bc46136c2565b612bcd82612549565b612c0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c0390614f01565b60405180910390fd5b5f7f000000000000000000000000000000000000000000000000000000000000000a8310612c6f5760017f000000000000000000000000000000000000000000000000000000000000000a84612c62919061431e565b612c6c91906141e5565b90505b5f8390505b818110612d74575f60035f8381526020019081526020015f206040518060400160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020015f820160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152505090505f73ffffffffffffffffffffffffffffffffffffffff16815f015173ffffffffffffffffffffffffffffffffffffffff1614612d6057809350505050612db0565b508080612d6c90614f1f565b915050612c74565b506040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612da790614fb6565b60405180910390fd5b919050565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f612e988473ffffffffffffffffffffffffffffffffffffffff166136b1565b15612fed578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612ec1612555565b8786866040518563ffffffff1660e01b8152600401612ee39493929190615026565b6020604051808303815f875af1925050508015612f1e57506040513d601f19601f82011682018060405250810190612f1b9190615084565b60015b612f9d573d805f8114612f4c576040519150601f19603f3d011682016040523d82523d5f602084013e612f51565b606091505b505f815103612f95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f8c90614951565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612ff2565b600190505b949350505050565b6060600a805461300990613e13565b80601f016020809104026020016040519081016040528092919081815260200182805461303590613e13565b80156130805780601f1061305757610100808354040283529160200191613080565b820191905f5260205f20905b81548152906001019060200180831161306357829003601f168201915b5050505050905090565b60605f82036130d0576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506131de565b5f8290505f5b5f82146130ff5780806130e8906140a8565b915050600a826130f891906142ee565b91506130d6565b5f8167ffffffffffffffff81111561311a57613119613a8f565b5b6040519080825280601f01601f19166020018201604052801561314c5781602001600182028036833780820191505090505b5090505b5f85146131d757600182613164919061431e565b9150600a8561317391906150af565b603061317f91906141e5565b60f81b818381518110613195576131946150df565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350600a856131d091906142ee565b9450613150565b8093505050505b919050565b50505050565b50505050565b5f805490505f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603613262576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132599061517c565b60405180910390fd5b61326b81612549565b156132ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132a2906151e4565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000a83111561330e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161330590615272565b60405180910390fd5b61331a5f8583866131e3565b5f60045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206040518060400160405290815f82015f9054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff1681526020015f820160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16815250509050604051806040016040528085835f01516134109190614e4e565b6fffffffffffffffffffffffffffffffff1681526020018583602001516134379190614e4e565b6fffffffffffffffffffffffffffffffff1681525060045f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f820151815f015f6101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506020820151815f0160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555090505060405180604001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020014267ffffffffffffffff1681525060035f8481526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151815f0160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055509050505f8290505f5b8581101561369657818773ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46136365f888488612e78565b613675576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161366c90614951565b60405180910390fd5b8180613680906140a8565b925050808061368e906140a8565b9150506135c7565b50805f819055506136a95f8785886131e9565b505050505050565b5f80823b90505f8111915050919050565b60405180604001604052805f73ffffffffffffffffffffffffffffffffffffffff1681526020015f67ffffffffffffffff1681525090565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61373f8161370b565b8114613749575f80fd5b50565b5f8135905061375a81613736565b92915050565b5f6020828403121561377557613774613703565b5b5f6137828482850161374c565b91505092915050565b5f8115159050919050565b61379f8161378b565b82525050565b5f6020820190506137b85f830184613796565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b838110156137f55780820151818401526020810190506137da565b5f8484015250505050565b5f601f19601f8301169050919050565b5f61381a826137be565b61382481856137c8565b93506138348185602086016137d8565b61383d81613800565b840191505092915050565b5f6020820190508181035f8301526138608184613810565b905092915050565b5f819050919050565b61387a81613868565b8114613884575f80fd5b50565b5f8135905061389581613871565b92915050565b5f602082840312156138b0576138af613703565b5b5f6138bd84828501613887565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6138ef826138c6565b9050919050565b6138ff816138e5565b82525050565b5f6020820190506139185f8301846138f6565b92915050565b613927816138e5565b8114613931575f80fd5b50565b5f813590506139428161391e565b92915050565b5f806040838503121561395e5761395d613703565b5b5f61396b85828601613934565b925050602061397c85828601613887565b9150509250929050565b61398f81613868565b82525050565b5f6020820190506139a85f830184613986565b92915050565b5f805f606084860312156139c5576139c4613703565b5b5f6139d286828701613934565b93505060206139e386828701613934565b92505060406139f486828701613887565b9150509250925092565b5f60208284031215613a1357613a12613703565b5b5f613a2084828501613934565b91505092915050565b5f819050919050565b613a3b81613a29565b8114613a45575f80fd5b50565b5f81359050613a5681613a32565b92915050565b5f60208284031215613a7157613a70613703565b5b5f613a7e84828501613a48565b91505092915050565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b613ac582613800565b810181811067ffffffffffffffff82111715613ae457613ae3613a8f565b5b80604052505050565b5f613af66136fa565b9050613b028282613abc565b919050565b5f67ffffffffffffffff821115613b2157613b20613a8f565b5b613b2a82613800565b9050602081019050919050565b828183375f83830152505050565b5f613b57613b5284613b07565b613aed565b905082815260208101848484011115613b7357613b72613a8b565b5b613b7e848285613b37565b509392505050565b5f82601f830112613b9a57613b99613a87565b5b8135613baa848260208601613b45565b91505092915050565b5f60208284031215613bc857613bc7613703565b5b5f82013567ffffffffffffffff811115613be557613be4613707565b5b613bf184828501613b86565b91505092915050565b613c038161378b565b8114613c0d575f80fd5b50565b5f81359050613c1e81613bfa565b92915050565b5f8060408385031215613c3a57613c39613703565b5b5f613c4785828601613934565b9250506020613c5885828601613c10565b9150509250929050565b5f67ffffffffffffffff821115613c7c57613c7b613a8f565b5b613c8582613800565b9050602081019050919050565b5f613ca4613c9f84613c62565b613aed565b905082815260208101848484011115613cc057613cbf613a8b565b5b613ccb848285613b37565b509392505050565b5f82601f830112613ce757613ce6613a87565b5b8135613cf7848260208601613c92565b91505092915050565b5f805f8060808587031215613d1857613d17613703565b5b5f613d2587828801613934565b9450506020613d3687828801613934565b9350506040613d4787828801613887565b925050606085013567ffffffffffffffff811115613d6857613d67613707565b5b613d7487828801613cd3565b91505092959194509250565b5f8060408385031215613d9657613d95613703565b5b5f613da385828601613934565b9250506020613db485828601613934565b9150509250929050565b613dc781613a29565b82525050565b5f602082019050613de05f830184613dbe565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680613e2a57607f821691505b602082108103613e3d57613e3c613de6565b5b50919050565b7f455243373231413a20617070726f76656420717565727920666f72206e6f6e655f8201527f78697374656e7420746f6b656e00000000000000000000000000000000000000602082015250565b5f613e9d602d836137c8565b9150613ea882613e43565b604082019050919050565b5f6020820190508181035f830152613eca81613e91565b9050919050565b7f455243373231413a20617070726f76616c20746f2063757272656e74206f776e5f8201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b5f613f2b6022836137c8565b9150613f3682613ed1565b604082019050919050565b5f6020820190508181035f830152613f5881613f1f565b9050919050565b7f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f5f8201527f776e6572206e6f7220617070726f76656420666f7220616c6c00000000000000602082015250565b5f613fb96039836137c8565b9150613fc482613f5f565b604082019050919050565b5f6020820190508181035f830152613fe681613fad565b9050919050565b7f455243373231413a206f776e657220696e646578206f7574206f6620626f756e5f8201527f6473000000000000000000000000000000000000000000000000000000000000602082015250565b5f6140476022836137c8565b915061405282613fed565b604082019050919050565b5f6020820190508181035f8301526140748161403b565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6140b282613868565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036140e4576140e361407b565b5b600182019050919050565b7f455243373231413a20756e61626c6520746f2067657420746f6b656e206f66205f8201527f6f776e657220627920696e646578000000000000000000000000000000000000602082015250565b5f614149602e836137c8565b9150614154826140ef565b604082019050919050565b5f6020820190508181035f8301526141768161413d565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6141b16020836137c8565b91506141bc8261417d565b602082019050919050565b5f6020820190508181035f8301526141de816141a5565b9050919050565b5f6141ef82613868565b91506141fa83613868565b92508282019050808211156142125761421161407b565b5b92915050565b7f4578636565647320746f74616c20737570706c790000000000000000000000005f82015250565b5f61424c6014836137c8565b915061425782614218565b602082019050919050565b5f6020820190508181035f83015261427981614240565b9050919050565b5f61428a82613868565b915061429583613868565b92508282026142a381613868565b915082820484148315176142ba576142b961407b565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6142f882613868565b915061430383613868565b925082614313576143126142c1565b5b828204905092915050565b5f61432882613868565b915061433383613868565b925082820390508181111561434b5761434a61407b565b5b92915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f614385601f836137c8565b915061439082614351565b602082019050919050565b5f6020820190508181035f8301526143b281614379565b9050919050565b7f4d6178207065722077616c6c65742072656163686564000000000000000000005f82015250565b5f6143ed6016836137c8565b91506143f8826143b9565b602082019050919050565b5f6020820190508181035f83015261441a816143e1565b9050919050565b7f57686974656c6973742073616c65206e6f74206c6976650000000000000000005f82015250565b5f6144556017836137c8565b915061446082614421565b602082019050919050565b5f6020820190508181035f83015261448281614449565b9050919050565b7f45786365656473206d617820706572207472616e73616374696f6e00000000005f82015250565b5f6144bd601b836137c8565b91506144c882614489565b602082019050919050565b5f6020820190508181035f8301526144ea816144b1565b9050919050565b7f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f755f8201527f6e64730000000000000000000000000000000000000000000000000000000000602082015250565b5f61454b6023836137c8565b9150614556826144f1565b604082019050919050565b5f6020820190508181035f8301526145788161453f565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026145db7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826145a0565b6145e586836145a0565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61462061461b61461684613868565b6145fd565b613868565b9050919050565b5f819050919050565b61463983614606565b61464d61464582614627565b8484546145ac565b825550505050565b5f90565b614661614655565b61466c818484614630565b505050565b5b8181101561468f576146845f82614659565b600181019050614672565b5050565b601f8211156146d4576146a58161457f565b6146ae84614591565b810160208510156146bd578190505b6146d16146c985614591565b830182614671565b50505b505050565b5f82821c905092915050565b5f6146f45f19846008026146d9565b1980831691505092915050565b5f61470c83836146e5565b9150826002028217905092915050565b614725826137be565b67ffffffffffffffff81111561473e5761473d613a8f565b5b6147488254613e13565b614753828285614693565b5f60209050601f831160018114614784575f8415614772578287015190505b61477c8582614701565b8655506147e3565b601f1984166147928661457f565b5f5b828110156147b957848901518255600182019150602085019450602081019050614794565b868310156147d657848901516147d2601f8916826146e5565b8355505b6001600288020188555050505b505050505050565b7f455243373231413a2062616c616e636520717565727920666f7220746865207a5f8201527f65726f2061646472657373000000000000000000000000000000000000000000602082015250565b5f614845602b836137c8565b9150614850826147eb565b604082019050919050565b5f6020820190508181035f83015261487281614839565b9050919050565b7f455243373231413a20617070726f766520746f2063616c6c65720000000000005f82015250565b5f6148ad601a836137c8565b91506148b882614879565b602082019050919050565b5f6020820190508181035f8301526148da816148a1565b9050919050565b7f455243373231413a207472616e7366657220746f206e6f6e20455243373231525f8201527f6563656976657220696d706c656d656e74657200000000000000000000000000602082015250565b5f61493b6033836137c8565b9150614946826148e1565b604082019050919050565b5f6020820190508181035f8301526149688161492f565b9050919050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f5f8201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b5f6149c9602f836137c8565b91506149d48261496f565b604082019050919050565b5f6020820190508181035f8301526149f6816149bd565b9050919050565b5f81905092915050565b5f614a11826137be565b614a1b81856149fd565b9350614a2b8185602086016137d8565b80840191505092915050565b5f614a428285614a07565b9150614a4e8284614a07565b91508190509392505050565b7f53616c65206e6f74206c697665000000000000000000000000000000000000005f82015250565b5f614a8e600d836137c8565b9150614a9982614a5a565b602082019050919050565b5f6020820190508181035f830152614abb81614a82565b9050919050565b7f596f75206d757374206d696e74206174206c65617374206f6e650000000000005f82015250565b5f614af6601a836137c8565b9150614b0182614ac2565b602082019050919050565b5f6020820190508181035f830152614b2381614aea565b9050919050565b7f4e6f7420656e6f756768204554482073656e7420666f722073656c65637465645f8201527f20616d6f756e7400000000000000000000000000000000000000000000000000602082015250565b5f614b846027836137c8565b9150614b8f82614b2a565b604082019050919050565b5f6020820190508181035f830152614bb181614b78565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f614c126026836137c8565b9150614c1d82614bb8565b604082019050919050565b5f6020820190508181035f830152614c3f81614c06565b9050919050565b7f455243373231413a207472616e736665722063616c6c6572206973206e6f74205f8201527f6f776e6572206e6f7220617070726f7665640000000000000000000000000000602082015250565b5f614ca06032836137c8565b9150614cab82614c46565b604082019050919050565b5f6020820190508181035f830152614ccd81614c94565b9050919050565b7f455243373231413a207472616e736665722066726f6d20696e636f72726563745f8201527f206f776e65720000000000000000000000000000000000000000000000000000602082015250565b5f614d2e6026836137c8565b9150614d3982614cd4565b604082019050919050565b5f6020820190508181035f830152614d5b81614d22565b9050919050565b7f455243373231413a207472616e7366657220746f20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f614dbc6025836137c8565b9150614dc782614d62565b604082019050919050565b5f6020820190508181035f830152614de981614db0565b9050919050565b5f6fffffffffffffffffffffffffffffffff82169050919050565b5f614e1582614df0565b9150614e2083614df0565b925082820390506fffffffffffffffffffffffffffffffff811115614e4857614e4761407b565b5b92915050565b5f614e5882614df0565b9150614e6383614df0565b925082820190506fffffffffffffffffffffffffffffffff811115614e8b57614e8a61407b565b5b92915050565b7f455243373231413a206f776e657220717565727920666f72206e6f6e657869735f8201527f74656e7420746f6b656e00000000000000000000000000000000000000000000602082015250565b5f614eeb602a836137c8565b9150614ef682614e91565b604082019050919050565b5f6020820190508181035f830152614f1881614edf565b9050919050565b5f614f2982613868565b91505f8203614f3b57614f3a61407b565b5b600182039050919050565b7f455243373231413a20756e61626c6520746f2064657465726d696e65207468655f8201527f206f776e6572206f6620746f6b656e0000000000000000000000000000000000602082015250565b5f614fa0602f836137c8565b9150614fab82614f46565b604082019050919050565b5f6020820190508181035f830152614fcd81614f94565b9050919050565b5f81519050919050565b5f82825260208201905092915050565b5f614ff882614fd4565b6150028185614fde565b93506150128185602086016137d8565b61501b81613800565b840191505092915050565b5f6080820190506150395f8301876138f6565b61504660208301866138f6565b6150536040830185613986565b81810360608301526150658184614fee565b905095945050505050565b5f8151905061507e81613736565b92915050565b5f6020828403121561509957615098613703565b5b5f6150a684828501615070565b91505092915050565b5f6150b982613868565b91506150c483613868565b9250826150d4576150d36142c1565b5b828206905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f455243373231413a206d696e7420746f20746865207a65726f206164647265735f8201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b5f6151666021836137c8565b91506151718261510c565b604082019050919050565b5f6020820190508181035f8301526151938161515a565b9050919050565b7f455243373231413a20746f6b656e20616c7265616479206d696e7465640000005f82015250565b5f6151ce601d836137c8565b91506151d98261519a565b602082019050919050565b5f6020820190508181035f8301526151fb816151c2565b9050919050565b7f455243373231413a207175616e7469747920746f206d696e7420746f6f2068695f8201527f6768000000000000000000000000000000000000000000000000000000000000602082015250565b5f61525c6022836137c8565b915061526782615202565b604082019050919050565b5f6020820190508181035f83015261528981615250565b905091905056fea26469706673582212207220e9b08009d98f106eb26ecaad08ff46c59ee3a9f05ca0540b49f46606501064736f6c63430008150033

Verified Source Code Partial Match

Compiler: v0.8.21+commit.d9974bed EVM: shanghai Optimization: No
NFTPD.sol 1243 lines
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.3;

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

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

library Address {
    function isContract(address account) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

    function functionCall(address target, bytes memory data)
        internal
        returns (bytes memory)
    {
        return functionCall(target, data, "Address: low-level call failed");
    }

    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

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

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

    function functionStaticCall(address target, bytes memory data)
        internal
        view
        returns (bytes memory)
    {
        return
            functionStaticCall(
                target,
                data,
                "Address: low-level static call failed"
            );
    }

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

    function functionDelegateCall(address target, bytes memory data)
        internal
        returns (bytes memory)
    {
        return
            functionDelegateCall(
                target,
                data,
                "Address: low-level delegate call failed"
            );
    }

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

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

abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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

interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

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

contract ERC721A is
    Context,
    ERC165,
    IERC721,
    IERC721Metadata,
    IERC721Enumerable
{
    using Address for address;
    using Strings for uint256;

    struct TokenOwnership {
        address addr;
        uint64 startTimestamp;
    }

    struct AddressData {
        uint128 balance;
        uint128 numberMinted;
    }

    uint256 private currentIndex = 0;

    uint256 internal immutable collectionSize;
    uint256 internal immutable maxBatchSize;

    // 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 ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) private _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev
     * `maxBatchSize` refers to how much a minter can mint at a time.
     * `collectionSize_` refers to how many tokens are in the collection.
     */
    constructor(
        string memory name_,
        string memory symbol_,
        uint256 maxBatchSize_,
        uint256 collectionSize_
    ) {
        require(
            collectionSize_ > 0,
            "ERC721A: collection must have a nonzero supply"
        );
        require(maxBatchSize_ > 0, "ERC721A: max batch size must be nonzero");
        _name = name_;
        _symbol = symbol_;
        maxBatchSize = maxBatchSize_;
        collectionSize = collectionSize_;
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view override returns (uint256) {
        return currentIndex;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index)
        public
        view
        override
        returns (uint256)
    {
        require(index < totalSupply(), "ERC721A: global index out of bounds");
        return index;
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     * This read function is O(collectionSize). If calling from a separate contract, be sure to test gas first.
     * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index)
        public
        view
        override
        returns (uint256)
    {
        require(index < balanceOf(owner), "ERC721A: owner index out of bounds");
        uint256 numMintedSoFar = totalSupply();
        uint256 tokenIdsIdx = 0;
        address currOwnershipAddr = address(0);
        for (uint256 i = 0; i < numMintedSoFar; i++) {
            TokenOwnership memory ownership = _ownerships[i];
            if (ownership.addr != address(0)) {
                currOwnershipAddr = ownership.addr;
            }
            if (currOwnershipAddr == owner) {
                if (tokenIdsIdx == index) {
                    return i;
                }
                tokenIdsIdx++;
            }
        }
        revert("ERC721A: unable to get token of owner by index");
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC165, IERC165)
        returns (bool)
    {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            interfaceId == type(IERC721Enumerable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        require(
            owner != address(0),
            "ERC721A: balance query for the zero address"
        );
        return uint256(_addressData[owner].balance);
    }

    function _numberMinted(address owner) internal view returns (uint256) {
        require(
            owner != address(0),
            "ERC721A: number minted query for the zero address"
        );
        return uint256(_addressData[owner].numberMinted);
    }

    function ownershipOf(uint256 tokenId)
        internal
        view
        returns (TokenOwnership memory)
    {
        require(_exists(tokenId), "ERC721A: owner query for nonexistent token");

        uint256 lowestTokenToCheck;
        if (tokenId >= maxBatchSize) {
            lowestTokenToCheck = tokenId - maxBatchSize + 1;
        }

        for (uint256 curr = tokenId; curr >= lowestTokenToCheck; curr--) {
            TokenOwnership memory ownership = _ownerships[curr];
            if (ownership.addr != address(0)) {
                return ownership;
            }
        }

        revert("ERC721A: unable to determine the owner of token");
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return ownershipOf(tokenId).addr;
    }

    /**
     * @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)
    {
        require(
            _exists(tokenId),
            "ERC721Metadata: URI query for nonexistent token"
        );

        string memory baseURI = _baseURI();
        return
            bytes(baseURI).length > 0
                ? string(abi.encodePacked(baseURI, tokenId.toString()))
                : "";
    }

    /**
     * @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, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ERC721A.ownerOf(tokenId);
        require(to != owner, "ERC721A: approval to current owner");

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

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId)
        public
        view
        override
        returns (address)
    {
        require(
            _exists(tokenId),
            "ERC721A: approved query for nonexistent token"
        );

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved)
        public
        override
    {
        require(operator != _msgSender(), "ERC721A: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), 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-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public override {
        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public override {
        _transfer(from, to, tokenId);
        require(
            _checkOnERC721Received(from, to, tokenId, _data),
            "ERC721A: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @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 tokenId < currentIndex;
    }

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, "");
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - there must be `quantity` tokens remaining unminted in the total collection.
     * - `to` cannot be the zero address.
     * - `quantity` cannot be larger than the max batch size.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        uint256 startTokenId = currentIndex;
        require(to != address(0), "ERC721A: mint to the zero address");
        // We know if the first token in the batch doesn't exist, the other ones don't as well, because of serial ordering.
        require(!_exists(startTokenId), "ERC721A: token already minted");
        require(quantity <= maxBatchSize, "ERC721A: quantity to mint too high");

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        AddressData memory addressData = _addressData[to];
        _addressData[to] = AddressData(
            addressData.balance + uint128(quantity),
            addressData.numberMinted + uint128(quantity)
        );
        _ownerships[startTokenId] = TokenOwnership(to, uint64(block.timestamp));

        uint256 updatedIndex = startTokenId;

        for (uint256 i = 0; i < quantity; i++) {
            emit Transfer(address(0), to, updatedIndex);
            require(
                _checkOnERC721Received(address(0), to, updatedIndex, _data),
                "ERC721A: transfer to non ERC721Receiver implementer"
            );
            updatedIndex++;
        }

        currentIndex = updatedIndex;
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @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 _transfer(
        address from,
        address to,
        uint256 tokenId
    ) private {
        TokenOwnership memory prevOwnership = ownershipOf(tokenId);

        bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr ||
            getApproved(tokenId) == _msgSender() ||
            isApprovedForAll(prevOwnership.addr, _msgSender()));

        require(
            isApprovedOrOwner,
            "ERC721A: transfer caller is not owner nor approved"
        );

        require(
            prevOwnership.addr == from,
            "ERC721A: transfer from incorrect owner"
        );
        require(to != address(0), "ERC721A: transfer to the zero address");

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId, prevOwnership.addr);

        _addressData[from].balance -= 1;
        _addressData[to].balance += 1;
        _ownerships[tokenId] = TokenOwnership(to, uint64(block.timestamp));

        // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
        // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
        uint256 nextTokenId = tokenId + 1;
        if (_ownerships[nextTokenId].addr == address(0)) {
            if (_exists(nextTokenId)) {
                _ownerships[nextTokenId] = TokenOwnership(
                    prevOwnership.addr,
                    prevOwnership.startTimestamp
                );
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(
        address to,
        uint256 tokenId,
        address owner
    ) private {
        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    uint256 public nextOwnerToExplicitlySet = 0;

    /**
     * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf().
     */
    function _setOwnersExplicit(uint256 quantity) internal {
        uint256 oldNextOwnerToSet = nextOwnerToExplicitlySet;
        require(quantity > 0, "quantity must be nonzero");
        uint256 endIndex = oldNextOwnerToSet + quantity - 1;
        if (endIndex > collectionSize - 1) {
            endIndex = collectionSize - 1;
        }
        // We know if the last one in the group exists, all in the group exist, due to serial ordering.
        require(_exists(endIndex), "not enough minted yet for this cleanup");
        for (uint256 i = oldNextOwnerToSet; i <= endIndex; i++) {
            if (_ownerships[i].addr == address(0)) {
                TokenOwnership memory ownership = ownershipOf(i);
                _ownerships[i] = TokenOwnership(
                    ownership.addr,
                    ownership.startTimestamp
                );
            }
        }
        nextOwnerToExplicitlySet = endIndex + 1;
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a 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 _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try
                IERC721Receiver(to).onERC721Received(
                    _msgSender(),
                    from,
                    tokenId,
                    _data
                )
            returns (bytes4 retval) {
                return retval == IERC721Receiver(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert(
                        "ERC721A: transfer to non ERC721Receiver implementer"
                    );
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     *
     * 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`.
     */
    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.
     *
     * 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` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

contract NFTPD is ERC721A, Ownable, ReentrancyGuard {
    using Strings for uint256;
    using MerkleProof for bytes32;

    string public baseURI;
    uint256 public mintPrice = 0.025 ether;
    uint256 public wlPrice = 0.019 ether;
    uint256 public maxPerTransaction = 10;
    uint256 public maxPerWallet = 100;
    uint256 public maxTotalSupply = 3333;
    bool public isPublicLive = false;
    bool public isWhitelistLive = false;
    bytes32 public merkleTreeRoot;
    mapping(address => uint256) public whitelistMintsPerWallet;    
    mapping(address => uint256) public mintsPerWallet;

    address private Address1 = 0x27264A9F498933AA2495eBa96B2929B4c208c2eB;
    address private Address2 = 0x078116d7a4A77187E5312e7114C6945440A9b0c6;
    address private Address3 = 0x27d0E073Fc1f62B8856De351df7EEF497C4F1bab;
    address private Address4 = 0x31b7Fc64B3c9c3AA9142069d9aF7bC6DadCD5C6a;
    address private Address5 = 0x363513A0E2d9800902F16ae1cAA1314822AA21f9;

    constructor() ERC721A("nftpd", "NFTPD", maxPerTransaction, maxTotalSupply) {}

    function mintPublic(uint256 _amount) external payable nonReentrant {
        require(isPublicLive, "Sale not live");
        require(mintsPerWallet[_msgSender()] + _amount <= maxPerWallet, "Max per wallet reached");
        require(_amount > 0, "You must mint at least one");
        require(totalSupply() + _amount <= maxTotalSupply, "Exceeds total supply");
        require(_amount <= maxPerTransaction, "Exceeds max per transaction");
        require(mintPrice * _amount <= msg.value, "Not enough ETH sent for selected amount");

        mintsPerWallet[_msgSender()] = mintsPerWallet[_msgSender()] + _amount;

        _safeMint(_msgSender(), _amount);
    }

    function mintWhitelist(uint256 _amount) external nonReentrant {
        require(mintsPerWallet[_msgSender()] + _amount <= maxPerWallet, "Max per wallet reached");
        require(isWhitelistLive, "Whitelist sale not live");
        require(totalSupply() + _amount <= maxTotalSupply, "Exceeds total supply");
        require(_amount <= maxPerTransaction, "Exceeds max per transaction");

        mintsPerWallet[_msgSender()] = mintsPerWallet[_msgSender()] + _amount;

        _safeMint(_msgSender(), _amount);
    }

    function mintPrivate(address _receiver, uint256 _amount) external onlyOwner {
        require(totalSupply() + _amount <= maxTotalSupply, "Exceeds total supply");
        _safeMint(_receiver, _amount);
    }

    function flipPublicSaleState() external onlyOwner {
        isPublicLive = !isPublicLive;
    }

    function flipWhitelistSaleState() external onlyOwner {
        isWhitelistLive = !isWhitelistLive;
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;
    }

    function setMintPrice(uint256 _mintPrice) external onlyOwner {
        mintPrice = _mintPrice;
    }

    function setMaxTotalSupply(uint256 _maxTotalSupply) external onlyOwner {
        maxTotalSupply = _maxTotalSupply;
    }

    function setMaxPerTransaction(uint256 _maxPerTransaction) external onlyOwner {
        maxPerTransaction = _maxPerTransaction;
    }

    function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner {
        maxPerWallet = _maxPerWallet;
    }

    function setBaseURI(string memory _newBaseURI) external onlyOwner {
        baseURI = _newBaseURI;
    }

    function setMerkleTreeRoot(bytes32 _merkleTreeRoot) external onlyOwner {
        merkleTreeRoot = _merkleTreeRoot;
    }

    function withdraw() public onlyOwner {
        uint256 balance = address(this).balance;
        uint256 balance4 = (balance * 3651) / 10000;
        uint256 balance3 = (balance * 794) / 10000;
        uint256 balance2 = (balance * 794) / 10000;
        uint256 balance1 = (balance * 794) / 10000;

        payable(Address1).transfer(balance1);

        payable(Address2).transfer(balance2);

        payable(Address3).transfer(balance3);

        payable(Address4).transfer(balance4);

        uint256 balance5 = balance - (balance1 + balance2 + balance3 + balance4);
        payable(Address5).transfer(balance5);
    }
}

Read Contract

balanceOf 0x70a08231 → uint256
baseURI 0x6c0360eb → string
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isPublicLive 0x5e5f3ce4 → bool
isWhitelistLive 0x3281fa3f → bool
maxPerTransaction 0x4b980d67 → uint256
maxPerWallet 0x453c2310 → uint256
maxTotalSupply 0x2ab4d052 → uint256
merkleTreeRoot 0xf716aee9 → bytes32
mintPrice 0x6817c76c → uint256
mintsPerWallet 0x4d0df5fc → uint256
name 0x06fdde03 → string
nextOwnerToExplicitlySet 0xd7224ba0 → uint256
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
whitelistMintsPerWallet 0x27a69949 → uint256
wlPrice 0xc7f8d01a → uint256

Write Contract 19 functions

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

approve 0x095ea7b3
address to
uint256 tokenId
flipPublicSaleState 0xa10866ef
No parameters
flipWhitelistSaleState 0xd1beca64
No parameters
mintPrivate 0x3627d3a1
address _receiver
uint256 _amount
mintPublic 0xefd0cbf9
uint256 _amount
mintWhitelist 0x4618163e
uint256 _amount
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 _newBaseURI
setMaxPerTransaction 0xccfdd2f8
uint256 _maxPerTransaction
setMaxPerWallet 0xe268e4d3
uint256 _maxPerWallet
setMaxTotalSupply 0x3f3e4c11
uint256 _maxTotalSupply
setMerkleTreeRoot 0x50dc4656
bytes32 _merkleTreeRoot
setMintPrice 0xf4a0a528
uint256 _mintPrice
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address