More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Latest 25 from a total of 2,390 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Redeem | 21451372 | 115 days ago | IN | 0 ETH | 0.00068641 | ||||
Redeem | 21342279 | 130 days ago | IN | 0 ETH | 0.00098818 | ||||
Redeem | 21086914 | 166 days ago | IN | 0 ETH | 0.00088564 | ||||
Redeem | 21086907 | 166 days ago | IN | 0 ETH | 0.00093267 | ||||
Redeem | 21032295 | 173 days ago | IN | 0 ETH | 0.0003553 | ||||
Redeem | 20761740 | 211 days ago | IN | 0 ETH | 0.00066197 | ||||
Redeem | 20737742 | 214 days ago | IN | 0 ETH | 0.00016485 | ||||
Redeem | 20071415 | 307 days ago | IN | 0 ETH | 0.00078039 | ||||
Redeem | 20071378 | 307 days ago | IN | 0 ETH | 0.00042702 | ||||
Redeem | 19770592 | 349 days ago | IN | 0 ETH | 0.0007312 | ||||
Redeem | 19730563 | 355 days ago | IN | 0 ETH | 0.00042668 | ||||
Redeem | 19717566 | 357 days ago | IN | 0 ETH | 0.00087916 | ||||
Redeem | 19717531 | 357 days ago | IN | 0 ETH | 0.00066541 | ||||
Redeem | 19693325 | 360 days ago | IN | 0 ETH | 0.00027419 | ||||
Redeem | 19638627 | 368 days ago | IN | 0 ETH | 0.00162428 | ||||
Redeem | 19620322 | 370 days ago | IN | 0 ETH | 0.00150842 | ||||
Redeem | 19534970 | 382 days ago | IN | 0 ETH | 0.00215859 | ||||
Redeem | 19531668 | 383 days ago | IN | 0 ETH | 0.00180476 | ||||
Redeem | 19529773 | 383 days ago | IN | 0 ETH | 0.00129383 | ||||
Redeem | 19529132 | 383 days ago | IN | 0 ETH | 0.00184637 | ||||
Redeem | 19528864 | 383 days ago | IN | 0 ETH | 0.00218772 | ||||
Redeem | 19486651 | 389 days ago | IN | 0 ETH | 0.00174894 | ||||
Redeem | 19486645 | 389 days ago | IN | 0 ETH | 0.00168313 | ||||
Redeem | 19480988 | 390 days ago | IN | 0 ETH | 0.00197839 | ||||
Redeem | 19479982 | 390 days ago | IN | 0 ETH | 0.00218636 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 21973414 | 42 days ago | 0.01864102 ETH | ||||
Transfer | 21954253 | 44 days ago | 0.02649951 ETH | ||||
Transfer | 21888689 | 54 days ago | 0.0186743 ETH | ||||
Transfer | 21888683 | 54 days ago | 0.0186743 ETH | ||||
Transfer | 21888678 | 54 days ago | 0.01393239 ETH | ||||
Transfer | 21888230 | 54 days ago | 0.0186743 ETH | ||||
Transfer | 21888197 | 54 days ago | 0.01141274 ETH | ||||
Transfer | 21862570 | 57 days ago | 0.05572958 ETH | ||||
Transfer | 21793823 | 67 days ago | 0.01287851 ETH | ||||
Transfer | 21790786 | 67 days ago | 0.0506833 ETH | ||||
Transfer | 21788955 | 67 days ago | 0.01860153 ETH | ||||
Transfer | 21787170 | 68 days ago | 0.01482257 ETH | ||||
Transfer | 21462922 | 113 days ago | 0.07463133 ETH | ||||
Transfer | 21451372 | 115 days ago | 0.60282753 ETH | ||||
Transfer | 21397448 | 122 days ago | 0.03635121 ETH | ||||
Transfer | 21342279 | 130 days ago | 0.73469605 ETH | ||||
Transfer | 21326197 | 132 days ago | 0.02672726 ETH | ||||
Transfer | 21284993 | 138 days ago | 0.01866204 ETH | ||||
Transfer | 21112653 | 162 days ago | 0.03017018 ETH | ||||
Transfer | 21086914 | 166 days ago | 0.20722196 ETH | ||||
Transfer | 21086907 | 166 days ago | 0.30141376 ETH | ||||
Transfer | 20761740 | 211 days ago | 0.64050425 ETH | ||||
Transfer | 20071415 | 307 days ago | 0.1883836 ETH | ||||
Transfer | 19770592 | 349 days ago | 0.51805491 ETH | ||||
Transfer | 19730563 | 355 days ago | 0.01883836 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
TokenRedeemer
Compiler Version
vyper:0.3.9
Contract Source Code (Vyper language format)
# @version ^0.3.9 # @title TokenRedeemer """ Token redemption contract where users can redeem their tokens for ETH. They get (accumulated ETH) / (total supply) * (token balance) """ from vyper.interfaces import ERC20 token: public(ERC20) interface MintableBurnableToken: def mint(amount: uint256): nonpayable def burn(amount: uint256): nonpayable event Redeemed: redeemer: indexed(address) amount_earned: uint256 amount_burned: uint256 @external def __init__(_token: ERC20): self.token = _token event Attempt: user: indexed(address) amount: uint256 allowance: uint256 balance: uint256 @external def redeem(amount: uint256 = 0): """ Redeem tokens for ETH. """ totalSupply: uint256 = self.token.totalSupply() amount_to_burn: uint256 = amount if amount_to_burn == 0: amount_to_burn = self.token.balanceOf(msg.sender) amount_earned: uint256 = (self.balance * amount_to_burn) / totalSupply assert self.token.allowance(msg.sender, self) >= amount_to_burn, "Not enough allowance" assert self.token.balanceOf(msg.sender) >= amount_to_burn, "Not enough balance" log Attempt(msg.sender, amount_to_burn, self.token.allowance(msg.sender, self), self.token.balanceOf(msg.sender)) self.token.transferFrom(msg.sender, self, amount_to_burn) send(msg.sender, amount_earned) MintableBurnableToken(self.token.address).burn(amount_to_burn) log Redeemed(msg.sender, amount_earned, amount_to_burn) @view @external def claimable_amount(user: address) -> uint256: """ Returns the amount of ETH that can be claimed. """ totalSupply: uint256 = self.token.totalSupply() return (self.balance * self.token.balanceOf(user)) / totalSupply @payable @external def __default__(): """ Fallback function to receive ETH. """ pass
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"name":"Redeemed","inputs":[{"name":"redeemer","type":"address","indexed":true},{"name":"amount_earned","type":"uint256","indexed":false},{"name":"amount_burned","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Attempt","inputs":[{"name":"user","type":"address","indexed":true},{"name":"amount","type":"uint256","indexed":false},{"name":"allowance","type":"uint256","indexed":false},{"name":"balance","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_token","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"redeem","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"redeem","inputs":[{"name":"amount","type":"uint256"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"claimable_amount","inputs":[{"name":"user","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}]}]
Contract Creation Code
60206104a65f395f518060a01c6104a257604052346104a2576040515f5561047261002f61000039610472610000f36003361161000c5761045f565b5f3560e01c63fc0c546a811861002c5734610461575f5460405260206040f35b63be040fb08118610040575f60405261005a565b63db006a7581186103a45760243610610461576004356040525b34610461575f546318160ddd608052602060806004609c845afa610080573d5f5f3e3d5ffd5b60203d106104615760809050516060526040516080526080516100d3575f546370a0823160a0523360c052602060a0602460bc845afa6100c2573d5f5f3e3d5ffd5b60203d106104615760a09050516080525b4760805180820281158383830414171561046157905090506060518015610461578082049050905060a0526080515f5463dd62ed3e60c0523360e0523061010052602060c0604460dc845afa61012b573d5f5f3e3d5ffd5b60203d106104615760c090505110156101a1576014610120527f4e6f7420656e6f75676820616c6c6f77616e63650000000000000000000000006101405261012050610120518061014001601f825f031636823750506308c379a060e052602061010052601f19601f61012051011660440160fcfd5b6080515f546370a0823160c0523360e052602060c0602460dc845afa6101c9573d5f5f3e3d5ffd5b60203d106104615760c0905051101561023e576012610100527f4e6f7420656e6f7567682062616c616e636500000000000000000000000000006101205261010050610100518061012001601f825f031636823750506308c379a060c052602060e052601f19601f61010051011660440160dcfd5b337fb281156836deb382d925e5f0c190a92e9c5205deb970f205783680737fddd27a608051610160525f5463dd62ed3e60c0523360e0523061010052602060c0604460dc845afa610291573d5f5f3e3d5ffd5b60203d106104615760c0905051610180525f546370a082316101205233610140526020610120602461013c845afa6102cb573d5f5f3e3d5ffd5b60203d10610461576101209050516101a0526060610160a25f546323b872dd60c0523360e052306101005260805161012052602060c0606460dc5f855af1610315573d5f5f3e3d5ffd5b60203d106104615760c0518060011c610461576101405261014050505f5f5f5f60a051335ff115610461575f546342966c6860c05260805160e052803b15610461575f60c0602460dc5f855af161036e573d5f5f3e3d5ffd5b50337ff3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec26260a05160c05260805160e052604060c0a2005b63cef1a1a3811861045d5760243610610461576004358060a01c6104615760405234610461575f546318160ddd608052602060806004609c845afa6103eb573d5f5f3e3d5ffd5b60203d10610461576080905051606052475f546370a0823160805260405160a052602060806024609c845afa610423573d5f5f3e3d5ffd5b60203d1061046157608090505180820281158383830414171561046157905090506060518015610461578082049050905060c052602060c0f35b505b005b5f80fda165767970657283000309000b005b5f80fd000000000000000000000000ce96cc49a25e8c1e6e380f8ab4b64dff188fd035
Deployed Bytecode
0x6003361161000c5761045f565b5f3560e01c63fc0c546a811861002c5734610461575f5460405260206040f35b63be040fb08118610040575f60405261005a565b63db006a7581186103a45760243610610461576004356040525b34610461575f546318160ddd608052602060806004609c845afa610080573d5f5f3e3d5ffd5b60203d106104615760809050516060526040516080526080516100d3575f546370a0823160a0523360c052602060a0602460bc845afa6100c2573d5f5f3e3d5ffd5b60203d106104615760a09050516080525b4760805180820281158383830414171561046157905090506060518015610461578082049050905060a0526080515f5463dd62ed3e60c0523360e0523061010052602060c0604460dc845afa61012b573d5f5f3e3d5ffd5b60203d106104615760c090505110156101a1576014610120527f4e6f7420656e6f75676820616c6c6f77616e63650000000000000000000000006101405261012050610120518061014001601f825f031636823750506308c379a060e052602061010052601f19601f61012051011660440160fcfd5b6080515f546370a0823160c0523360e052602060c0602460dc845afa6101c9573d5f5f3e3d5ffd5b60203d106104615760c0905051101561023e576012610100527f4e6f7420656e6f7567682062616c616e636500000000000000000000000000006101205261010050610100518061012001601f825f031636823750506308c379a060c052602060e052601f19601f61010051011660440160dcfd5b337fb281156836deb382d925e5f0c190a92e9c5205deb970f205783680737fddd27a608051610160525f5463dd62ed3e60c0523360e0523061010052602060c0604460dc845afa610291573d5f5f3e3d5ffd5b60203d106104615760c0905051610180525f546370a082316101205233610140526020610120602461013c845afa6102cb573d5f5f3e3d5ffd5b60203d10610461576101209050516101a0526060610160a25f546323b872dd60c0523360e052306101005260805161012052602060c0606460dc5f855af1610315573d5f5f3e3d5ffd5b60203d106104615760c0518060011c610461576101405261014050505f5f5f5f60a051335ff115610461575f546342966c6860c05260805160e052803b15610461575f60c0602460dc5f855af161036e573d5f5f3e3d5ffd5b50337ff3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec26260a05160c05260805160e052604060c0a2005b63cef1a1a3811861045d5760243610610461576004358060a01c6104615760405234610461575f546318160ddd608052602060806004609c845afa6103eb573d5f5f3e3d5ffd5b60203d10610461576080905051606052475f546370a0823160805260405160a052602060806024609c845afa610423573d5f5f3e3d5ffd5b60203d1061046157608090505180820281158383830414171561046157905090506060518015610461578082049050905060c052602060c0f35b505b005b5f80fda165767970657283000309000b
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ce96cc49a25e8c1e6e380f8ab4b64dff188fd035
-----Decoded View---------------
Arg [0] : _token (address): 0xCe96cc49a25e8C1E6E380F8Ab4B64DFF188fd035
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000ce96cc49a25e8c1e6e380f8ab4b64dff188fd035
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.