Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x36D582Ea65F98A087767028A0Ef469aDa276Ffe7
Balance 0 ETH
Nonce 1
Code Size 19004 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

19004 bytes
0x60806040526004361061025c5760003560e01c80635c975abb11610144578063a22cb465116100b6578063d5abeb011161007a578063d5abeb01146108c3578063ddff5b1c146108ee578063e0a808531461090a578063e985e9c514610933578063efbd73f414610970578063f2fde38b146109995761025c565b8063a22cb465146107e0578063a45ba8e714610809578063b071401b14610834578063b88d4fde1461085d578063c87b56dd146108865761025c565b80637ec4a659116101085780637ec4a659146106f15780638295784d1461071a5780638da5cb5b1461074357806394354fd01461076e57806395d89b4114610799578063a0712d68146107c45761025c565b80635c975abb1461060a57806362b99ad4146106355780636352211e1461066057806370a082311461069d578063715018a6146106da5761025c565b806329fc6bae116101dd57806342842e0e116101a157806342842e0e146104fc578063438b63001461052557806344a0d68a146105625780634fdd43cb1461058b57806351830227146105b45780635503a0e8146105df5761025c565b806329fc6bae1461043d5780632e0674211461046857806334ecc70a146104915780633a73c58d146104bc5780633ccfd60b146104e55761025c565b806313faede61161022457806313faede61461036c57806316ba10e01461039757806316c38b3c146103c057806318160ddd146103e957806323b872dd146104145761025c565b806301ffc9a71461026157806306fdde031461029e578063081812fc146102c9578063095ea7b3146103065780630d7581111461032f575b600080fd5b34801561026d57600080fd5b5061028860048036038101906102839190613611565b6109c2565b6040516102959190613cf3565b60405180910390f35b3480156102aa57600080fd5b506102b3610aa4565b6040516102c09190613d0e565b60405180910390f35b3480156102d557600080fd5b506102f060048036038101906102eb91906136b4565b610b36565b6040516102fd9190613c6a565b60405180910390f35b34801561031257600080fd5b5061032d60048036038101906103289190613544565b610b7c565b005b34801561033b57600080fd5b50610356600480360381019061035191906133c1565b610c94565b6040516103639190613fd0565b60405180910390f35b34801561037857600080fd5b50610381610cac565b60405161038e9190613fd0565b60405180910390f35b3480156103a357600080fd5b506103be60048036038101906103b9919061366b565b610cb2565b005b3480156103cc57600080fd5b506103e760048036038101906103e291906135e4565b610d48565b005b3480156103f557600080fd5b506103fe610de1565b60405161040b9190613fd0565b60405180910390f35b34801561042057600080fd5b5061043b6004803603810190610436919061342e565b610df2565b005b34801561044957600080fd5b50610452610e52565b60405161045f9190613cf3565b60405180910390f35b34801561047457600080fd5b5061048f600480360381019061048a91906136b4565b610e65565b005b34801561049d57600080fd5b506104a6610eeb565b6040516104b39190613fd0565b60405180910390f35b3480156104c857600080fd5b506104e360048036038101906104de91906135e4565b610ef1565b005b3480156104f157600080fd5b506104fa610f8a565b005b34801561050857600080fd5b50610523600480360381019061051e919061342e565b611086565b005b34801561053157600080fd5b5061054c600480360381019061054791906133c1565b6110a6565b6040516105599190613cd1565b60405180910390f35b34801561056e57600080fd5b50610589600480360381019061058491906136b4565b6111b1565b005b34801561059757600080fd5b506105b260048036038101906105ad919061366b565b611237565b005b3480156105c057600080fd5b506105c96112cd565b6040516105d69190613cf3565b60405180910390f35b3480156105eb57600080fd5b506105f46112e0565b6040516106019190613d0e565b60405180910390f35b34801561061657600080fd5b5061061f61136e565b60405161062c9190613cf3565b60405180910390f35b34801561064157600080fd5b5061064a611381565b6040516106579190613d0e565b60405180910390f35b34801561066c57600080fd5b50610687600480360381019061068291906136b4565b61140f565b6040516106949190613c6a565b60405180910390f35b3480156106a957600080fd5b506106c460048036038101906106bf91906133c1565b6114c1565b6040516106d19190613fd0565b60405180910390f35b3480156106e657600080fd5b506106ef611579565b005b3480156106fd57600080fd5b506107186004803603810190610713919061366b565b611601565b005b34801561072657600080fd5b50610741600480360381019061073c9190613584565b611697565b005b34801561074f57600080fd5b506107586117b9565b6040516107659190613c6a565b60405180910390f35b34801561077a57600080fd5b506107836117e3565b6040516107909190613fd0565b60405180910390f35b3480156107a557600080fd5b506107ae6117e9565b6040516107bb9190613d0e565b60405180910390f35b6107de60048036038101906107d991906136b4565b61187b565b005b3480156107ec57600080fd5b5061080760048036038101906108029190613504565b611a69565b005b34801561081557600080fd5b5061081e611a7f565b60405161082b9190613d0e565b60405180910390f35b34801561084057600080fd5b5061085b600480360381019061085691906136b4565b611b0d565b005b34801561086957600080fd5b50610884600480360381019061087f9190613481565b611b93565b005b34801561089257600080fd5b506108ad60048036038101906108a891906136b4565b611bf5565b6040516108ba9190613d0e565b60405180910390f35b3480156108cf57600080fd5b506108d8611d4e565b6040516108e59190613fd0565b60405180910390f35b61090860048036038101906109039190613721565b611d54565b005b34801561091657600080fd5b50610931600480360381019061092c91906135e4565b612034565b005b34801561093f57600080fd5b5061095a600480360381019061095591906133ee565b6120cd565b6040516109679190613cf3565b60405180910390f35b34801561097c57600080fd5b50610997600480360381019061099291906136e1565b612161565b005b3480156109a557600080fd5b506109c060048036038101906109bb91906133c1565b612297565b005b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610a8d57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610a9d5750610a9c8261238f565b5b9050919050565b606060008054610ab3906142c0565b80601f0160208091040260200160405190810160405280929190818152602001828054610adf906142c0565b8015610b2c5780601f10610b0157610100808354040283529160200191610b2c565b820191906000526020600020905b815481529060010190602001808311610b0f57829003601f168201915b5050505050905090565b6000610b41826123f9565b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610b878261140f565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610bf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bef90613f30565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610c17612444565b73ffffffffffffffffffffffffffffffffffffffff161480610c465750610c4581610c40612444565b6120cd565b5b610c85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7c90613e70565b60405180910390fd5b610c8f838361244c565b505050565b60116020528060005260406000206000915090505481565b600b5481565b610cba612444565b73ffffffffffffffffffffffffffffffffffffffff16610cd86117b9565b73ffffffffffffffffffffffffffffffffffffffff1614610d2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2590613eb0565b60405180910390fd5b8060099080519060200190610d4492919061316a565b5050565b610d50612444565b73ffffffffffffffffffffffffffffffffffffffff16610d6e6117b9565b73ffffffffffffffffffffffffffffffffffffffff1614610dc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dbb90613eb0565b60405180910390fd5b80600f60006101000a81548160ff02191690831515021790555050565b6000610ded6007612505565b905090565b610e03610dfd612444565b82612513565b610e42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3990613fb0565b60405180910390fd5b610e4d8383836125a8565b505050565b600f60029054906101000a900460ff1681565b610e6d612444565b73ffffffffffffffffffffffffffffffffffffffff16610e8b6117b9565b73ffffffffffffffffffffffffffffffffffffffff1614610ee1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed890613eb0565b60405180910390fd5b80600e8190555050565b600e5481565b610ef9612444565b73ffffffffffffffffffffffffffffffffffffffff16610f176117b9565b73ffffffffffffffffffffffffffffffffffffffff1614610f6d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6490613eb0565b60405180910390fd5b80600f60026101000a81548160ff02191690831515021790555050565b610f92612444565b73ffffffffffffffffffffffffffffffffffffffff16610fb06117b9565b73ffffffffffffffffffffffffffffffffffffffff1614611006576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffd90613eb0565b60405180910390fd5b60006110106117b9565b73ffffffffffffffffffffffffffffffffffffffff164760405161103390613c55565b60006040518083038185875af1925050503d8060008114611070576040519150601f19603f3d011682016040523d82523d6000602084013e611075565b606091505b505090508061108357600080fd5b50565b6110a183838360405180602001604052806000815250611b93565b505050565b606060006110b3836114c1565b905060008167ffffffffffffffff8111156110d1576110d0614459565b5b6040519080825280602002602001820160405280156110ff5781602001602082028036833780820191505090505b50905060006001905060005b838110801561111c5750600c548211155b156111a557600061112c8361140f565b90508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561119157828483815181106111765761117561442a565b5b602002602001018181525050818061118d90614323565b9250505b828061119c90614323565b9350505061110b565b82945050505050919050565b6111b9612444565b73ffffffffffffffffffffffffffffffffffffffff166111d76117b9565b73ffffffffffffffffffffffffffffffffffffffff161461122d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122490613eb0565b60405180910390fd5b80600b8190555050565b61123f612444565b73ffffffffffffffffffffffffffffffffffffffff1661125d6117b9565b73ffffffffffffffffffffffffffffffffffffffff16146112b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112aa90613eb0565b60405180910390fd5b80600a90805190602001906112c992919061316a565b5050565b600f60019054906101000a900460ff1681565b600980546112ed906142c0565b80601f0160208091040260200160405190810160405280929190818152602001828054611319906142c0565b80156113665780601f1061133b57610100808354040283529160200191611366565b820191906000526020600020905b81548152906001019060200180831161134957829003601f168201915b505050505081565b600f60009054906101000a900460ff1681565b6008805461138e906142c0565b80601f01602080910402602001604051908101604052809291908181526020018280546113ba906142c0565b80156114075780601f106113dc57610100808354040283529160200191611407565b820191906000526020600020905b8154815290600101906020018083116113ea57829003601f168201915b505050505081565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156114b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114af90613f10565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611532576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152990613e50565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b611581612444565b73ffffffffffffffffffffffffffffffffffffffff1661159f6117b9565b73ffffffffffffffffffffffffffffffffffffffff16146115f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ec90613eb0565b60405180910390fd5b6115ff600061280f565b565b611609612444565b73ffffffffffffffffffffffffffffffffffffffff166116276117b9565b73ffffffffffffffffffffffffffffffffffffffff161461167d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167490613eb0565b60405180910390fd5b806008908051906020019061169392919061316a565b5050565b61169f612444565b73ffffffffffffffffffffffffffffffffffffffff166116bd6117b9565b73ffffffffffffffffffffffffffffffffffffffff1614611713576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170a90613eb0565b60405180910390fd5b60005b838390508110156117b35781601060008686858181106117395761173861442a565b5b905060200201602081019061174e91906133c1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908360ff16021790555080806117ab90614323565b915050611716565b50505050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600d5481565b6060600180546117f8906142c0565b80601f0160208091040260200160405190810160405280929190818152602001828054611824906142c0565b80156118715780601f1061184657610100808354040283529160200191611871565b820191906000526020600020905b81548152906001019060200180831161185457829003601f168201915b5050505050905090565b8060008111801561188e5750600d548111155b6118cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c490613df0565b60405180910390fd5b600c54816118db6007612505565b6118e5919061410e565b1115611926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191d90613f70565b60405180910390fd5b600f60009054906101000a900460ff1615611976576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196d90613ed0565b60405180910390fd5b600e54601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836119c4919061410e565b1115611a05576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119fc90613d30565b60405180910390fd5b81601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611a54919061410e565b92505081905550611a6533836128d5565b5050565b611a7b611a74612444565b8383612915565b5050565b600a8054611a8c906142c0565b80601f0160208091040260200160405190810160405280929190818152602001828054611ab8906142c0565b8015611b055780601f10611ada57610100808354040283529160200191611b05565b820191906000526020600020905b815481529060010190602001808311611ae857829003601f168201915b505050505081565b611b15612444565b73ffffffffffffffffffffffffffffffffffffffff16611b336117b9565b73ffffffffffffffffffffffffffffffffffffffff1614611b89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8090613eb0565b60405180910390fd5b80600d8190555050565b611ba4611b9e612444565b83612513565b611be3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bda90613fb0565b60405180910390fd5b611bef84848484612a82565b50505050565b6060611c0082612ade565b611c3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c3690613ef0565b60405180910390fd5b60001515600f60019054906101000a900460ff1615151415611ced57600a8054611c68906142c0565b80601f0160208091040260200160405190810160405280929190818152602001828054611c94906142c0565b8015611ce15780601f10611cb657610100808354040283529160200191611ce1565b820191906000526020600020905b815481529060010190602001808311611cc457829003601f168201915b50505050509050611d49565b6000611cf7612b4a565b90506000815111611d175760405180602001604052806000815250611d45565b80611d2184612bdc565b6009604051602001611d3593929190613c24565b6040516020818303038152906040525b9150505b919050565b600c5481565b600f60029054906101000a900460ff16611da3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d9a90613f90565b60405180910390fd5b601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1660ff168160ff161115611e38576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2f90613f50565b60405180910390fd5b600c548160ff16611e496007612505565b611e53919061410e565b1115611e94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e8b90613d90565b60405180910390fd5b600e54601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548260ff16611ee5919061410e565b1115611f26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1d90613d30565b60405180910390fd5b8060ff16601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611f78919061410e565b9250508190555080601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282829054906101000a900460ff16611fda91906141c9565b92506101000a81548160ff021916908360ff16021790555060005b8160ff168110156120305761200a6007612d3d565b61201d336120186007612505565b612d53565b808061202890614323565b915050611ff5565b5050565b61203c612444565b73ffffffffffffffffffffffffffffffffffffffff1661205a6117b9565b73ffffffffffffffffffffffffffffffffffffffff16146120b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120a790613eb0565b60405180910390fd5b80600f60016101000a81548160ff02191690831515021790555050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b816000811180156121745750600d548111155b6121b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121aa90613df0565b60405180910390fd5b600c54816121c16007612505565b6121cb919061410e565b111561220c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161220390613f70565b60405180910390fd5b612214612444565b73ffffffffffffffffffffffffffffffffffffffff166122326117b9565b73ffffffffffffffffffffffffffffffffffffffff1614612288576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227f90613eb0565b60405180910390fd5b61229282846128d5565b505050565b61229f612444565b73ffffffffffffffffffffffffffffffffffffffff166122bd6117b9565b73ffffffffffffffffffffffffffffffffffffffff1614612313576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161230a90613eb0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612383576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237a90613d70565b60405180910390fd5b61238c8161280f565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61240281612ade565b612441576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161243890613f10565b60405180910390fd5b50565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166124bf8361140f565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081600001549050919050565b60008061251f8361140f565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612561575061256081856120cd565b5b8061259f57508373ffffffffffffffffffffffffffffffffffffffff1661258784610b36565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166125c88261140f565b73ffffffffffffffffffffffffffffffffffffffff161461261e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161261590613db0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561268e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161268590613e10565b60405180910390fd5b612699838383612d71565b6126a460008261244c565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126f49190614195565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461274b919061410e565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461280a838383612d76565b505050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60005b81811015612910576128ea6007612d3d565b6128fd836128f86007612505565b612d53565b808061290890614323565b9150506128d8565b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161297b90613e30565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612a759190613cf3565b60405180910390a3505050565b612a8d8484846125a8565b612a9984848484612d7b565b612ad8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612acf90613d50565b60405180910390fd5b50505050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b606060088054612b59906142c0565b80601f0160208091040260200160405190810160405280929190818152602001828054612b85906142c0565b8015612bd25780601f10612ba757610100808354040283529160200191612bd2565b820191906000526020600020905b815481529060010190602001808311612bb557829003601f168201915b5050505050905090565b60606000821415612c24576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612d38565b600082905060005b60008214612c56578080612c3f90614323565b915050600a82612c4f9190614164565b9150612c2c565b60008167ffffffffffffffff811115612c7257612c71614459565b5b6040519080825280601f01601f191660200182016040528015612ca45781602001600182028036833780820191505090505b5090505b60008514612d3157600182612cbd9190614195565b9150600a85612ccc919061436c565b6030612cd8919061410e565b60f81b818381518110612cee57612ced61442a565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612d2a9190614164565b9450612ca8565b8093505050505b919050565b6001816000016000828254019250508190555050565b612d6d828260405180602001604052806000815250612f12565b5050565b505050565b505050565b6000612d9c8473ffffffffffffffffffffffffffffffffffffffff16612f6d565b15612f05578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612dc5612444565b8786866040518563ffffffff1660e01b8152600401612de79493929190613c85565b602060405180830381600087803b158015612e0157600080fd5b505af1925050508015612e3257506040513d601f19601f82011682018060405250810190612e2f919061363e565b60015b612eb5573d8060008114612e62576040519150601f19603f3d011682016040523d82523d6000602084013e612e67565b606091505b50600081511415612ead576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ea490613d50565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050612f0a565b600190505b949350505050565b612f1c8383612f90565b612f296000848484612d7b565b612f68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f5f90613d50565b60405180910390fd5b505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613000576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ff790613e90565b60405180910390fd5b61300981612ade565b15613049576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161304090613dd0565b60405180910390fd5b61305560008383612d71565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546130a5919061410e565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461316660008383612d76565b5050565b828054613176906142c0565b90600052602060002090601f01602090048101928261319857600085556131df565b82601f106131b157805160ff19168380011785556131df565b828001600101855582156131df579182015b828111156131de5782518255916020019190600101906131c3565b5b5090506131ec91906131f0565b5090565b5b808211156132095760008160009055506001016131f1565b5090565b600061322061321b84614010565b613feb565b90508281526020810184848401111561323c5761323b614497565b5b61324784828561427e565b509392505050565b600061326261325d84614041565b613feb565b90508281526020810184848401111561327e5761327d614497565b5b61328984828561427e565b509392505050565b6000813590506132a081614993565b92915050565b60008083601f8401126132bc576132bb61448d565b5b8235905067ffffffffffffffff8111156132d9576132d8614488565b5b6020830191508360208202830111156132f5576132f4614492565b5b9250929050565b60008135905061330b816149aa565b92915050565b600081359050613320816149c1565b92915050565b600081519050613335816149c1565b92915050565b600082601f8301126133505761334f61448d565b5b813561336084826020860161320d565b91505092915050565b600082601f83011261337e5761337d61448d565b5b813561338e84826020860161324f565b91505092915050565b6000813590506133a6816149d8565b92915050565b6000813590506133bb816149ef565b92915050565b6000602082840312156133d7576133d66144a1565b5b60006133e584828501613291565b91505092915050565b60008060408385031215613405576134046144a1565b5b600061341385828601613291565b925050602061342485828601613291565b9150509250929050565b600080600060608486031215613447576134466144a1565b5b600061345586828701613291565b935050602061346686828701613291565b925050604061347786828701613397565b9150509250925092565b6000806000806080858703121561349b5761349a6144a1565b5b60006134a987828801613291565b94505060206134ba87828801613291565b93505060406134cb87828801613397565b925050606085013567ffffffffffffffff8111156134ec576134eb61449c565b5b6134f88782880161333b565b91505092959194509250565b6000806040838503121561351b5761351a6144a1565b5b600061352985828601613291565b925050602061353a858286016132fc565b9150509250929050565b6000806040838503121561355b5761355a6144a1565b5b600061356985828601613291565b925050602061357a85828601613397565b9150509250929050565b60008060006040848603121561359d5761359c6144a1565b5b600084013567ffffffffffffffff8111156135bb576135ba61449c565b5b6135c7868287016132a6565b935093505060206135da868287016133ac565b9150509250925092565b6000602082840312156135fa576135f96144a1565b5b6000613608848285016132fc565b91505092915050565b600060208284031215613627576136266144a1565b5b600061363584828501613311565b91505092915050565b600060208284031215613654576136536144a1565b5b600061366284828501613326565b91505092915050565b600060208284031215613681576136806144a1565b5b600082013567ffffffffffffffff81111561369f5761369e61449c565b5b6136ab84828501613369565b91505092915050565b6000602082840312156136ca576136c96144a1565b5b60006136d884828501613397565b91505092915050565b600080604083850312156136f8576136f76144a1565b5b600061370685828601613397565b925050602061371785828601613291565b9150509250929050565b600060208284031215613737576137366144a1565b5b6000613745848285016133ac565b91505092915050565b600061375a8383613c06565b60208301905092915050565b61376f816141fd565b82525050565b600061378082614097565b61378a81856140c5565b935061379583614072565b8060005b838110156137c65781516137ad888261374e565b97506137b8836140b8565b925050600181019050613799565b5085935050505092915050565b6137dc8161420f565b82525050565b60006137ed826140a2565b6137f781856140d6565b935061380781856020860161428d565b613810816144a6565b840191505092915050565b6000613826826140ad565b61383081856140f2565b935061384081856020860161428d565b613849816144a6565b840191505092915050565b600061385f826140ad565b6138698185614103565b935061387981856020860161428d565b80840191505092915050565b60008154613892816142c0565b61389c8186614103565b945060018216600081146138b757600181146138c8576138fb565b60ff198316865281860193506138fb565b6138d185614082565b60005b838110156138f3578154818901526001820191506020810190506138d4565b838801955050505b50505092915050565b60006139116012836140f2565b915061391c826144b7565b602082019050919050565b60006139346032836140f2565b915061393f826144e0565b604082019050919050565b60006139576026836140f2565b91506139628261452f565b604082019050919050565b600061397a6020836140f2565b91506139858261457e565b602082019050919050565b600061399d6025836140f2565b91506139a8826145a7565b604082019050919050565b60006139c0601c836140f2565b91506139cb826145f6565b602082019050919050565b60006139e36014836140f2565b91506139ee8261461f565b602082019050919050565b6000613a066024836140f2565b9150613a1182614648565b604082019050919050565b6000613a296019836140f2565b9150613a3482614697565b602082019050919050565b6000613a4c6029836140f2565b9150613a57826146c0565b604082019050919050565b6000613a6f603e836140f2565b9150613a7a8261470f565b604082019050919050565b6000613a926020836140f2565b9150613a9d8261475e565b602082019050919050565b6000613ab56020836140f2565b9150613ac082614787565b602082019050919050565b6000613ad86017836140f2565b9150613ae3826147b0565b602082019050919050565b6000613afb602f836140f2565b9150613b06826147d9565b604082019050919050565b6000613b1e6018836140f2565b9150613b2982614828565b602082019050919050565b6000613b416021836140f2565b9150613b4c82614851565b604082019050919050565b6000613b646022836140f2565b9150613b6f826148a0565b604082019050919050565b6000613b876000836140e7565b9150613b92826148ef565b600082019050919050565b6000613baa6014836140f2565b9150613bb5826148f2565b602082019050919050565b6000613bcd6018836140f2565b9150613bd88261491b565b602082019050919050565b6000613bf0602e836140f2565b9150613bfb82614944565b604082019050919050565b613c0f81614267565b82525050565b613c1e81614267565b82525050565b6000613c308286613854565b9150613c3c8285613854565b9150613c488284613885565b9150819050949350505050565b6000613c6082613b7a565b9150819050919050565b6000602082019050613c7f6000830184613766565b92915050565b6000608082019050613c9a6000830187613766565b613ca76020830186613766565b613cb46040830185613c15565b8181036060830152613cc681846137e2565b905095945050505050565b60006020820190508181036000830152613ceb8184613775565b905092915050565b6000602082019050613d0860008301846137d3565b92915050565b60006020820190508181036000830152613d28818461381b565b905092915050565b60006020820190508181036000830152613d4981613904565b9050919050565b60006020820190508181036000830152613d6981613927565b9050919050565b60006020820190508181036000830152613d898161394a565b9050919050565b60006020820190508181036000830152613da98161396d565b9050919050565b60006020820190508181036000830152613dc981613990565b9050919050565b60006020820190508181036000830152613de9816139b3565b9050919050565b60006020820190508181036000830152613e09816139d6565b9050919050565b60006020820190508181036000830152613e29816139f9565b9050919050565b60006020820190508181036000830152613e4981613a1c565b9050919050565b60006020820190508181036000830152613e6981613a3f565b9050919050565b60006020820190508181036000830152613e8981613a62565b9050919050565b60006020820190508181036000830152613ea981613a85565b9050919050565b60006020820190508181036000830152613ec981613aa8565b9050919050565b60006020820190508181036000830152613ee981613acb565b9050919050565b60006020820190508181036000830152613f0981613aee565b9050919050565b60006020820190508181036000830152613f2981613b11565b9050919050565b60006020820190508181036000830152613f4981613b34565b9050919050565b60006020820190508181036000830152613f6981613b57565b9050919050565b60006020820190508181036000830152613f8981613b9d565b9050919050565b60006020820190508181036000830152613fa981613bc0565b9050919050565b60006020820190508181036000830152613fc981613be3565b9050919050565b6000602082019050613fe56000830184613c15565b92915050565b6000613ff5614006565b905061400182826142f2565b919050565b6000604051905090565b600067ffffffffffffffff82111561402b5761402a614459565b5b614034826144a6565b9050602081019050919050565b600067ffffffffffffffff82111561405c5761405b614459565b5b614065826144a6565b9050602081019050919050565b6000819050602082019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061411982614267565b915061412483614267565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156141595761415861439d565b5b828201905092915050565b600061416f82614267565b915061417a83614267565b92508261418a576141896143cc565b5b828204905092915050565b60006141a082614267565b91506141ab83614267565b9250828210156141be576141bd61439d565b5b828203905092915050565b60006141d482614271565b91506141df83614271565b9250828210156141f2576141f161439d565b5b828203905092915050565b600061420882614247565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b838110156142ab578082015181840152602081019050614290565b838111156142ba576000848401525b50505050565b600060028204905060018216806142d857607f821691505b602082108114156142ec576142eb6143fb565b5b50919050565b6142fb826144a6565b810181811067ffffffffffffffff8211171561431a57614319614459565b5b80604052505050565b600061432e82614267565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156143615761436061439d565b5b600182019050919050565b600061437782614267565b915061438283614267565b925082614392576143916143cc565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f457863656564206d6178427957616c6c65740000000000000000000000000000600082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f507572636861736520776f756c6420657863656564206d617820746f6b656e73600082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b7f496e76616c6964206d696e7420616d6f756e7421000000000000000000000000600082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f54686520636f6e74726163742069732070617573656421000000000000000000600082015250565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565646564206d617820617661696c61626c6520746f2070757263686160008201527f7365000000000000000000000000000000000000000000000000000000000000602082015250565b50565b7f4d617820737570706c7920657863656564656421000000000000000000000000600082015250565b7f416c6c6f77206c697374206973206e6f74206163746976650000000000000000600082015250565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b61499c816141fd565b81146149a757600080fd5b50565b6149b38161420f565b81146149be57600080fd5b50565b6149ca8161421b565b81146149d557600080fd5b50565b6149e181614267565b81146149ec57600080fd5b50565b6149f881614271565b8114614a0357600080fd5b5056fea26469706673582212209c71ef1d30d97486bd0bb397ba6e308ef5b1735df0f31223d480bb7f6ac82c6364736f6c63430008070033

Verified Source Code Partial Match

Compiler: v0.8.7+commit.e28d00a7 EVM: london Optimization: No
Forgotten.sol 1354 lines
// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Counters.sol


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

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Strings.sol


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

pragma solidity ^0.8.0;

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

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

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

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

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

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

// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Context.sol


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

pragma solidity ^0.8.0;

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

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

// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol


// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;


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

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

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

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

// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol


// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/IERC721Receiver.sol


// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/introspection/IERC165.sol


// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/introspection/ERC165.sol


// OpenZeppelin Contracts v4.4.1 (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: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/IERC721.sol


// OpenZeppelin Contracts (last updated v4.6.0) (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`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

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

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

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

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

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

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

// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/IERC721Metadata.sol


// OpenZeppelin Contracts v4.4.1 (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: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol


// OpenZeppelin Contracts (last updated v4.6.0) (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: address zero is not a valid owner");
        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: invalid token ID");
        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) {
        _requireMinted(tokenId);

        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 overridden 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 token owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_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: caller is not token 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: caller is not token 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) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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);

        _afterTokenTransfer(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);

        _afterTokenTransfer(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 from incorrect owner");
        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);

        _afterTokenTransfer(from, to, tokenId);
    }

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

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @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 {
                    /// @solidity memory-safe-assembly
                    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 {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

// File: contracts/Nft.sol


// Amended by HashLips

pragma solidity >=0.7.0 <0.9.0;




contract Forgotten is ERC721, Ownable {
  using Strings for uint256;
  using Counters for Counters.Counter;

  Counters.Counter private supply;

  string public uriPrefix;
  string public uriSuffix = ".json";
  string public hiddenMetadataUri;
  
  uint256 public cost = 0 ether;
  uint256 public maxSupply = 777;
  uint256 public maxMintAmountPerTx = 2;
  uint256 public maxByWallet = 3;

  bool public paused = true;
  bool public revealed = true;
  bool public isAllowListActive = false;

  mapping(address => uint8) private _allowList;
  mapping(address => uint256) public mintedByWallet;

  constructor() ERC721("Forgott3n Worlds", "F3W") {
    setHiddenMetadataUri("ipfs://__CID__/hidden.json");
  }

  modifier mintCompliance(uint256 _mintAmount) {
    require(_mintAmount > 0 && _mintAmount <= maxMintAmountPerTx, "Invalid mint amount!");
    require(supply.current() + _mintAmount <= maxSupply, "Max supply exceeded!");
    _;
  }

  function totalSupply() public view returns (uint256) {
    return supply.current();
  }

  function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) {
    require(!paused, "The contract is paused!");
    require(_mintAmount + mintedByWallet[msg.sender] <= maxByWallet, "Exceed maxByWallet");

    mintedByWallet[msg.sender] += _mintAmount;

    _mintLoop(msg.sender, _mintAmount);
  }
  
  function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
    _mintLoop(_receiver, _mintAmount);
  }

  function walletOfOwner(address _owner)
    public
    view
    returns (uint256[] memory)
  {
    uint256 ownerTokenCount = balanceOf(_owner);
    uint256[] memory ownedTokenIds = new uint256[](ownerTokenCount);
    uint256 currentTokenId = 1;
    uint256 ownedTokenIndex = 0;

    while (ownedTokenIndex < ownerTokenCount && currentTokenId <= maxSupply) {
      address currentTokenOwner = ownerOf(currentTokenId);

      if (currentTokenOwner == _owner) {
        ownedTokenIds[ownedTokenIndex] = currentTokenId;

        ownedTokenIndex++;
      }

      currentTokenId++;
    }

    return ownedTokenIds;
  }

  function tokenURI(uint256 _tokenId)
    public
    view
    virtual
    override
    returns (string memory)
  {
    require(
      _exists(_tokenId),
      "ERC721Metadata: URI query for nonexistent token"
    );

    if (revealed == false) {
      return hiddenMetadataUri;
    }


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

  function setRevealed(bool _state) public onlyOwner {
    revealed = _state;
  }

  function setCost(uint256 _cost) public onlyOwner {
    cost = _cost;
  }

  function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
    maxMintAmountPerTx = _maxMintAmountPerTx;
  }

  function setMaxByWallet(uint256 _maxByWallet) public onlyOwner {
    maxByWallet = _maxByWallet;
  }

  function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
    hiddenMetadataUri = _hiddenMetadataUri;
  }

  function setUriPrefix(string memory _uriPrefix) public onlyOwner {
    uriPrefix = _uriPrefix;
  }

  function setUriSuffix(string memory _uriSuffix) public onlyOwner {
    uriSuffix = _uriSuffix;
  }

  function setPaused(bool _state) public onlyOwner {
    paused = _state;
  }

  function setAllowListActive(bool _state) public onlyOwner {
    isAllowListActive = _state;
  }

  function setAllowList(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner {
    for (uint256 i = 0; i < addresses.length; i++) {
        _allowList[addresses[i]] = numAllowedToMint;
    }
  }

  function withdraw() public onlyOwner {
    (bool os, ) = payable(owner()).call{value: address(this).balance}("");
    require(os);
  }

  function mintAllowList(uint8 numberOfTokens) public payable{

    require(isAllowListActive, "Allow list is not active");
    require(numberOfTokens <= _allowList[msg.sender], "Exceeded max available to purchase");
    require(supply.current() + numberOfTokens <= maxSupply, "Purchase would exceed max tokens");
    require(numberOfTokens + mintedByWallet[msg.sender] <= maxByWallet, "Exceed maxByWallet");

    mintedByWallet[msg.sender] += numberOfTokens;

    _allowList[msg.sender] -= numberOfTokens;
    for (uint256 i = 0; i < numberOfTokens; i++) {
        supply.increment();
        _safeMint(msg.sender, supply.current());
    }
  }

  function _mintLoop(address _receiver, uint256 _mintAmount) internal {
    for (uint256 i = 0; i < _mintAmount; i++) {
      supply.increment();
      _safeMint(_receiver, supply.current());
    }
  }

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

Read Contract

balanceOf 0x70a08231 → uint256
cost 0x13faede6 → uint256
getApproved 0x081812fc → address
hiddenMetadataUri 0xa45ba8e7 → string
isAllowListActive 0x29fc6bae → bool
isApprovedForAll 0xe985e9c5 → bool
maxByWallet 0x34ecc70a → uint256
maxMintAmountPerTx 0x94354fd0 → uint256
maxSupply 0xd5abeb01 → uint256
mintedByWallet 0x0d758111 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
paused 0x5c975abb → bool
revealed 0x51830227 → bool
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
uriPrefix 0x62b99ad4 → string
uriSuffix 0x5503a0e8 → string
walletOfOwner 0x438b6300 → uint256[]

Write Contract 21 functions

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

approve 0x095ea7b3
address to
uint256 tokenId
mint 0xa0712d68
uint256 _mintAmount
mintAllowList 0xddff5b1c
uint8 numberOfTokens
mintForAddress 0xefbd73f4
uint256 _mintAmount
address _receiver
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes data
setAllowList 0x8295784d
address[] addresses
uint8 numAllowedToMint
setAllowListActive 0x3a73c58d
bool _state
setApprovalForAll 0xa22cb465
address operator
bool approved
setCost 0x44a0d68a
uint256 _cost
setHiddenMetadataUri 0x4fdd43cb
string _hiddenMetadataUri
setMaxByWallet 0x2e067421
uint256 _maxByWallet
setMaxMintAmountPerTx 0xb071401b
uint256 _maxMintAmountPerTx
setPaused 0x16c38b3c
bool _state
setRevealed 0xe0a80853
bool _state
setUriPrefix 0x7ec4a659
string _uriPrefix
setUriSuffix 0x16ba10e0
string _uriSuffix
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address