Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x2A82AA959f93A33Ba1CEE20DEe63Ac16d12373D9
Balance 0 ETH
Nonce 1
Code Size 13972 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

13972 bytes
0x608060405260043610610169575f3560e01c80638da5cb5b116100d0578063c1809db111610089578063dd62ed3e11610063578063dd62ed3e1461053a578063ec8db81714610576578063f2fde38b1461058c578063f5e0a374146105b457610170565b8063c1809db11461049a578063d871b0e3146104c2578063dbd94267146104fe57610170565b80638da5cb5b1461037e57806395d89b41146103a8578063a457c2d7146103d2578063a9059cbb1461040e578063aa69a8c51461044a578063bd6af9e41461047257610170565b806323b872dd1161012257806323b872dd14610280578063313ce567146102bc57806339509351146102e65780636de9f32b1461032257806370a082311461032c578063715018a61461036857610170565b806306fdde0314610174578063095ea7b31461019e578063165f2efe146101da57806316ee41b51461020257806318160ddd1461022c5780631e84c4131461025657610170565b3661017057005b5f80fd5b34801561017f575f80fd5b506101886105dc565b604051610195919061234d565b60405180910390f35b3480156101a9575f80fd5b506101c460048036038101906101bf919061240b565b61066c565b6040516101d19190612463565b60405180910390f35b3480156101e5575f80fd5b5061020060048036038101906101fb919061247c565b610689565b005b34801561020d575f80fd5b50610216610a3a565b60405161022391906124db565b60405180910390f35b348015610237575f80fd5b50610240610a5f565b60405161024d9190612503565b60405180910390f35b348015610261575f80fd5b5061026a610a68565b6040516102779190612463565b60405180910390f35b34801561028b575f80fd5b506102a660048036038101906102a1919061251c565b610a7a565b6040516102b39190612463565b60405180910390f35b3480156102c7575f80fd5b506102d0610b94565b6040516102dd9190612587565b60405180910390f35b3480156102f1575f80fd5b5061030c6004803603810190610307919061240b565b610b9c565b6040516103199190612463565b60405180910390f35b61032a610c43565b005b348015610337575f80fd5b50610352600480360381019061034d91906125a0565b610ec4565b60405161035f9190612503565b60405180910390f35b348015610373575f80fd5b5061037c610f09565b005b348015610389575f80fd5b5061039261105c565b60405161039f91906124db565b60405180910390f35b3480156103b3575f80fd5b506103bc611084565b6040516103c9919061234d565b60405180910390f35b3480156103dd575f80fd5b506103f860048036038101906103f3919061240b565b611114565b6040516104059190612463565b60405180910390f35b348015610419575f80fd5b50610434600480360381019061042f919061240b565b6111fa565b6040516104419190612463565b60405180910390f35b348015610455575f80fd5b50610470600480360381019061046b91906125a0565b611217565b005b34801561047d575f80fd5b50610498600480360381019061049391906125a0565b61135e565b005b3480156104a5575f80fd5b506104c060048036038101906104bb91906125a0565b61144b565b005b3480156104cd575f80fd5b506104e860048036038101906104e391906125a0565b611539565b6040516104f59190612503565b60405180910390f35b348015610509575f80fd5b50610524600480360381019061051f91906125a0565b61157f565b6040516105319190612463565b60405180910390f35b348015610545575f80fd5b50610560600480360381019061055b91906125cb565b61159c565b60405161056d9190612503565b60405180910390f35b348015610581575f80fd5b5061058a61161e565b005b348015610597575f80fd5b506105b260048036038101906105ad91906125a0565b61171d565b005b3480156105bf575f80fd5b506105da60048036038101906105d59190612749565b6118df565b005b6060600380546105eb906127d0565b80601f0160208091040260200160405190810160405280929190818152602001828054610617906127d0565b80156106625780601f1061063957610100808354040283529160200191610662565b820191905f5260205f20905b81548152906001019060200180831161064557829003601f168201915b5050505050905090565b5f61067f610678611a2c565b8484611a33565b6001905092915050565b610691611a2c565b73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107169061284a565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361078d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610784906128b2565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108b15747821115610803576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107fa9061291a565b60405180910390fd5b5f8173ffffffffffffffffffffffffffffffffffffffff168360405161082890612965565b5f6040518083038185875af1925050503d805f8114610862576040519150601f19603f3d011682016040523d82523d5f602084013e610867565b606091505b50509050806108ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108a2906129c3565b60405180910390fd5b50610a35565b5f8390505f8173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108ef91906124db565b602060405180830381865afa15801561090a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061092e91906129f5565b905080841115610973576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096a90612a6a565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85876040518363ffffffff1660e01b81526004016109af929190612a88565b6020604051808303815f875af11580156109cb573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109ef9190612ad9565b905080610a31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a2890612b4e565b60405180910390fd5b5050505b505050565b600d5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f600254905090565b60075f9054906101000a900460ff1681565b5f8060015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f610ac2611a2c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610b7d5782811015610b68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5f90612bdc565b60405180910390fd5b610b7c85610b74611a2c565b858403611a33565b5b610b88858585611bf6565b60019150509392505050565b5f6012905090565b5f610c39610ba8611a2c565b848460015f610bb5611a2c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610c349190612c27565b611a33565b6001905092915050565b60075f9054906101000a900460ff16610c91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8890612ca4565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff16610cb061105c565b73ffffffffffffffffffffffffffffffffffffffff1603610d06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfd90612d32565b60405180910390fd5b67016345785d8a0000341015610d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4890612d9a565b60405180910390fd5b5f67016345785d8a000060065434610d699190612db8565b610d739190612e26565b90505f30905081610d8382610ec4565b1015610dc4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dbb90612ec6565b60405180910390fd5b610dcf813384611cd5565b3460085f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610e189190612c27565b60085f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550610e6233611f4a565b600e5f815480929190610e7490612ee4565b9190505550343373ffffffffffffffffffffffffffffffffffffffff16600e547f5c8e94c72da12a6d6a1213edafd788896df5fd2d6527a9adeb11f8e5d0be1c4c60405160405180910390a45050565b5f805f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610f11611a2c565b73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f969061284a565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35f60055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054611093906127d0565b80601f01602080910402602001604051908101604052809291908181526020018280546110bf906127d0565b801561110a5780601f106110e15761010080835404028352916020019161110a565b820191905f5260205f20905b8154815290600101906020018083116110ed57829003601f168201915b5050505050905090565b5f8060015f611121611a2c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050828110156111db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111d290612f9b565b60405180910390fd5b6111ef6111e6611a2c565b85858403611a33565b600191505092915050565b5f61120d611206611a2c565b8484611bf6565b6001905092915050565b61121f611a2c565b73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a49061284a565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361131b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131290613003565b60405180910390fd5b80600d5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611366611a2c565b73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113eb9061284a565b60405180910390fd5b5f60095f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555050565b611453611a2c565b73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d89061284a565b60405180910390fd5b600160095f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555050565b5f60085f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b6009602052805f5260405f205f915054906101000a900460ff1681565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b611626611a2c565b73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ab9061284a565b60405180910390fd5b60075f9054906101000a900460ff16611702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f990612ca4565b60405180910390fd5b5f60075f6101000a81548160ff021916908315150217905550565b611725611a2c565b73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117aa9061284a565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611821576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181890613091565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a38060055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6118e7611a2c565b73ffffffffffffffffffffffffffffffffffffffff1660055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611975576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196c9061284a565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff1661199461105c565b73ffffffffffffffffffffffffffffffffffffffff16036119ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e190612d32565b60405180910390fd5b5f5b8251811015611a2757611a1a30848381518110611a0c57611a0b6130af565b5b602002602001015184611cd5565b80806001019150506119ec565b505050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611aa1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a989061314c565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611b0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b06906131da565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611be99190612503565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611c64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c5b90613268565b60405180910390fd5b611c6d82612241565b15611cad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca49061331c565b60405180910390fd5b5f8103611cc457611cbf83835f611cd5565b611cd0565b611ccf838383611cd5565b5b505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611d43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3a90613268565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611db1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da8906133aa565b60405180910390fd5b611dbc8383836122bc565b5f805f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015611e3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3690613438565b60405180910390fd5b8181035f808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550815f808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254611ecd9190612c27565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611f319190612503565b60405180910390a3611f448484846122c1565b50505050565b5f8060085f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490505f600190505b60048160ff1611612044575f600a600183611fad9190613456565b60ff1681548110611fc157611fc06130af565b5b905f5260205f20015490505f611fd5610b94565b600a611fe191906135b9565b600b600185611ff09190613456565b60ff1681548110612004576120036130af565b5b905f5260205f2001546120179190612db8565b90508184106120285780945061202f565b5050612044565b5050808061203c90613603565b915050611f92565b505f600c5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508083111561223b575f818461209b919061362b565b905083600c5f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055505f73ffffffffffffffffffffffffffffffffffffffff16600d5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146121ff57600d5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166307420a4186836040518363ffffffff1660e01b815260040161218f929190612a88565b5f604051808303815f87803b1580156121a6575f80fd5b505af19250505080156121b7575060015b6121f9577f049e2c1190c30b3fec47c8e9e33f6a6dd929bc61329111d628b943baaa44552185826040516121ec929190612a88565b60405180910390a16121fa565b5b612239565b7f049e2c1190c30b3fec47c8e9e33f6a6dd929bc61329111d628b943baaa4455218582604051612230929190612a88565b60405180910390a15b505b50505050565b5f61224b826122c6565b80156122b5575060095f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff161580156122b4575060075f9054906101000a900460ff165b5b9050919050565b505050565b505050565b5f80823b90505f8163ffffffff1611915050919050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61231f826122dd565b61232981856122e7565b93506123398185602086016122f7565b61234281612305565b840191505092915050565b5f6020820190508181035f8301526123658184612315565b905092915050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6123a78261237e565b9050919050565b6123b78161239d565b81146123c1575f80fd5b50565b5f813590506123d2816123ae565b92915050565b5f819050919050565b6123ea816123d8565b81146123f4575f80fd5b50565b5f81359050612405816123e1565b92915050565b5f806040838503121561242157612420612376565b5b5f61242e858286016123c4565b925050602061243f858286016123f7565b9150509250929050565b5f8115159050919050565b61245d81612449565b82525050565b5f6020820190506124765f830184612454565b92915050565b5f805f6060848603121561249357612492612376565b5b5f6124a0868287016123c4565b93505060206124b1868287016123f7565b92505060406124c2868287016123c4565b9150509250925092565b6124d58161239d565b82525050565b5f6020820190506124ee5f8301846124cc565b92915050565b6124fd816123d8565b82525050565b5f6020820190506125165f8301846124f4565b92915050565b5f805f6060848603121561253357612532612376565b5b5f612540868287016123c4565b9350506020612551868287016123c4565b9250506040612562868287016123f7565b9150509250925092565b5f60ff82169050919050565b6125818161256c565b82525050565b5f60208201905061259a5f830184612578565b92915050565b5f602082840312156125b5576125b4612376565b5b5f6125c2848285016123c4565b91505092915050565b5f80604083850312156125e1576125e0612376565b5b5f6125ee858286016123c4565b92505060206125ff858286016123c4565b9150509250929050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61264382612305565b810181811067ffffffffffffffff821117156126625761266161260d565b5b80604052505050565b5f61267461236d565b9050612680828261263a565b919050565b5f67ffffffffffffffff82111561269f5761269e61260d565b5b602082029050602081019050919050565b5f80fd5b5f6126c66126c184612685565b61266b565b905080838252602082019050602084028301858111156126e9576126e86126b0565b5b835b8181101561271257806126fe88826123c4565b8452602084019350506020810190506126eb565b5050509392505050565b5f82601f8301126127305761272f612609565b5b81356127408482602086016126b4565b91505092915050565b5f806040838503121561275f5761275e612376565b5b5f83013567ffffffffffffffff81111561277c5761277b61237a565b5b6127888582860161271c565b9250506020612799858286016123f7565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806127e757607f821691505b6020821081036127fa576127f96127a3565b5b50919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6128346020836122e7565b915061283f82612800565b602082019050919050565b5f6020820190508181035f83015261286181612828565b9050919050565b7f496e76616c696420726563697069656e742061646472657373000000000000005f82015250565b5f61289c6019836122e7565b91506128a782612868565b602082019050919050565b5f6020820190508181035f8301526128c981612890565b9050919050565b7f496e73756666696369656e7420636f6e74726163742062616c616e63650000005f82015250565b5f612904601d836122e7565b915061290f826128d0565b602082019050919050565b5f6020820190508181035f830152612931816128f8565b9050919050565b5f81905092915050565b50565b5f6129505f83612938565b915061295b82612942565b5f82019050919050565b5f61296f82612945565b9150819050919050565b7f455448207472616e73666572206661696c6564000000000000000000000000005f82015250565b5f6129ad6013836122e7565b91506129b882612979565b602082019050919050565b5f6020820190508181035f8301526129da816129a1565b9050919050565b5f815190506129ef816123e1565b92915050565b5f60208284031215612a0a57612a09612376565b5b5f612a17848285016129e1565b91505092915050565b7f496e73756666696369656e742062616c616e636520696e20636f6e74726163745f82015250565b5f612a546020836122e7565b9150612a5f82612a20565b602082019050919050565b5f6020820190508181035f830152612a8181612a48565b9050919050565b5f604082019050612a9b5f8301856124cc565b612aa860208301846124f4565b9392505050565b612ab881612449565b8114612ac2575f80fd5b50565b5f81519050612ad381612aaf565b92915050565b5f60208284031215612aee57612aed612376565b5b5f612afb84828501612ac5565b91505092915050565b7f546f6b656e207472616e73666572206661696c656400000000000000000000005f82015250565b5f612b386015836122e7565b9150612b4382612b04565b602082019050919050565b5f6020820190508181035f830152612b6581612b2c565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320615f8201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b5f612bc66028836122e7565b9150612bd182612b6c565b604082019050919050565b5f6020820190508181035f830152612bf381612bba565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612c31826123d8565b9150612c3c836123d8565b9250828201905080821115612c5457612c53612bfa565b5b92915050565b7f5075626c69632073616c652068617320656e64656400000000000000000000005f82015250565b5f612c8e6015836122e7565b9150612c9982612c5a565b602082019050919050565b5f6020820190508181035f830152612cbb81612c82565b9050919050565b7f4f776e65722061646472657373206973207a65726f2c206f7065726174696f6e5f8201527f206e6f7420616c6c6f7765640000000000000000000000000000000000000000602082015250565b5f612d1c602c836122e7565b9150612d2782612cc2565b604082019050919050565b5f6020820190508181035f830152612d4981612d10565b9050919050565b7f496e73756666696369656e74204554482073656e7400000000000000000000005f82015250565b5f612d846015836122e7565b9150612d8f82612d50565b602082019050919050565b5f6020820190508181035f830152612db181612d78565b9050919050565b5f612dc2826123d8565b9150612dcd836123d8565b9250828202612ddb816123d8565b91508282048414831517612df257612df1612bfa565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f612e30826123d8565b9150612e3b836123d8565b925082612e4b57612e4a612df9565b5b828204905092915050565b7f4f776e657220646f6573206e6f74206861766520656e6f75676820746f6b656e5f8201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b5f612eb06021836122e7565b9150612ebb82612e56565b604082019050919050565b5f6020820190508181035f830152612edd81612ea4565b9050919050565b5f612eee826123d8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612f2057612f1f612bfa565b5b600182019050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f775f8201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b5f612f856025836122e7565b9150612f9082612f2b565b604082019050919050565b5f6020820190508181035f830152612fb281612f79565b9050919050565b7f496e76616c69642065636f2066756e64206164647265737300000000000000005f82015250565b5f612fed6018836122e7565b9150612ff882612fb9565b602082019050919050565b5f6020820190508181035f83015261301a81612fe1565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61307b6026836122e7565b915061308682613021565b604082019050919050565b5f6020820190508181035f8301526130a88161306f565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f45524332303a20617070726f76652066726f6d20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f6131366024836122e7565b9150613141826130dc565b604082019050919050565b5f6020820190508181035f8301526131638161312a565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f2061646472655f8201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b5f6131c46022836122e7565b91506131cf8261316a565b604082019050919050565b5f6020820190508181035f8301526131f1816131b8565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f2061645f8201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b5f6132526025836122e7565b915061325d826131f8565b604082019050919050565b5f6020820190508181035f83015261327f81613246565b9050919050565b7f4f6e6c792077686974656c6973746564206164647265737365732063616e20615f8201527f6464206c6971756964697479206265666f7265207075626c69632073616c652060208201527f656e64732e000000000000000000000000000000000000000000000000000000604082015250565b5f6133066045836122e7565b915061331182613286565b606082019050919050565b5f6020820190508181035f830152613333816132fa565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f20616464725f8201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b5f6133946023836122e7565b915061339f8261333a565b604082019050919050565b5f6020820190508181035f8301526133c181613388565b9050919050565b7f45524332303a207472616e7366657220616d6f756e74206578636565647320625f8201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b5f6134226026836122e7565b915061342d826133c8565b604082019050919050565b5f6020820190508181035f83015261344f81613416565b9050919050565b5f6134608261256c565b915061346b8361256c565b9250828203905060ff81111561348457613483612bfa565b5b92915050565b5f8160011c9050919050565b5f808291508390505b60018511156134df578086048111156134bb576134ba612bfa565b5b60018516156134ca5780820291505b80810290506134d88561348a565b945061349f565b94509492505050565b5f826134f757600190506135b2565b81613504575f90506135b2565b816001811461351a576002811461352457613553565b60019150506135b2565b60ff84111561353657613535612bfa565b5b8360020a91508482111561354d5761354c612bfa565b5b506135b2565b5060208310610133831016604e8410600b84101617156135885782820a90508381111561358357613582612bfa565b5b6135b2565b6135958484846001613496565b925090508184048111156135ac576135ab612bfa565b5b81810290505b9392505050565b5f6135c3826123d8565b91506135ce8361256c565b92506135fb7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84846134e8565b905092915050565b5f61360d8261256c565b915060ff82036136205761361f612bfa565b5b600182019050919050565b5f613635826123d8565b9150613640836123d8565b925082820390508181111561365857613657612bfa565b5b9291505056fea2646970667358221220310a26c3a2d6ed703fcb292bf5f1bbd78e62e2e78b65f8a400273de7f1b8a0f764736f6c634300081a0033

Verified Source Code Partial Match

Compiler: v0.8.26+commit.8a97fa7a EVM: cancun Optimization: No
AgentNet.sol 408 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);
   
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

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 Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

abstract contract Ownable is Context {
    address private _owner;

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

    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    function owner() public view returns (address) {
        return _owner;
    }

    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) internal _balances;
    mapping(address => mapping(address => 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 override returns (string memory) {
        return _name;
    }

    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        uint256 currentAllowance = _allowances[sender][_msgSender()];
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
            unchecked {
                _approve(sender, _msgSender(), currentAllowance - amount);
            }
        }

        _transfer(sender, recipient, amount);

        return true;
    }

    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /*
    * @notice Creates new tokens and adds them to the specified account.
    * @dev The function creates a specified amount of tokens and adds them to the specified account, increasing the total supply accordingly.
    * @param account The account to which the tokens will be minted.
    * @param amount The amount of tokens to be minted.
    * @return It emits a Transfer event indicating the minting of tokens from the zero address to the specified account.
    */ 
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /*
    * @notice Burns a specific amount of tokens from the specified account.
    * @dev The function reduces the balance of the specified account by the specified amount and decreases the total supply accordingly.
    * @param account The account from which the tokens will be burned.
    * @param amount The amount of tokens to be burned.
    * @return It emits a Transfer event indicating the burning of tokens from the account to the zero address.
    */ 
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }


    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");
        

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /*
    * @notice Hook that is called before transferring tokens.
    * @dev This function is called before transferring tokens from one account to another.
    * @param from The account from which the tokens are being transferred.
    * @param to The account to which the tokens are being transferred.
    * @param amount The amount of tokens being transferred.
    */ 
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}


interface IEcoFund {
    function sendReward(address user, uint256 amount) external;
}

contract AgentNet is ERC20, Ownable {
    uint256 private  baseMintRate = 20000 * 10**uint256(decimals());
    uint256 private constant minContribution = 0.1 ether;
    bool public isPublicSaleActive = true;
    mapping(address => uint256) private userTotalContributions; 
    mapping(address => bool) public liquidityProviders;
    uint256[] private contributionMilestones = [5 ether, 15 ether, 25 ether, 40 ether]; 
    uint256[] private milestoneRewards = [50000, 210000, 500000, 1200000];
    mapping(address => uint256) private userClaimedMilestoneRewards; 
    address public ecoFundContract;
    uint256 private mintEventCounter; 
    
    event RewardDistributionFailed(address user, uint256 amount);
    event TokensMinted(uint256 indexed  eventId, address indexed  sender, uint256 indexed  value);


    constructor () ERC20("AgentNet", "AGT") 
    {   
        _mint(address(this), 1e9 * (10 ** decimals()));
       mintEventCounter = 0; 
    }

    receive() external payable {}


    function tokensMinted() external payable {
        require(isPublicSaleActive, "Public sale has ended");
        require(owner() != address(0), "Owner address is zero, operation not allowed");
        require(msg.value >= minContribution, "Insufficient ETH sent");

        // Dynamically calculate the number of tokens a user deserves
        uint256 mintQuantity = (msg.value * baseMintRate) / minContribution;
        address contractAddress = address(this);
        require(balanceOf(contractAddress) >= mintQuantity, "Owner does not have enough tokens");
        // Transfer tokens from owner to user
        super._transfer(contractAddress, msg.sender, mintQuantity);

        // Update the user's cumulative deposit amount
        userTotalContributions[msg.sender] = userTotalContributions[msg.sender] + msg.value;
        // Check whether the reward threshold is reached and issue the reward
        checkAndReward(msg.sender);
        mintEventCounter ++;
        emit TokensMinted(mintEventCounter, msg.sender, msg.value);
    }
    

    function checkAndReward(address user) internal {
        uint256 totalReward = 0;
        uint256 userDeposit = userTotalContributions[user];
        
        for (uint8 level = 1; level <= 4; level++) {
            uint256 threshold = contributionMilestones[level - 1];
            uint256 reward = milestoneRewards[level - 1] * (10**decimals());
            if (userDeposit >= threshold) {
                totalReward = reward;
            } else {
                break;
            }
        }

        uint256 claimedReward = userClaimedMilestoneRewards[user];

        if (totalReward > claimedReward) {
            uint256 rewardToSend = totalReward - claimedReward;
            userClaimedMilestoneRewards[user] = totalReward;

            if (ecoFundContract != address(0)) {
                try IEcoFund(ecoFundContract).sendReward(user, rewardToSend) {
                    // success, do nothing extra
                } catch {
                    emit RewardDistributionFailed(user, rewardToSend);
                }
            } else {
                emit RewardDistributionFailed(user, rewardToSend); 
            }
        }
    }

    function setEcoFundContract(address _ecoFundContract) external onlyOwner {
        require(_ecoFundContract != address(0), "Invalid eco fund address");
        ecoFundContract = _ecoFundContract;
    }

    function batchDistributeTokens(address[] memory recipients, uint256 amount) external onlyOwner{
        require(owner() != address(0), "Owner address is zero, operation not allowed");
        for (uint i = 0; i < recipients.length; i++) {
            super._transfer(address(this), recipients[i], amount);
        }
    }

    function disablePublicSale() external onlyOwner{
        require(isPublicSaleActive, "Public sale has ended");
        isPublicSaleActive = false;
    }


    function isAddressContract(address _addr) internal view returns (bool) {
        uint32 size;
        assembly {
            size := extcodesize(_addr)
        }
        return (size > 0);
    }


    function _transfer(address from,address to,uint256 amount) internal  override {
        require(from != address(0), "ERC20: transfer from the zero address");
        
         if (isUnauthorizedLiquidityAddition(to)) {
            revert("Only whitelisted addresses can add liquidity before public sale ends.");
        }

        if (amount == 0) {
            super._transfer(from, to, 0);
            return;
        }

        super._transfer(from, to, amount);
    }


    function isUnauthorizedLiquidityAddition(address to) internal view returns (bool) {
        return isAddressContract(to) && (!liquidityProviders[to] && isPublicSaleActive);
    }

    function addLiquidityProvider(address _addr) external onlyOwner {
        liquidityProviders[_addr] = true;
    }

    function removeLiquidityProvider(address _addr) external onlyOwner {
        liquidityProviders[_addr] = false;
    }
    
    function getUserTotalContribution(address user) external view returns (uint256) {
        return userTotalContributions[user];
    }

    function recoverStuckAssets(address tokenAddress, uint256 amount, address to) external onlyOwner {
        require(to != address(0), "Invalid recipient address");

        if (tokenAddress == address(0)) {
            require(amount <= address(this).balance, "Insufficient contract balance");
            (bool success, ) = payable(to).call{value: amount}("");
            require(success, "ETH transfer failed");
            return;
        }

        IERC20 token = IERC20(tokenAddress);
        uint256 contractBalance = token.balanceOf(address(this));

        require(amount <= contractBalance, "Insufficient balance in contract");

        bool tokenSuccess = token.transfer(to, amount);
        require(tokenSuccess, "Token transfer failed");
    }
}

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
ecoFundContract 0x16ee41b5 → address
getUserTotalContribution 0xd871b0e3 → uint256
isPublicSaleActive 0x1e84c413 → bool
liquidityProviders 0xdbd94267 → bool
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 14 functions

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

addLiquidityProvider 0xc1809db1
address _addr
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
batchDistributeTokens 0xf5e0a374
address[] recipients
uint256 amount
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
disablePublicSale 0xec8db817
No parameters
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
recoverStuckAssets 0x165f2efe
address tokenAddress
uint256 amount
address to
removeLiquidityProvider 0xbd6af9e4
address _addr
renounceOwnership 0x715018a6
No parameters
setEcoFundContract 0xaa69a8c5
address _ecoFundContract
tokensMinted 0x6de9f32b
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address