Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xbE6338f94920fAEFC59c76041689808bE5fEd6B7
Balance 0 ETH
Nonce 1
Code Size 22259 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

22259 bytes
0x60806040526004361061027d5760003560e01c8063715018a61161014f578063ae104265116100c1578063d81d8ef01161007a578063d81d8ef0146109a4578063e985e9c5146109e1578063eb6426a914610a1e578063ef56267e14610a49578063f2fde38b14610a86578063fe2c7fee14610aaf5761027d565b8063ae10426514610880578063b88d4fde146108bd578063c504685e146108e6578063c668286214610911578063c87b56dd1461093c578063d547cfb7146109795761027d565b80638da5cb5b116101135780638da5cb5b1461077d578063918b933f146107a857806395d89b41146107e5578063a0712d6814610810578063a22cb4651461082c578063a6d23e10146108555761027d565b8063715018a6146106be57806375794a3c146106d55780637f649783146107005780638044741f146107295780638d859f3e146107525761027d565b80633775ddcc116101f35780634f6ccce7116101ac5780634f6ccce71461058a578063548db174146105c757806355f804b3146105f05780636352211e146106195780637035bf181461065657806370a08231146106815761027d565b80633775ddcc1461049d5780633af32abf146104c65780633c66485e146105035780633ccfd60b1461052e578063405200cd1461053857806342842e0e146105615761027d565b806318160ddd1161024557806318160ddd146103795780631e08a9e4146103a45780631e7269c5146103cf57806323b872dd1461040c5780632f745c591461043557806332cb6b0c146104725761027d565b806301ffc9a71461028257806306fdde03146102bf578063081812fc146102ea578063095ea7b3146103275780630c88b73114610350575b600080fd5b34801561028e57600080fd5b506102a960048036038101906102a49190613a7d565b610ad8565b6040516102b69190613ac5565b60405180910390f35b3480156102cb57600080fd5b506102d4610b52565b6040516102e19190613b79565b60405180910390f35b3480156102f657600080fd5b50610311600480360381019061030c9190613bd1565b610be4565b60405161031e9190613c3f565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190613c86565b610c69565b005b34801561035c57600080fd5b5061037760048036038101906103729190613bd1565b610d80565b005b34801561038557600080fd5b5061038e610e06565b60405161039b9190613cd5565b60405180910390f35b3480156103b057600080fd5b506103b9610e13565b6040516103c69190613cd5565b60405180910390f35b3480156103db57600080fd5b506103f660048036038101906103f19190613cf0565b610e19565b6040516104039190613cd5565b60405180910390f35b34801561041857600080fd5b50610433600480360381019061042e9190613d1d565b610e31565b005b34801561044157600080fd5b5061045c60048036038101906104579190613c86565b610e91565b6040516104699190613cd5565b60405180910390f35b34801561047e57600080fd5b50610487610f36565b6040516104949190613cd5565b60405180910390f35b3480156104a957600080fd5b506104c460048036038101906104bf9190613bd1565b610f3c565b005b3480156104d257600080fd5b506104ed60048036038101906104e89190613cf0565b610fc2565b6040516104fa9190613ac5565b60405180910390f35b34801561050f57600080fd5b50610518610fe2565b6040516105259190613cd5565b60405180910390f35b610536610fe8565b005b34801561054457600080fd5b5061055f600480360381019061055a9190613bd1565b61117e565b005b34801561056d57600080fd5b5061058860048036038101906105839190613d1d565b611204565b005b34801561059657600080fd5b506105b160048036038101906105ac9190613bd1565b611224565b6040516105be9190613cd5565b60405180910390f35b3480156105d357600080fd5b506105ee60048036038101906105e99190613eb8565b611295565b005b3480156105fc57600080fd5b5061061760048036038101906106129190613fb6565b6113a6565b005b34801561062557600080fd5b50610640600480360381019061063b9190613bd1565b61143c565b60405161064d9190613c3f565b60405180910390f35b34801561066257600080fd5b5061066b6114ed565b6040516106789190613b79565b60405180910390f35b34801561068d57600080fd5b506106a860048036038101906106a39190613cf0565b61157b565b6040516106b59190613cd5565b60405180910390f35b3480156106ca57600080fd5b506106d3611632565b005b3480156106e157600080fd5b506106ea6116ba565b6040516106f79190613cd5565b60405180910390f35b34801561070c57600080fd5b5061072760048036038101906107229190613eb8565b6116c0565b005b34801561073557600080fd5b50610750600480360381019061074b9190613bd1565b61185a565b005b34801561075e57600080fd5b506107676118e0565b6040516107749190613cd5565b60405180910390f35b34801561078957600080fd5b506107926118e6565b60405161079f9190613c3f565b60405180910390f35b3480156107b457600080fd5b506107cf60048036038101906107ca9190613cf0565b611910565b6040516107dc9190613cd5565b60405180910390f35b3480156107f157600080fd5b506107fa611928565b6040516108079190613b79565b60405180910390f35b61082a60048036038101906108259190613bd1565b6119ba565b005b34801561083857600080fd5b50610853600480360381019061084e919061402b565b61212f565b005b34801561086157600080fd5b5061086a612145565b604051610877919061408c565b60405180910390f35b34801561088c57600080fd5b506108a760048036038101906108a29190613bd1565b61216b565b6040516108b49190613cd5565b60405180910390f35b3480156108c957600080fd5b506108e460048036038101906108df9190614148565b612182565b005b3480156108f257600080fd5b506108fb6121e4565b6040516109089190613cd5565b60405180910390f35b34801561091d57600080fd5b506109266121ea565b6040516109339190613b79565b60405180910390f35b34801561094857600080fd5b50610963600480360381019061095e9190613bd1565b612278565b6040516109709190613b79565b60405180910390f35b34801561098557600080fd5b5061098e612362565b60405161099b9190613b79565b60405180910390f35b3480156109b057600080fd5b506109cb60048036038101906109c69190613cf0565b6123f0565b6040516109d89190613cd5565b60405180910390f35b3480156109ed57600080fd5b50610a086004803603810190610a0391906141cb565b612408565b604051610a159190613ac5565b60405180910390f35b348015610a2a57600080fd5b50610a3361249c565b604051610a409190613cd5565b60405180910390f35b348015610a5557600080fd5b50610a706004803603810190610a6b9190613cf0565b6124a2565b604051610a7d9190613cd5565b60405180910390f35b348015610a9257600080fd5b50610aad6004803603810190610aa89190613cf0565b6124ba565b005b348015610abb57600080fd5b50610ad66004803603810190610ad19190613fb6565b6125b1565b005b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610b4b5750610b4a82612647565b5b9050919050565b606060008054610b619061423a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8d9061423a565b8015610bda5780601f10610baf57610100808354040283529160200191610bda565b820191906000526020600020905b815481529060010190602001808311610bbd57829003601f168201915b5050505050905090565b6000610bef82612729565b610c2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c25906142dd565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000610c748261143c565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610ce4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdb9061436f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610d03612795565b73ffffffffffffffffffffffffffffffffffffffff161480610d325750610d3181610d2c612795565b612408565b5b610d71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6890614401565b60405180910390fd5b610d7b838361279d565b505050565b610d88612795565b73ffffffffffffffffffffffffffffffffffffffff16610da66118e6565b73ffffffffffffffffffffffffffffffffffffffff1614610dfc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df39061446d565b60405180910390fd5b8060168190555050565b6000600880549050905090565b60165481565b600e6020528060005260406000206000915090505481565b610e42610e3c612795565b82612856565b610e81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e78906144ff565b60405180910390fd5b610e8c838383612934565b505050565b6000610e9c8361157b565b8210610edd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed490614591565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b61052e81565b610f44612795565b73ffffffffffffffffffffffffffffffffffffffff16610f626118e6565b73ffffffffffffffffffffffffffffffffffffffff1614610fb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610faf9061446d565b60405180910390fd5b8060138190555050565b60156020528060005260406000206000915054906101000a900460ff1681565b60145481565b610ff0612795565b73ffffffffffffffffffffffffffffffffffffffff1661100e6118e6565b73ffffffffffffffffffffffffffffffffffffffff1614611064576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105b9061446d565b60405180910390fd5b6000479050600081116110ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110a3906145fd565b60405180910390fd5b6000601a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16826040516110f49061464e565b60006040518083038185875af1925050503d8060008114611131576040519150601f19603f3d011682016040523d82523d6000602084013e611136565b606091505b505090508061117a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611171906146af565b60405180910390fd5b5050565b611186612795565b73ffffffffffffffffffffffffffffffffffffffff166111a46118e6565b73ffffffffffffffffffffffffffffffffffffffff16146111fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f19061446d565b60405180910390fd5b80600d8190555050565b61121f83838360405180602001604052806000815250612182565b505050565b600061122e610e06565b821061126f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126690614741565b60405180910390fd5b6008828154811061128357611282614761565b5b90600052602060002001549050919050565b61129d612795565b73ffffffffffffffffffffffffffffffffffffffff166112bb6118e6565b73ffffffffffffffffffffffffffffffffffffffff1614611311576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113089061446d565b60405180910390fd5b60005b81518110156113a25760006015600084848151811061133657611335614761565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061139a906147bf565b915050611314565b5050565b6113ae612795565b73ffffffffffffffffffffffffffffffffffffffff166113cc6118e6565b73ffffffffffffffffffffffffffffffffffffffff1614611422576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114199061446d565b60405180910390fd5b806017908051906020019061143892919061396e565b5050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90614879565b60405180910390fd5b80915050919050565b601980546114fa9061423a565b80601f01602080910402602001604051908101604052809291908181526020018280546115269061423a565b80156115735780601f1061154857610100808354040283529160200191611573565b820191906000526020600020905b81548152906001019060200180831161155657829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036115eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e29061490b565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61163a612795565b73ffffffffffffffffffffffffffffffffffffffff166116586118e6565b73ffffffffffffffffffffffffffffffffffffffff16146116ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a59061446d565b60405180910390fd5b6116b86000612b9a565b565b600b5481565b6116c8612795565b73ffffffffffffffffffffffffffffffffffffffff166116e66118e6565b73ffffffffffffffffffffffffffffffffffffffff161461173c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117339061446d565b60405180910390fd5b60005b815181101561185657600073ffffffffffffffffffffffffffffffffffffffff1682828151811061177357611772614761565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036117d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c890614977565b60405180910390fd5b6001601560008484815181106117ea576117e9614761565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061184e906147bf565b91505061173f565b5050565b611862612795565b73ffffffffffffffffffffffffffffffffffffffff166118806118e6565b73ffffffffffffffffffffffffffffffffffffffff16146118d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118cd9061446d565b60405180910390fd5b8060148190555050565b600c5481565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600f6020528060005260406000206000915090505481565b6060600180546119379061423a565b80601f01602080910402602001604051908101604052809291908181526020018280546119639061423a565b80156119b05780601f10611985576101008083540402835291602001916119b0565b820191906000526020600020905b81548152906001019060200180831161199357829003601f168201915b5050505050905090565b6000600b549050600161052e6119d09190614997565b6119e38383612c6090919063ffffffff16565b1115611a24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1b90614a39565b60405180910390fd5b60008211611a67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a5e90614aa5565b60405180910390fd5b6000601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611af39190614ac5565b1115611ca65781601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611b489190614997565b92505081905550601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054601160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115611c19601260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c76565b604051602001611c299190614bcd565b60405160208183030381529060405290611c79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c709190613b79565b60405180910390fd5b5060005b82811015611ca057611c8d612dd6565b8080611c98906147bf565b915050611c7d565b5061212b565b6013544211611cea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ce190614c46565b60405180910390fd5b611cf38261216b565b341015611d35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2c90614cd8565b60405180910390fd5b600d54421115611e1d5781600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611d8e9190614997565b92505081905550600a600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115611e18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0f90614d6a565b60405180910390fd5b612103565b601454421115611f9157601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611eb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eaa90614dd6565b60405180910390fd5b81601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611f029190614997565b925050819055506005601060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115611f8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f8390614e68565b60405180910390fd5b612102565b60135442111561210157601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612027576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161201e90614dd6565b60405180910390fd5b81600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546120769190614997565b925050819055506002600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115612100576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120f790614efa565b60405180910390fd5b5b5b5b60005b8281101561212957612116612dd6565b8080612121906147bf565b915050612106565b505b5050565b61214161213a612795565b8383612e0d565b5050565b601a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600c548261217b9190614f1a565b9050919050565b61219361218d612795565b83612856565b6121d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c9906144ff565b60405180910390fd5b6121de84848484612f79565b50505050565b60135481565b601880546121f79061423a565b80601f01602080910402602001604051908101604052809291908181526020018280546122239061423a565b80156122705780601f1061224557610100808354040283529160200191612270565b820191906000526020600020905b81548152906001019060200180831161225357829003601f168201915b505050505081565b606061228382612729565b6122c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b990614fe6565b60405180910390fd5b6016544210156123015760196122d783612c76565b60186040516020016122eb9392919061509a565b604051602081830303815290604052905061235d565b600061230b612fd5565b9050600081511161232b5760405180602001604052806000815250612359565b8061233584612c76565b6018604051602001612349939291906150cb565b6040516020818303038152906040525b9150505b919050565b6017805461236f9061423a565b80601f016020809104026020016040519081016040528092919081815260200182805461239b9061423a565b80156123e85780601f106123bd576101008083540402835291602001916123e8565b820191906000526020600020905b8154815290600101906020018083116123cb57829003601f168201915b505050505081565b60106020528060005260406000206000915090505481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600d5481565b60116020528060005260406000206000915090505481565b6124c2612795565b73ffffffffffffffffffffffffffffffffffffffff166124e06118e6565b73ffffffffffffffffffffffffffffffffffffffff1614612536576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161252d9061446d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036125a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161259c9061516e565b60405180910390fd5b6125ae81612b9a565b50565b6125b9612795565b73ffffffffffffffffffffffffffffffffffffffff166125d76118e6565b73ffffffffffffffffffffffffffffffffffffffff161461262d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126249061446d565b60405180910390fd5b806019908051906020019061264392919061396e565b5050565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061271257507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80612722575061272182613104565b5b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600033905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166128108361143c565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061286182612729565b6128a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161289790615200565b60405180910390fd5b60006128ab8361143c565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806128ed57506128ec8185612408565b5b8061292b57508373ffffffffffffffffffffffffffffffffffffffff1661291384610be4565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166129548261143c565b73ffffffffffffffffffffffffffffffffffffffff16146129aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129a190615292565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612a19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a1090615324565b60405180910390fd5b612a2483838361316e565b612a2f60008261279d565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612a7f9190614ac5565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254612ad69190614997565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4612b95838383613280565b505050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008183612c6e9190614997565b905092915050565b606060008203612cbd576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612dd1565b600082905060005b60008214612cef578080612cd8906147bf565b915050600a82612ce89190615373565b9150612cc5565b60008167ffffffffffffffff811115612d0b57612d0a613d75565b5b6040519080825280601f01601f191660200182016040528015612d3d5781602001600182028036833780820191505090505b5090505b60008514612dca57600182612d569190614ac5565b9150600a85612d6591906153a4565b6030612d719190614997565b60f81b818381518110612d8757612d86614761565b5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a85612dc39190615373565b9450612d41565b8093505050505b919050565b6000600b549050612df7338260405180602001604052806000815250613285565b600181612e049190614997565b600b8190555050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612e7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e7290615421565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612f6c9190613ac5565b60405180910390a3505050565b612f84848484612934565b612f90848484846132e0565b612fcf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fc6906154b3565b60405180910390fd5b50505050565b60606016544210156130735760198054612fee9061423a565b80601f016020809104026020016040519081016040528092919081815260200182805461301a9061423a565b80156130675780601f1061303c57610100808354040283529160200191613067565b820191906000526020600020905b81548152906001019060200180831161304a57829003601f168201915b50505050509050613101565b601780546130809061423a565b80601f01602080910402602001604051908101604052809291908181526020018280546130ac9061423a565b80156130f95780601f106130ce576101008083540402835291602001916130f9565b820191906000526020600020905b8154815290600101906020018083116130dc57829003601f168201915b505050505090505b90565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b613179838383613467565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036131bb576131b68161346c565b6131fa565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146131f9576131f883826134b5565b5b5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361323c5761323781613622565b61327b565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461327a5761327982826136f3565b5b5b505050565b505050565b61328f8383613772565b61329c60008484846132e0565b6132db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016132d2906154b3565b60405180910390fd5b505050565b60006133018473ffffffffffffffffffffffffffffffffffffffff1661394b565b1561345a578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261332a612795565b8786866040518563ffffffff1660e01b815260040161334c9493929190615528565b6020604051808303816000875af192505050801561338857506040513d601f19601f820116820180604052508101906133859190615589565b60015b61340a573d80600081146133b8576040519150601f19603f3d011682016040523d82523d6000602084013e6133bd565b606091505b506000815103613402576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133f9906154b3565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161491505061345f565b600190505b949350505050565b505050565b6008805490506009600083815260200190815260200160002081905550600881908060018154018082558091505060019003906000526020600020016000909190919091505550565b600060016134c28461157b565b6134cc9190614ac5565b90506000600760008481526020019081526020016000205490508181146135b1576000600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816007600083815260200190815260200160002081905550505b6007600084815260200190815260200160002060009055600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b600060016008805490506136369190614ac5565b905060006009600084815260200190815260200160002054905060006008838154811061366657613665614761565b5b90600052602060002001549050806008838154811061368857613687614761565b5b9060005260206000200181905550816009600083815260200190815260200160002081905550600960008581526020019081526020016000206000905560088054806136d7576136d66155b6565b5b6001900381819060005260206000200160009055905550505050565b60006136fe8361157b565b905081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806007600084815260200190815260200160002081905550505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036137e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016137d890615631565b60405180910390fd5b6137ea81612729565b1561382a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016138219061569d565b60405180910390fd5b6138366000838361316e565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546138869190614997565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461394760008383613280565b5050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b82805461397a9061423a565b90600052602060002090601f01602090048101928261399c57600085556139e3565b82601f106139b557805160ff19168380011785556139e3565b828001600101855582156139e3579182015b828111156139e25782518255916020019190600101906139c7565b5b5090506139f091906139f4565b5090565b5b80821115613a0d5760008160009055506001016139f5565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b613a5a81613a25565b8114613a6557600080fd5b50565b600081359050613a7781613a51565b92915050565b600060208284031215613a9357613a92613a1b565b5b6000613aa184828501613a68565b91505092915050565b60008115159050919050565b613abf81613aaa565b82525050565b6000602082019050613ada6000830184613ab6565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613b1a578082015181840152602081019050613aff565b83811115613b29576000848401525b50505050565b6000601f19601f8301169050919050565b6000613b4b82613ae0565b613b558185613aeb565b9350613b65818560208601613afc565b613b6e81613b2f565b840191505092915050565b60006020820190508181036000830152613b938184613b40565b905092915050565b6000819050919050565b613bae81613b9b565b8114613bb957600080fd5b50565b600081359050613bcb81613ba5565b92915050565b600060208284031215613be757613be6613a1b565b5b6000613bf584828501613bbc565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613c2982613bfe565b9050919050565b613c3981613c1e565b82525050565b6000602082019050613c546000830184613c30565b92915050565b613c6381613c1e565b8114613c6e57600080fd5b50565b600081359050613c8081613c5a565b92915050565b60008060408385031215613c9d57613c9c613a1b565b5b6000613cab85828601613c71565b9250506020613cbc85828601613bbc565b9150509250929050565b613ccf81613b9b565b82525050565b6000602082019050613cea6000830184613cc6565b92915050565b600060208284031215613d0657613d05613a1b565b5b6000613d1484828501613c71565b91505092915050565b600080600060608486031215613d3657613d35613a1b565b5b6000613d4486828701613c71565b9350506020613d5586828701613c71565b9250506040613d6686828701613bbc565b9150509250925092565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613dad82613b2f565b810181811067ffffffffffffffff82111715613dcc57613dcb613d75565b5b80604052505050565b6000613ddf613a11565b9050613deb8282613da4565b919050565b600067ffffffffffffffff821115613e0b57613e0a613d75565b5b602082029050602081019050919050565b600080fd5b6000613e34613e2f84613df0565b613dd5565b90508083825260208201905060208402830185811115613e5757613e56613e1c565b5b835b81811015613e805780613e6c8882613c71565b845260208401935050602081019050613e59565b5050509392505050565b600082601f830112613e9f57613e9e613d70565b5b8135613eaf848260208601613e21565b91505092915050565b600060208284031215613ece57613ecd613a1b565b5b600082013567ffffffffffffffff811115613eec57613eeb613a20565b5b613ef884828501613e8a565b91505092915050565b600080fd5b600067ffffffffffffffff821115613f2157613f20613d75565b5b613f2a82613b2f565b9050602081019050919050565b82818337600083830152505050565b6000613f59613f5484613f06565b613dd5565b905082815260208101848484011115613f7557613f74613f01565b5b613f80848285613f37565b509392505050565b600082601f830112613f9d57613f9c613d70565b5b8135613fad848260208601613f46565b91505092915050565b600060208284031215613fcc57613fcb613a1b565b5b600082013567ffffffffffffffff811115613fea57613fe9613a20565b5b613ff684828501613f88565b91505092915050565b61400881613aaa565b811461401357600080fd5b50565b60008135905061402581613fff565b92915050565b6000806040838503121561404257614041613a1b565b5b600061405085828601613c71565b925050602061406185828601614016565b9150509250929050565b600061407682613bfe565b9050919050565b6140868161406b565b82525050565b60006020820190506140a1600083018461407d565b92915050565b600067ffffffffffffffff8211156140c2576140c1613d75565b5b6140cb82613b2f565b9050602081019050919050565b60006140eb6140e6846140a7565b613dd5565b90508281526020810184848401111561410757614106613f01565b5b614112848285613f37565b509392505050565b600082601f83011261412f5761412e613d70565b5b813561413f8482602086016140d8565b91505092915050565b6000806000806080858703121561416257614161613a1b565b5b600061417087828801613c71565b945050602061418187828801613c71565b935050604061419287828801613bbc565b925050606085013567ffffffffffffffff8111156141b3576141b2613a20565b5b6141bf8782880161411a565b91505092959194509250565b600080604083850312156141e2576141e1613a1b565b5b60006141f085828601613c71565b925050602061420185828601613c71565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061425257607f821691505b6020821081036142655761426461420b565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b60006142c7602c83613aeb565b91506142d28261426b565b604082019050919050565b600060208201905081810360008301526142f6816142ba565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b6000614359602183613aeb565b9150614364826142fd565b604082019050919050565b600060208201905081810360008301526143888161434c565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b60006143eb603883613aeb565b91506143f68261438f565b604082019050919050565b6000602082019050818103600083015261441a816143de565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614457602083613aeb565b915061446282614421565b602082019050919050565b600060208201905081810360008301526144868161444a565b9050919050565b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b60006144e9603183613aeb565b91506144f48261448d565b604082019050919050565b60006020820190508181036000830152614518816144dc565b9050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b600061457b602b83613aeb565b91506145868261451f565b604082019050919050565b600060208201905081810360008301526145aa8161456e565b9050919050565b7f4e6f20657468657265756d206c65667420746f20776974686472617700000000600082015250565b60006145e7601c83613aeb565b91506145f2826145b1565b602082019050919050565b60006020820190508181036000830152614616816145da565b9050919050565b600081905092915050565b50565b600061463860008361461d565b915061464382614628565b600082019050919050565b60006146598261462b565b9150819050919050565b7f5472616e73666572206661696c65642e00000000000000000000000000000000600082015250565b6000614699601083613aeb565b91506146a482614663565b602082019050919050565b600060208201905081810360008301526146c88161468c565b9050919050565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b600061472b602c83613aeb565b9150614736826146cf565b604082019050919050565b6000602082019050818103600083015261475a8161471e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006147ca82613b9b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036147fc576147fb614790565b5b600182019050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b6000614863602983613aeb565b915061486e82614807565b604082019050919050565b6000602082019050818103600083015261489281614856565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b60006148f5602a83613aeb565b915061490082614899565b604082019050919050565b60006020820190508181036000830152614924816148e8565b9050919050565b7f4163636f756e7420697320746865207a65726f20616464726573730000000000600082015250565b6000614961601b83613aeb565b915061496c8261492b565b602082019050919050565b6000602082019050818103600083015261499081614954565b9050919050565b60006149a282613b9b565b91506149ad83613b9b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156149e2576149e1614790565b5b828201905092915050565b7f4e6f7420656e6f756768204e465473206c656674000000000000000000000000600082015250565b6000614a23601483613aeb565b9150614a2e826149ed565b602082019050919050565b60006020820190508181036000830152614a5281614a16565b9050919050565b7f43616e6e6f74206d696e742030204e4654730000000000000000000000000000600082015250565b6000614a8f601283613aeb565b9150614a9a82614a59565b602082019050919050565b60006020820190508181036000830152614abe81614a82565b9050919050565b6000614ad082613b9b565b9150614adb83613b9b565b925082821015614aee57614aed614790565b5b828203905092915050565b600081905092915050565b7f416464726573732063616e2774206d696e74206d6f7265207468616e20000000600082015250565b6000614b3a601d83614af9565b9150614b4582614b04565b601d82019050919050565b6000614b5b82613ae0565b614b658185614af9565b9350614b75818560208601613afc565b80840191505092915050565b7f204e46547320696e2046726565206d696e740000000000000000000000000000600082015250565b6000614bb7601283614af9565b9150614bc282614b81565b601282019050919050565b6000614bd882614b2d565b9150614be48284614b50565b9150614bef82614baa565b915081905092915050565b7f53616c65206e6f74207374617274656420796574000000000000000000000000600082015250565b6000614c30601483613aeb565b9150614c3b82614bfa565b602082019050919050565b60006020820190508181036000830152614c5f81614c23565b9050919050565b7f4e6f7420656e6f75676820657468657265756d20746f2070757263686173652060008201527f4e46547300000000000000000000000000000000000000000000000000000000602082015250565b6000614cc2602483613aeb565b9150614ccd82614c66565b604082019050919050565b60006020820190508181036000830152614cf181614cb5565b9050919050565b7f416464726573732063616e2774206d696e74206d6f7265207468616e2031302060008201527f4e46547320696e205075626c69632073616c6500000000000000000000000000602082015250565b6000614d54603383613aeb565b9150614d5f82614cf8565b604082019050919050565b60006020820190508181036000830152614d8381614d47565b9050919050565b7f41646472657373206973206e6f742077686974656c6973746564000000000000600082015250565b6000614dc0601a83613aeb565b9150614dcb82614d8a565b602082019050919050565b60006020820190508181036000830152614def81614db3565b9050919050565b7f416464726573732063616e2774206d696e74206d6f7265207468616e2035204e60008201527f46547320696e20506861736520322073616c6500000000000000000000000000602082015250565b6000614e52603383613aeb565b9150614e5d82614df6565b604082019050919050565b60006020820190508181036000830152614e8181614e45565b9050919050565b7f416464726573732063616e2774206d696e74206d6f7265207468616e2032204e60008201527f46547320696e20506861736520312073616c6500000000000000000000000000602082015250565b6000614ee4603383613aeb565b9150614eef82614e88565b604082019050919050565b60006020820190508181036000830152614f1381614ed7565b9050919050565b6000614f2582613b9b565b9150614f3083613b9b565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614f6957614f68614790565b5b828202905092915050565b7f4552433732314d657461646174613a2055524920717565727920666f72206e6f60008201527f6e6578697374656e7420746f6b656e0000000000000000000000000000000000602082015250565b6000614fd0602f83613aeb565b9150614fdb82614f74565b604082019050919050565b60006020820190508181036000830152614fff81614fc3565b9050919050565b60008190508160005260206000209050919050565b600081546150288161423a565b6150328186614af9565b9450600182166000811461504d576001811461505e57615091565b60ff19831686528186019350615091565b61506785615006565b60005b838110156150895781548189015260018201915060208101905061506a565b838801955050505b50505092915050565b60006150a6828661501b565b91506150b28285614b50565b91506150be828461501b565b9150819050949350505050565b60006150d78286614b50565b91506150e38285614b50565b91506150ef828461501b565b9150819050949350505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000615158602683613aeb565b9150615163826150fc565b604082019050919050565b600060208201905081810360008301526151878161514b565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b60006151ea602c83613aeb565b91506151f58261518e565b604082019050919050565b60006020820190508181036000830152615219816151dd565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b600061527c602583613aeb565b915061528782615220565b604082019050919050565b600060208201905081810360008301526152ab8161526f565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061530e602483613aeb565b9150615319826152b2565b604082019050919050565b6000602082019050818103600083015261533d81615301565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061537e82613b9b565b915061538983613b9b565b92508261539957615398615344565b5b828204905092915050565b60006153af82613b9b565b91506153ba83613b9b565b9250826153ca576153c9615344565b5b828206905092915050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b600061540b601983613aeb565b9150615416826153d5565b602082019050919050565b6000602082019050818103600083015261543a816153fe565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b600061549d603283613aeb565b91506154a882615441565b604082019050919050565b600060208201905081810360008301526154cc81615490565b9050919050565b600081519050919050565b600082825260208201905092915050565b60006154fa826154d3565b61550481856154de565b9350615514818560208601613afc565b61551d81613b2f565b840191505092915050565b600060808201905061553d6000830187613c30565b61554a6020830186613c30565b6155576040830185613cc6565b818103606083015261556981846154ef565b905095945050505050565b60008151905061558381613a51565b92915050565b60006020828403121561559f5761559e613a1b565b5b60006155ad84828501615574565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b600061561b602083613aeb565b9150615626826155e5565b602082019050919050565b6000602082019050818103600083015261564a8161560e565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b6000615687601c83613aeb565b915061569282615651565b602082019050919050565b600060208201905081810360008301526156b68161567a565b905091905056fea2646970667358221220fff6d6d76f279c4105891b748b98f25f2c2eaea623e3259617dc9e5a4083077f64736f6c634300080d0033

Verified Source Code Partial Match

Compiler: v0.8.13+commit.abaa5c0e EVM: london Optimization: No
PokerGO.sol 1720 lines
// File: @openzeppelin/contracts/utils/math/SafeMath.sol


// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

// File: @openzeppelin/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";

    /**
     * @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/Context.sol


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

pragma solidity ^0.8.0;

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

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

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


// OpenZeppelin Contracts 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: @openzeppelin/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

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

// File: @openzeppelin/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: @openzeppelin/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: @openzeppelin/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: @openzeppelin/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 be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

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


// OpenZeppelin Contracts (last updated v4.5.0) (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);

    /**
     * @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/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: @openzeppelin/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: 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 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 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 {
        _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: 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 || 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 a {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 a {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 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 {}

    /**
     * @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: @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol


// OpenZeppelin Contracts v4.4.1 (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 addres...

// [truncated — 59410 bytes total]

Read Contract

MAX_SUPPLY 0x32cb6b0c → uint256
PRICE 0x8d859f3e → uint256
balanceOf 0x70a08231 → uint256
baseExtension 0xc6682862 → string
baseTokenURI 0xd547cfb7 → string
calculatePrice 0xae104265 → uint256
freeminted 0xef56267e → uint256
getApproved 0x081812fc → address
isApprovedForAll 0xe985e9c5 → bool
isWhitelisted 0x3af32abf → bool
minted 0x1e7269c5 → uint256
name 0x06fdde03 → string
nextTokenId 0x75794a3c → uint256
owner 0x8da5cb5b → address
ownerOf 0x6352211e → address
p1minted 0x918b933f → uint256
p2minted 0xd81d8ef0 → uint256
payments 0xa6d23e10 → address
phase1StartDate 0xc504685e → uint256
phase2StartDate 0x3c66485e → uint256
publicsaleStartDate 0xeb6426a9 → uint256
revealDate 0x1e08a9e4 → uint256
supportsInterface 0x01ffc9a7 → bool
symbol 0x95d89b41 → string
tokenByIndex 0x4f6ccce7 → uint256
tokenOfOwnerByIndex 0x2f745c59 → uint256
tokenURI 0xc87b56dd → string
totalSupply 0x18160ddd → uint256
unrevealedURI 0x7035bf18 → string

Write Contract 17 functions

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

addToWhitelist 0x7f649783
address[] _addresses
approve 0x095ea7b3
address to
uint256 tokenId
mint 0xa0712d68
uint256 _count
removeFromWhitelist 0x548db174
address[] _addresses
renounceOwnership 0x715018a6
No parameters
safeTransferFrom 0x42842e0e
address from
address to
uint256 tokenId
safeTransferFrom 0xb88d4fde
address from
address to
uint256 tokenId
bytes _data
setApprovalForAll 0xa22cb465
address operator
bool approved
setBaseURI 0x55f804b3
string _baseTokenURI
setPhase1StartDate 0x3775ddcc
uint256 _startDate
setPhase2StartDate 0x8044741f
uint256 _endDate
setPublicSaleStartDate 0x405200cd
uint256 _publicsaleStartDate
setRevealDate 0x0c88b731
uint256 _revealDate
setUnrevealedURI 0xfe2c7fee
string _unrevealedURI
transferFrom 0x23b872dd
address from
address to
uint256 tokenId
transferOwnership 0xf2fde38b
address newOwner
withdraw 0x3ccfd60b
No parameters

Recent Transactions

No transactions found for this address