Contract 0xb61915609e6dc7a7261b678073c53bac5875a8b4 11

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2b6688ab0e7cf77a6033a4e5eddc609c67db323b3fc541003a2b666d248f28a30x60016009141535442022-06-09 12:56:43113 days 3 hrs ago0x91dfd5a51e7c00604e8b2521e678dd8444ea56c9 IN  Create: Vyper_contract0 ETH0.002497741915 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x39bb0e0399e133569b96ad082ea0a3e287b37f16564dac3e0bc79855cca56b22274549652022-09-29 16:48:011 day ago 0x5c686cb4150dc2eed3bdd4ce01c58f6a58b76355 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0x821c973920db77384c5634787cb5154f8db685e7d83de6d92a96303153775500274162412022-09-29 12:51:131 day 3 hrs ago 0xc4b0e90fcfbf4a2c23398588a788a33a5964679b 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xf5600be5ef8c3a707a2145e6b88b3422e56abec9ba083714d5dd284d05b9aa5e272558042022-09-28 16:24:022 days 24 mins ago 0x65d3bd4f1ca6306fc38f5e595e18634b45fb7b25 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0x560af09c8e37acc03e29a1b0dc07b545a7635ad20323c4a211e1a7bfee92b529270245472022-09-27 16:13:453 days 34 mins ago 0x3b1c6eb77ca3365977eaaf319779056bd548d39f 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0x3334089264dfea360edd557fff8ee3dcd1af21e959b1ba0471163a7a1f890226270244392022-09-27 16:13:233 days 35 mins ago 0x31f323be2b7cd3faa9cb669ca7bb26f83e564973 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0x5b229406043867396edef27efec91d50eddb7908c4cf70d24dece0d35d6f1ec9269599152022-09-27 9:28:573 days 7 hrs ago 0xb16308495cb50d67a0f592691b77c4d965a84544 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0x01203451147922710f1fc74f0cf3f47c16020d391fb6b839be2ae04f5c9e06a9269028732022-09-27 2:11:363 days 14 hrs ago 0x65d3bd4f1ca6306fc38f5e595e18634b45fb7b25 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xde76f2370192dfa8e32bf6089413110788d8bf2cd78e4f6c18c14e91fd7a9451269016522022-09-27 2:02:083 days 14 hrs ago 0x65d3bd4f1ca6306fc38f5e595e18634b45fb7b25 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xb7829b096bcd8f1bbd49a80c8103933e908e935d6a2daa9c5df01bad1b6d1731269012812022-09-27 1:59:323 days 14 hrs ago 0x65d3bd4f1ca6306fc38f5e595e18634b45fb7b25 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0x9539139f4a70b7485d6884bf7c8c288c6150c8175d8b2541b258daaa6ee0d6da264138152022-09-24 15:14:056 days 1 hr ago 0x3b1c6eb77ca3365977eaaf319779056bd548d39f 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0x83e9da4a233a0e724dbcfb5afefc81dd22b257d9201892db5d16467df405f6aa264125022022-09-24 15:06:046 days 1 hr ago 0x31f323be2b7cd3faa9cb669ca7bb26f83e564973 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xd87deacda0c7af00ba0f17ed6ef3f8fc121169c53ca9ad208852461d79891e3c261630812022-09-23 11:08:257 days 5 hrs ago 0xa9ec9fdbeae720592ffa144f24de480876bab10d 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xb4958d7af30580d0662e8e265a8593ef9c22409c0a87a1e586aefd8c12550562259540512022-09-22 12:04:498 days 4 hrs ago 0xc4b0e90fcfbf4a2c23398588a788a33a5964679b 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0x8f274c27c21cbbc7aeea92ad2b093f39e7b7cd3155970af074d8eb1b359c062c255370382022-09-20 17:36:539 days 23 hrs ago 0xf74a398fab5df2159f8e9ffe8dc00cb102ebc58c 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xd0083f8608389bffe687ba958a4797d057dbce16f3c4e2018ff96db17bd16d08253243602022-09-19 18:05:3210 days 22 hrs ago 0xc4b0e90fcfbf4a2c23398588a788a33a5964679b 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xd443bf69054e47ce84c854681a696ea66c799c5078645aeb56661805268fccef251758972022-09-18 21:16:1811 days 19 hrs ago 0xb16308495cb50d67a0f592691b77c4d965a84544 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xe1ace7fd07211513dae7274172b6d40a15b31b42a6106df7a7179de940dcb710250618632022-09-18 0:26:1412 days 16 hrs ago 0x3b1c6eb77ca3365977eaaf319779056bd548d39f 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xe1ace7fd07211513dae7274172b6d40a15b31b42a6106df7a7179de940dcb710250618632022-09-18 0:26:1412 days 16 hrs ago 0x65d3bd4f1ca6306fc38f5e595e18634b45fb7b25 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xe1ace7fd07211513dae7274172b6d40a15b31b42a6106df7a7179de940dcb710250618632022-09-18 0:26:1412 days 16 hrs ago 0x316d8195fee5377b83204941f10ff629e4135fa4 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xe1ace7fd07211513dae7274172b6d40a15b31b42a6106df7a7179de940dcb710250618632022-09-18 0:26:1412 days 16 hrs ago 0x37d19a7a0d2bafd85fa5bdd3c974673fa46fb5e1 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xe1ace7fd07211513dae7274172b6d40a15b31b42a6106df7a7179de940dcb710250618632022-09-18 0:26:1412 days 16 hrs ago 0xdbf843e2f4b2ff2245be03850264dc5fd07d2c4e 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xe1ace7fd07211513dae7274172b6d40a15b31b42a6106df7a7179de940dcb710250618632022-09-18 0:26:1412 days 16 hrs ago 0x53da79d794652bde12983b3235e43bf482f14ef7 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0xe1ace7fd07211513dae7274172b6d40a15b31b42a6106df7a7179de940dcb710250618632022-09-18 0:26:1412 days 16 hrs ago 0x31f323be2b7cd3faa9cb669ca7bb26f83e564973 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0x5dda689a9cdec1194ed1f33cf3081cb6617dc06da3257cd6197f3d6eac948788250617942022-09-18 0:25:1012 days 16 hrs ago 0x5c686cb4150dc2eed3bdd4ce01c58f6a58b76355 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
0x5dda689a9cdec1194ed1f33cf3081cb6617dc06da3257cd6197f3d6eac948788250617942022-09-18 0:25:1012 days 16 hrs ago 0x999bee80fe716ea792967cd85b3c6a04b42b6d48 0xb61915609e6dc7a7261b678073c53bac5875a8b40 ETH
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.16

Optimization Enabled:
N/A

Other Settings:
, MIT license

Contract Source Code (Vyper language format)

# @version 0.2.16
"""
@title Simple Vesting Escrow
@author Curve Finance, Yearn Finance
@license MIT
@notice Vests ERC20 tokens for a single address
@dev Intended to be deployed many times via `VotingEscrowFactory`
"""

from vyper.interfaces import ERC20

event Fund:
    recipient: indexed(address)
    amount: uint256

event Claim:
    recipient: indexed(address)
    claimed: uint256

event RugPull:
    recipient: address
    rugged: uint256

event CommitOwnership:
    admin: address

event ApplyOwnership:
    admin: address

recipient: public(address)
token: public(ERC20)
start_time: public(uint256)
end_time: public(uint256)
cliff_length: public(uint256)
total_locked: public(uint256)
total_claimed: public(uint256)
disabled_at: public(uint256)
initialized: public(bool)

admin: public(address)
future_admin: public(address)

@external
def __init__():
    # ensure that the original contract cannot be initialized
    self.initialized = True


@external
@nonreentrant('lock')
def initialize(
    admin: address,
    token: address,
    recipient: address,
    amount: uint256,
    start_time: uint256,
    end_time: uint256,
    cliff_length: uint256,
) -> bool:
    """
    @notice Initialize the contract.
    @dev This function is seperate from `__init__` because of the factory pattern
         used in `VestingEscrowFactory.deploy_vesting_contract`. It may be called
         once per deployment.
    @param admin Admin address
    @param token Address of the ERC20 token being distributed
    @param recipient Address to vest tokens for
    @param amount Amount of tokens being vested for `recipient`
    @param start_time Epoch time at which token distribution starts
    @param end_time Time until everything should be vested
    @param cliff_length Duration after which the first portion vests
    """
    assert not self.initialized  # dev: can only initialize once
    self.initialized = True

    self.token = ERC20(token)
    self.admin = admin
    self.start_time = start_time
    self.end_time = end_time
    self.cliff_length = cliff_length

    assert self.token.transferFrom(msg.sender, self, amount)  # dev: could not fund escrow

    self.recipient = recipient
    self.disabled_at = end_time  # Set to maximum time
    self.total_locked = amount
    log Fund(recipient, amount)

    return True


@internal
@view
def _total_vested_at(time: uint256 = block.timestamp) -> uint256:
    start: uint256 = self.start_time
    end: uint256 = self.end_time
    locked: uint256 = self.total_locked
    if time < start + self.cliff_length:
        return 0
    return min(locked * (time - start) / (end - start), locked)


@internal
@view
def _unclaimed(time: uint256 = block.timestamp) -> uint256:
    return self._total_vested_at(time) - self.total_claimed


@external
@view
def unclaimed() -> uint256:
    """
    @notice Get the number of unclaimed, vested tokens for recipient
    """
    # NOTE: if `rug_pull` is activated, limit by the activation timestamp
    return self._unclaimed(min(block.timestamp, self.disabled_at))


@internal
@view
def _locked(time: uint256 = block.timestamp) -> uint256:
    return self.total_locked - self._total_vested_at(time)


@external
@view
def locked() -> uint256:
    """
    @notice Get the number of locked tokens for recipient
    """
    # NOTE: if `rug_pull` is activated, limit by the activation timestamp
    return self._locked(min(block.timestamp, self.disabled_at))


@external
def claim(beneficiary: address = msg.sender, amount: uint256 = MAX_UINT256):
    """
    @notice Claim tokens which have vested
    @param beneficiary Address to transfer claimed tokens to
    @param amount Amount of tokens to claim
    """
    assert msg.sender == self.recipient  # dev: not recipient

    claim_period_end: uint256 = min(block.timestamp, self.disabled_at)
    claimable: uint256 = min(self._unclaimed(claim_period_end), amount)
    self.total_claimed += claimable

    assert self.token.transfer(beneficiary, claimable)
    log Claim(beneficiary, claimable)


@external
def rug_pull():
    """
    @notice Disable further flow of tokens and clawback the unvested part to admin
    """
    assert msg.sender == self.admin  # dev: admin only
    # NOTE: Rugging more than once is futile

    self.disabled_at = block.timestamp
    ruggable: uint256 = self._locked()

    assert self.token.transfer(self.admin, ruggable)
    log RugPull(self.recipient, ruggable)


@external
def commit_transfer_ownership(addr: address):
    """
    @notice Transfer ownership of the contract to `addr`
    @param addr Address to have ownership transferred to
    """
    assert msg.sender == self.admin  # dev: admin only
    self.future_admin = addr
    log CommitOwnership(addr)


@external
def apply_transfer_ownership():
    """
    @notice Apply pending ownership transfer
    """
    assert msg.sender == self.future_admin  # dev: future admin only
    self.admin = msg.sender
    self.future_admin = ZERO_ADDRESS
    log ApplyOwnership(msg.sender)


@external
def renounce_ownership():
    """
    @notice Renounce admin control of the escrow
    """
    assert msg.sender == self.admin  # dev: admin only
    self.future_admin = ZERO_ADDRESS
    self.admin = ZERO_ADDRESS
    log ApplyOwnership(ZERO_ADDRESS)

@external
def collect_dust(token: address):
    assert msg.sender == self.recipient  # dev: recipient only
    assert (token != self.token.address or block.timestamp > self.disabled_at)
    assert ERC20(token).transfer(self.recipient, ERC20(token).balanceOf(self))

Contract ABI

[{"name":"Fund","inputs":[{"name":"recipient","type":"address","indexed":true},{"name":"amount","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Claim","inputs":[{"name":"recipient","type":"address","indexed":true},{"name":"claimed","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"RugPull","inputs":[{"name":"recipient","type":"address","indexed":false},{"name":"rugged","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"CommitOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyOwnership","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"initialize","inputs":[{"name":"admin","type":"address"},{"name":"token","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"},{"name":"start_time","type":"uint256"},{"name":"end_time","type":"uint256"},{"name":"cliff_length","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":402331},{"stateMutability":"view","type":"function","name":"unclaimed","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":26060},{"stateMutability":"view","type":"function","name":"locked","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":26120},{"stateMutability":"nonpayable","type":"function","name":"claim","inputs":[],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim","inputs":[{"name":"beneficiary","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"claim","inputs":[{"name":"beneficiary","type":"address"},{"name":"amount","type":"uint256"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"rug_pull","inputs":[],"outputs":[],"gas":72184},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"addr","type":"address"}],"outputs":[],"gas":39595},{"stateMutability":"nonpayable","type":"function","name":"apply_transfer_ownership","inputs":[],"outputs":[],"gas":59523},{"stateMutability":"nonpayable","type":"function","name":"renounce_ownership","inputs":[],"outputs":[],"gas":44555},{"stateMutability":"nonpayable","type":"function","name":"collect_dust","inputs":[{"name":"token","type":"address"}],"outputs":[],"gas":14120},{"stateMutability":"view","type":"function","name":"recipient","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2658},{"stateMutability":"view","type":"function","name":"token","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2688},{"stateMutability":"view","type":"function","name":"start_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2718},{"stateMutability":"view","type":"function","name":"end_time","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2748},{"stateMutability":"view","type":"function","name":"cliff_length","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2778},{"stateMutability":"view","type":"function","name":"total_locked","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2808},{"stateMutability":"view","type":"function","name":"total_claimed","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2838},{"stateMutability":"view","type":"function","name":"disabled_at","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2868},{"stateMutability":"view","type":"function","name":"initialized","inputs":[],"outputs":[{"name":"","type":"bool"}],"gas":2898},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2928},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2958}]

600160095561091456600436101561000d5761072f565b600035601c526000513461090657632b4656c881141561011d5760005461090657600160005560043560a01c6109065760243560a01c6109065760443560a01c61090657600954610906576001600955602435600255600435600a5560843560035560a43560045560c435600555602061020060646323b872dd61014052336101605230610180526064356101a05261015c60006002545af11561090657601f3d11156109065760005061020051156109065760443560015560a4356008556064356006556044357fda8220a878ff7a89474ccffdaa31ea1ed1ffbb0207d5051afccc4fbaf81f9bcd61014080808060643581525050602090509050610140a26001600052600060005560206000f35b63669416b881141561017357426008548082111561013b578061013d565b815b90509050610140526101405161014051610160526101605160065801610836565b6101c052610140526101c05160005260206000f35b63cf3090128114156101c95742600854808211156101915780610193565b815b905090506101405261014051610140516101605261016051600658016108ab565b6101c052610140526101c05160005260206000f35b634e71d92d8114156102045733610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61016052610282565b631e83409a81141561024f577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101605260043560a01c610906576020600461014037600050610282565b63aad3ec9681141561027d5760043560a01c6109065760206004610140376020602461016037600050610282565b61039f565b60015433141561090657426008548082111561029e57806102a0565b815b90509050610180526101405161016051610180516101a051610180516101c0526101c05160065801610836565b610220526101a0526101805261016052610140526102205161016051808211156102f757806102f9565b815b905090506101a052600780546101a051818183011061090657808201905090508155506020610260604463a9059cbb6101c052610140516101e0526101a051610200526101dc60006002545af11561090657601f3d111561090657600050610260511561090657610140517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d46101c08080806101a051815250506020905090506101c0a2005b63713533b381141561046357600a5433141561090657426008556101405160065801610895565b610160526101405261016051610140526020610200604463a9059cbb61016052600a5461018052610140516101a05261017c60006002545af11561090657601f3d1115610906576000506102005115610906577f26c39210ac9cda246a6cc6e33da67c1971d5f14bbc32e2b66c3e14ab813549d76101608080806001548152505060208101905080806101405181525050604090509050610160a1005b636b441a408114156104c35760043560a01c61090657600a5433141561090657600435600b557f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e961014080808060043581525050602090509050610140a1005b636a1c05ae81141561051a57600b543314156109065733600a556000600b557febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056101408080803381525050602090509050610140a1005b63b15e13ee81141561057357600a54331415610906576000600b556000600a557febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a1189105610140808080600081525050602090509050610140a1005b638956c9838114156106255760043560a01c610906576001543314156109065760025460043518156105a65760016105ac565b60085442115b5b15610906576020610280604463a9059cbb6101e0526001546102005260206101c060246370a0823161014052306101605261015c6004355afa1561090657601f3d1115610906576000506101c051610220526101fc60006004355af11561090657601f3d111561090657600050610280511561090657005b6366d003ac81141561063d5760015460005260206000f35b63fc0c546a8114156106555760025460005260206000f35b63834ee41781141561066d5760035460005260206000f35b63162433568114156106855760045460005260206000f35b6394abf76081141561069d5760055460005260206000f35b633c48a6208114156106b55760065460005260206000f35b636af904c68114156106cd5760075460005260206000f35b63ac1a2f698114156106e55760085460005260206000f35b63158ef93e8114156106fd5760095460005260206000f35b63f851a44081141561071557600a5460005260206000f35b6317f7182a81141561072d57600b5460005260206000f35b505b60006000fd610747575b610160524261014052610760565b60001561075f575b6101605261014052600050610760565b5b600354610180526004546101a0526006546101c05261018051600554818183011061090657808201905090506101405110156107a457600060005260005161016051565b6101c0516101405161018051808210610906578082039050905080820282158284830414171561090657809050905090506101a051610180518082106109065780820390509050808015610906578204905090506101c0518082111561080a578061080c565b815b90509050600052600051610160515661082e575b610160524261014052610847565b600015610846575b6101605261014052600050610847565b5b61014051610160516101405161018052610180516006580161074f565b6101e05261016052610140526101e051600754808210610906578082039050905060005260005161016051566108a3575b6101605242610140526108bc565b6000156108bb575b61016052610140526000506108bc565b5b60065461014051610160516101405161018052610180516006580161074f565b6101e05261016052610140526101e051808210610906578082039050905060005260005161016051565b600080fd5b61000961091403610009600039610009610914036000f3

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.