ETH Price: $3,291.63 (-3.48%)
Gas: 14 Gwei

Contract

0x849eab964B112F8A7F79Ba1301Cac53910F2BB2E
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Claim201540232024-06-23 11:14:3510 days ago1719141275IN
0x849eab96...910F2BB2E
0 ETH0.000125092.25492897
Claim199603692024-05-27 9:39:3537 days ago1716802775IN
0x849eab96...910F2BB2E
0 ETH0.0018360124.19754226
Claim196358772024-04-12 0:13:3582 days ago1712880815IN
0x849eab96...910F2BB2E
0 ETH0.0009053111.93153214
Claim196185892024-04-09 14:09:5985 days ago1712671799IN
0x849eab96...910F2BB2E
0 ETH0.0022896236.8130164
Claim195288012024-03-27 23:34:5997 days ago1711582499IN
0x849eab96...910F2BB2E
0 ETH0.0020866927.50132042
Claim195034862024-03-24 9:21:59101 days ago1711272119IN
0x849eab96...910F2BB2E
0 ETH0.0012976317.10200193
Claim192613622024-02-19 11:03:47135 days ago1708340627IN
0x849eab96...910F2BB2E
0 ETH0.0019280731
Claim191623652024-02-05 13:27:35149 days ago1707139655IN
0x849eab96...910F2BB2E
0 ETH0.0008531513.71724117
Claim190079782024-01-14 22:02:23170 days ago1705269743IN
0x849eab96...910F2BB2E
0 ETH0.0015680425.21137406
Claim188693092023-12-26 10:35:11190 days ago1703586911IN
0x849eab96...910F2BB2E
0 ETH0.001096817.63466511
Claim187631232023-12-11 13:00:23205 days ago1702299623IN
0x849eab96...910F2BB2E
0 ETH0.0023903431.50325687
Claim187436772023-12-08 19:39:59207 days ago1702064399IN
0x849eab96...910F2BB2E
0 ETH0.0022942341.36067395
Claim187433332023-12-08 18:29:59208 days ago1702060199IN
0x849eab96...910F2BB2E
0 ETH0.0024643544.42764866
Claim187410562023-12-08 10:50:47208 days ago1702032647IN
0x849eab96...910F2BB2E
0 ETH0.0024840532.73829102
Claim187394882023-12-08 5:35:11208 days ago1702013711IN
0x849eab96...910F2BB2E
0 ETH0.0018774433.84679752
Claim187088462023-12-03 22:30:47212 days ago1701642647IN
0x849eab96...910F2BB2E
0 ETH0.0024509932.30269083
Claim185456252023-11-11 2:09:59235 days ago1699668599IN
0x849eab96...910F2BB2E
0 ETH0.0020846833.52173793
Claim185013302023-11-04 21:24:47241 days ago1699133087IN
0x849eab96...910F2BB2E
0 ETH0.0007337713.14493059
Claim185013232023-11-04 21:23:23241 days ago1699133003IN
0x849eab96...910F2BB2E
0 ETH0.0007497513.51657327
Claim185012772023-11-04 21:13:59241 days ago1699132439IN
0x849eab96...910F2BB2E
0 ETH0.0007192312.96650021
Claim184979012023-11-04 9:52:35242 days ago1699091555IN
0x849eab96...910F2BB2E
0 ETH0.0013993918.44312991
Claim183279512023-10-11 14:58:23266 days ago1697036303IN
0x849eab96...910F2BB2E
0 ETH0.0009283112.23463957
Claim182807142023-10-05 0:24:35272 days ago1696465475IN
0x849eab96...910F2BB2E
0 ETH0.000440567.08348771
Claim182366722023-09-28 20:39:59278 days ago1695933599IN
0x849eab96...910F2BB2E
0 ETH0.00071829.46550205
Claim182196802023-09-26 11:33:47281 days ago1695728027IN
0x849eab96...910F2BB2E
0 ETH0.0008085413
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x575CCD8e...000318E2c
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.4

Optimization Enabled:
N/A

Other Settings:
MIT license

Contract Source Code (Vyper language format)

# @version 0.2.4
"""
@title Vesting Escrow
@author Curve Finance
@license MIT
@notice Vests `ERC20CRV` tokens for multiple addresses over multiple vesting periods
"""


from vyper.interfaces import ERC20

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

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

event ToggleDisable:
    recipient: address
    disabled: bool

event CommitOwnership:
    admin: address

event ApplyOwnership:
    admin: address


token: public(address)
start_time: public(uint256)
end_time: public(uint256)
initial_locked: public(HashMap[address, uint256])
total_claimed: public(HashMap[address, uint256])

initial_locked_supply: public(uint256)
unallocated_supply: public(uint256)

can_disable: public(bool)
disabled_at: public(HashMap[address, uint256])

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

fund_admins_enabled: public(bool)
fund_admins: public(HashMap[address, bool])


@external
def __init__(
    _token: address,
    _start_time: uint256,
    _end_time: uint256,
    _can_disable: bool,
    _fund_admins: address[4]
):
    """
    @param _token Address of the ERC20 token being distributed
    @param _start_time Timestamp at which the distribution starts. Should be in
        the future, so that we have enough time to VoteLock everyone
    @param _end_time Time until everything should be vested
    @param _can_disable Whether admin can disable accounts in this deployment
    @param _fund_admins Temporary admin accounts used only for funding
    """
    assert _start_time >= block.timestamp
    assert _end_time > _start_time

    self.token = _token
    self.admin = msg.sender
    self.start_time = _start_time
    self.end_time = _end_time
    self.can_disable = _can_disable

    _fund_admins_enabled: bool = False
    for addr in _fund_admins:
        if addr != ZERO_ADDRESS:
            self.fund_admins[addr] = True
            if not _fund_admins_enabled:
                _fund_admins_enabled = True
                self.fund_admins_enabled = True



@external
def add_tokens(_amount: uint256):
    """
    @notice Transfer vestable tokens into the contract
    @dev Handled separate from `fund` to reduce transaction count when using funding admins
    @param _amount Number of tokens to transfer
    """
    assert msg.sender == self.admin  # dev: admin only
    assert ERC20(self.token).transferFrom(msg.sender, self, _amount)  # dev: transfer failed
    self.unallocated_supply += _amount


@external
@nonreentrant('lock')
def fund(_recipients: address[100], _amounts: uint256[100]):
    """
    @notice Vest tokens for multiple recipients
    @param _recipients List of addresses to fund
    @param _amounts Amount of vested tokens for each address
    """
    if msg.sender != self.admin:
        assert self.fund_admins[msg.sender]  # dev: admin only
        assert self.fund_admins_enabled  # dev: fund admins disabled

    _total_amount: uint256 = 0
    for i in range(100):
        amount: uint256 = _amounts[i]
        recipient: address = _recipients[i]
        if recipient == ZERO_ADDRESS:
            break
        _total_amount += amount
        self.initial_locked[recipient] += amount
        log Fund(recipient, amount)

    self.initial_locked_supply += _total_amount
    self.unallocated_supply -= _total_amount


@external
def toggle_disable(_recipient: address):
    """
    @notice Disable or re-enable a vested address's ability to claim tokens
    @dev When disabled, the address is only unable to claim tokens which are still
         locked at the time of this call. It is not possible to block the claim
         of tokens which have already vested.
    @param _recipient Address to disable or enable
    """
    assert msg.sender == self.admin  # dev: admin only
    assert self.can_disable, "Cannot disable"

    is_disabled: bool = self.disabled_at[_recipient] == 0
    if is_disabled:
        self.disabled_at[_recipient] = block.timestamp
    else:
        self.disabled_at[_recipient] = 0

    log ToggleDisable(_recipient, is_disabled)


@external
def disable_can_disable():
    """
    @notice Disable the ability to call `toggle_disable`
    """
    assert msg.sender == self.admin  # dev: admin only
    self.can_disable = False


@external
def disable_fund_admins():
    """
    @notice Disable the funding admin accounts
    """
    assert msg.sender == self.admin  # dev: admin only
    self.fund_admins_enabled = False


@internal
@view
def _total_vested_of(_recipient: address, _time: uint256 = block.timestamp) -> uint256:
    start: uint256 = self.start_time
    end: uint256 = self.end_time
    locked: uint256 = self.initial_locked[_recipient]
    if _time < start:
        return 0
    return min(locked * (_time - start) / (end - start), locked)


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


@external
@view
def vestedSupply() -> uint256:
    """
    @notice Get the total number of tokens which have vested, that are held
            by this contract
    """
    return self._total_vested()


@external
@view
def lockedSupply() -> uint256:
    """
    @notice Get the total number of tokens which are still locked
            (have not yet vested)
    """
    return self.initial_locked_supply - self._total_vested()


@external
@view
def vestedOf(_recipient: address) -> uint256:
    """
    @notice Get the number of tokens which have vested for a given address
    @param _recipient address to check
    """
    return self._total_vested_of(_recipient)


@external
@view
def balanceOf(_recipient: address) -> uint256:
    """
    @notice Get the number of unclaimed, vested tokens for a given address
    @param _recipient address to check
    """
    return self._total_vested_of(_recipient) - self.total_claimed[_recipient]


@external
@view
def lockedOf(_recipient: address) -> uint256:
    """
    @notice Get the number of locked tokens for a given address
    @param _recipient address to check
    """
    return self.initial_locked[_recipient] - self._total_vested_of(_recipient)


@external
@nonreentrant('lock')
def claim(addr: address = msg.sender):
    """
    @notice Claim tokens which have vested
    @param addr Address to claim tokens for
    """
    t: uint256 = self.disabled_at[addr]
    if t == 0:
        t = block.timestamp
    claimable: uint256 = self._total_vested_of(addr, t) - self.total_claimed[addr]
    self.total_claimed[addr] += claimable
    assert ERC20(self.token).transfer(addr, claimable)

    log Claim(addr, claimable)


@external
def commit_transfer_ownership(addr: address) -> bool:
    """
    @notice Transfer ownership of GaugeController 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)

    return True


@external
def apply_transfer_ownership() -> bool:
    """
    @notice Apply pending ownership transfer
    """
    assert msg.sender == self.admin  # dev: admin only
    _admin: address = self.future_admin
    assert _admin != ZERO_ADDRESS  # dev: admin not set
    self.admin = _admin
    log ApplyOwnership(_admin)

    return True

Contract Security Audit

Contract ABI

[{"name":"Fund","inputs":[{"type":"address","name":"recipient","indexed":true},{"type":"uint256","name":"amount","indexed":false}],"anonymous":false,"type":"event"},{"name":"Claim","inputs":[{"type":"address","name":"recipient","indexed":true},{"type":"uint256","name":"claimed","indexed":false}],"anonymous":false,"type":"event"},{"name":"ToggleDisable","inputs":[{"type":"address","name":"recipient","indexed":false},{"type":"bool","name":"disabled","indexed":false}],"anonymous":false,"type":"event"},{"name":"CommitOwnership","inputs":[{"type":"address","name":"admin","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyOwnership","inputs":[{"type":"address","name":"admin","indexed":false}],"anonymous":false,"type":"event"},{"outputs":[],"inputs":[{"type":"address","name":"_token"},{"type":"uint256","name":"_start_time"},{"type":"uint256","name":"_end_time"},{"type":"bool","name":"_can_disable"},{"type":"address[4]","name":"_fund_admins"}],"stateMutability":"nonpayable","type":"constructor"},{"name":"add_tokens","outputs":[],"inputs":[{"type":"uint256","name":"_amount"}],"stateMutability":"nonpayable","type":"function","gas":39108},{"name":"fund","outputs":[],"inputs":[{"type":"address[100]","name":"_recipients"},{"type":"uint256[100]","name":"_amounts"}],"stateMutability":"nonpayable","type":"function","gas":3962646},{"name":"toggle_disable","outputs":[],"inputs":[{"type":"address","name":"_recipient"}],"stateMutability":"nonpayable","type":"function","gas":40280},{"name":"disable_can_disable","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":21295},{"name":"disable_fund_admins","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":21325},{"name":"vestedSupply","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":4468},{"name":"lockedSupply","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":5465},{"name":"vestedOf","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_recipient"}],"stateMutability":"view","type":"function","gas":5163},{"name":"balanceOf","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_recipient"}],"stateMutability":"view","type":"function","gas":6275},{"name":"lockedOf","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"_recipient"}],"stateMutability":"view","type":"function","gas":6305},{"name":"claim","outputs":[],"inputs":[],"stateMutability":"nonpayable","type":"function"},{"name":"claim","outputs":[],"inputs":[{"type":"address","name":"addr"}],"stateMutability":"nonpayable","type":"function"},{"name":"commit_transfer_ownership","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"addr"}],"stateMutability":"nonpayable","type":"function","gas":38032},{"name":"apply_transfer_ownership","outputs":[{"type":"bool","name":""}],"inputs":[],"stateMutability":"nonpayable","type":"function","gas":38932},{"name":"token","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1601},{"name":"start_time","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1631},{"name":"end_time","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1661},{"name":"initial_locked","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":1845},{"name":"total_claimed","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":1875},{"name":"initial_locked_supply","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1751},{"name":"unallocated_supply","outputs":[{"type":"uint256","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1781},{"name":"can_disable","outputs":[{"type":"bool","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1811},{"name":"disabled_at","outputs":[{"type":"uint256","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":1995},{"name":"admin","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1871},{"name":"future_admin","outputs":[{"type":"address","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1901},{"name":"fund_admins_enabled","outputs":[{"type":"bool","name":""}],"inputs":[],"stateMutability":"view","type":"function","gas":1931},{"name":"fund_admins","outputs":[{"type":"bool","name":""}],"inputs":[{"type":"address","name":"arg0"}],"stateMutability":"view","type":"function","gas":2115}]

Deployed Bytecode

0x600436101561000d57610d3d565b600035601c52740100000000000000000000000000000000000000006020526f7fffffffffffffffffffffffffffffff6040527fffffffffffffffffffffffffffffffff8000000000000000000000000000000060605274012a05f1fffffffffffffffffffffffffdabf41c006080527ffffffffffffffffffffffffed5fa0e000000000000000000000000000000000060a05263d78c4464600051141561013b5734156100ba57600080fd5b60095433146100c857600080fd5b602061020060646323b872dd61014052336101605230610180526004356101a05261015c60006000545af16100fc57600080fd5b601f3d1161010957600080fd5b6000506102005161011957600080fd5b6006805460043581818301101561012f57600080fd5b80820190509050815550005b63dc4555da600051141561030f5762ffffff541561015857600080fd5b600162ffffff55341561016a57600080fd5b6000610120525b6101205160040135602051811061018757600080fd5b506020610120510161012052610c806101205110156101a557610171565b6009543318156101d457600c3360e05260c052604060c020546101c757600080fd5b600b546101d357600080fd5b5b60006101405261016060006064818352015b610c8461016051606481106101fa57600080fd5b6020020135610180526004610160516064811061021657600080fd5b60200201356101a0526101a051151561022e576102c4565b61014080516101805181818301101561024657600080fd5b8082019050905081525060036101a05160e05260c052604060c02080546101805181818301101561027657600080fd5b80820190509050815550610180516101c0526101a0517fda8220a878ff7a89474ccffdaa31ea1ed1ffbb0207d5051afccc4fbaf81f9bcd60206101c0a25b81516001018083528114156101e6575b505060058054610140518181830110156102dd57600080fd5b808201905090508155506006805461014051808210156102fc57600080fd5b80820390509050815550600062ffffff55005b6336fc59c7600051141561041657341561032857600080fd5b600435602051811061033957600080fd5b50600954331461034857600080fd5b6308c379a061014052602061016052600e610180527f43616e6e6f742064697361626c650000000000000000000000000000000000006101a0526101805060075461039457606461015cfd5b600860043560e05260c052604060c02054156101e0526101e051156103ca5742600860043560e05260c052604060c020556103de565b6000600860043560e05260c052604060c020555b600435610200526101e051610220527fcc8442d1b68aaf1cdb1da2b3d9ebf3daad586d3404166b75d744a8b5092cefad6040610200a1005b632a1e50fd600051141561044457341561042f57600080fd5b600954331461043d57600080fd5b6000600755005b6372dd3ee8600051141561047257341561045d57600080fd5b600954331461046b57600080fd5b6000600b55005b60001561048f575b610180524261016052610140526000506104b3565b6000156104ab575b6101805261014052610160526000506104b3565b600015610582575b6001546101a0526002546101c05260036101405160e05260c052604060c020546101e0526101a0516101605110156104f45760006000526000516101805156505b6101e051610160516101a0518082101561050d57600080fd5b80820390509050808202821582848304141761052857600080fd5b809050905090506101c0516101a0518082101561054457600080fd5b80820390509050808061055657600080fd5b8204905090506101e0518082111561056e5780610570565b815b90509050600052600051610180515650005b600015610648575b6101405260015461016052600254610180526005546101a052610160514210156105bd5760006000526000516101405156505b6101a0514261016051808210156105d357600080fd5b8082039050905080820282158284830414176105ee57600080fd5b8090509050905061018051610160518082101561060a57600080fd5b80820390509050808061061c57600080fd5b8204905090506101a051808211156106345780610636565b815b90509050600052600051610140515650005b63d9844dc0600051141561067d57341561066157600080fd5b6006580161058a565b610140526101405160005260206000f350005b63ca5c7b9160005114156106c957341561069657600080fd5b6005546006580161058a565b6101405261014051808210156106b757600080fd5b8082039050905060005260206000f350005b6394477104600051141561071b5734156106e257600080fd5b60043560205181106106f357600080fd5b5060043561014052610140516006580161047a565b6101a0526101a05160005260206000f350005b6370a08231600051141561079257341561073457600080fd5b600435602051811061074557600080fd5b5060043561014052610140516006580161047a565b6101a0526101a051600460043560e05260c052604060c020548082101561078057600080fd5b8082039050905060005260206000f350005b63a5f1e28260005114156108095734156107ab57600080fd5b60043560205181106107bc57600080fd5b50600360043560e05260c052604060c0205460043561014052610140516006580161047a565b6101a0526101a051808210156107f757600080fd5b8082039050905060005260206000f350005b634e71d92d6000511415610821573361014052610858565b631e83409a600051141561085057600435602051811061084057600080fd5b6020600461014037600050610858565b6000156109c6575b62ffffff541561086757600080fd5b600162ffffff55341561087957600080fd5b60086101405160e05260c052604060c020546101605261016051151561089f5742610160525b610140516101605161018051610140516101c052610160516101e0526101e0516101c05160065801610497565b610240526101805261016052610140526102405160046101405160e05260c052604060c02054808210156108ff57600080fd5b808203905090506101805260046101405160e05260c052604060c02080546101805181818301101561093057600080fd5b808201905090508155506020610300604463a9059cbb610260526101405161028052610180516102a05261027c60006000545af161096d57600080fd5b601f3d1161097a57600080fd5b6000506103005161098a57600080fd5b6101805161032052610140517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d46020610320a2600062ffffff55005b636b441a406000511415610a405734156109df57600080fd5b60043560205181106109f057600080fd5b5060095433146109ff57600080fd5b600435600a55600435610140527f2f56810a6bf40af059b96d3aea4db54081f378029a518390491093a7b67032e96020610140a1600160005260206000f350005b636a1c05ae6000511415610ac1573415610a5957600080fd5b6009543314610a6757600080fd5b600a546101405260006101405118610a7e57600080fd5b6101405160095561014051610160527febee2d5739011062cb4f14113f3b36bf0ffe3da5c0568f64189d1012a11891056020610160a1600160005260206000f350005b63fc0c546a6000511415610ae8573415610ada57600080fd5b60005460005260206000f350005b63834ee4176000511415610b0f573415610b0157600080fd5b60015460005260206000f350005b63162433566000511415610b36573415610b2857600080fd5b60025460005260206000f350005b6350b3aad46000511415610b7d573415610b4f57600080fd5b6004356020518110610b6057600080fd5b50600360043560e05260c052604060c0205460005260206000f350005b63b8638e1e6000511415610bc4573415610b9657600080fd5b6004356020518110610ba757600080fd5b50600460043560e05260c052604060c0205460005260206000f350005b6321dc49b46000511415610beb573415610bdd57600080fd5b60055460005260206000f350005b630b080cc26000511415610c12573415610c0457600080fd5b60065460005260206000f350005b630568de416000511415610c39573415610c2b57600080fd5b60075460005260206000f350005b636b10247d6000511415610c80573415610c5257600080fd5b6004356020518110610c6357600080fd5b50600860043560e05260c052604060c0205460005260206000f350005b63f851a4406000511415610ca7573415610c9957600080fd5b60095460005260206000f350005b6317f7182a6000511415610cce573415610cc057600080fd5b600a5460005260206000f350005b63144d4f256000511415610cf5573415610ce757600080fd5b600b5460005260206000f350005b631696c3876000511415610d3c573415610d0e57600080fd5b6004356020518110610d1f57600080fd5b50600c60043560e05260c052604060c0205460005260206000f350005b5b60006000fd

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.