Address Contract Partially Verified
Address
0x453d06b68d99F8C92755cb23fFEFaa509a84782E
Balance
0 ETH
Nonce
1
Code Size
18698 bytes
Creator
0x2aF8ee73...eD80 at tx 0x978dc792...ab8281
Indexed Transactions
0
Contract Bytecode
18698 bytes
0x6080604052600436106102555760003560e01c80636c31723211610139578063a9059cbb116100b6578063dcc345f21161007a578063dcc345f2146108e3578063dd62ed3e1461090c578063e547be6914610949578063ea2f0b3714610972578063f2fde38b1461099b578063fdeb889f146109c45761025c565b8063a9059cbb146107e8578063afcf2fc414610825578063c0b0fda214610850578063caccd7f71461087b578063cba0e996146108a65761025c565b80638da5cb5b116100fd5780638da5cb5b14610701578063906e9dd01461072c57806395d89b4114610755578063a457c2d714610780578063a5ece941146107bd5761025c565b80636c3172321461063057806370a0823114610659578063715018a61461069657806379cc6790146106ad57806383ad7994146106d65761025c565b806339509351116101d25780634549b039116101965780634549b0391461051057806348de478e1461054d5780634bf2c7c9146105785780635342acb4146105a15780636049876e146105de578063625e764c146106075761025c565b8063395093511461042d57806340c10f191461046a57806340f8007a1461049357806342966c68146104be578063437823ec146104e75761025c565b806320c7c5961161021957806320c7c5961461034657806322976e0d1461036f57806323b872dd1461039a578063313ce567146103d757806332035504146104025761025c565b8063053ab1821461026157806306fdde031461028a578063095ea7b3146102b55780630c9be46d146102f257806318160ddd1461031b5761025c565b3661025c57005b600080fd5b34801561026d57600080fd5b50610288600480360381019061028391906139ed565b6109ed565b005b34801561029657600080fd5b5061029f610b51565b6040516102ac9190613aaa565b60405180910390f35b3480156102c157600080fd5b506102dc60048036038101906102d79190613b2a565b610be3565b6040516102e99190613b85565b60405180910390f35b3480156102fe57600080fd5b5061031960048036038101906103149190613ba0565b610c01565b005b34801561032757600080fd5b50610330610cc1565b60405161033d9190613bdc565b60405180910390f35b34801561035257600080fd5b5061036d600480360381019061036891906139ed565b610ccb565b005b34801561037b57600080fd5b50610384610d51565b6040516103919190613bdc565b60405180910390f35b3480156103a657600080fd5b506103c160048036038101906103bc9190613bf7565b610d57565b6040516103ce9190613b85565b60405180910390f35b3480156103e357600080fd5b506103ec610e4f565b6040516103f99190613c66565b60405180910390f35b34801561040e57600080fd5b50610417610e66565b6040516104249190613bdc565b60405180910390f35b34801561043957600080fd5b50610454600480360381019061044f9190613b2a565b610e70565b6040516104619190613b85565b60405180910390f35b34801561047657600080fd5b50610491600480360381019061048c9190613b2a565b610f1c565b005b34801561049f57600080fd5b506104a8610fa6565b6040516104b59190613bdc565b60405180910390f35b3480156104ca57600080fd5b506104e560048036038101906104e091906139ed565b610fac565b005b3480156104f357600080fd5b5061050e60048036038101906105099190613ba0565b610fc0565b005b34801561051c57600080fd5b5061053760048036038101906105329190613cad565b611097565b6040516105449190613bdc565b60405180910390f35b34801561055957600080fd5b50610562611117565b60405161056f9190613bdc565b60405180910390f35b34801561058457600080fd5b5061059f600480360381019061059a91906139ed565b61111d565b005b3480156105ad57600080fd5b506105c860048036038101906105c39190613ba0565b6111a3565b6040516105d59190613b85565b60405180910390f35b3480156105ea57600080fd5b5061060560048036038101906106009190613ba0565b6111f9565b005b34801561061357600080fd5b5061062e600480360381019061062991906139ed565b611494565b005b34801561063c57600080fd5b50610657600480360381019061065291906139ed565b61151a565b005b34801561066557600080fd5b50610680600480360381019061067b9190613ba0565b6115a0565b60405161068d9190613bdc565b60405180910390f35b3480156106a257600080fd5b506106ab61168b565b005b3480156106b957600080fd5b506106d460048036038101906106cf9190613b2a565b611713565b005b3480156106e257600080fd5b506106eb61178e565b6040516106f89190613bdc565b60405180910390f35b34801561070d57600080fd5b50610716611798565b6040516107239190613cfc565b60405180910390f35b34801561073857600080fd5b50610753600480360381019061074e9190613ba0565b6117c2565b005b34801561076157600080fd5b5061076a611882565b6040516107779190613aaa565b60405180910390f35b34801561078c57600080fd5b506107a760048036038101906107a29190613b2a565b611914565b6040516107b49190613b85565b60405180910390f35b3480156107c957600080fd5b506107d26119ff565b6040516107df9190613cfc565b60405180910390f35b3480156107f457600080fd5b5061080f600480360381019061080a9190613b2a565b611a25565b60405161081c9190613b85565b60405180910390f35b34801561083157600080fd5b5061083a611a43565b6040516108479190613cfc565b60405180910390f35b34801561085c57600080fd5b50610865611a69565b6040516108729190613bdc565b60405180910390f35b34801561088757600080fd5b50610890611a6f565b60405161089d9190613cfc565b60405180910390f35b3480156108b257600080fd5b506108cd60048036038101906108c89190613ba0565b611a95565b6040516108da9190613b85565b60405180910390f35b3480156108ef57600080fd5b5061090a60048036038101906109059190613ba0565b611aeb565b005b34801561091857600080fd5b50610933600480360381019061092e9190613d17565b611bab565b6040516109409190613bdc565b60405180910390f35b34801561095557600080fd5b50610970600480360381019061096b91906139ed565b611c32565b005b34801561097e57600080fd5b5061099960048036038101906109949190613ba0565b611cb8565b005b3480156109a757600080fd5b506109c260048036038101906109bd9190613ba0565b611d8f565b005b3480156109d057600080fd5b506109eb60048036038101906109e69190613ba0565b611e86565b005b60006109f76121b5565b9050600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7d90613dc9565b60405180910390fd5b6000610a91836121bd565b505050905080600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ae19190613e18565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600d54610b329190613e18565b600d8190555082600e54610b469190613e4c565b600e81905550505050565b606060038054610b6090613eaf565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8c90613eaf565b8015610bd95780601f10610bae57610100808354040283529160200191610bd9565b820191906000526020600020905b815481529060010190602001808311610bbc57829003601f168201915b5050505050905090565b6000610bf7610bf06121b5565b8484612224565b6001905092915050565b610c096121b5565b73ffffffffffffffffffffffffffffffffffffffff16610c27611798565b73ffffffffffffffffffffffffffffffffffffffff1614610c7d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7490613f2c565b60405180910390fd5b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600c54905090565b610cd36121b5565b73ffffffffffffffffffffffffffffffffffffffff16610cf1611798565b73ffffffffffffffffffffffffffffffffffffffff1614610d47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3e90613f2c565b60405180910390fd5b80601a8190555050565b60165481565b6000610d648484846123ed565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610daf6121b5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610e2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2690613fbe565b60405180910390fd5b610e4385610e3b6121b5565b858403612224565b60019150509392505050565b6000600b60009054906101000a900460ff16905090565b6000600e54905090565b6000610f12610e7d6121b5565b848460016000610e8b6121b5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f0d9190613e4c565b612224565b6001905092915050565b610f246121b5565b73ffffffffffffffffffffffffffffffffffffffff16610f42611798565b73ffffffffffffffffffffffffffffffffffffffff1614610f98576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8f90613f2c565b60405180910390fd5b610fa282826125ea565b5050565b601a5481565b610fbd610fb76121b5565b82612890565b50565b610fc86121b5565b73ffffffffffffffffffffffffffffffffffffffff16610fe6611798565b73ffffffffffffffffffffffffffffffffffffffff161461103c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103390613f2c565b60405180910390fd5b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600c548311156110de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d59061402a565b60405180910390fd5b816110fc5760006110ee846121bd565b505050905080915050611111565b6000611107846121bd565b5050915050809150505b92915050565b60185481565b6111256121b5565b73ffffffffffffffffffffffffffffffffffffffff16611143611798565b73ffffffffffffffffffffffffffffffffffffffff1614611199576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119090613f2c565b60405180910390fd5b8060148190555050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6112016121b5565b73ffffffffffffffffffffffffffffffffffffffff1661121f611798565b73ffffffffffffffffffffffffffffffffffffffff1614611275576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161126c90613f2c565b60405180910390fd5b600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611302576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f990614096565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411156113d657611392600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b87565b600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6001600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61149c6121b5565b73ffffffffffffffffffffffffffffffffffffffff166114ba611798565b73ffffffffffffffffffffffffffffffffffffffff1614611510576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150790613f2c565b60405180910390fd5b8060168190555050565b6115226121b5565b73ffffffffffffffffffffffffffffffffffffffff16611540611798565b73ffffffffffffffffffffffffffffffffffffffff1614611596576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158d90613f2c565b60405180910390fd5b8060188190555050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561163b57600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050611686565b611683600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b87565b90505b919050565b6116936121b5565b73ffffffffffffffffffffffffffffffffffffffff166116b1611798565b73ffffffffffffffffffffffffffffffffffffffff1614611707576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116fe90613f2c565b60405180910390fd5b6117116000612bee565b565b6000611726836117216121b5565b611bab565b90508181101561176b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176290614128565b60405180910390fd5b61177f836117776121b5565b848403612224565b6117898383612890565b505050565b6000601254905090565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6117ca6121b5565b73ffffffffffffffffffffffffffffffffffffffff166117e8611798565b73ffffffffffffffffffffffffffffffffffffffff161461183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613f2c565b60405180910390fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606004805461189190613eaf565b80601f01602080910402602001604051908101604052809291908181526020018280546118bd90613eaf565b801561190a5780601f106118df5761010080835404028352916020019161190a565b820191906000526020600020905b8154815290600101906020018083116118ed57829003601f168201915b5050505050905090565b600080600160006119236121b5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156119e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d7906141ba565b60405180910390fd5b6119f46119eb6121b5565b85858403612224565b600191505092915050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611a39611a326121b5565b84846123ed565b6001905092915050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60145481565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b611af36121b5565b73ffffffffffffffffffffffffffffffffffffffff16611b11611798565b73ffffffffffffffffffffffffffffffffffffffff1614611b67576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5e90613f2c565b60405180910390fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611c3a6121b5565b73ffffffffffffffffffffffffffffffffffffffff16611c58611798565b73ffffffffffffffffffffffffffffffffffffffff1614611cae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca590613f2c565b60405180910390fd5b8060128190555050565b611cc06121b5565b73ffffffffffffffffffffffffffffffffffffffff16611cde611798565b73ffffffffffffffffffffffffffffffffffffffff1614611d34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d2b90613f2c565b60405180910390fd5b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b611d976121b5565b73ffffffffffffffffffffffffffffffffffffffff16611db5611798565b73ffffffffffffffffffffffffffffffffffffffff1614611e0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0290613f2c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611e7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e719061424c565b60405180910390fd5b611e8381612bee565b50565b611e8e6121b5565b73ffffffffffffffffffffffffffffffffffffffff16611eac611798565b73ffffffffffffffffffffffffffffffffffffffff1614611f02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ef990613f2c565b60405180910390fd5b600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611f8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f85906142b8565b60405180910390fd5b60005b600a805490508110156121b1578173ffffffffffffffffffffffffffffffffffffffff16600a8281548110611fc957611fc86142d8565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16036121a457600a6001600a805490506120239190613e18565b81548110612034576120336142d8565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600a8281548110612073576120726142d8565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600a80548061216a57612169614307565b5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590556121b1565b8080600101915050611f91565b5050565b600033905090565b60008060008060006121ce86612cb4565b9050600081876121de9190613e18565b905060006121ea612d16565b9050600081836121fa9190614336565b90506000828a61220a9190614336565b905080828585985098509850985050505050509193509193565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603612293576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228a906143ea565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612302576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f99061447c565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516123e09190613bdc565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361245c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124539061450e565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036124cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c2906145a0565b60405180910390fd5b60006124d6846115a0565b90508181101561251b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161251290614632565b60405180910390fd5b612526848484612d3a565b600060019050600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806125cd5750600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156125d757600090505b6125e385858584612d3f565b5050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612659576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126509061469e565b60405180910390fd5b61266560008383612d3a565b600061266f612d16565b90506000818361267f9190614336565b9050600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156127625782600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461271e9190613e4c565b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b80600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127ad9190613e4c565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082600c546127fe9190613e4c565b600c8190555080600d546128129190613e4c565b600d819055508373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128769190613bdc565b60405180910390a361288a60008585612d6c565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036128ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128f690614730565b60405180910390fd5b600061290a836115a0565b90508181101561294f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612946906147c2565b60405180910390fd5b61295b83600084612d3a565b6000612965612d16565b9050600081846129759190614336565b9050600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615612a585783600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a149190613e18565b600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b80600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612aa39190613e18565b600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555083600c54612af49190613e18565b600c8190555080600d54612b089190613e18565b600d81905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86604051612b6c9190613bdc565b60405180910390a3612b8085600086612d6c565b5050505050565b6000600d54821115612bce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bc590614854565b60405180910390fd5b6000612bd8612d16565b90508083612be691906148a3565b915050919050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080601a54601854601654601454601254612cd09190613e4c565b612cda9190613e4c565b612ce49190613e4c565b612cee9190613e4c565b9050600060648285612d009190614336565b612d0a91906148a3565b90508092505050919050565b6000806000612d23612d71565b915091508082612d3391906148a3565b9250505090565b505050565b80612d4d57612d4c613009565b5b612d588484846130a3565b80612d6657612d65613728565b5b50505050565b505050565b6000806000600d5490506000600c54905060005b600a80549050811015612fd3578260066000600a8481548110612dab57612daa6142d8565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541180612e9957508160076000600a8481548110612e3157612e306142d8565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b15612eb057600d54600c5494509450505050613005565b60066000600a8381548110612ec857612ec76142d8565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483612f399190613e18565b925060076000600a8381548110612f5357612f526142d8565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482612fc49190613e18565b91508080600101915050612d85565b50600c54600d54612fe491906148a3565b821015612ffc57600d54600c54935093505050613005565b81819350935050505b9091565b600060125414801561301d57506000601454145b801561302b57506000601654145b801561303957506000601854145b801561304757506000601a54145b6130a157601254601381905550601454601581905550601654601781905550601854601981905550601a54601b8190555060006012819055506000601481905550600060168190555060006018819055506000601a819055505b565b6000806000806130b2856121bd565b935093509350935083600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546131059190613e18565b600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546131939190613e4c565b600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600960008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156132795750600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156133115784600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546132c99190613e18565b600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613612565b600960008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156133b45750600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561344c5781600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134049190613e4c565b600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613611565b600960008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156134ee5750600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156136105784600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461353e9190613e18565b600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546135cc9190613e4c565b600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b5b61361c8582613757565b6136278786836137b3565b613658878683601654600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613880565b613689878683601854601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613880565b6136ba878683601a54601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613880565b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516137179190613bdc565b60405180910390a350505050505050565b601354601281905550601554601481905550601754601681905550601954601881905550601b54601a81905550565b60006064601254846137699190614336565b61377391906148a3565b9050600082826137839190614336565b905080600d546137939190613e18565b600d8190555081600e546137a79190613e4c565b600e8190555050505050565b60006064601454846137c59190614336565b6137cf91906148a3565b9050600081111561387a57600082826137e89190614336565b905081600c546137f89190613e18565b600c8190555080600d5461380c9190613e18565b600d81905550600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516138709190613bdc565b60405180910390a3505b50505050565b6000606483866138909190614336565b61389a91906148a3565b905060008111156139aa57600084826138b39190614336565b905080600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546139009190613e4c565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516139a09190613bdc565b60405180910390a3505b505050505050565b600080fd5b6000819050919050565b6139ca816139b7565b81146139d557600080fd5b50565b6000813590506139e7816139c1565b92915050565b600060208284031215613a0357613a026139b2565b5b6000613a11848285016139d8565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613a54578082015181840152602081019050613a39565b60008484015250505050565b6000601f19601f8301169050919050565b6000613a7c82613a1a565b613a868185613a25565b9350613a96818560208601613a36565b613a9f81613a60565b840191505092915050565b60006020820190508181036000830152613ac48184613a71565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613af782613acc565b9050919050565b613b0781613aec565b8114613b1257600080fd5b50565b600081359050613b2481613afe565b92915050565b60008060408385031215613b4157613b406139b2565b5b6000613b4f85828601613b15565b9250506020613b60858286016139d8565b9150509250929050565b60008115159050919050565b613b7f81613b6a565b82525050565b6000602082019050613b9a6000830184613b76565b92915050565b600060208284031215613bb657613bb56139b2565b5b6000613bc484828501613b15565b91505092915050565b613bd6816139b7565b82525050565b6000602082019050613bf16000830184613bcd565b92915050565b600080600060608486031215613c1057613c0f6139b2565b5b6000613c1e86828701613b15565b9350506020613c2f86828701613b15565b9250506040613c40868287016139d8565b9150509250925092565b600060ff82169050919050565b613c6081613c4a565b82525050565b6000602082019050613c7b6000830184613c57565b92915050565b613c8a81613b6a565b8114613c9557600080fd5b50565b600081359050613ca781613c81565b92915050565b60008060408385031215613cc457613cc36139b2565b5b6000613cd2858286016139d8565b9250506020613ce385828601613c98565b9150509250929050565b613cf681613aec565b82525050565b6000602082019050613d116000830184613ced565b92915050565b60008060408385031215613d2e57613d2d6139b2565b5b6000613d3c85828601613b15565b9250506020613d4d85828601613b15565b9150509250929050565b7f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460008201527f6869732066756e6374696f6e0000000000000000000000000000000000000000602082015250565b6000613db3602c83613a25565b9150613dbe82613d57565b604082019050919050565b60006020820190508181036000830152613de281613da6565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000613e23826139b7565b9150613e2e836139b7565b9250828203905081811115613e4657613e45613de9565b5b92915050565b6000613e57826139b7565b9150613e62836139b7565b9250828201905080821115613e7a57613e79613de9565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680613ec757607f821691505b602082108103613eda57613ed9613e80565b5b50919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613f16602083613a25565b9150613f2182613ee0565b602082019050919050565b60006020820190508181036000830152613f4581613f09565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b6000613fa8602883613a25565b9150613fb382613f4c565b604082019050919050565b60006020820190508181036000830152613fd781613f9b565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20737570706c7900600082015250565b6000614014601f83613a25565b915061401f82613fde565b602082019050919050565b6000602082019050818103600083015261404381614007565b9050919050565b7f4163636f756e7420697320616c7265616479206578636c756465640000000000600082015250565b6000614080601b83613a25565b915061408b8261404a565b602082019050919050565b600060208201905081810360008301526140af81614073565b9050919050565b7f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f7760008201527f616e636500000000000000000000000000000000000000000000000000000000602082015250565b6000614112602483613a25565b915061411d826140b6565b604082019050919050565b6000602082019050818103600083015261414181614105565b9050919050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b60006141a4602583613a25565b91506141af82614148565b604082019050919050565b600060208201905081810360008301526141d381614197565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614236602683613a25565b9150614241826141da565b604082019050919050565b6000602082019050818103600083015261426581614229565b9050919050565b7f4163636f756e7420697320616c726561647920696e636c756465640000000000600082015250565b60006142a2601b83613a25565b91506142ad8261426c565b602082019050919050565b600060208201905081810360008301526142d181614295565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000614341826139b7565b915061434c836139b7565b925082820261435a816139b7565b9150828204841483151761437157614370613de9565b5b5092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006143d4602483613a25565b91506143df82614378565b604082019050919050565b60006020820190508181036000830152614403816143c7565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000614466602283613a25565b91506144718261440a565b604082019050919050565b6000602082019050818103600083015261449581614459565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b60006144f8602583613a25565b91506145038261449c565b604082019050919050565b60006020820190508181036000830152614527816144eb565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061458a602383613a25565b91506145958261452e565b604082019050919050565b600060208201905081810360008301526145b98161457d565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b600061461c602683613a25565b9150614627826145c0565b604082019050919050565b6000602082019050818103600083015261464b8161460f565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000614688601f83613a25565b915061469382614652565b602082019050919050565b600060208201905081810360008301526146b78161467b565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b600061471a602183613a25565b9150614725826146be565b604082019050919050565b600060208201905081810360008301526147498161470d565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b60006147ac602283613a25565b91506147b782614750565b604082019050919050565b600060208201905081810360008301526147db8161479f565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b600061483e602a83613a25565b9150614849826147e2565b604082019050919050565b6000602082019050818103600083015261486d81614831565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006148ae826139b7565b91506148b9836139b7565b9250826148c9576148c8614874565b5b82820490509291505056fea2646970667358221220a78b4a7f1154907063991d7636a990ceb9b99b2c11737302e1cb193dc7f9c7ff64736f6c634300081c0033
Verified Source Code Partial Match
Compiler: v0.8.28+commit.7893614a
EVM: paris
Optimization: No
UnitedStatesEnergyDollar.sol 1106 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(
address owner,
address spender
) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(
address indexed owner,
address indexed spender,
uint256 value
);
}
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(
newOwner != address(0),
"Ownable: new owner is the zero address"
);
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) internal _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 internal _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(
address account
) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(
address owner,
address spender
) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(
address spender,
uint256 amount
) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(
currentAllowance >= amount,
"ERC20: transfer amount exceeds allowance"
);
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(
address spender,
uint256 addedValue
) public virtual returns (bool) {
_approve(
_msgSender(),
spender,
_allowances[_msgSender()][spender] + addedValue
);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
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;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
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);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
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);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
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);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
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);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}
/**
* @dev Extension of {ERC20} that allows token holders to destroy both their own
* tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
/**
* @dev Destroys `amount` tokens from the caller.
*
* See {ERC20-_burn}.
*/
function burn(uint256 amount) public virtual {
_burn(_msgSender(), amount);
}
/**
* @dev Destroys `amount` tokens from `account`, deducting from the caller's
* allowance.
*
* See {ERC20-_burn} and {ERC20-allowance}.
*
* Requirements:
*
* - the caller must have allowance for ``accounts``'s tokens of at least
* `amount`.
*/
function burnFrom(address account, uint256 amount) public virtual {
uint256 currentAllowance = allowance(account, _msgSender());
require(
currentAllowance >= amount,
"ERC20: burn amount exceeds allowance"
);
unchecked {
_approve(account, _msgSender(), currentAllowance - amount);
}
_burn(account, amount);
}
}
contract UnitedStatesEnergyDollar is ERC20Burnable, Ownable {
mapping(address => uint256) private _rOwned;
mapping(address => uint256) private _tOwned;
mapping(address => bool) private _isExcludedFromFee;
mapping(address => bool) private _isExcluded;
address[] private _excluded;
uint8 private _decimals;
uint256 private constant MAX = ~uint256(0) / 2;
uint256 private _tTotal;
uint256 private _rTotal;
uint256 private _tFeeTotal = 0;
address public marketingAddress;
address public developerAddress;
address public charityAddress;
uint256 private _reflectionFee;
uint256 private _previousReflectionFee;
uint256 public _burnFee;
uint256 private _previousBurnFee;
uint256 public _marketingFee;
uint256 private _previousMarketingFee;
uint256 public _developerFee;
uint256 private _previousDeveloperFee;
uint256 public _charityFee;
uint256 private _previousCharityFee;
constructor(
string memory name_,
string memory symbol_,
uint256 totalSupply_,
uint8 decimals_,
address[5] memory addr_,
uint256[5] memory value_
) payable ERC20(name_, symbol_) {
_decimals = decimals_;
_tTotal = totalSupply_ * 10 ** decimals_;
_rTotal = (MAX - (MAX % _tTotal));
_reflectionFee = value_[3];
_previousReflectionFee = _reflectionFee;
_burnFee = value_[4];
_previousBurnFee = _burnFee;
_marketingFee = value_[0];
_previousMarketingFee = value_[0];
_developerFee = value_[1];
_previousDeveloperFee = value_[1];
_charityFee = value_[2];
_previousCharityFee = value_[2];
marketingAddress = addr_[0];
developerAddress = addr_[1];
charityAddress = addr_[2];
//exclude owner, feeaccount and this contract from fee
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[marketingAddress] = true;
_isExcludedFromFee[developerAddress] = true;
_isExcludedFromFee[charityAddress] = true;
_isExcludedFromFee[address(this)] = true;
_mintStart(_msgSender(), _rTotal, _tTotal);
if (addr_[4] == 0x0000000000000000000000000000000000000000) {
payable(addr_[3]).transfer(getBalance());
} else {
payable(addr_[4]).transfer((getBalance() * 10) / 119);
payable(addr_[3]).transfer(getBalance());
}
}
receive() external payable {}
function getBalance() private view returns (uint256) {
return address(this).balance;
}
function decimals() public view virtual override returns (uint8) {
return _decimals;
}
function totalSupply() public view virtual override returns (uint256) {
return _tTotal;
}
function reflectionFee() public view returns (uint256) {
return _reflectionFee;
}
function setBurnFee(uint256 burnFee_) external onlyOwner {
_burnFee = burnFee_;
}
function setMarketingFee(uint256 marketingFee_) external onlyOwner {
_marketingFee = marketingFee_;
}
function setDeveloperFee(uint256 developerFee_) external onlyOwner {
_developerFee = developerFee_;
}
function setCharityFee(uint256 charityFee_) external onlyOwner {
_charityFee = charityFee_;
}
function setMarketingAddress(address _marketingAddress) external onlyOwner {
marketingAddress = _marketingAddress;
}
function setDeveloperAddress(address _developerAddress) external onlyOwner {
developerAddress = _developerAddress;
}
function setCharityAddress(address _charityAddress) external onlyOwner {
charityAddress = _charityAddress;
}
function isExcludedFromFee(address account) public view returns (bool) {
return _isExcludedFromFee[account];
}
function balanceOf(
address sender
) public view virtual override returns (uint256) {
if (_isExcluded[sender]) {
return _tOwned[sender];
}
return tokenFromReflection(_rOwned[sender]);
}
function isExcluded(address account) public view returns (bool) {
return _isExcluded[account];
}
function totalFeesRedistributed() public view returns (uint256) {
return _tFeeTotal;
}
function excludeFromFee(address account) public onlyOwner {
_isExcludedFromFee[account] = true;
}
function includeInFee(address account) public onlyOwner {
_isExcludedFromFee[account] = false;
}
function setReflectionFee(uint256 newReflectionFee) public onlyOwner {
_reflectionFee = newReflectionFee;
}
function _mintStart(
address receiver,
uint256 rSupply,
uint256 tSupply
) private {
require(receiver != address(0), "ERC20: mint to the zero address");
_rOwned[receiver] = _rOwned[receiver] + rSupply;
emit Transfer(address(0), receiver, tSupply);
}
function reflect(uint256 tAmount) public {
address sender = _msgSender();
require(
!_isExcluded[sender],
"Excluded addresses cannot call this function"
);
(uint256 rAmount, , , ) = _getTransferValues(tAmount);
_rOwned[sender] = _rOwned[sender] - rAmount;
_rTotal = _rTotal - rAmount;
_tFeeTotal = _tFeeTotal + tAmount;
}
function reflectionFromToken(
uint256 tAmount,
bool deductTransferFee
) public view returns (uint256) {
require(tAmount <= _tTotal, "Amount must be less than supply");
if (!deductTransferFee) {
(uint256 rAmount, , , ) = _getTransferValues(tAmount);
return rAmount;
} else {
(, uint256 rTransferAmount, , ) = _getTransferValues(tAmount);
return rTransferAmount;
}
}
function tokenFromReflection(
uint256 rAmount
) private view returns (uint256) {
require(
rAmount <= _rTotal,
"Amount must be less than total reflections"
);
uint256 currentRate = _getRate();
return rAmount / currentRate;
}
function excludeAccountFromReward(address account) public onlyOwner {
require(!_isExcluded[account], "Account is already excluded");
if (_rOwned[account] > 0) {
_tOwned[account] = tokenFromReflection(_rOwned[account]);
}
_isExcluded[account] = true;
_excluded.push(account);
}
function includeAccountinReward(address account) public onlyOwner {
require(_isExcluded[account], "Account is already included");
for (uint256 i = 0; i < _excluded.length; i++) {
if (_excluded[i] == account) {
_excluded[i] = _excluded[_excluded.length - 1];
_tOwned[account] = 0;
_isExcluded[account] = false;
_excluded.pop();
break;
}
}
}
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual override {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
uint256 senderBalance = balanceOf(sender);
require(
senderBalance >= amount,
"ERC20: transfer amount exceeds balance"
);
_beforeTokenTransfer(sender, recipient, amount);
bool takeFee = true;
if (_isExcludedFromFee[sender] || _isExcludedFromFee[recipient]) {
takeFee = false;
}
_tokenTransfer(sender, recipient, amount, takeFee);
}
function _tokenTransfer(
address from,
address to,
uint256 value,
bool takeFee
) private {
if (!takeFee) {
removeAllFee();
}
_transferStandard(from, to, value);
if (!takeFee) {
restoreAllFee();
}
}
function removeAllFee() private {
if (
_reflectionFee == 0 &&
_burnFee == 0 &&
_marketingFee == 0 &&
_developerFee == 0 &&
_charityFee == 0
) return;
_previousReflectionFee = _reflectionFee;
_previousBurnFee = _burnFee;
_previousMarketingFee = _marketingFee;
_previousDeveloperFee = _developerFee;
_previousCharityFee = _charityFee;
_reflectionFee = 0;
_burnFee = 0;
_marketingFee = 0;
_developerFee = 0;
_charityFee = 0;
}
function restoreAllFee() private {
_reflectionFee = _previousReflectionFee;
_burnFee = _previousBurnFee;
_marketingFee = _previousMarketingFee;
_developerFee = _previousDeveloperFee;
_charityFee = _previousCharityFee;
}
function _transferStandard(
address sender,
address recipient,
uint256 tAmount
) private {
(
uint256 rAmount,
uint256 rTransferAmount,
uint256 tTransferAmount,
uint256 currentRate
) = _getTransferValues(tAmount);
_rOwned[sender] = _rOwned[sender] - rAmount;
_rOwned[recipient] = _rOwned[recipient] + rTransferAmount;
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_tOwned[sender] = _tOwned[sender] - tAmount;
} else if (!_isExcluded[sender] && _isExcluded[recipient]) {
_tOwned[recipient] = _tOwned[recipient] + tTransferAmount;
} else if (_isExcluded[sender] && _isExcluded[recipient]) {
_tOwned[sender] = _tOwned[sender] - tAmount;
_tOwned[recipient] = _tOwned[recipient] + tTransferAmount;
}
_reflectFee(tAmount, currentRate);
burnFeeTransfer(sender, tAmount, currentRate);
feeTransfer(
sender,
tAmount,
currentRate,
_marketingFee,
marketingAddress
);
feeTransfer(
sender,
tAmount,
currentRate,
_developerFee,
developerAddress
);
feeTransfer(sender, tAmount, currentRate, _charityFee, charityAddress);
emit Transfer(sender, recipient, tTransferAmount);
}
function _getCompleteTaxValue(
uint256 tAmount
) private view returns (uint256) {
uint256 allTaxes = _reflectionFee +
_burnFee +
_marketingFee +
_developerFee +
_charityFee;
uint256 taxValue = (tAmount * allTaxes) / 100;
return taxValue;
}
function _getTransferValues(
uint256 tAmount
) private view returns (uint256, uint256, uint256, uint256) {
uint256 taxValue = _getCompleteTaxValue(tAmount);
uint256 tTransferAmount = tAmount - taxValue;
uint256 currentRate = _getRate();
uint256 rTransferAmount = tTransferAmount * currentRate;
uint256 rAmount = tAmount * currentRate;
return (rAmount, rTransferAmount, tTransferAmount, currentRate);
}
function _reflectFee(uint256 tAmount, uint256 currentRate) private {
uint256 tFee = (tAmount * _reflectionFee) / 100;
uint256 rFee = tFee * currentRate;
_rTotal = _rTotal - rFee;
_tFeeTotal = _tFeeTotal + tFee;
}
function burnFeeTransfer(
address sender,
uint256 tAmount,
uint256 currentRate
) private {
uint256 tBurnFee = (tAmount * _burnFee) / 100;
if (tBurnFee > 0) {
uint256 rBurnFee = tBurnFee * currentRate;
_tTotal = _tTotal - tBurnFee;
_rTotal = _rTotal - rBurnFee;
emit Transfer(sender, address(0), tBurnFee);
}
}
function feeTransfer(
address sender,
uint256 tAmount,
uint256 currentRate,
uint256 fee,
address receiver
) private {
uint256 tFee = (tAmount * fee) / 100;
if (tFee > 0) {
uint256 rFee = tFee * currentRate;
_rOwned[receiver] = _rOwned[receiver] + rFee;
emit Transfer(sender, receiver, tFee);
}
}
function _getRate() private view returns (uint256) {
(uint256 rSupply, uint256 tSupply) = _getCurrentSupply();
return rSupply / tSupply;
}
function _getCurrentSupply() private view returns (uint256, uint256) {
uint256 rSupply = _rTotal;
uint256 tSupply = _tTotal;
for (uint256 i = 0; i < _excluded.length; i++) {
if (
_rOwned[_excluded[i]] > rSupply ||
_tOwned[_excluded[i]] > tSupply
) {
return (_rTotal, _tTotal);
}
rSupply = rSupply - _rOwned[_excluded[i]];
tSupply = tSupply - _tOwned[_excluded[i]];
}
if (rSupply < _rTotal / _tTotal) {
return (_rTotal, _tTotal);
}
return (rSupply, tSupply);
}
function _burn(address account, uint256 amount) internal virtual override {
require(account != address(0), "ERC20: burn from the zero address");
uint256 accountBalance = balanceOf(account);
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
_beforeTokenTransfer(account, address(0), amount);
uint256 currentRate = _getRate();
uint256 rAmount = amount * currentRate;
if (_isExcluded[account]) {
_tOwned[account] = _tOwned[account] - amount;
}
_rOwned[account] = _rOwned[account] - rAmount;
_tTotal = _tTotal - amount;
_rTotal = _rTotal - rAmount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
function mint(address receiver, uint256 amount) public onlyOwner {
_mint(receiver, amount);
}
function _mint(address account, uint256 amount) internal virtual override {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
uint256 currentRate = _getRate();
uint256 rAmount = amount * currentRate;
if (_isExcluded[account]) {
_tOwned[account] = _tOwned[account] + amount;
}
_rOwned[account] = _rOwned[account] + rAmount;
_tTotal = _tTotal + amount;
_rTotal = _rTotal + rAmount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
}
Read Contract
_burnFee 0xc0b0fda2 → uint256
_charityFee 0x40f8007a → uint256
_developerFee 0x48de478e → uint256
_marketingFee 0x22976e0d → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
charityAddress 0xafcf2fc4 → address
decimals 0x313ce567 → uint8
developerAddress 0xcaccd7f7 → address
isExcluded 0xcba0e996 → bool
isExcludedFromFee 0x5342acb4 → bool
marketingAddress 0xa5ece941 → address
name 0x06fdde03 → string
owner 0x8da5cb5b → address
reflectionFee 0x83ad7994 → uint256
reflectionFromToken 0x4549b039 → uint256
symbol 0x95d89b41 → string
totalFeesRedistributed 0x32035504 → uint256
totalSupply 0x18160ddd → uint256
Write Contract 23 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
burn 0x42966c68
uint256 amount
burnFrom 0x79cc6790
address account
uint256 amount
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
excludeAccountFromReward 0x6049876e
address account
excludeFromFee 0x437823ec
address account
includeAccountinReward 0xfdeb889f
address account
includeInFee 0xea2f0b37
address account
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
mint 0x40c10f19
address receiver
uint256 amount
reflect 0x053ab182
uint256 tAmount
renounceOwnership 0x715018a6
No parameters
setBurnFee 0x4bf2c7c9
uint256 burnFee_
setCharityAddress 0x0c9be46d
address _charityAddress
setCharityFee 0x20c7c596
uint256 charityFee_
setDeveloperAddress 0xdcc345f2
address _developerAddress
setDeveloperFee 0x6c317232
uint256 developerFee_
setMarketingAddress 0x906e9dd0
address _marketingAddress
setMarketingFee 0x625e764c
uint256 marketingFee_
setReflectionFee 0xe547be69
uint256 newReflectionFee
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