More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,282 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 21548973 | 29 mins ago | IN | 0 ETH | 0.00047693 | ||||
Claim | 21513209 | 5 days ago | IN | 0 ETH | 0.00037865 | ||||
Claim | 21509717 | 5 days ago | IN | 0 ETH | 0.00051208 | ||||
Claim | 21489108 | 8 days ago | IN | 0 ETH | 0.00056957 | ||||
Claim | 21482473 | 9 days ago | IN | 0 ETH | 0.00039578 | ||||
Claim | 21482464 | 9 days ago | IN | 0 ETH | 0.00040273 | ||||
Claim | 21478319 | 9 days ago | IN | 0 ETH | 0.00050596 | ||||
Claim | 21470133 | 11 days ago | IN | 0 ETH | 0.00040373 | ||||
Claim | 21465277 | 11 days ago | IN | 0 ETH | 0.00072768 | ||||
Claim | 21452150 | 13 days ago | IN | 0 ETH | 0.00091499 | ||||
Claim | 21446119 | 14 days ago | IN | 0 ETH | 0.00138414 | ||||
Claim | 21446021 | 14 days ago | IN | 0 ETH | 0.00185562 | ||||
Claim | 21445945 | 14 days ago | IN | 0 ETH | 0.00227004 | ||||
Claim | 21443563 | 14 days ago | IN | 0 ETH | 0.00623166 | ||||
Claim | 21430807 | 16 days ago | IN | 0 ETH | 0.00267507 | ||||
Claim | 21396128 | 21 days ago | IN | 0 ETH | 0.00152708 | ||||
Claim | 21363243 | 25 days ago | IN | 0 ETH | 0.0009272 | ||||
Claim | 21354486 | 27 days ago | IN | 0 ETH | 0.00100847 | ||||
Claim | 21334389 | 29 days ago | IN | 0 ETH | 0.00209285 | ||||
Claim | 21304496 | 34 days ago | IN | 0 ETH | 0.00131267 | ||||
Claim | 21302972 | 34 days ago | IN | 0 ETH | 0.00145563 | ||||
Claim | 21302612 | 34 days ago | IN | 0 ETH | 0.00152426 | ||||
Claim | 21302339 | 34 days ago | IN | 0 ETH | 0.00225256 | ||||
Claim | 21301756 | 34 days ago | IN | 0 ETH | 0.00138593 | ||||
Claim | 21299940 | 34 days ago | IN | 0 ETH | 0.00087721 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
VestSplitter
Compiler Version
vyper:0.3.10
Contract Source Code (Vyper language format)
# @version 0.3.10 """ @title VestSplitter @author Curve Finance @license MIT @notice Split VestingEscrow for a distribution of users, and accepts donations and top-ups. Made originally to compensate victims of Vyper hack, but can be used for other purposes. """ from vyper.interfaces import ERC20 interface VestingEscrow: def claim(): nonpayable def balanceOf(user: address) -> uint256: view event Claim: recipient: indexed(address) claimed: uint256 TOKEN: public(immutable(ERC20)) vest: public(VestingEscrow) ADMIN: public(immutable(address)) fractions: public(HashMap[address, uint256]) total_fraction: public(uint256) finalized: public(bool) last_balance: public(uint256) total_granted: public(uint256) claimed: public(HashMap[address, uint256]) @external def __init__(token: ERC20): TOKEN = token ADMIN = msg.sender # Only needed before the distribution is finalized @external def set_vest(vest: VestingEscrow): assert msg.sender == ADMIN, "Access" assert self.vest == empty(VestingEscrow), "Vest already set" self.vest = vest @external def save_distribution(users: DynArray[address, 200], fractions: DynArray[uint256, 200]): assert msg.sender == ADMIN, "Access" assert not self.finalized, "Distribution is finalized already" for i in range(200): if i >= len(users): break user: address = users[i] f_old: uint256 = self.fractions[user] f: uint256 = fractions[i] self.fractions[user] = f self.total_fraction = self.total_fraction + f - f_old @external def finalize_distribution(): assert msg.sender == ADMIN, "Access" self.finalized = True @external @nonreentrant('lock') def claim(user: address = msg.sender, use_vest: bool = True): vest: VestingEscrow = self.vest if use_vest and vest != empty(VestingEscrow) and vest != VestingEscrow(self): vest.claim() total_granted: uint256 = self.total_granted + (TOKEN.balanceOf(self) - self.last_balance) self.total_granted = total_granted total_for_user: uint256 = total_granted * self.fractions[user] / self.total_fraction to_send: uint256 = total_for_user - self.claimed[user] self.claimed[user] = total_for_user TOKEN.transfer(user, to_send) self.last_balance = TOKEN.balanceOf(self) log Claim(user, to_send) @external @view def balanceOf(user: address, use_vest: bool = True) -> uint256: total_granted: uint256 = self.total_granted vest: VestingEscrow = self.vest if use_vest and vest != empty(VestingEscrow) and vest != VestingEscrow(self): total_granted += vest.balanceOf(self) total_granted = total_granted + TOKEN.balanceOf(self) - self.last_balance total_for_user: uint256 = total_granted * self.fractions[user] / self.total_fraction return total_for_user - self.claimed[user]
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"name":"Claim","inputs":[{"name":"recipient","type":"address","indexed":true},{"name":"claimed","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"token","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"set_vest","inputs":[{"name":"vest","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"save_distribution","inputs":[{"name":"users","type":"address[]"},{"name":"fractions","type":"uint256[]"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"finalize_distribution","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim","inputs":[{"name":"user","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim","inputs":[{"name":"user","type":"address"},{"name":"use_vest","type":"bool"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"user","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"user","type":"address"},{"name":"use_vest","type":"bool"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"TOKEN","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"vest","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"ADMIN","inputs":[],"outputs":[{"name":"","type":"address"}]},{"stateMutability":"view","type":"function","name":"fractions","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"total_fraction","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"finalized","inputs":[],"outputs":[{"name":"","type":"bool"}]},{"stateMutability":"view","type":"function","name":"last_balance","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"total_granted","inputs":[],"outputs":[{"name":"","type":"uint256"}]},{"stateMutability":"view","type":"function","name":"claimed","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}]}]
Contract Creation Code
61099151503461003b5760206109c65f395f518060a01c61003b5760405260405161097152336109915261097161003f610000396109b1610000f35b5f80fd5f3560e01c60026013820660011b61094b01601e395f51565b6382bfefc88118610036573461094757602061097160403960206040f35b6392fd2daf811861094357604436103417610947576004358060a01c610947576040526024358060011c610947576060525b5f546002146109475760025f55600154608052606051610088575f61009d565b6080511561009b5730608051141561009d565b5f5b156100cd57608051634e71d92d60a052803b15610947575f60a0600460bc5f855af16100cb573d5f5f3e3d5ffd5b505b60065460206109715f395f516370a0823160c0523060e052602060c0602460dc845afa6100fc573d5f5f3e3d5ffd5b60203d106109475760c09050516005548082038281116109475790509050808201828110610947579050905060a05260a05160065560a05160026040516020525f5260405f205480820281158383830414171561094757905090506003548015610947578082049050905060c05260c05160076040516020525f5260405f2054808203828111610947579050905060e05260c05160076040516020525f5260405f205560206109715f395f5163a9059cbb610100526040516101205260e051610140526020610100604461011c5f855af16101d9573d5f5f3e3d5ffd5b60203d1061094757610100518060011c6109475761016052610160505060206109715f395f516370a082316101005230610120526020610100602461011c845afa610226573d5f5f3e3d5ffd5b60203d10610947576101009050516005556040517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d460e051610100526020610100a260035f5500610943565b63458efde3811861094357346109475760015460405260206040f3610943565b632a0acc6a81186102b0573461094757602061099160403960206040f35b6359c0095a8118610943576084361034176109475760043560040160c88135116109475780355f8160c8811161094757801561030d57905b8060051b6020850101358060a01c610947578160051b606001526001018181186102e8575b505080604052505060243560040160c881351161094757803560208160051b0180836119603750505060206109915f395f513318156103ab576006613280527f41636365737300000000000000000000000000000000000000000000000000006132a0526132805061328051806132a001601f825f031636823750506308c379a061324052602061326052601f19601f61328051011660440161325cfd5b6004541561043d576021613280527f446973747269627574696f6e2069732066696e616c697a656420616c726561646132a0527f79000000000000000000000000000000000000000000000000000000000000006132c0526132805061328051806132a001601f825f031636823750506308c379a061324052602061326052601f19601f61328051011660440161325cfd5b5f60c8905b80613280526040516132805110610458576104e9565b613280516040518110156109475760051b606001516132a05260026132a0516020525f5260405f20546132c05261328051611960518110156109475760051b61198001516132e0526132e05160026132a0516020525f5260405f20556003546132e05180820182811061094757905090506132c0518082038281116109475790509050600355600101818118610442575b505000610943565b631d026de4811861094357602436103417610947576004358060a01c6109475760405260026040516020525f5260405f205460605260206060f3610943565b63e987fc11811861054c57346109475760035460405260206040f35b634e71d92d811861094357346109475733604052600160605261006856610943565b63b3f05b97811861058a57346109475760045460405260206040f35b63abf484ff811861094357602436103417610947576004358060a01c6109475760405260206109915f395f513318156106195760066060527f416363657373000000000000000000000000000000000000000000000000000060805260605060605180608001601f825f031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b6001541561067d5760106060527f5665737420616c7265616479207365740000000000000000000000000000000060805260605060605180608001601f825f031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b60405160015500610943565b630727adb3811861094357346109475760055460405260206040f3610943565b63906eba1381186106c557346109475760065460405260206040f35b63772865e2811861094357604436103417610947576024358060011c610947576060525b6004358060a01c6109475760405260065460805260015460a052606051610710575f610725565b60a05115610723573060a0511415610725565b5f5b156107725760805160a0516370a0823160c0523060e052602060c0602460dc845afa610753573d5f5f3e3d5ffd5b60203d106109475760c090505180820182811061094757905090506080525b60805160206109715f395f516370a0823160c0523060e052602060c0602460dc845afa6107a1573d5f5f3e3d5ffd5b60203d106109475760c09050518082018281106109475790509050600554808203828111610947579050905060805260805160026040516020525f5260405f205480820281158383830414171561094757905090506003548015610947578082049050905060c05260c05160076040516020525f5260405f2054808203828111610947579050905060e052602060e0f3610943565b63c884ef83811861087157602436103417610947576004358060a01c6109475760405260076040516020525f5260405f205460605260206060f35b6370a082318118610943576024361034176109475760016060526106e956610943565b632b083797811861091657346109475760206109915f395f5133181561090f5760066040527f416363657373000000000000000000000000000000000000000000000000000060605260405060405180606001601f825f031636823750506308c379a05f526020602052601f19601f6040510116604401601cfd5b6001600455005b631e83409a811861094357602436103417610947576004358060a01c610947576040526001606052610068565b5f5ffd5b5f80fd0943094306a9056e06890943029209430943094308360272053009430943094304f100180894841909718118261840a16576797065728300030a0016000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52
Deployed Bytecode
0x5f3560e01c60026013820660011b61094b01601e395f51565b6382bfefc88118610036573461094757602061097160403960206040f35b6392fd2daf811861094357604436103417610947576004358060a01c610947576040526024358060011c610947576060525b5f546002146109475760025f55600154608052606051610088575f61009d565b6080511561009b5730608051141561009d565b5f5b156100cd57608051634e71d92d60a052803b15610947575f60a0600460bc5f855af16100cb573d5f5f3e3d5ffd5b505b60065460206109715f395f516370a0823160c0523060e052602060c0602460dc845afa6100fc573d5f5f3e3d5ffd5b60203d106109475760c09050516005548082038281116109475790509050808201828110610947579050905060a05260a05160065560a05160026040516020525f5260405f205480820281158383830414171561094757905090506003548015610947578082049050905060c05260c05160076040516020525f5260405f2054808203828111610947579050905060e05260c05160076040516020525f5260405f205560206109715f395f5163a9059cbb610100526040516101205260e051610140526020610100604461011c5f855af16101d9573d5f5f3e3d5ffd5b60203d1061094757610100518060011c6109475761016052610160505060206109715f395f516370a082316101005230610120526020610100602461011c845afa610226573d5f5f3e3d5ffd5b60203d10610947576101009050516005556040517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d460e051610100526020610100a260035f5500610943565b63458efde3811861094357346109475760015460405260206040f3610943565b632a0acc6a81186102b0573461094757602061099160403960206040f35b6359c0095a8118610943576084361034176109475760043560040160c88135116109475780355f8160c8811161094757801561030d57905b8060051b6020850101358060a01c610947578160051b606001526001018181186102e8575b505080604052505060243560040160c881351161094757803560208160051b0180836119603750505060206109915f395f513318156103ab576006613280527f41636365737300000000000000000000000000000000000000000000000000006132a0526132805061328051806132a001601f825f031636823750506308c379a061324052602061326052601f19601f61328051011660440161325cfd5b6004541561043d576021613280527f446973747269627574696f6e2069732066696e616c697a656420616c726561646132a0527f79000000000000000000000000000000000000000000000000000000000000006132c0526132805061328051806132a001601f825f031636823750506308c379a061324052602061326052601f19601f61328051011660440161325cfd5b5f60c8905b80613280526040516132805110610458576104e9565b613280516040518110156109475760051b606001516132a05260026132a0516020525f5260405f20546132c05261328051611960518110156109475760051b61198001516132e0526132e05160026132a0516020525f5260405f20556003546132e05180820182811061094757905090506132c0518082038281116109475790509050600355600101818118610442575b505000610943565b631d026de4811861094357602436103417610947576004358060a01c6109475760405260026040516020525f5260405f205460605260206060f3610943565b63e987fc11811861054c57346109475760035460405260206040f35b634e71d92d811861094357346109475733604052600160605261006856610943565b63b3f05b97811861058a57346109475760045460405260206040f35b63abf484ff811861094357602436103417610947576004358060a01c6109475760405260206109915f395f513318156106195760066060527f416363657373000000000000000000000000000000000000000000000000000060805260605060605180608001601f825f031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b6001541561067d5760106060527f5665737420616c7265616479207365740000000000000000000000000000000060805260605060605180608001601f825f031636823750506308c379a06020526020604052601f19601f6060510116604401603cfd5b60405160015500610943565b630727adb3811861094357346109475760055460405260206040f3610943565b63906eba1381186106c557346109475760065460405260206040f35b63772865e2811861094357604436103417610947576024358060011c610947576060525b6004358060a01c6109475760405260065460805260015460a052606051610710575f610725565b60a05115610723573060a0511415610725565b5f5b156107725760805160a0516370a0823160c0523060e052602060c0602460dc845afa610753573d5f5f3e3d5ffd5b60203d106109475760c090505180820182811061094757905090506080525b60805160206109715f395f516370a0823160c0523060e052602060c0602460dc845afa6107a1573d5f5f3e3d5ffd5b60203d106109475760c09050518082018281106109475790509050600554808203828111610947579050905060805260805160026040516020525f5260405f205480820281158383830414171561094757905090506003548015610947578082049050905060c05260c05160076040516020525f5260405f2054808203828111610947579050905060e052602060e0f3610943565b63c884ef83811861087157602436103417610947576004358060a01c6109475760405260076040516020525f5260405f205460605260206060f35b6370a082318118610943576024361034176109475760016060526106e956610943565b632b083797811861091657346109475760206109915f395f5133181561090f5760066040527f416363657373000000000000000000000000000000000000000000000000000060605260405060405180606001601f825f031636823750506308c379a05f526020602052601f19601f6040510116604401601cfd5b6001600455005b631e83409a811861094357602436103417610947576004358060a01c610947576040526001606052610068565b5f5ffd5b5f80fd0943094306a9056e06890943029209430943094308360272053009430943094304f100180894000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52000000000000000000000000a90f91b989ad379f6762d73e453521f760d23580
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52
-----Decoded View---------------
Arg [0] : token (address): 0xD533a949740bb3306d119CC777fa900bA034cd52
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000d533a949740bb3306d119cc777fa900ba034cd52
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $1.06 | 286,167.6772 | $304,691.75 |
Loading...
Loading
[ 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.