Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0xAa407cae90E31b94Fb384dBC6f79325cA0324048
Balance 0 ETH
Nonce 1
Code Size 19876 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

19876 bytes
0x6080604052600436106102e85760003560e01c806389947bfd11610190578063c3623b20116100dc578063d00efb2f11610095578063dd62ed3e1161006f578063dd62ed3e14610aee578063deab8aea14610b2b578063f2fde38b14610b56578063f928364c14610b7f576102ef565b8063d00efb2f14610a6f578063d576e97214610a9a578063dd4698d014610ac3576102ef565b8063c3623b2014610987578063c596f3fe1461099e578063c8c8ebe4146109c7578063cca0feb6146109f2578063cd2c6a9914610a1b578063cd34c0c214610a58576102ef565b8063a7ab56af11610149578063ab80904f11610123578063ab80904f146108dd578063ad75e48914610908578063ae3dcf2614610931578063bdc303161461095c576102ef565b8063a7ab56af1461084c578063a9059cbb14610875578063aa4bde28146108b2576102ef565b806389947bfd146107505780638da5cb5b1461077957806395d89b41146107a457806398e122fd146107cf578063a13d1a2b146107f8578063a14779c914610821576102ef565b806338eac85d1161024f5780635992704411610208578063715018a6116101e2578063715018a6146106b857806377d1440d146106cf5780637b208769146106fa578063890aceb214610725576102ef565b806359927044146106255780636ea405d31461065057806370a082311461067b576102ef565b806338eac85d146105395780633a03c07e146105645780634234c60b1461058f5780634ada218b146105b857806350e8e512146105e357806351bc3c851461060e576102ef565b80631f3f8d33116102a15780631f3f8d331461041557806323b872dd1461044057806327a14fc21461047d5780632fa62740146104a6578063313ce567146104e357806334b7f7ae1461050e576102ef565b806306fdde03146102f157806307a212be1461031c578063095ea7b3146103455780630f3a325f146103825780631694505e146103bf57806318160ddd146103ea576102ef565b366102ef57005b005b3480156102fd57600080fd5b50610306610b96565b6040516103139190613a78565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e9190613ad5565b610c28565b005b34801561035157600080fd5b5061036c60048036038101906103679190613b60565b610cd7565b6040516103799190613bbb565b60405180910390f35b34801561038e57600080fd5b506103a960048036038101906103a49190613bd6565b610cfa565b6040516103b69190613bbb565b60405180910390f35b3480156103cb57600080fd5b506103d4610d1a565b6040516103e19190613c62565b60405180910390f35b3480156103f657600080fd5b506103ff610d3e565b60405161040c9190613c8c565b60405180910390f35b34801561042157600080fd5b5061042a610d48565b6040516104379190613bbb565b60405180910390f35b34801561044c57600080fd5b5061046760048036038101906104629190613ca7565b610d5f565b6040516104749190613bbb565b60405180910390f35b34801561048957600080fd5b506104a4600480360381019061049f9190613ad5565b610d8e565b005b3480156104b257600080fd5b506104cd60048036038101906104c89190613bd6565b610e84565b6040516104da9190613bbb565b60405180910390f35b3480156104ef57600080fd5b506104f8610ea4565b6040516105059190613d16565b60405180910390f35b34801561051a57600080fd5b50610523610ead565b6040516105309190613c8c565b60405180910390f35b34801561054557600080fd5b5061054e610eb3565b60405161055b9190613bbb565b60405180910390f35b34801561057057600080fd5b50610579610ec6565b6040516105869190613bbb565b60405180910390f35b34801561059b57600080fd5b506105b660048036038101906105b19190613ad5565b610ed9565b005b3480156105c457600080fd5b506105cd610f67565b6040516105da9190613bbb565b60405180910390f35b3480156105ef57600080fd5b506105f8610f7a565b6040516106059190613c8c565b60405180910390f35b34801561061a57600080fd5b50610623610f80565b005b34801561063157600080fd5b5061063a611069565b6040516106479190613d40565b60405180910390f35b34801561065c57600080fd5b5061066561108f565b6040516106729190613c8c565b60405180910390f35b34801561068757600080fd5b506106a2600480360381019061069d9190613bd6565b611095565b6040516106af9190613c8c565b60405180910390f35b3480156106c457600080fd5b506106cd6110de565b005b3480156106db57600080fd5b506106e46110f2565b6040516106f19190613c8c565b60405180910390f35b34801561070657600080fd5b5061070f6110f8565b60405161071c9190613d40565b60405180910390f35b34801561073157600080fd5b5061073a61111e565b6040516107479190613c8c565b60405180910390f35b34801561075c57600080fd5b5061077760048036038101906107729190613d87565b611124565b005b34801561078557600080fd5b5061078e611180565b60405161079b9190613d40565b60405180910390f35b3480156107b057600080fd5b506107b96111aa565b6040516107c69190613a78565b60405180910390f35b3480156107db57600080fd5b506107f660048036038101906107f19190613bd6565b61123c565b005b34801561080457600080fd5b5061081f600480360381019061081a9190613db4565b611250565b005b34801561082d57600080fd5b506108366112ec565b6040516108439190613d40565b60405180910390f35b34801561085857600080fd5b50610873600480360381019061086e9190613bd6565b611312565b005b34801561088157600080fd5b5061089c60048036038101906108979190613b60565b611444565b6040516108a99190613bbb565b60405180910390f35b3480156108be57600080fd5b506108c7611467565b6040516108d49190613c8c565b60405180910390f35b3480156108e957600080fd5b506108f261146d565b6040516108ff9190613c8c565b60405180910390f35b34801561091457600080fd5b5061092f600480360381019061092a9190613ad5565b611550565b005b34801561093d57600080fd5b50610946611608565b6040516109539190613c8c565b60405180910390f35b34801561096857600080fd5b506109716116f9565b60405161097e9190613bbb565b60405180910390f35b34801561099357600080fd5b5061099c611710565b005b3480156109aa57600080fd5b506109c560048036038101906109c09190613b60565b61179f565b005b3480156109d357600080fd5b506109dc611937565b6040516109e99190613c8c565b60405180910390f35b3480156109fe57600080fd5b50610a196004803603810190610a149190613ad5565b61193d565b005b348015610a2757600080fd5b50610a426004803603810190610a3d9190613bd6565b6119cb565b604051610a4f9190613bbb565b60405180910390f35b348015610a6457600080fd5b50610a6d6119eb565b005b348015610a7b57600080fd5b50610a84611a1f565b604051610a919190613c8c565b60405180910390f35b348015610aa657600080fd5b50610ac16004803603810190610abc9190613e19565b611a25565b005b348015610acf57600080fd5b50610ad8611ea1565b604051610ae59190613bbb565b60405180910390f35b348015610afa57600080fd5b50610b156004803603810190610b109190613e59565b611eb4565b604051610b229190613c8c565b60405180910390f35b348015610b3757600080fd5b50610b40611f3b565b604051610b4d9190613d40565b60405180910390f35b348015610b6257600080fd5b50610b7d6004803603810190610b789190613bd6565b611f61565b005b348015610b8b57600080fd5b50610b94611fe7565b005b606060048054610ba590613ec8565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd190613ec8565b8015610c1e5780601f10610bf357610100808354040283529160200191610c1e565b820191906000526020600020905b815481529060010190602001808311610c0157829003601f168201915b5050505050905090565b610c30612047565b620186a06001610c3e610d3e565b610c489190613f28565b610c529190613f99565b811015610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90614016565b60405180910390fd5b806008819055507fcfbc3e24bcdbf875f7af2b101605919fdbd3cb0b217ae54c372ae49417c58d01600854604051610ccc9190613c8c565b60405180910390a150565b600080610ce26120ce565b9050610cef8185856120d6565b600191505092915050565b60146020528060005260406000206000915054906101000a900460ff1681565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6000600354905090565b6000600660159054906101000a900460ff16905090565b600080610d6a6120ce565b9050610d778582856120e8565b610d8285858561217c565b60019150509392505050565b610d96612047565b6103e8610da1610d3e565b610dab9190613f99565b811015610ded576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de490614082565b60405180910390fd5b600a610df7610d3e565b610e019190613f99565b811115610e43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3a906140ee565b60405180910390fd5b80600a819055507f4b39c36d20c57d220f61fd25c4349d4435cc03ef6c2a680942f15333c3c3e00181604051610e799190613c8c565b60405180910390a150565b60166020528060005260406000206000915054906101000a900460ff1681565b60006012905090565b600b5481565b600660159054906101000a900460ff1681565b600660189054906101000a900460ff1681565b610ee1612047565b61012c811115610f26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f1d9061415a565b60405180910390fd5b80600b819055507fc4d978175d3c07d16372ccefaf0cd6282f07b3b93c73c51ca598d816838b623b81604051610f5c9190613c8c565b60405180910390a150565b600660179054906101000a900460ff1681565b600e5481565b610f88612047565b6000610f9330611095565b905060008111610fd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fcf906141c6565b60405180910390fd5b600660149054906101000a900460ff1615611028576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101f90614232565b60405180910390fd5b6001600660146101000a81548160ff02191690831515021790555061104b61299e565b6000600660146101000a81548160ff02191690831515021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60075481565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6110e6612047565b6110f06000612e26565b565b60085481565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d5481565b61112c612047565b80600660186101000a81548160ff0219169083151502179055507f7e0e6e2143876a516bcdac83e707a7aed20ee376e7dc65707b9d70807c54a4d0816040516111759190613bbb565b60405180910390a150565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600580546111b990613ec8565b80601f01602080910402602001604051908101604052809291908181526020018280546111e590613ec8565b80156112325780601f1061120757610100808354040283529160200191611232565b820191906000526020600020905b81548152906001019060200180831161121557829003601f168201915b5050505050905090565b611244612047565b61124d81612eec565b50565b611258612047565b80601560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507ff5ac7689d017b32b050acd71722bbd0751cfc9913acc11d642645cc2604a5a6682826040516112e0929190614252565b60405180910390a15050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61131a612047565b601460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166113a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161139d906142c7565b60405180910390fd5b6000601460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167fa957ba3a52f05ac246d413f37460b13ee4b8281799a6b8365c8d227bb376567360405160405180910390a250565b60008061144f6120ce565b905061145c81858561217c565b600191505092915050565b600a5481565b6000600660189054906101000a900460ff1615806114975750600660159054906101000a900460ff165b156114ab576114a4610d3e565b905061154d565b6000600e54426114bb91906142e7565b905062278d008111156115465762ed4e008111156114fc576103e8600a6114e0610d3e565b6114ea9190613f28565b6114f49190613f99565b91505061154d565b600064039ef8b00082600861150f610d3e565b6115199190613f28565b6115239190613f28565b61152d9190613f99565b90508060095461153d919061431b565b9250505061154d565b6009549150505b90565b611558612047565b611560613058565b6000811180156115705750804710155b6115af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a69061439b565b60405180910390fd5b6115b7611180565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156115fc573d6000803e3d6000fd5b5061160561309e565b50565b6000600660189054906101000a900460ff1615806116325750600660159054906101000a900460ff165b156116465761163f610d3e565b90506116f6565b6000600e544261165691906142e7565b905062278d008111156116ef5762ed4e00811115611697576103e8601e61167b610d3e565b6116859190613f28565b61168f9190613f99565b9150506116f6565b600064039ef8b00062278d00836116ae91906142e7565b60146116b8610d3e565b6116c29190613f28565b6116cc9190613f28565b6116d69190613f99565b905080600a546116e6919061431b565b925050506116f6565b600a549150505b90565b6000600660189054906101000a900460ff16905090565b611718612047565b6000600c541461175d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161175490614407565b60405180910390fd5b43600c819055507f8da81f1d10edd7e242582e37f1e97267643687e6eb87d87c8be39d0a74ead87f600c546040516117959190613c8c565b60405180910390a1565b6117a7612047565b6117af613058565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361181e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181590614473565b60405180910390fd5b60008111611861576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611858906144df565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb611887611180565b846040518363ffffffff1660e01b81526004016118a59291906144ff565b6020604051808303816000875af11580156118c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118e8919061453d565b90508061192a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611921906145b6565b60405180910390fd5b5061193361309e565b5050565b60095481565b611945612047565b6103e881111561198a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198190614622565b60405180910390fd5b806007819055507f35ad15e7f5e4a16b548e8916bd02c51847dde8d106f334b4edaaacf140e43c91816040516119c09190613c8c565b60405180910390a150565b60156020528060005260406000206000915054906101000a900460ff1681565b6119f3612047565b600660169054906101000a900460ff1615600660166101000a81548160ff021916908315150217905550565b600c5481565b611a2d612047565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a939061468e565b60405180910390fd5b60006003811115611ab057611aaf6146ae565b5b826003811115611ac357611ac26146ae565b5b03611b9d5780600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001601560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fc593283808d96116d978f98a4d43b0d5377c2a186c00e6bc147ab590ac9d006081604051611b909190613d40565b60405180910390a1611e9d565b60016003811115611bb157611bb06146ae565b5b826003811115611bc457611bc36146ae565b5b03611c9e5780601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001601560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fc92adabe7e3c798b024690e02ee7d25de288e646ad1dbe65b009342bfd37a7f681604051611c919190613d40565b60405180910390a1611e9c565b60026003811115611cb257611cb16146ae565b5b826003811115611cc557611cc46146ae565b5b03611d9e5780601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001601560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507e3a625ce2c1733a2f48879bc625b0e8b428365f072b18aaae4a11b26a7f187081604051611d919190613d40565b60405180910390a1611e9b565b600380811115611db157611db06146ae565b5b826003811115611dc457611dc36146ae565b5b03611e9a5780601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001601560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f98feaa8b24e6c2f447c9354b74b62dd2bb32ebe2c33a556546d0e88420343e1481604051611e919190613d40565b60405180910390a15b5b5b5b5050565b600660169054906101000a900460ff1681565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611f69612047565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611fdb5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401611fd29190613d40565b60405180910390fd5b611fe481612e26565b50565b611fef612047565b600660159054906101000a900460ff1615600660156101000a81548160ff0219169083151502179055507fd0a8ff473dcac5e83a30583490a7d6b4eea5bbb9dd4aa26182b0fa8a231e0c9860405160405180910390a1565b61204f6120ce565b73ffffffffffffffffffffffffffffffffffffffff1661206d611180565b73ffffffffffffffffffffffffffffffffffffffff16146120cc576120906120ce565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016120c39190613d40565b60405180910390fd5b565b600033905090565b6120e383838360016130a8565b505050565b60006120f48484611eb4565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146121765781811015612166578281836040517ffb8f41b200000000000000000000000000000000000000000000000000000000815260040161215d939291906146dd565b60405180910390fd5b612175848484840360006130a8565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036121eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121e290614786565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361225a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612251906147f2565b60405180910390fd5b6000811161229d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161229490614884565b60405180910390fd5b600660179054906101000a900460ff16806122f157506122bb611180565b73ffffffffffffffffffffffffffffffffffffffff166122d96120ce565b73ffffffffffffffffffffffffffffffffffffffff16145b612330576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612327906148f0565b60405180910390fd5b600660179054906101000a900460ff1615612557576000600c541480156123a05750601660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156123ad5743600c819055505b600d54600c546123bd919061431b565b43111580156124155750601660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612473576001601460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156125175750601460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b612556576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161254d9061495c565b60405180910390fd5b5b61255f611180565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806125ca575061259b611180565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b8061261e5750601560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806126725750601560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156126875761268283838361327f565b612999565b600061269161146d565b9050808211156126d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126cd906149ee565b60405180910390fd5b601660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612791576000612731611608565b9050600061273e85611095565b905081848261274d919061431b565b111561278e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161278590614a5a565b60405180910390fd5b50505b6000601660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1690506000601660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050818061283c5750805b1561298a5760008261284e5786612850565b855b9050601560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612988576000601360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050600b54816128f5919061431b565b421015806129035750600081145b612942576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161293990614aec565b60405180910390fd5b42601360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b505b61299586868661327f565b5050505b505050565b6129a6613058565b60006129b130611095565b9050600081036129c15750612e1c565b6129ca81613560565b60004790506000811115612e195760006004826129e79190613f99565b9050600080600080600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16856188b890604051612a3990614b3d565b600060405180830381858888f193505050503d8060008114612a77576040519150601f19603f3d011682016040523d82523d6000602084013e612a7c565b606091505b505080945050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16856188b890604051612acc90614b3d565b600060405180830381858888f193505050503d8060008114612b0a576040519150601f19603f3d011682016040523d82523d6000602084013e612b0f565b606091505b505080935050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16856188b890604051612b5f90614b3d565b600060405180830381858888f193505050503d8060008114612b9d576040519150601f19603f3d011682016040523d82523d6000602084013e612ba2565b606091505b505080925050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16856188b890604051612bf290614b3d565b600060405180830381858888f193505050503d8060008114612c30576040519150601f19603f3d011682016040523d82523d6000602084013e612c35565b606091505b50508091505083612cb157600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f1c43b9761b3fba5321ca8212bfc231945f668ccc0c446f333999eea9ce8fda8186604051612ca89190613c8c565b60405180910390a25b82612d2757601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f1c43b9761b3fba5321ca8212bfc231945f668ccc0c446f333999eea9ce8fda8186604051612d1e9190613c8c565b60405180910390a25b81612d9d57601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f1c43b9761b3fba5321ca8212bfc231945f668ccc0c446f333999eea9ce8fda8186604051612d949190613c8c565b60405180910390a25b80612e1357601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f1c43b9761b3fba5321ca8212bfc231945f668ccc0c446f333999eea9ce8fda8186604051612e0a9190613c8c565b60405180910390a25b50505050505b50505b612e2461309e565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60007f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015612f59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f7d9190614b67565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630846040518363ffffffff1660e01b8152600401612fb7929190614b94565b6020604051808303816000875af1158015612fd6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ffa9190614b67565b90506001601660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600260005403613094576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600081905550565b6001600081905550565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361311a5760006040517fe602df050000000000000000000000000000000000000000000000000000000081526004016131119190613d40565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361318c5760006040517f94280d620000000000000000000000000000000000000000000000000000000081526004016131839190613d40565b60405180910390fd5b81600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508015613279578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516132709190613c8c565b60405180910390a35b50505050565b6000601660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1690506000601660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050600061332c30611095565b90506000600854821015905060008180156133445750835b801561335d5750600660149054906101000a900460ff16155b80156133b35750601560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156134095750601560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b90508080156134245750600660169054906101000a900460ff165b15613468576001600660146101000a81548160ff02191690831515021790555061344c61299e565b6000600660146101000a81548160ff0219169083151502179055505b600085806134735750845b1561354a57601560008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561351c5750601560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156135495761352d8760075461379d565b905061353a8930836137c0565b808761354691906142e7565b96505b5b6135558989896137c0565b505050505050505050565b6000600267ffffffffffffffff81111561357d5761357c614bbd565b5b6040519080825280602002602001820160405280156135ab5781602001602082028036833780820191505090505b50905030816000815181106135c3576135c2614bec565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015613668573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061368c9190614b67565b816001815181106136a05761369f614bec565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050613705307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d846120d6565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401613767959493929190614d14565b600060405180830381600087803b15801561378157600080fd5b505af1158015613795573d6000803e3d6000fd5b505050505050565b600061271082846137ae9190613f28565b6137b89190613f99565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603613812578060036000828254613806919061431b565b925050819055506138e7565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561389f578381836040517fe450d38c000000000000000000000000000000000000000000000000000000008152600401613896939291906146dd565b60405180910390fd5b818103600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603613930578060036000828254039250508190555061397e565b80600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516139db9190613c8c565b60405180910390a3505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613a22578082015181840152602081019050613a07565b60008484015250505050565b6000601f19601f8301169050919050565b6000613a4a826139e8565b613a5481856139f3565b9350613a64818560208601613a04565b613a6d81613a2e565b840191505092915050565b60006020820190508181036000830152613a928184613a3f565b905092915050565b600080fd5b6000819050919050565b613ab281613a9f565b8114613abd57600080fd5b50565b600081359050613acf81613aa9565b92915050565b600060208284031215613aeb57613aea613a9a565b5b6000613af984828501613ac0565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613b2d82613b02565b9050919050565b613b3d81613b22565b8114613b4857600080fd5b50565b600081359050613b5a81613b34565b92915050565b60008060408385031215613b7757613b76613a9a565b5b6000613b8585828601613b4b565b9250506020613b9685828601613ac0565b9150509250929050565b60008115159050919050565b613bb581613ba0565b82525050565b6000602082019050613bd06000830184613bac565b92915050565b600060208284031215613bec57613beb613a9a565b5b6000613bfa84828501613b4b565b91505092915050565b6000819050919050565b6000613c28613c23613c1e84613b02565b613c03565b613b02565b9050919050565b6000613c3a82613c0d565b9050919050565b6000613c4c82613c2f565b9050919050565b613c5c81613c41565b82525050565b6000602082019050613c776000830184613c53565b92915050565b613c8681613a9f565b82525050565b6000602082019050613ca16000830184613c7d565b92915050565b600080600060608486031215613cc057613cbf613a9a565b5b6000613cce86828701613b4b565b9350506020613cdf86828701613b4b565b9250506040613cf086828701613ac0565b9150509250925092565b600060ff82169050919050565b613d1081613cfa565b82525050565b6000602082019050613d2b6000830184613d07565b92915050565b613d3a81613b22565b82525050565b6000602082019050613d556000830184613d31565b92915050565b613d6481613ba0565b8114613d6f57600080fd5b50565b600081359050613d8181613d5b565b92915050565b600060208284031215613d9d57613d9c613a9a565b5b6000613dab84828501613d72565b91505092915050565b60008060408385031215613dcb57613dca613a9a565b5b6000613dd985828601613b4b565b9250506020613dea85828601613d72565b9150509250929050565b60048110613e0157600080fd5b50565b600081359050613e1381613df4565b92915050565b60008060408385031215613e3057613e2f613a9a565b5b6000613e3e85828601613e04565b9250506020613e4f85828601613b4b565b9150509250929050565b60008060408385031215613e7057613e6f613a9a565b5b6000613e7e85828601613b4b565b9250506020613e8f85828601613b4b565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613ee057607f821691505b602082108103613ef357613ef2613e99565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613f3382613a9f565b9150613f3e83613a9f565b9250828202613f4c81613a9f565b91508282048414831517613f6357613f62613ef9565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613fa482613a9f565b9150613faf83613a9f565b925082613fbf57613fbe613f6a565b5b828204905092915050565b7f5468726573686f6c6420746f6f206c6f77000000000000000000000000000000600082015250565b60006140006011836139f3565b915061400b82613fca565b602082019050919050565b6000602082019050818103600083015261402f81613ff3565b9050919050565b7f4d61782077616c6c657420616d6f756e7420746f6f206c6f7700000000000000600082015250565b600061406c6019836139f3565b915061407782614036565b602082019050919050565b6000602082019050818103600083015261409b8161405f565b9050919050565b7f4d61782077616c6c657420616d6f756e7420746f6f2068696768000000000000600082015250565b60006140d8601a836139f3565b91506140e3826140a2565b602082019050919050565b60006020820190508181036000830152614107816140cb565b9050919050565b7f436f6f6c646f776e2074696d6520746f6f206869676800000000000000000000600082015250565b60006141446016836139f3565b915061414f8261410e565b602082019050919050565b6000602082019050818103600083015261417381614137565b9050919050565b7f4e6f20746f6b656e7320746f2073776170000000000000000000000000000000600082015250565b60006141b06011836139f3565b91506141bb8261417a565b602082019050919050565b600060208201905081810360008301526141df816141a3565b9050919050565b7f5377617020696e2070726f677265737300000000000000000000000000000000600082015250565b600061421c6010836139f3565b9150614227826141e6565b602082019050919050565b6000602082019050818103600083015261424b8161420f565b9050919050565b60006040820190506142676000830185613d31565b6142746020830184613bac565b9392505050565b7f41646472657373206973206e6f74206d61726b656420617320736e6970657200600082015250565b60006142b1601f836139f3565b91506142bc8261427b565b602082019050919050565b600060208201905081810360008301526142e0816142a4565b9050919050565b60006142f282613a9f565b91506142fd83613a9f565b925082820390508181111561431557614314613ef9565b5b92915050565b600061432682613a9f565b915061433183613a9f565b925082820190508082111561434957614348613ef9565b5b92915050565b7f496e76616c696420616d6f756e74000000000000000000000000000000000000600082015250565b6000614385600e836139f3565b91506143908261434f565b602082019050919050565b600060208201905081810360008301526143b481614378565b9050919050565b7f416c726561647920696e697469616c697a656400000000000000000000000000600082015250565b60006143f16013836139f3565b91506143fc826143bb565b602082019050919050565b60006020820190508181036000830152614420816143e4565b9050919050565b7f496e76616c696420746f6b656e20616464726573730000000000000000000000600082015250565b600061445d6015836139f3565b915061446882614427565b602082019050919050565b6000602082019050818103600083015261448c81614450565b9050919050565b7f416d6f756e74206d7573742062652067726561746572207468616e207a65726f600082015250565b60006144c96020836139f3565b91506144d482614493565b602082019050919050565b600060208201905081810360008301526144f8816144bc565b9050919050565b60006040820190506145146000830185613d31565b6145216020830184613c7d565b9392505050565b60008151905061453781613d5b565b92915050565b60006020828403121561455357614552613a9a565b5b600061456184828501614528565b91505092915050565b7f546f6b656e207472616e73666572206661696c65640000000000000000000000600082015250565b60006145a06015836139f3565b91506145ab8261456a565b602082019050919050565b600060208201905081810360008301526145cf81614593565b9050919050565b7f54617820746f6f20686967680000000000000000000000000000000000000000600082015250565b600061460c600c836139f3565b9150614617826145d6565b602082019050919050565b6000602082019050818103600083015261463b816145ff565b9050919050565b7f496e76616c696420616464726573730000000000000000000000000000000000600082015250565b6000614678600f836139f3565b915061468382614642565b602082019050919050565b600060208201905081810360008301526146a78161466b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60006060820190506146f26000830186613d31565b6146ff6020830185613c7d565b61470c6040830184613c7d565b949350505050565b7f45524332303a207472616e736665722066726f6d207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b60006147706021836139f3565b915061477b82614714565b604082019050919050565b6000602082019050818103600083015261479f81614763565b9050919050565b7f45524332303a207472616e7366657220746f207a65726f206164647265737300600082015250565b60006147dc601f836139f3565b91506147e7826147a6565b602082019050919050565b6000602082019050818103600083015261480b816147cf565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b600061486e6029836139f3565b915061487982614812565b604082019050919050565b6000602082019050818103600083015261489d81614861565b9050919050565b7f54726164696e672069732064697361626c656400000000000000000000000000600082015250565b60006148da6013836139f3565b91506148e5826148a4565b602082019050919050565b60006020820190508181036000830152614909816148cd565b9050919050565b7f536e697065722064657465637465640000000000000000000000000000000000600082015250565b6000614946600f836139f3565b915061495182614910565b602082019050919050565b6000602082019050818103600083015261497581614939565b9050919050565b7f5472616e7366657220616d6f756e742065786365656473206d6178207472616e60008201527f73616374696f6e206c696d697400000000000000000000000000000000000000602082015250565b60006149d8602d836139f3565b91506149e38261497c565b604082019050919050565b60006020820190508181036000830152614a07816149cb565b9050919050565b7f4d61782077616c6c657420616d6f756e74206578636565646564000000000000600082015250565b6000614a44601a836139f3565b9150614a4f82614a0e565b602082019050919050565b60006020820190508181036000830152614a7381614a37565b9050919050565b7f54726164696e6720636f6f6c646f776e20706572696f64206e6f74207965742060008201527f7061737365640000000000000000000000000000000000000000000000000000602082015250565b6000614ad66026836139f3565b9150614ae182614a7a565b604082019050919050565b60006020820190508181036000830152614b0581614ac9565b9050919050565b600081905092915050565b50565b6000614b27600083614b0c565b9150614b3282614b17565b600082019050919050565b6000614b4882614b1a565b9150819050919050565b600081519050614b6181613b34565b92915050565b600060208284031215614b7d57614b7c613a9a565b5b6000614b8b84828501614b52565b91505092915050565b6000604082019050614ba96000830185613d31565b614bb66020830184613d31565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000819050919050565b6000614c40614c3b614c3684614c1b565b613c03565b613a9f565b9050919050565b614c5081614c25565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b614c8b81613b22565b82525050565b6000614c9d8383614c82565b60208301905092915050565b6000602082019050919050565b6000614cc182614c56565b614ccb8185614c61565b9350614cd683614c72565b8060005b83811015614d07578151614cee8882614c91565b9750614cf983614ca9565b925050600181019050614cda565b5085935050505092915050565b600060a082019050614d296000830188613c7d565b614d366020830187614c47565b8181036040830152614d488186614cb6565b9050614d576060830185613d31565b614d646080830184613c7d565b969550505050505056fea2646970667358221220e680c5bd646195c29817a02fbcb36bc36753e90a6fbd2c3d2e4dc6f36505cfce64736f6c63430008130033

Verified Source Code Full Match

Compiler: v0.8.19+commit.7dd6d404 EVM: paris Optimization: No
Crotch.sol 848 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
 
 
interface IERC20Errors {
 
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
 
 
    error ERC20InvalidSender(address sender);
 
    error ERC20InvalidReceiver(address receiver);
 
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
 
    error ERC20InvalidApprover(address approver);
 
    error ERC20InvalidSpender(address spender);
}
 
interface IERC721Errors {
 
    error ERC721InvalidOwner(address owner);
 
    error ERC721NonexistentToken(uint256 tokenId);
 
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
 
    error ERC721InvalidSender(address sender);
 
    error ERC721InvalidReceiver(address receiver);
 
    error ERC721InsufficientApproval(address operator, uint256 tokenId);
 
    error ERC721InvalidApprover(address approver);
 
    error ERC721InvalidOperator(address operator);
}
 
 
interface IERC1155Errors {
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
 
    error ERC1155InvalidSender(address sender);
 
    error ERC1155InvalidReceiver(address receiver);
 
    error ERC1155MissingApprovalForAll(address operator, address owner);
 
    error ERC1155InvalidApprover(address approver);
 
    error ERC1155InvalidOperator(address operator);
 
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}
 
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }
 
    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
 
    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
 
 
abstract contract Ownable is Context {
    address private _owner;
 
    error OwnableUnauthorizedAccount(address account);
 
    error OwnableInvalidOwner(address owner);
 
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
 
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }
 
    modifier onlyOwner() {
        _checkOwner();
        _;
    }
 
 
    function owner() public view virtual returns (address) {
        return _owner;
    }
 
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }
 
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }
 
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }
 
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
 
 
interface IERC20 {
 
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
 
    function totalSupply() external view returns (uint256);
 
    function balanceOf(address account) external view returns (uint256);
 
    function transfer(address to, uint256 value) external returns (bool);
 
    function allowance(address owner, address spender) external view returns (uint256);
 
    function approve(address spender, uint256 value) external returns (bool);
 
    function transferFrom(address from, address to, uint256 value) external returns (bool);
}
 
interface IERC20Metadata is IERC20 {
 
    function name() external view returns (string memory);
 
 
    function symbol() external view returns (string memory);
 
    function decimals() external view returns (uint8);
}

abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

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

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}
 
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors, ReentrancyGuard {
    mapping(address account => uint256) private _balances;
 
    mapping(address account => mapping(address spender => uint256)) private _allowances;
 
    uint256 private _totalSupply;
 
    string private _name;
    string private _symbol;
 
 
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }
 
    function name() public view virtual returns (string memory) {
        return _name;
    }
 
 
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }
 
 
    function decimals() public view virtual returns (uint8) {
        return 18;
    }
 
 
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }
 
 
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }
 
 
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }
 
    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }
 
    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }
 
 
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }
 
    function _transfer(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }
 
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                _balances[from] = fromBalance - value;
            }
        }
 
        if (to == address(0)) {
            unchecked {
                _totalSupply -= value;
            }
        } else {
            unchecked {
                _balances[to] += value;
            }
        }
 
        emit Transfer(from, to, value);
    }
 
 
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }
 
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }
 
 
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }
 
 
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}
 
 
interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address lpPair, uint);
    function getPair(address tokenA, address tokenB) external view returns (address lpPair);
    function createPair(address tokenA, address tokenB) external returns (address lpPair);
}
 
 
interface IRouter01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
        ) external returns (uint amountToken, uint amountETH);
    function swapExactETHForTokens(
        uint amountOutMin, 
        address[] calldata path, 
        address to, uint deadline
    ) external payable returns (uint[] memory amounts);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
 
interface IUniswapV2Router02 is IRouter01 {
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
}

contract Crotch is ReentrancyGuard, ERC20, Ownable {

    IUniswapV2Router02 public immutable uniswapV2Router;
    bool private swapping;
    bool public limitsDisabled;
    bool public isPancakeSwapEnable = true;
    bool public tradingEnabled = true;
    bool public dynamicLimitsEnabled = true;

    uint256 public Tax = 400; // 4%
    uint256 public taxThreshold = 4000 * 10** uint256(decimals()); // Change this value before deploy the mainnet
     // Anti-Whale Variables
    uint256 public maxTransactionAmount; // 0.2% of total supply initially
    uint256 public maxWalletAmount;      // Max tokens per wallet
    uint256 public tradingCooldown = 30; // 30 seconds cooldown
    uint256 public launchBlock;
    uint256 public sniperBlockWindow = 2;
    uint256 public contractLaunchTime;

    address public teamWallet = 0x246EADe3DC857956D5FB7B981E0C46d5314fB8fD; // Before deploy on the mainnet please change this address
    address public charityWallet = 0x6C147C0E6a9070Ad3Ce429C4f9fBF13c62070Ca8; // Before deploy on the mainnet please change this address
    address public buybackWallet = 0xc2d99a8AF865eBab4c860819d551a971608ecaA9; // Before deploy on the mainnet please change this address
    address public airdropWallet = 0x933a0da8eD2B8d960ca279E26Ec4bafd6eFB6EC5; // Before deploy on the mainnet please change this address
    
    mapping(address => uint256) private _lastTradingTime;
    mapping(address => bool) public isSniper;
    mapping(address => bool) public isExemptFromLimits;
    mapping(address => bool) public liquidityPairs; // Store multiple pairs 
    
    enum WalletType {
        TEAM, 
        CHARITY, 
        BUYBACK, 
        AIRDROP 
    }

    event UpdateThreshold(uint256 newThreshold);
    event UpdateWalletsForTeam(address team);
    event UpdateWalletsForCharity(address charity);
    event UpdateWalletsForBuyback(address buyback);
    event UpdateWalletsForAirdrop(address airdrop);
    event MaxWalletAmountUpdated(uint256 newAmount);
    event CooldownTimeUpdated(uint256 newTime);
    event ExemptFromLimitsUpdated(address account, bool isExempt);
    event DynamicLimitsUpdated(bool enabled);
    event TaxUpdated(uint256 newTax);
    event LimitsDisabled();
    event LaunchBlockInitialized(uint256 launchBlock);
    event TransferFailed(address indexed recipient, uint256 amount);
    event SniperRemoved(address indexed account);
    
    constructor() ERC20("Crotch", "CROTCH") Ownable(msg.sender) {
        uint256 totalSupply = 320_000_000 * (10**decimals());
        _mint(msg.sender, totalSupply);

        // Set initial caps
        maxTransactionAmount = totalSupply * 2 / 1000; // 0.2% of total supply
        maxWalletAmount = totalSupply * 10 / 1000;     // 1% of total supply

        // Set contract launch time
        contractLaunchTime = block.timestamp;

        // Exempt owner and contract from limits
        isExemptFromLimits[msg.sender] = true;
        isExemptFromLimits[address(this)] = true;
        
        // Exempt wallets from limits
        isExemptFromLimits[teamWallet] = true;
        isExemptFromLimits[charityWallet] = true;
        isExemptFromLimits[buybackWallet] = true;
        isExemptFromLimits[airdropWallet] = true;

        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(
            0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D  // Deploy on Mainnet enable this UniswapV2 Ethereum Mainnet
        );
        
        uniswapV2Router = _uniswapV2Router;

        address weth = _uniswapV2Router.WETH();
        _createLiquidityPair(weth);

        _approve(address(this), address(uniswapV2Router), type(uint256).max);
    }

    // Function to set max wallet amount
    function setMaxWalletAmount(uint256 amount) external onlyOwner {
        require(amount >= totalSupply() / 1000, "Max wallet amount too low");
        require(amount <= totalSupply() / 10, "Max wallet amount too high");
        maxWalletAmount = amount;
        emit MaxWalletAmountUpdated(amount);
    }

    // Function to set cooldown time
    function setTradingCooldown(uint256 time) external onlyOwner {
        require(time <= 300, "Cooldown time too high"); // Maximum 5 minutes
        tradingCooldown = time;
        emit CooldownTimeUpdated(time);
    }

    // Function to exempt address from limits
    function setExemptFromLimits(address account, bool exempt) external onlyOwner {
        isExemptFromLimits[account] = exempt;
        emit ExemptFromLimitsUpdated(account, exempt);
    }

    // Function to toggle dynamic limits
    function setDynamicLimits(bool enabled) external onlyOwner {
        dynamicLimitsEnabled = enabled;
        emit DynamicLimitsUpdated(enabled);
    }

    // Calculate current transaction limit based on token age
    function getCurrentMaxTransactionAmount() public view returns (uint256) {

        if (!dynamicLimitsEnabled || limitsDisabled) {
            return totalSupply(); // No limit if disabled
        }
        
        uint256 elapsedTime = block.timestamp - contractLaunchTime;
        
        // After 30 days, gradually increase limits
        if (elapsedTime > 30 days) {
            if (elapsedTime > 6 * 30 days) {
                // After 6 months, cap at 1% of total supply
                return totalSupply() * 10 / 1000;
            } else {
                // Linearly increase from 0.2% to 1% over 6 months
                // Avoid division before multiplication completely
                uint256 linearIncrease = (totalSupply() * 8 * elapsedTime) / (1000 * 6 * 30 days);
                return maxTransactionAmount + linearIncrease;
            }
        }
        
        return maxTransactionAmount;
    }

    function getCurrentMaxWalletAmount() public view returns (uint256) {
        if (!dynamicLimitsEnabled || limitsDisabled) {
            return totalSupply(); // No limit if disabled
        }
        
        uint256 elapsedTime = block.timestamp - contractLaunchTime;
        
        // After 30 days, gradually increase limits
        if (elapsedTime > 30 days) {
            if (elapsedTime > 6 * 30 days) {
                // After 6 months, cap at 3% of total supply
                return totalSupply() * 30 / 1000;
            } else {
                // Linearly increase from 1% to 3% over 6 months
                // Avoid division before multiplication completely
                uint256 linearIncrease = (totalSupply() * 20 * (elapsedTime - 30 days)) / (1000 * 6 * 30 days);
                return maxWalletAmount + linearIncrease;
            }
        }
        
        return maxWalletAmount;
    }

    function disableLimits() external onlyOwner {
        limitsDisabled = !limitsDisabled;
        emit LimitsDisabled();
    }

    function togglePancakeSwap() external onlyOwner {
        isPancakeSwapEnable = !isPancakeSwapEnable;
        
    }

    function setTaxThreshold(uint256 threshold) external onlyOwner {
        require(threshold >= (totalSupply() * 1) / 100_000, "Threshold too low"); // 0.001%
        taxThreshold = threshold;
        emit UpdateThreshold(taxThreshold);
    }

    function updateWallet(WalletType _walletType, address _wallet) external onlyOwner {
        require(_wallet != address(0), "Invalid address");

        if (_walletType == WalletType.TEAM) {
            teamWallet = _wallet;
            isExemptFromLimits[_wallet] = true;
            emit UpdateWalletsForTeam(_wallet);
        } else if (_walletType == WalletType.CHARITY) {
            charityWallet = _wallet;
            isExemptFromLimits[_wallet] = true;
            emit UpdateWalletsForCharity(_wallet);
        } else if (_walletType == WalletType.BUYBACK) {
            buybackWallet = _wallet;
            isExemptFromLimits[_wallet] = true;
            emit UpdateWalletsForBuyback(_wallet);
        } else if (_walletType == WalletType.AIRDROP) {
            airdropWallet = _wallet;
            isExemptFromLimits[_wallet] = true;
            emit UpdateWalletsForAirdrop(_wallet);
        }
    }

    function swapTokensForEth(uint256 tokenAmount) private {
        address[] memory path = new address[](2);
        path[0] = address(this);
        path[1] = uniswapV2Router.WETH();

        _approve(address(this), address(uniswapV2Router), tokenAmount);
        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
            tokenAmount,
            0,
            path,
            address(this),
            block.timestamp
        );
    }

    // Add function to remove address from sniper list
    function removeSniperAddress(address account) external onlyOwner {
        require(isSniper[account], "Address is not marked as sniper");
        isSniper[account] = false;
        emit SniperRemoved(account);
    }

    function swapTokensAndDistribute() internal nonReentrant {
        uint256 contractTokenBalance = balanceOf(address(this));
        if (contractTokenBalance == 0) return;

        swapTokensForEth(contractTokenBalance);
        uint256 ethBalance = address(this).balance;
        if (ethBalance > 0) {
            uint256 share = ethBalance / 4;
            
            // Use fixed 35000 gas limit for all transfers
            bool success1;
            bool success2;
            bool success3;
            bool success4;
            
            (success1,) = payable(teamWallet).call{value: share, gas: 35000}("");
            (success2,) = payable(charityWallet).call{value: share, gas: 35000}("");
            (success3,) = payable(buybackWallet).call{value: share, gas: 35000}("");
            (success4,) = payable(airdropWallet).call{value: share, gas: 35000}("");
            
            // Emit events for any failed transfers
            if (!success1) emit TransferFailed(teamWallet, share);
            if (!success2) emit TransferFailed(charityWallet, share);
            if (!success3) emit TransferFailed(buybackWallet, share);
            if (!success4) emit TransferFailed(airdropWallet, share);
        }
    }
    
    function manualSwap() external onlyOwner {
        uint256 contractTokenBalance = balanceOf(address(this));
        require(contractTokenBalance > 0, "No tokens to swap");
        require(!swapping, "Swap in progress");
        
        swapping = true;
        swapTokensAndDistribute();
        swapping = false;
    }
    
    function _transfer(address sender, address recipient, uint256 amount) internal override {
        require(sender != address(0), "ERC20: transfer from zero address");
        require(recipient != address(0), "ERC20: transfer to zero address");
        require(amount > 0, "Transfer amount must be greater than zero");
        require(tradingEnabled || _msgSender() == owner(), "Trading is disabled");

        if (tradingEnabled) {
            // Set launch block on first buy only
            if (launchBlock == 0 && liquidityPairs[sender]) {
                launchBlock = block.number;
            }

            // Detect snipers in the early blocks
            if (block.number <= launchBlock + sniperBlockWindow && liquidityPairs[sender]) {
                isSniper[recipient] = true;
            }

            // Block sniper transfers
            require(!isSniper[sender] && !isSniper[recipient], "Sniper detected");
        }

        if (sender == owner() || recipient == owner() || 
            isExemptFromLimits[sender] || isExemptFromLimits[recipient]) {
            // Exempt transactions from limits
            _standardTransfer(sender, recipient, amount);
            return;
        }

        // Apply transaction limits
        uint256 currentMaxTxAmount = getCurrentMaxTransactionAmount();
        require(amount <= currentMaxTxAmount, "Transfer amount exceeds max transaction limit");

        // Apply wallet limits (except for liquidity pairs)
        if (!liquidityPairs[recipient]) {
            uint256 currentMaxWallet = getCurrentMaxWalletAmount();
            uint256 recipientBalance = balanceOf(recipient);
            require(recipientBalance + amount <= currentMaxWallet, "Max wallet amount exceeded");
        }

        // Anti-bot cooldown check on buys and sells
        bool isBuy = liquidityPairs[sender];
        bool isSell = liquidityPairs[recipient];
        
        if (isBuy || isSell) {
            // Check cooldown period for sender (for sells) and recipient (for buys)
            address trader = isBuy ? recipient : sender;
            
            // Skip check for exempt addresses
            if (!isExemptFromLimits[trader]) {
                uint256 lastTrade = _lastTradingTime[trader];
                require(block.timestamp >= lastTrade + tradingCooldown || lastTrade == 0, 
                        "Trading cooldown period not yet passed");
                
                // Update last trading time
                _lastTradingTime[trader] = block.timestamp;
            }
        }

        _standardTransfer(sender, recipient, amount);
    }

    function _standardTransfer(address sender, address recipient, uint256 amount) private {
        bool isBuy = liquidityPairs[sender];  
        bool isSell = liquidityPairs[recipient];

        uint256 contractTokenBalance = balanceOf(address(this));
        bool canSwap = contractTokenBalance >= taxThreshold;
        
        // Flag to track if we should swap in this transaction
        bool shouldSwap = canSwap && isSell && !swapping 
                        && !isExemptFromLimits[sender] && !isExemptFromLimits[recipient];

        if (shouldSwap && isPancakeSwapEnable) {
            swapping = true;  // Set flag
            swapTokensAndDistribute();  // Call swap function
            swapping = false; // Reset flag AFTER the swap completes
        }                

        uint256 fee = 0;

        // Calculate and collect fee
        if (isBuy || isSell) {
            if (!isExemptFromLimits[sender] && !isExemptFromLimits[recipient]) {
                fee = _calculateTax(amount, Tax);
                _update(sender, address(this), fee);
                amount -= fee;
            }
        }
        // Update main transfer balances
        _update(sender, recipient, amount);

    }

    function _calculateTax(uint256 amount, uint256 taxPercentage) private pure returns (uint256) {
        return (amount * taxPercentage) / 10000;
    }

    function initializeLaunchBlock() external onlyOwner {
        require(launchBlock == 0, "Already initialized");
        launchBlock = block.number;
        emit LaunchBlockInitialized(launchBlock);
    }

    function _createLiquidityPair(address token) private {
        address pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), token);
        liquidityPairs[pair] = true;
    }

    function createLiquidityPair(address token) external onlyOwner {
        _createLiquidityPair(token);
    }
    
    function recoverStuckTokens(address token, uint256 amount) external onlyOwner nonReentrant {
        require(token != address(0), "Invalid token address");
        require(amount > 0, "Amount must be greater than zero");
        bool success = IERC20(token).transfer(owner(), amount);
        require(success, "Token transfer failed");
    }

    function recoverStuckETH(uint256 amount) external onlyOwner nonReentrant {
        require(amount > 0 && address(this).balance >= amount, "Invalid amount");
        payable(owner()).transfer(amount);
    }

    function updateTax(uint256 newTax) external onlyOwner {
        require(newTax <= 1000, "Tax too high"); // Max 10%
        Tax = newTax;
        emit TaxUpdated(newTax);
    }

    function isDynamicLimitsEnabled() external view returns (bool) {
        return dynamicLimitsEnabled;
    }

    function areAllLimitsDisabled() external view returns (bool) {
        return limitsDisabled;
    }

    receive() external payable {}
    fallback() external payable {}
}

Read Contract

Tax 0x6ea405d3 → uint256
airdropWallet 0xa14779c9 → address
allowance 0xdd62ed3e → uint256
areAllLimitsDisabled 0x1f3f8d33 → bool
balanceOf 0x70a08231 → uint256
buybackWallet 0xdeab8aea → address
charityWallet 0x7b208769 → address
contractLaunchTime 0x50e8e512 → uint256
decimals 0x313ce567 → uint8
dynamicLimitsEnabled 0x3a03c07e → bool
getCurrentMaxTransactionAmount 0xab80904f → uint256
getCurrentMaxWalletAmount 0xae3dcf26 → uint256
isDynamicLimitsEnabled 0xbdc30316 → bool
isExemptFromLimits 0xcd2c6a99 → bool
isPancakeSwapEnable 0xdd4698d0 → bool
isSniper 0x0f3a325f → bool
launchBlock 0xd00efb2f → uint256
limitsDisabled 0x38eac85d → bool
liquidityPairs 0x2fa62740 → bool
maxTransactionAmount 0xc8c8ebe4 → uint256
maxWalletAmount 0xaa4bde28 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
sniperBlockWindow 0x890aceb2 → uint256
symbol 0x95d89b41 → string
taxThreshold 0x77d1440d → uint256
teamWallet 0x59927044 → address
totalSupply 0x18160ddd → uint256
tradingCooldown 0x34b7f7ae → uint256
tradingEnabled 0x4ada218b → bool
uniswapV2Router 0x1694505e → address

Write Contract 20 functions

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

approve 0x095ea7b3
address spender
uint256 value
returns: bool
createLiquidityPair 0x98e122fd
address token
disableLimits 0xf928364c
No parameters
initializeLaunchBlock 0xc3623b20
No parameters
manualSwap 0x51bc3c85
No parameters
recoverStuckETH 0xad75e489
uint256 amount
recoverStuckTokens 0xc596f3fe
address token
uint256 amount
removeSniperAddress 0xa7ab56af
address account
renounceOwnership 0x715018a6
No parameters
setDynamicLimits 0x89947bfd
bool enabled
setExemptFromLimits 0xa13d1a2b
address account
bool exempt
setMaxWalletAmount 0x27a14fc2
uint256 amount
setTaxThreshold 0x07a212be
uint256 threshold
setTradingCooldown 0x4234c60b
uint256 time
togglePancakeSwap 0xcd34c0c2
No parameters
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
updateTax 0xcca0feb6
uint256 newTax
updateWallet 0xd576e972
uint8 _walletType
address _wallet

Recent Transactions

No transactions found for this address