Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x52701bFA...4Cb77DAe3 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.16
Contract Source Code (Vyper language format)
# @version 0.2.16
"""
@title Voting Escrow Delegation Proxy
@author Angle Protocol
@license MIT
"""
# Full fork from:
# Curve Finance's veBoostProxy
from vyper.interfaces import ERC20
interface VeDelegation:
def adjusted_balance_of(_account: address) -> uint256: view
event CommitAdmin:
admin: address
event ApplyAdmin:
admin: address
event DelegationSet:
delegation: address
voting_escrow: public(address)
delegation: public(address)
admin: public(address)
future_admin: public(address)
@external
def __init__(_voting_escrow: address, _delegation: address, _admin: address):
assert _voting_escrow != ZERO_ADDRESS
assert _admin != ZERO_ADDRESS
self.voting_escrow = _voting_escrow
self.delegation = _delegation
self.admin = _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(self.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 == self.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.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_admin(_admin: address):
"""
@notice Set admin to `_admin`
@param _admin Ownership admin
"""
assert msg.sender == self.admin, "Access denied"
self.future_admin = _admin
log CommitAdmin(_admin)
@external
def accept_transfer_ownership():
"""
@notice Accept a pending ownership transfer
"""
_admin: address = self.future_admin
assert msg.sender == _admin # dev: future admin only
self.admin = _admin
log ApplyAdmin(_admin)Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"name":"CommitAdmin","inputs":[{"name":"admin","type":"address","indexed":false}],"anonymous":false,"type":"event"},{"name":"ApplyAdmin","inputs":[{"name":"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":"_voting_escrow","type":"address"},{"name":"_delegation","type":"address"},{"name":"_admin","type":"address"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"adjusted_balance_of","inputs":[{"name":"_account","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":9489},{"stateMutability":"nonpayable","type":"function","name":"kill_delegation","inputs":[],"outputs":[],"gas":24369},{"stateMutability":"nonpayable","type":"function","name":"set_delegation","inputs":[{"name":"_delegation","type":"address"}],"outputs":[],"gas":41872},{"stateMutability":"nonpayable","type":"function","name":"commit_admin","inputs":[{"name":"_admin","type":"address"}],"outputs":[],"gas":39561},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[],"outputs":[],"gas":39480},{"stateMutability":"view","type":"function","name":"voting_escrow","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2538},{"stateMutability":"view","type":"function","name":"delegation","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2568},{"stateMutability":"view","type":"function","name":"admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2598},{"stateMutability":"view","type":"function","name":"future_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2628}]Contract Creation Code
0x60606103de6101403960206103de60c03960c05160a01c6103d957602060206103de0160c03960c05160a01c6103d957602060406103de0160c03960c05160a01c6103d95760006101405118156103d95760006101805118156103d9576101405160005561016051600155610180516002557f963001cf3a0c5cdcfc26b2710abe2fe859b3565482158b7cb34f59b6eaff52126101a080808061016051815250506020905090506101a0a16103c156600436101561000d57610307565b600035601c526000513461030d5763bbf7408a8114156100bb5760043560a01c61030d57600154610140526101405161007d5760206101e060246370a08231610160526004356101805261017c6000545afa1561030d57601f3d111561030d576000506101e05160005260206000f35b60206101e0602463bbf7408a610160526004356101805261017c610140515afa1561030d57601f3d111561030d576000506101e05160005260206000f35b634b74efb781141561010f5760025433141561030d5760006001557f963001cf3a0c5cdcfc26b2710abe2fe859b3565482158b7cb34f59b6eaff5212610140808080600081525050602090509050610140a1005b63f4b446a38114156101a15760043560a01c61030d5760025433141561030d5760206101c0602463bbf7408a61014052336101605261015c6004355afa1561030d57601f3d111561030d576000506101c0506004356001557f963001cf3a0c5cdcfc26b2710abe2fe859b3565482158b7cb34f59b6eaff521261014080808060043581525050602090509050610140a1005b63b1d3db758114156102455760043560a01c61030d576002543314610205576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b6004356003557f59a407284ae6e2986675fa1400d6498af928ed01f4fd2dd6be4a2a8b4fc35b3461014080808060043581525050602090509050610140a1005b63e5ea47b88114156102a557600354610140526101405133141561030d57610140516002557f756f845176805c8ebf249854e909627308157f63c96e470e44a9e8549ba6fb1e6101608080806101405181525050602090509050610160a1005b63dfe050318114156102bd5760005460005260206000f35b63df5cf7238114156102d55760015460005260206000f35b63f851a4408114156102ed5760025460005260206000f35b6317f7182a8114156103055760035460005260206000f35b505b60006000fd5b600080fd5b6100af6103c1036100af6000396100af6103c1036000f35b600080fd0000000000000000000000000c30476f66034e11782938df8e4384970b6c9e8a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b36a0671b3d49587236d7833b01e79798175875f
Deployed Bytecode
0x600436101561000d57610307565b600035601c526000513461030d5763bbf7408a8114156100bb5760043560a01c61030d57600154610140526101405161007d5760206101e060246370a08231610160526004356101805261017c6000545afa1561030d57601f3d111561030d576000506101e05160005260206000f35b60206101e0602463bbf7408a610160526004356101805261017c610140515afa1561030d57601f3d111561030d576000506101e05160005260206000f35b634b74efb781141561010f5760025433141561030d5760006001557f963001cf3a0c5cdcfc26b2710abe2fe859b3565482158b7cb34f59b6eaff5212610140808080600081525050602090509050610140a1005b63f4b446a38114156101a15760043560a01c61030d5760025433141561030d5760206101c0602463bbf7408a61014052336101605261015c6004355afa1561030d57601f3d111561030d576000506101c0506004356001557f963001cf3a0c5cdcfc26b2710abe2fe859b3565482158b7cb34f59b6eaff521261014080808060043581525050602090509050610140a1005b63b1d3db758114156102455760043560a01c61030d576002543314610205576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b6004356003557f59a407284ae6e2986675fa1400d6498af928ed01f4fd2dd6be4a2a8b4fc35b3461014080808060043581525050602090509050610140a1005b63e5ea47b88114156102a557600354610140526101405133141561030d57610140516002557f756f845176805c8ebf249854e909627308157f63c96e470e44a9e8549ba6fb1e6101608080806101405181525050602090509050610160a1005b63dfe050318114156102bd5760005460005260206000f35b63df5cf7238114156102d55760015460005260206000f35b63f851a4408114156102ed5760025460005260206000f35b6317f7182a8114156103055760035460005260206000f35b505b60006000fd5b600080fd
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.