Forkchoice Ethereum Mainnet

Address Contract Partially Verified

Address 0xEc22f7CFc3deba665fDDC003D5bfAB1aEA398C8c
Balance 0 ETH
Nonce 1
Code Size 21382 bytes
Indexed Transactions 0 (1 on-chain, 1.2% indexed)
External Etherscan · Sourcify

Contract Bytecode

21382 bytes
0x60806040526004361061027d5760003560e01c80636352211e1161014f578063b88d4fde116100c1578063d5abeb011161007a578063d5abeb0114610983578063da3ef23f146109ae578063e985e9c5146109d7578063edec5f2714610a14578063f2c4ce1e14610a3d578063f2fde38b14610a665761027d565b8063b88d4fde14610861578063ba4e5c491461088a578063ba7d2c76146108c7578063c6682862146108f2578063c87b56dd1461091d578063d0eb26b01461095a5761027d565b80638da5cb5b116101135780638da5cb5b1461078457806395d89b41146107af5780639c70b512146107da578063a0712d6814610805578063a22cb46514610821578063a475b5dd1461084a5761027d565b80636352211e1461069f5780636c0360eb146106dc57806370a0823114610707578063715018a6146107445780637f00c7a61461075b5761027d565b80632f745c59116101f3578063449a52f8116101ac578063449a52f81461059e57806344a0d68a146105ba5780634f6ccce7146105e3578063518302271461062057806355f804b31461064b5780635c975abb146106745761027d565b80632f745c591461048b5780633af32abf146104c85780633c952764146105055780633ccfd60b1461052e57806342842e0e14610538578063438b6300146105615761027d565b8063095ea7b311610245578063095ea7b31461037b57806313faede6146103a457806318160ddd146103cf57806318cae269146103fa578063239c70ae1461043757806323b872dd146104625761027d565b806301ffc9a71461028257806302329a29146102bf57806306fdde03146102e8578063081812fc14610313578063081c8c4414610350575b600080fd5b34801561028e57600080fd5b506102a960048036038101906102a49190613c2b565b610a8f565b6040516102b69190614372565b60405180910390f35b3480156102cb57600080fd5b506102e660048036038101906102e19190613bfe565b610b09565b005b3480156102f457600080fd5b506102fd610ba2565b60405161030a919061438d565b60405180910390f35b34801561031f57600080fd5b5061033a60048036038101906103359190613cce565b610c34565b60405161034791906142e9565b60405180910390f35b34801561035c57600080fd5b50610365610cb9565b604051610372919061438d565b60405180910390f35b34801561038757600080fd5b506103a2600480360381019061039d9190613b71565b610d47565b005b3480156103b057600080fd5b506103b9610e5f565b6040516103c6919061470f565b60405180910390f35b3480156103db57600080fd5b506103e4610e65565b6040516103f1919061470f565b60405180910390f35b34801561040657600080fd5b50610421600480360381019061041c91906139ee565b610e72565b60405161042e919061470f565b60405180910390f35b34801561044357600080fd5b5061044c610e8a565b604051610459919061470f565b60405180910390f35b34801561046e57600080fd5b5061048960048036038101906104849190613a5b565b610e90565b005b34801561049757600080fd5b506104b260048036038101906104ad9190613b71565b610ef0565b6040516104bf919061470f565b60405180910390f35b3480156104d457600080fd5b506104ef60048036038101906104ea91906139ee565b610f95565b6040516104fc9190614372565b60405180910390f35b34801561051157600080fd5b5061052c60048036038101906105279190613bfe565b611044565b005b6105366110dd565b005b34801561054457600080fd5b5061055f600480360381019061055a9190613a5b565b6111d9565b005b34801561056d57600080fd5b50610588600480360381019061058391906139ee565b6111f9565b6040516105959190614350565b60405180910390f35b6105b860048036038101906105b39190613b71565b6112a7565b005b3480156105c657600080fd5b506105e160048036038101906105dc9190613cce565b6114b6565b005b3480156105ef57600080fd5b5061060a60048036038101906106059190613cce565b61153c565b604051610617919061470f565b60405180910390f35b34801561062c57600080fd5b506106356115ad565b6040516106429190614372565b60405180910390f35b34801561065757600080fd5b50610672600480360381019061066d9190613c85565b6115c0565b005b34801561068057600080fd5b50610689611656565b6040516106969190614372565b60405180910390f35b3480156106ab57600080fd5b506106c660048036038101906106c19190613cce565b611669565b6040516106d391906142e9565b60405180910390f35b3480156106e857600080fd5b506106f161171b565b6040516106fe919061438d565b60405180910390f35b34801561071357600080fd5b5061072e600480360381019061072991906139ee565b6117a9565b60405161073b919061470f565b60405180910390f35b34801561075057600080fd5b50610759611861565b005b34801561076757600080fd5b50610782600480360381019061077d9190613cce565b6118e9565b005b34801561079057600080fd5b5061079961196f565b6040516107a691906142e9565b60405180910390f35b3480156107bb57600080fd5b506107c4611999565b6040516107d1919061438d565b60405180910390f35b3480156107e657600080fd5b506107ef611a2b565b6040516107fc9190614372565b60405180910390f35b61081f600480360381019061081a9190613cce565b611a3e565b005b34801561082d57600080fd5b5061084860048036038101906108439190613b31565b611d87565b005b34801561085657600080fd5b5061085f611f08565b005b34801561086d57600080fd5b5061088860048036038101906108839190613aae565b611fa1565b005b34801561089657600080fd5b506108b160048036038101906108ac9190613cce565b612003565b6040516108be91906142e9565b60405180910390f35b3480156108d357600080fd5b506108dc612042565b6040516108e9919061470f565b60405180910390f35b3480156108fe57600080fd5b50610907612048565b604051610914919061438d565b60405180910390f35b34801561092957600080fd5b50610944600480360381019061093f9190613cce565b6120d6565b604051610951919061438d565b60405180910390f35b34801561096657600080fd5b50610981600480360381019061097c9190613cce565b61222f565b005b34801561098f57600080fd5b506109986122b5565b6040516109a5919061470f565b60405180910390f35b3480156109ba57600080fd5b506109d560048036038101906109d09190613c85565b6122bb565b005b3480156109e357600080fd5b506109fe60048036038101906109f99190613a1b565b612351565b604051610a0b9190614372565b60405180910390f35b348015610a2057600080fd5b50610a3b6004803603810190610a369190613bb1565b6123e5565b005b348015610a4957600080fd5b50610a646004803603810190610a5f9190613c85565b612485565b005b348015610a7257600080fd5b50610a8d6004803603810190610a8891906139ee565b61251b565b005b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b025750610b0182612613565b5b9050919050565b610b116126f5565b73ffffffffffffffffffffffffffffffffffffffff16610b2f61196f565b73ffffffffffffffffffffffffffffffffffffffff1614610b85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7c9061458f565b60405180910390fd5b80601260006101000a81548160ff02191690831515021790555050565b606060008054610bb190614a18565b80601f0160208091040260200160405190810160405280929190818152602001828054610bdd90614a18565b8015610c2a5780601f10610bff57610100808354040283529160200191610c2a565b820191906000526020600020905b815481529060010190602001808311610c0d57829003601f168201915b5050505050905090565b6000610c3f826126fd565b610c7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c759061456f565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600d8054610cc690614a18565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf290614a18565b8015610d3f5780601f10610d1457610100808354040283529160200191610d3f565b820191906000526020600020905b815481529060010190602001808311610d2257829003601f168201915b505050505081565b6000610d5282611669565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610dc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dba9061462f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610de26126f5565b73ffffffffffffffffffffffffffffffffffffffff161480610e115750610e1081610e0b6126f5565b612351565b5b610e50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e47906144af565b60405180910390fd5b610e5a8383612769565b505050565b600e5481565b6000600880549050905090565b60146020528060005260406000206000915090505481565b60105481565b610ea1610e9b6126f5565b82612822565b610ee0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed79061466f565b60405180910390fd5b610eeb838383612900565b505050565b6000610efb836117a9565b8210610f3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f33906143af565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b600080600090505b601380549050811015611039578273ffffffffffffffffffffffffffffffffffffffff1660138281548110610fd557610fd4614bb1565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561102657600191505061103f565b808061103190614a7b565b915050610f9d565b50600090505b919050565b61104c6126f5565b73ffffffffffffffffffffffffffffffffffffffff1661106a61196f565b73ffffffffffffffffffffffffffffffffffffffff16146110c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b79061458f565b60405180910390fd5b80601260026101000a81548160ff02191690831515021790555050565b6110e56126f5565b73ffffffffffffffffffffffffffffffffffffffff1661110361196f565b73ffffffffffffffffffffffffffffffffffffffff1614611159576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111509061458f565b60405180910390fd5b600061116361196f565b73ffffffffffffffffffffffffffffffffffffffff1647604051611186906142d4565b60006040518083038185875af1925050503d80600081146111c3576040519150601f19603f3d011682016040523d82523d6000602084013e6111c8565b606091505b50509050806111d657600080fd5b50565b6111f483838360405180602001604052806000815250611fa1565b505050565b60606000611206836117a9565b905060008167ffffffffffffffff81111561122457611223614be0565b5b6040519080825280602002602001820160405280156112525781602001602082028036833780820191505090505b50905060005b8281101561129c5761126a8582610ef0565b82828151811061127d5761127c614bb1565b5b602002602001018181525050808061129490614a7b565b915050611258565b508092505050919050565b600073dab1a1854214684ace522439684a145e625052339050601260009054906101000a900460ff1615611310576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611307906145af565b60405180910390fd5b600061131a610e65565b90506000831161135f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611356906146ef565b60405180910390fd5b6010548311156113a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139b9061452f565b60405180910390fd5b600f5483826113b3919061484d565b11156113f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113eb9061450f565b60405180910390fd5b34600e5414611438576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142f906146af565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149d9061460f565b60405180910390fd5b6114b08484612b5c565b50505050565b6114be6126f5565b73ffffffffffffffffffffffffffffffffffffffff166114dc61196f565b73ffffffffffffffffffffffffffffffffffffffff1614611532576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115299061458f565b60405180910390fd5b80600e8190555050565b6000611546610e65565b8210611587576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157e9061468f565b60405180910390fd5b6008828154811061159b5761159a614bb1565b5b90600052602060002001549050919050565b601260019054906101000a900460ff1681565b6115c86126f5565b73ffffffffffffffffffffffffffffffffffffffff166115e661196f565b73ffffffffffffffffffffffffffffffffffffffff161461163c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116339061458f565b60405180910390fd5b80600b90805190602001906116529291906136eb565b5050565b601260009054906101000a900460ff1681565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611712576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611709906144ef565b60405180910390fd5b80915050919050565b600b805461172890614a18565b80601f016020809104026020016040519081016040528092919081815260200182805461175490614a18565b80156117a15780601f10611776576101008083540402835291602001916117a1565b820191906000526020600020905b81548152906001019060200180831161178457829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561181a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611811906144cf565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6118696126f5565b73ffffffffffffffffffffffffffffffffffffffff1661188761196f565b73ffffffffffffffffffffffffffffffffffffffff16146118dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d49061458f565b60405180910390fd5b6118e76000612b7a565b565b6118f16126f5565b73ffffffffffffffffffffffffffffffffffffffff1661190f61196f565b73ffffffffffffffffffffffffffffffffffffffff1614611965576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161195c9061458f565b60405180910390fd5b8060108190555050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600180546119a890614a18565b80601f01602080910402602001604051908101604052809291908181526020018280546119d490614a18565b8015611a215780601f106119f657610100808354040283529160200191611a21565b820191906000526020600020905b815481529060010190602001808311611a0457829003601f168201915b5050505050905090565b601260029054906101000a900460ff1681565b601260009054906101000a900460ff1615611a8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a85906145af565b60405180910390fd5b6000611a98610e65565b905060008211611add576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad4906146ef565b60405180910390fd5b601054821115611b22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b199061452f565b60405180910390fd5b600f548282611b31919061484d565b1115611b72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b699061450f565b60405180910390fd5b611b7a61196f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611cf75760011515601260029054906101000a900460ff1615151415611ca657611bd133610f95565b611c10576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c07906146cf565b60405180910390fd5b6000601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506011548382611c63919061484d565b1115611ca4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9b9061442f565b60405180910390fd5b505b81600e54611cb491906148d4565b341015611cf6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ced9061464f565b60405180910390fd5b5b6000600190505b828111611d8257601460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611d5590614a7b565b9190505550611d6f338284611d6a919061484d565b612b5c565b8080611d7a90614a7b565b915050611cfe565b505050565b611d8f6126f5565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611dfd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df49061446f565b60405180910390fd5b8060056000611e0a6126f5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611eb76126f5565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611efc9190614372565b60405180910390a35050565b611f106126f5565b73ffffffffffffffffffffffffffffffffffffffff16611f2e61196f565b73ffffffffffffffffffffffffffffffffffffffff1614611f84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f7b9061458f565b60405180910390fd5b6001601260016101000a81548160ff021916908315150217905550565b611fb2611fac6126f5565b83612822565b611ff1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fe89061466f565b60405180910390fd5b611ffd84848484612c40565b50505050565b6013818154811061201357600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60115481565b600c805461205590614a18565b80601f016020809104026020016040519081016040528092919081815260200182805461208190614a18565b80156120ce5780601f106120a3576101008083540402835291602001916120ce565b820191906000526020600020905b8154815290600101906020018083116120b157829003601f168201915b505050505081565b60606120e1826126fd565b612120576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612117906145ef565b60405180910390fd5b60001515601260019054906101000a900460ff16151514156121ce57600d805461214990614a18565b80601f016020809104026020016040519081016040528092919081815260200182805461217590614a18565b80156121c25780601f10612197576101008083540402835291602001916121c2565b820191906000526020600020905b8154815290600101906020018083116121a557829003601f168201915b5050505050905061222a565b60006121d8612c9c565b905060008151116121f85760405180602001604052806000815250612226565b8061220284612d2e565b600c604051602001612216939291906142a3565b6040516020818303038152906040525b9150505b919050565b6122376126f5565b73ffffffffffffffffffffffffffffffffffffffff1661225561196f565b73ffffffffffffffffffffffffffffffffffffffff16146122ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122a29061458f565b60405180910390fd5b8060118190555050565b600f5481565b6122c36126f5565b73ffffffffffffffffffffffffffffffffffffffff166122e161196f565b73ffffffffffffffffffffffffffffffffffffffff1614612337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232e9061458f565b60405180910390fd5b80600c908051906020019061234d9291906136eb565b5050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6123ed6126f5565b73ffffffffffffffffffffffffffffffffffffffff1661240b61196f565b73ffffffffffffffffffffffffffffffffffffffff1614612461576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124589061458f565b60405180910390fd5b6013600061246f9190613771565b818160139190612480929190613792565b505050565b61248d6126f5565b73ffffffffffffffffffffffffffffffffffffffff166124ab61196f565b73ffffffffffffffffffffffffffffffffffffffff1614612501576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f89061458f565b60405180910390fd5b80600d90805190602001906125179291906136eb565b5050565b6125236126f5565b73ffffffffffffffffffffffffffffffffffffffff1661254161196f565b73ffffffffffffffffffffffffffffffffffffffff1614612597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161258e9061458f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612607576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125fe906143ef565b60405180910390fd5b61261081612b7a565b50565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806126de57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806126ee57506126ed82612e8f565b5b9050919050565b600033905090565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166127dc83611669565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061282d826126fd565b61286c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128639061448f565b60405180910390fd5b600061287783611669565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806128e657508373ffffffffffffffffffffffffffffffffffffffff166128ce84610c34565b73ffffffffffffffffffffffffffffffffffffffff16145b806128f757506128f68185612351565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1661292082611669565b73ffffffffffffffffffffffffffffffffffffffff1614612976576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161296d906145cf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156129e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129dd9061444f565b60405180910390fd5b6129f1838383612ef9565b6129fc600082612769565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612a4c919061492e565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612aa3919061484d565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b612b7682826040518060200160405280600081525061300d565b5050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612c4b848484612900565b612c5784848484613068565b612c96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8d906143cf565b60405180910390fd5b50505050565b6060600b8054612cab90614a18565b80601f0160208091040260200160405190810160405280929190818152602001828054612cd790614a18565b8015612d245780601f10612cf957610100808354040283529160200191612d24565b820191906000526020600020905b815481529060010190602001808311612d0757829003601f168201915b5050505050905090565b60606000821415612d76576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612e8a565b600082905060005b60008214612da8578080612d9190614a7b565b915050600a82612da191906148a3565b9150612d7e565b60008167ffffffffffffffff811115612dc457612dc3614be0565b5b6040519080825280601f01601f191660200182016040528015612df65781602001600182028036833780820191505090505b5090505b60008514612e8357600182612e0f919061492e565b9150600a85612e1e9190614ac4565b6030612e2a919061484d565b60f81b818381518110612e4057612e3f614bb1565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612e7c91906148a3565b9450612dfa565b8093505050505b919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b612f048383836131ff565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612f4757612f4281613204565b612f86565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614612f8557612f84838261324d565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612fc957612fc4816133ba565b613008565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461300757613006828261348b565b5b5b505050565b613017838361350a565b6130246000848484613068565b613063576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161305a906143cf565b60405180910390fd5b505050565b60006130898473ffffffffffffffffffffffffffffffffffffffff166136d8565b156131f2578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026130b26126f5565b8786866040518563ffffffff1660e01b81526004016130d49493929190614304565b602060405180830381600087803b1580156130ee57600080fd5b505af192505050801561311f57506040513d601f19601f8201168201806040525081019061311c9190613c58565b60015b6131a2573d806000811461314f576040519150601f19603f3d011682016040523d82523d6000602084013e613154565b606091505b5060008151141561319a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613191906143cf565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506131f7565b600190505b949350505050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b6000600161325a846117a9565b613264919061492e565b9050600060076000848152602001908152602001600020549050818114613349576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506133ce919061492e565b90506000600960008481526020019081526020016000205490506000600883815481106133fe576133fd614bb1565b5b9060005260206000200154905080600883815481106134205761341f614bb1565b5b90600052602060002001819055508160096000838152602001908152602001600020819055506009600085815260200190815260200160002060009055600880548061346f5761346e614b82565b5b6001900381819060005260206000200160009055905550505050565b6000613496836117a9565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561357a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135719061454f565b60405180910390fd5b613583816126fd565b156135c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135ba9061440f565b60405180910390fd5b6135cf60008383612ef9565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461361f919061484d565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b600080823b905060008111915050919050565b8280546136f790614a18565b90600052602060002090601f0160209004810192826137195760008555613760565b82601f1061373257805160ff1916838001178555613760565b82800160010185558215613760579182015b8281111561375f578251825591602001919060010190613744565b5b50905061376d9190613832565b5090565b508054600082559060005260206000209081019061378f9190613832565b50565b828054828255906000526020600020908101928215613821579160200282015b8281111561382057823573ffffffffffffffffffffffffffffffffffffffff168260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550916020019190600101906137b2565b5b50905061382e9190613832565b5090565b5b8082111561384b576000816000905550600101613833565b5090565b600061386261385d8461474f565b61472a565b90508281526020810184848401111561387e5761387d614c1e565b5b6138898482856149d6565b509392505050565b60006138a461389f84614780565b61472a565b9050828152602081018484840111156138c0576138bf614c1e565b5b6138cb8482856149d6565b509392505050565b6000813590506138e2816152f4565b92915050565b60008083601f8401126138fe576138fd614c14565b5b8235905067ffffffffffffffff81111561391b5761391a614c0f565b5b60208301915083602082028301111561393757613936614c19565b5b9250929050565b60008135905061394d8161530b565b92915050565b60008135905061396281615322565b92915050565b60008151905061397781615322565b92915050565b600082601f83011261399257613991614c14565b5b81356139a284826020860161384f565b91505092915050565b600082601f8301126139c0576139bf614c14565b5b81356139d0848260208601613891565b91505092915050565b6000813590506139e881615339565b92915050565b600060208284031215613a0457613a03614c28565b5b6000613a12848285016138d3565b91505092915050565b60008060408385031215613a3257613a31614c28565b5b6000613a40858286016138d3565b9250506020613a51858286016138d3565b9150509250929050565b600080600060608486031215613a7457613a73614c28565b5b6000613a82868287016138d3565b9350506020613a93868287016138d3565b9250506040613aa4868287016139d9565b9150509250925092565b60008060008060808587031215613ac857613ac7614c28565b5b6000613ad6878288016138d3565b9450506020613ae7878288016138d3565b9350506040613af8878288016139d9565b925050606085013567ffffffffffffffff811115613b1957613b18614c23565b5b613b258782880161397d565b91505092959194509250565b60008060408385031215613b4857613b47614c28565b5b6000613b56858286016138d3565b9250506020613b678582860161393e565b9150509250929050565b60008060408385031215613b8857613b87614c28565b5b6000613b96858286016138d3565b9250506020613ba7858286016139d9565b9150509250929050565b60008060208385031215613bc857613bc7614c28565b5b600083013567ffffffffffffffff811115613be657613be5614c23565b5b613bf2858286016138e8565b92509250509250929050565b600060208284031215613c1457613c13614c28565b5b6000613c228482850161393e565b91505092915050565b600060208284031215613c4157613c40614c28565b5b6000613c4f84828501613953565b91505092915050565b600060208284031215613c6e57613c6d614c28565b5b6000613c7c84828501613968565b91505092915050565b600060208284031215613c9b57613c9a614c28565b5b600082013567ffffffffffffffff811115613cb957613cb8614c23565b5b613cc5848285016139ab565b91505092915050565b600060208284031215613ce457613ce3614c28565b5b6000613cf2848285016139d9565b91505092915050565b6000613d078383614285565b60208301905092915050565b613d1c81614962565b82525050565b6000613d2d826147d6565b613d378185614804565b9350613d42836147b1565b8060005b83811015613d73578151613d5a8882613cfb565b9750613d65836147f7565b925050600181019050613d46565b5085935050505092915050565b613d8981614974565b82525050565b6000613d9a826147e1565b613da48185614815565b9350613db48185602086016149e5565b613dbd81614c2d565b840191505092915050565b6000613dd3826147ec565b613ddd8185614831565b9350613ded8185602086016149e5565b613df681614c2d565b840191505092915050565b6000613e0c826147ec565b613e168185614842565b9350613e268185602086016149e5565b80840191505092915050565b60008154613e3f81614a18565b613e498186614842565b94506001821660008114613e645760018114613e7557613ea8565b60ff19831686528186019350613ea8565b613e7e856147c1565b60005b83811015613ea057815481890152600182019150602081019050613e81565b838801955050505b50505092915050565b6000613ebe602b83614831565b9150613ec982614c3e565b604082019050919050565b6000613ee1603283614831565b9150613eec82614c8d565b604082019050919050565b6000613f04602683614831565b9150613f0f82614cdc565b604082019050919050565b6000613f27601c83614831565b9150613f3282614d2b565b602082019050919050565b6000613f4a601c83614831565b9150613f5582614d54565b602082019050919050565b6000613f6d602483614831565b9150613f7882614d7d565b604082019050919050565b6000613f90601983614831565b9150613f9b82614dcc565b602082019050919050565b6000613fb3602c83614831565b9150613fbe82614df5565b604082019050919050565b6000613fd6603883614831565b9150613fe182614e44565b604082019050919050565b6000613ff9602a83614831565b915061400482614e93565b604082019050919050565b600061401c602983614831565b915061402782614ee2565b604082019050919050565b600061403f601683614831565b915061404a82614f31565b602082019050919050565b6000614062602483614831565b915061406d82614f5a565b604082019050919050565b6000614085602083614831565b915061409082614fa9565b602082019050919050565b60006140a8602c83614831565b91506140b382614fd2565b604082019050919050565b60006140cb602083614831565b91506140d682615021565b602082019050919050565b60006140ee601683614831565b91506140f98261504a565b602082019050919050565b6000614111602983614831565b915061411c82615073565b604082019050919050565b6000614134602f83614831565b915061413f826150c2565b604082019050919050565b6000614157603a83614831565b915061416282615111565b604082019050919050565b600061417a602183614831565b915061418582615160565b604082019050919050565b600061419d600083614826565b91506141a8826151af565b600082019050919050565b60006141c0601283614831565b91506141cb826151b2565b602082019050919050565b60006141e3603183614831565b91506141ee826151db565b604082019050919050565b6000614206602c83614831565b91506142118261522a565b604082019050919050565b6000614229601883614831565b915061423482615279565b602082019050919050565b600061424c601783614831565b9150614257826152a2565b602082019050919050565b600061426f601b83614831565b915061427a826152cb565b602082019050919050565b61428e816149cc565b82525050565b61429d816149cc565b82525050565b60006142af8286613e01565b91506142bb8285613e01565b91506142c78284613e32565b9150819050949350505050565b60006142df82614190565b9150819050919050565b60006020820190506142fe6000830184613d13565b92915050565b60006080820190506143196000830187613d13565b6143266020830186613d13565b6143336040830185614294565b81810360608301526143458184613d8f565b905095945050505050565b6000602082019050818103600083015261436a8184613d22565b905092915050565b60006020820190506143876000830184613d80565b92915050565b600060208201905081810360008301526143a78184613dc8565b905092915050565b600060208201905081810360008301526143c881613eb1565b9050919050565b600060208201905081810360008301526143e881613ed4565b9050919050565b6000602082019050818103600083015261440881613ef7565b9050919050565b6000602082019050818103600083015261442881613f1a565b9050919050565b6000602082019050818103600083015261444881613f3d565b9050919050565b6000602082019050818103600083015261446881613f60565b9050919050565b6000602082019050818103600083015261448881613f83565b9050919050565b600060208201905081810360008301526144a881613fa6565b9050919050565b600060208201905081810360008301526144c881613fc9565b9050919050565b600060208201905081810360008301526144e881613fec565b9050919050565b600060208201905081810360008301526145088161400f565b9050919050565b6000602082019050818103600083015261452881614032565b9050919050565b6000602082019050818103600083015261454881614055565b9050919050565b6000602082019050818103600083015261456881614078565b9050919050565b600060208201905081810360008301526145888161409b565b9050919050565b600060208201905081810360008301526145a8816140be565b9050919050565b600060208201905081810360008301526145c8816140e1565b9050919050565b600060208201905081810360008301526145e881614104565b9050919050565b6000602082019050818103600083015261460881614127565b9050919050565b600060208201905081810360008301526146288161414a565b9050919050565b600060208201905081810360008301526146488161416d565b9050919050565b60006020820190508181036000830152614668816141b3565b9050919050565b60006020820190508181036000830152614688816141d6565b9050919050565b600060208201905081810360008301526146a8816141f9565b9050919050565b600060208201905081810360008301526146c88161421c565b9050919050565b600060208201905081810360008301526146e88161423f565b9050919050565b6000602082019050818103600083015261470881614262565b9050919050565b60006020820190506147246000830184614294565b92915050565b6000614734614745565b90506147408282614a4a565b919050565b6000604051905090565b600067ffffffffffffffff82111561476a57614769614be0565b5b61477382614c2d565b9050602081019050919050565b600067ffffffffffffffff82111561479b5761479a614be0565b5b6147a482614c2d565b9050602081019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000614858826149cc565b9150614863836149cc565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561489857614897614af5565b5b828201905092915050565b60006148ae826149cc565b91506148b9836149cc565b9250826148c9576148c8614b24565b5b828204905092915050565b60006148df826149cc565b91506148ea836149cc565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561492357614922614af5565b5b828202905092915050565b6000614939826149cc565b9150614944836149cc565b92508282101561495757614956614af5565b5b828203905092915050565b600061496d826149ac565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b82818337600083830152505050565b60005b83811015614a035780820151818401526020810190506149e8565b83811115614a12576000848401525b50505050565b60006002820490506001821680614a3057607f821691505b60208210811415614a4457614a43614b53565b5b50919050565b614a5382614c2d565b810181811067ffffffffffffffff82111715614a7257614a71614be0565b5b80604052505050565b6000614a86826149cc565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614ab957614ab8614af5565b5b600182019050919050565b6000614acf826149cc565b9150614ada836149cc565b925082614aea57614ae9614b24565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f6d6178204e465420706572206164647265737320657863656564656400000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b7f6d6178204e4654206c696d697420657863656564656400000000000000000000600082015250565b7f6d6178206d696e7420616d6f756e74207065722073657373696f6e206578636560008201527f6564656400000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f74686520636f6e74726163742069732070617573656400000000000000000000600082015250565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f546869732066756e6374696f6e2063616e2062652063616c6c6564206279207460008201527f68652043726f73736d696e742061646472657373206f6e6c792e000000000000602082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b50565b7f696e73756666696369656e742066756e64730000000000000000000000000000600082015250565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f496e636f7272656374204554482076616c75652073656e740000000000000000600082015250565b7f75736572206973206e6f742077686974656c6973746564000000000000000000600082015250565b7f6e65656420746f206d696e74206174206c656173742031204e46540000000000600082015250565b6152fd81614962565b811461530857600080fd5b50565b61531481614974565b811461531f57600080fd5b50565b61532b81614980565b811461533657600080fd5b50565b615342816149cc565b811461534d57600080fd5b5056fea2646970667358221220e0df44d6db58cad5dd17ed08661b6cc652e6b3d2192b9759b612cf64c3701ac964736f6c63430008070033

Verified Source Code Partial Match

Compiler: v0.8.7+commit.e28d00a7 EVM: london Optimization: No
ThirstNFTBronze.sol 1381 lines
// SPDX-License-Identifier: GPL-3.0

// File: @openzeppelin/contracts/utils/introspection/IERC165.sol
pragma solidity ^0.8.0;
/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// File: @openzeppelin/contracts/token/ERC721/IERC721.sol
pragma solidity ^0.8.0;
/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

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

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

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

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

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

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


// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol
pragma solidity ^0.8.0;
/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

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

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


// File: @openzeppelin/contracts/utils/introspection/ERC165.sol
pragma solidity ^0.8.0;
/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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



pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

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



pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol



pragma solidity ^0.8.0;


/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

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

// File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol



pragma solidity ^0.8.0;

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

// File: @openzeppelin/contracts/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/token/ERC721/ERC721.sol
pragma solidity ^0.8.0;
/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // 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 Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @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 ||
            super.supportsInterface(interfaceId);
    }

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

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @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 virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: 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 virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @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 {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: 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`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * 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
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

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

    /**
     * @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.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * 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, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

// File: @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol



pragma solidity ^0.8.0;



/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

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

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

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * 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, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}


// File: @openzeppelin/contracts/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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

pragma solidity >=0.7.0 <0.9.0;

contract ThirstNFTBronze is ERC721Enumerable, Ownable {
  using Strings for uint256;

  string public baseURI;
  string public baseExtension = ".json";
  string public notRevealedUri;
  uint256 public cost = 0.40 ether;
  uint256 public maxSupply = 125;
  uint256 public maxMintAmount = 5;
  uint256 public nftPerAddressLimit = 3;
  bool public paused = false;
  bool public revealed = true;
  bool public onlyWhitelisted = false;
  address[] public whitelistedAddresses;
  mapping(address => uint256) public addressMintedBalance;

  constructor(
    string memory _name,
    string memory _symbol,
    string memory _initBaseURI,
    string memory _initNotRevealedUri
  ) ERC721(_name, _symbol) {
    setBaseURI(_initBaseURI);
    setNotRevealedURI(_initNotRevealedUri);
  }

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

  // public
  function mint(uint256 _mintAmount) public payable {
    require(!paused, "the contract is paused");
    uint256 supply = totalSupply();
    require(_mintAmount > 0, "need to mint at least 1 NFT");
    require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded");
    require(supply + _mintAmount <= maxSupply, "max NFT limit exceeded");

    if (msg.sender != owner()) {
        if(onlyWhitelisted == true) {
            require(isWhitelisted(msg.sender), "user is not whitelisted");
            uint256 ownerMintedCount = addressMintedBalance[msg.sender];
            require(ownerMintedCount + _mintAmount <= nftPerAddressLimit, "max NFT per address exceeded");
        }
        require(msg.value >= cost * _mintAmount, "insufficient funds");
    }

    for (uint256 i = 1; i <= _mintAmount; i++) {
      addressMintedBalance[msg.sender]++;
      _safeMint(msg.sender, supply + i);
    }
  }
  
  function isWhitelisted(address _user) public view returns (bool) {
    for (uint i = 0; i < whitelistedAddresses.length; i++) {
      if (whitelistedAddresses[i] == _user) {
          return true;
      }
    }
    return false;
  }

  function walletOfOwner(address _owner)
    public
    view
    returns (uint256[] memory)
  {
    uint256 ownerTokenCount = balanceOf(_owner);
    uint256[] memory tokenIds = new uint256[](ownerTokenCount);
    for (uint256 i; i < ownerTokenCount; i++) {
      tokenIds[i] = tokenOfOwnerByIndex(_owner, i);
    }
    return tokenIds;
  }

  function tokenURI(uint256 tokenId)
    public
    view
    virtual
    override
    returns (string memory)
  {
    require(
      _exists(tokenId),
      "ERC721Metadata: URI query for nonexistent token"
    );
    
    if(revealed == false) {
        return notRevealedUri;
    }

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

  //only owner
  function reveal() public onlyOwner {
      revealed = true;
  }
  
  function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
    nftPerAddressLimit = _limit;
  }
  
  function setCost(uint256 _newCost) public onlyOwner {
    cost = _newCost;
  }

  function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
    maxMintAmount = _newmaxMintAmount;
  }

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

  function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
    baseExtension = _newBaseExtension;
  }
  
  function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
    notRevealedUri = _notRevealedURI;
  }

  function pause(bool _state) public onlyOwner {
    paused = _state;
  }
  
  function setOnlyWhitelisted(bool _state) public onlyOwner {
    onlyWhitelisted = _state;
  }
  
  function whitelistUsers(address[] calldata _users) public onlyOwner {
    delete whitelistedAddresses;
    whitelistedAddresses = _users;
  }
 
  function withdraw() public payable onlyOwner {
    (bool os, ) = payable(owner()).call{value: address(this).balance}("");
    require(os);
  }

  function mintTo(address to, uint256 _mintAmount) external payable {
    address crossmint_eth = 0xdAb1a1854214684acE522439684a145E62505233;
    require(!paused, "the contract is paused");
    uint256 supply = totalSupply();
    require(_mintAmount > 0, "need to mint at least 1 NFT");
    require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded");
    require(supply + _mintAmount <= maxSupply, "max NFT limit exceeded");
    require(cost == msg.value, "Incorrect ETH value sent");
    require(
      msg.sender == crossmint_eth, // Optional Restriction
      "This function can be called by the Crossmint address only." // Error message
    );
    _safeMint(to, _mintAmount);
  }
}

Read Contract

addressMintedBalance 0x18cae269 → uint256
balanceOf 0x70a08231 → uint256
baseExtension 0xc6682862 → string
baseURI 0x6c0360eb → string
cost 0x13faede6 → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isWhitelisted 0x3af32abf → bool
maxMintAmount 0x239c70ae → uint256
maxSupply 0xd5abeb01 → uint256
name 0x06fdde03 → string
nftPerAddressLimit 0xba7d2c76 → uint256
notRevealedUri 0x081c8c44 → string
onlyWhitelisted 0x9c70b512 → bool
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
revealed 0x51830227 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
walletOfOwner 0x438b6300 → uint256[]
whitelistedAddresses 0xba4e5c49 → address

Write Contract 20 functions

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

approve 0x095ea7b3
address to
uint256 tokenId
mint 0xa0712d68
uint256 _mintAmount
mintTo 0x449a52f8
address to
uint256 _mintAmount
pause 0x02329a29
bool _state
renounceOwnership 0x715018a6
No parameters
reveal 0xa475b5dd
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
setBaseExtension 0xda3ef23f
string _newBaseExtension
setBaseURI 0x55f804b3
string _newBaseURI
setCost 0x44a0d68a
uint256 _newCost
setNftPerAddressLimit 0xd0eb26b0
uint256 _limit
setNotRevealedURI 0xf2c4ce1e
string _notRevealedURI
setOnlyWhitelisted 0x3c952764
bool _state
setmaxMintAmount 0x7f00c7a6
uint256 _newmaxMintAmount
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
whitelistUsers 0xedec5f27
address[] _users
withdraw 0x3ccfd60b
No parameters

Recent Transactions

This address has 1 on-chain transactions, but only 1.2% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →