ETH Price: $2,667.45 (-2.79%)

Contract

0x8E0c00ed546602fD9927DF742bbAbF726D5B0d16
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Apply_set_admins192890442024-02-23 8:16:59361 days ago1708676219IN
0x8E0c00ed...26D5B0d16
0 ETH0.0020029454.35992493
Commit_set_admin...192070182024-02-11 19:52:59373 days ago1707681179IN
0x8E0c00ed...26D5B0d16
0 ETH0.0035825151.41241101
Kill_delegation192070122024-02-11 19:51:47373 days ago1707681107IN
0x8E0c00ed...26D5B0d16
0 ETH0.0013759251.36522557
Set_delegation179649672023-08-21 18:44:35547 days ago1692643475IN
0x8E0c00ed...26D5B0d16
0 ETH0.001685530.56444752
Set_delegation151697732022-07-19 0:16:00945 days ago1658189760IN
0x8E0c00ed...26D5B0d16
0 ETH0.0029027555.50622017
Set_delegation151669782022-07-18 13:44:01946 days ago1658151841IN
0x8E0c00ed...26D5B0d16
0 ETH0.0013318225.67971971
Set_delegation131693452021-09-06 1:49:451261 days ago1630892985IN
0x8E0c00ed...26D5B0d16
0 ETH0.00459248101.06474055
Set_delegation131687192021-09-05 23:30:401261 days ago1630884640IN
0x8E0c00ed...26D5B0d16
0 ETH0.0037615382.77848854

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Vyper_contract

Compiler Version
vyper:0.2.15

Optimization Enabled:
N/A

Other Settings:
petersburg EvmVersion, MIT license

Contract Source Code (Vyper language format)

# @version 0.2.15
"""
@title Voting Escrow Delegation Proxy
@author Curve Finance
@license MIT
"""

from vyper.interfaces import ERC20


interface VeDelegation:
    def adjusted_balance_of(_account: address) -> uint256: view


event CommitAdmins:
    ownership_admin: address
    emergency_admin: address

event ApplyAdmins:
    ownership_admin: address
    emergency_admin: address

event DelegationSet:
    delegation: address


VOTING_ESCROW: constant(address) = 0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2


delegation: public(address)

emergency_admin: public(address)
ownership_admin: public(address)
future_emergency_admin: public(address)
future_ownership_admin: public(address)


@external
def __init__(_delegation: address, _o_admin: address, _e_admin: address):
    self.delegation = _delegation

    self.ownership_admin = _o_admin
    self.emergency_admin = _e_admin

    log DelegationSet(_delegation)


@view
@external
def adjusted_balance_of(_account: address) -> uint256:
    """
    @notice Get the adjusted veCRV balance from the active boost delegation contract
    @param _account The account to query the adjusted veCRV balance of
    @return veCRV balance
    """
    _delegation: address = self.delegation
    if _delegation == ZERO_ADDRESS:
        return ERC20(VOTING_ESCROW).balanceOf(_account)
    return VeDelegation(_delegation).adjusted_balance_of(_account)


@external
def kill_delegation():
    """
    @notice Set delegation contract to 0x00, disabling boost delegation
    @dev Callable by the emergency admin in case of an issue with the delegation logic
    """
    assert msg.sender in [self.ownership_admin, self.emergency_admin]

    self.delegation = ZERO_ADDRESS
    log DelegationSet(ZERO_ADDRESS)


@external
def set_delegation(_delegation: address):
    """
    @notice Set the delegation contract
    @dev Only callable by the ownership admin
    @param _delegation `VotingEscrowDelegation` deployment address
    """
    assert msg.sender == self.ownership_admin

    # call `adjusted_balance_of` to make sure it works
    VeDelegation(_delegation).adjusted_balance_of(msg.sender)

    self.delegation = _delegation
    log DelegationSet(_delegation)


@external
def commit_set_admins(_o_admin: address, _e_admin: address):
    """
    @notice Set ownership admin to `_o_admin` and emergency admin to `_e_admin`
    @param _o_admin Ownership admin
    @param _e_admin Emergency admin
    """
    assert msg.sender == self.ownership_admin, "Access denied"

    self.future_ownership_admin = _o_admin
    self.future_emergency_admin = _e_admin

    log CommitAdmins(_o_admin, _e_admin)


@external
def apply_set_admins():
    """
    @notice Apply the effects of `commit_set_admins`
    """
    assert msg.sender == self.ownership_admin, "Access denied"

    _o_admin: address = self.future_ownership_admin
    _e_admin: address = self.future_emergency_admin
    self.ownership_admin = _o_admin
    self.emergency_admin = _e_admin

    log ApplyAdmins(_o_admin, _e_admin)

Contract Security Audit

Contract ABI

[{"name":"CommitAdmins","inputs":[{"name":"ownership_admin","type":"address","indexed":false},{"name":"emergency_admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyAdmins","inputs":[{"name":"ownership_admin","type":"address","indexed":false},{"name":"emergency_admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"DelegationSet","inputs":[{"name":"delegation","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_delegation","type":"address"},{"name":"_o_admin","type":"address"},{"name":"_e_admin","type":"address"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"adjusted_balance_of","inputs":[{"name":"_account","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":7389},{"stateMutability":"nonpayable","type":"function","name":"kill_delegation","inputs":[],"outputs":[],"gas":26337},{"stateMutability":"nonpayable","type":"function","name":"set_delegation","inputs":[{"name":"_delegation","type":"address"}],"outputs":[],"gas":41322},{"stateMutability":"nonpayable","type":"function","name":"commit_set_admins","inputs":[{"name":"_o_admin","type":"address"},{"name":"_e_admin","type":"address"}],"outputs":[],"gas":74708},{"stateMutability":"nonpayable","type":"function","name":"apply_set_admins","inputs":[],"outputs":[],"gas":78756},{"stateMutability":"view","type":"function","name":"delegation","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2538},{"stateMutability":"view","type":"function","name":"emergency_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2568},{"stateMutability":"view","type":"function","name":"ownership_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2598},{"stateMutability":"view","type":"function","name":"future_emergency_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2628},{"stateMutability":"view","type":"function","name":"future_ownership_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2658}]

606061048061014039602061048060c03960c05160a01c61047b57602060206104800160c03960c05160a01c61047b57602060406104800160c03960c05160a01c61047b57610140516000556101605160025561018051600155610140516101a0527f963001cf3a0c5cdcfc26b2710abe2fe859b3565482158b7cb34f59b6eaff521260206101a0a161046356600436101561000d576103cb565b600035601c52600051346103d15763bbf7408a8114156100cd5760043560a01c6103d157600054610140526101405161008f5760206101e060246370a08231610160526004356101805261017c735f3b5dfeb7b28cdbd7faba78963ee202a494e2a25afa156103d157601f3d11156103d1576000506101e05160005260206000f35b60206101e0602463bbf7408a610160526004356101805261017c610140515afa156103d157601f3d11156103d1576000506101e05160005260206000f35b634b74efb781141561016957600254610160526001546101805260006101405261014061012060006002818352015b6101205160200261016001513314156101185760018352610129565b5b81516001018083528114156100fc575b50505061014051156103d15760006000556000610140527f963001cf3a0c5cdcfc26b2710abe2fe859b3565482158b7cb34f59b6eaff52126020610140a1005b63f4b446a38114156101f15760043560a01c6103d1576002543314156103d15760206101c0602463bbf7408a61014052336101605261015c6004355afa156103d157601f3d11156103d1576000506101c050600435600055600435610140527f963001cf3a0c5cdcfc26b2710abe2fe859b3565482158b7cb34f59b6eaff52126020610140a1005b63e3a8d3ab8114156102a25760043560a01c6103d15760243560a01c6103d157600254331461025f576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b60043560045560243560035560043561014052602435610160527f8f5425b30e6270c1011973f0ccf6d7795cc10623631523e4c45d2837d337d5746040610140a1005b63618939218114156103515760025433146102fc576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b600454610140526003546101605261014051600255610160516001556101405161018052610160516101a0527fe8d7597c306457cd1fa4eb0e165a1a4c3aea9808e274ea97c6b5d9f73a3c477f6040610180a1005b63df5cf7238114156103695760005460005260206000f35b63680c77838114156103815760015460005260206000f35b6347c8715f8114156103995760025460005260206000f35b635866507a8114156103b15760035460005260206000f35b633c2fcbf48114156103c95760045460005260206000f35b505b60006000fd5b600080fd5b61008d6104630361008d60003961008d610463036000f35b600080fd000000000000000000000000c620aafd6caa3cb7566e54176dd2ed1a81d056550000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a

Deployed Bytecode

0x600436101561000d576103cb565b600035601c52600051346103d15763bbf7408a8114156100cd5760043560a01c6103d157600054610140526101405161008f5760206101e060246370a08231610160526004356101805261017c735f3b5dfeb7b28cdbd7faba78963ee202a494e2a25afa156103d157601f3d11156103d1576000506101e05160005260206000f35b60206101e0602463bbf7408a610160526004356101805261017c610140515afa156103d157601f3d11156103d1576000506101e05160005260206000f35b634b74efb781141561016957600254610160526001546101805260006101405261014061012060006002818352015b6101205160200261016001513314156101185760018352610129565b5b81516001018083528114156100fc575b50505061014051156103d15760006000556000610140527f963001cf3a0c5cdcfc26b2710abe2fe859b3565482158b7cb34f59b6eaff52126020610140a1005b63f4b446a38114156101f15760043560a01c6103d1576002543314156103d15760206101c0602463bbf7408a61014052336101605261015c6004355afa156103d157601f3d11156103d1576000506101c050600435600055600435610140527f963001cf3a0c5cdcfc26b2710abe2fe859b3565482158b7cb34f59b6eaff52126020610140a1005b63e3a8d3ab8114156102a25760043560a01c6103d15760243560a01c6103d157600254331461025f576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b60043560045560243560035560043561014052602435610160527f8f5425b30e6270c1011973f0ccf6d7795cc10623631523e4c45d2837d337d5746040610140a1005b63618939218114156103515760025433146102fc576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b600454610140526003546101605261014051600255610160516001556101405161018052610160516101a0527fe8d7597c306457cd1fa4eb0e165a1a4c3aea9808e274ea97c6b5d9f73a3c477f6040610180a1005b63df5cf7238114156103695760005460005260206000f35b63680c77838114156103815760015460005260206000f35b6347c8715f8114156103995760025460005260206000f35b635866507a8114156103b15760035460005260206000f35b633c2fcbf48114156103c95760045460005260206000f35b505b60006000fd5b600080fd

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000c620aafd6caa3cb7566e54176dd2ed1a81d056550000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a

-----Decoded View---------------
Arg [0] : _delegation (address): 0xc620aaFD6Caa3Cb7566e54176dD2ED1A81d05655
Arg [1] : _o_admin (address): 0x7EeAC6CDdbd1D0B8aF061742D41877D7F707289a
Arg [2] : _e_admin (address): 0x7EeAC6CDdbd1D0B8aF061742D41877D7F707289a

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000c620aafd6caa3cb7566e54176dd2ed1a81d05655
Arg [1] : 0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a
Arg [2] : 0000000000000000000000007eeac6cddbd1d0b8af061742d41877d7f707289a


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.