ETH Price: $1,593.33 (-1.86%)
Gas: 8 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Sponsored

Transaction Hash
Method
Block
From
To
Value
0x60406105144031662022-03-17 9:18:40553 days 18 hrs ago1647508720IN
 Create: Vyper_contract
0 ETH0.0086584423.02330078

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:
MIT license

Contract Source Code (Vyper language format)

# @version 0.2.15
"""
@title Curve LiquidityGaugeV2 Ownership Proxy
@author This version was modified starting from Curve Finance's DAO contracts
@license MIT
"""

interface LiquidityGauge:
    def set_rewards(_reward_contract: address, _sigs: bytes32, _reward_tokens: address[8]): nonpayable
    def set_killed(_is_killed: bool): nonpayable
    def commit_transfer_ownership(addr: address): nonpayable
    def accept_transfer_ownership(): nonpayable


event CommitAdmins:
    ownership_admin: address
    emergency_admin: address

event ApplyAdmins:
    ownership_admin: address
    emergency_admin: address


ownership_admin: public(address)
emergency_admin: public(address)

future_ownership_admin: public(address)
future_emergency_admin: public(address)


@external
def __init__(_ownership_admin: address, _emergency_admin: address):
    self.ownership_admin = _ownership_admin
    self.emergency_admin = _emergency_admin


@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 accept_set_admins():
    """
    @notice Apply the effects of `commit_set_admins`
    @dev Only callable by the new owner admin
    """
    assert msg.sender == self.future_ownership_admin, "Access denied"

    e_admin: address = self.future_emergency_admin
    self.ownership_admin = msg.sender
    self.emergency_admin = e_admin

    log ApplyAdmins(msg.sender, e_admin)


@external
@nonreentrant('lock')
def commit_transfer_ownership(_gauge: address, new_owner: address):
    """
    @notice Transfer ownership for liquidity gauge `_gauge` to `new_owner`
    @param _gauge Gauge which ownership is to be transferred
    @param new_owner New gauge owner address
    """
    assert msg.sender == self.ownership_admin, "Access denied"
    LiquidityGauge(_gauge).commit_transfer_ownership(new_owner)


@external
@nonreentrant('lock')
def accept_transfer_ownership(_gauge: address):
    """
    @notice Apply transferring ownership of `_gauge`
    @param _gauge Gauge address
    """
    LiquidityGauge(_gauge).accept_transfer_ownership()


@external
@nonreentrant('lock')
def set_killed(_gauge: address, _is_killed: bool):
    """
    @notice Set the killed status for `_gauge`
    @dev When killed, the gauge always yields a rate of 0 and so cannot mint CRV
    @param _gauge Gauge address
    @param _is_killed Killed status to set
    """
    assert msg.sender in [self.ownership_admin, self.emergency_admin], "Access denied"

    LiquidityGauge(_gauge).set_killed(_is_killed)


@external
@nonreentrant('lock')
def set_rewards(_gauge: address, _reward_contract: address, _sigs: bytes32, _reward_tokens: address[8]):
    """
    @notice Set the active reward contract for `_gauge`
    @param _gauge Gauge address
    @param _reward_contract Reward contract address. Set to ZERO_ADDRESS to
                            disable staking.
    @param _sigs Four byte selectors for staking, withdrawing and claiming,
                 right padded with zero bytes. If the reward contract can
                 be claimed from but does not require staking, the staking
                 and withdraw selectors should be set to 0x00
    @param _reward_tokens List of claimable tokens for this reward contract
    """
    assert msg.sender == self.ownership_admin, "Access denied"

    LiquidityGauge(_gauge).set_rewards(_reward_contract, _sigs, _reward_tokens)

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"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_ownership_admin","type":"address"},{"name":"_emergency_admin","type":"address"}],"outputs":[]},{"stateMutability":"nonpayable","type":"function","name":"commit_set_admins","inputs":[{"name":"_o_admin","type":"address"},{"name":"_e_admin","type":"address"}],"outputs":[],"gas":74618},{"stateMutability":"nonpayable","type":"function","name":"accept_set_admins","inputs":[],"outputs":[],"gas":76549},{"stateMutability":"nonpayable","type":"function","name":"commit_transfer_ownership","inputs":[{"name":"_gauge","type":"address"},{"name":"new_owner","type":"address"}],"outputs":[],"gas":64878},{"stateMutability":"nonpayable","type":"function","name":"accept_transfer_ownership","inputs":[{"name":"_gauge","type":"address"}],"outputs":[],"gas":62583},{"stateMutability":"nonpayable","type":"function","name":"set_killed","inputs":[{"name":"_gauge","type":"address"},{"name":"_is_killed","type":"bool"}],"outputs":[],"gas":67459},{"stateMutability":"nonpayable","type":"function","name":"set_rewards","inputs":[{"name":"_gauge","type":"address"},{"name":"_reward_contract","type":"address"},{"name":"_sigs","type":"bytes32"},{"name":"_reward_tokens","type":"address[8]"}],"outputs":[],"gas":65364},{"stateMutability":"view","type":"function","name":"ownership_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2568},{"stateMutability":"view","type":"function","name":"emergency_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2598},{"stateMutability":"view","type":"function","name":"future_ownership_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2628},{"stateMutability":"view","type":"function","name":"future_emergency_admin","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2658}]

604061056661014039602061056660c03960c05160a01c61056157602060206105660160c03960c05160a01c61056157610140516004556101605160055561054956600436101561000d576104fc565b600035601c52600051346105025763e3a8d3ab8114156100cc5760043560a01c6105025760243560a01c610502576004543314610089576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b60043560065560243560075560043561014052602435610160527f8f5425b30e6270c1011973f0ccf6d7795cc10623631523e4c45d2837d337d5746040610140a1005b63c9653b9581141561016e576006543314610126576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b600754610140523360045561014051600555336101605261014051610180527fe8d7597c306457cd1fa4eb0e165a1a4c3aea9808e274ea97c6b5d9f73a3c477f6040610160a1005b633ea1c6f481141561021d5760005461050257600160005560043560a01c6105025760243560a01c6105025760045433146101e8576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b6004353b1561050257600060006024636b441a40610140526024356101605261015c60006004355af115610502576000600055005b63a8f22cf181141561026d5760015461050257600160015560043560a01c610502576004353b156105025760006000600463e5ea47b86101405261015c60006004355af115610502576000600155005b634344ce7181141561036e5760025461050257600160025560043560a01c6105025760243560011c61050257600454610160526005546101805260006101405261014061012060006002818352015b6101205160200261016001513314156102d857600183526102e9565b5b81516001018083528114156102bc575b50505061014051610339576308c379a06101a05260206101c052600d6101e0527f4163636573732064656e69656400000000000000000000000000000000000000610200526101e05060646101bcfd5b6004353b15610502576000600060246390b22997610140526024356101605261015c60006004355af115610502576000600255005b63259ad26d81141561049a5760035461050257600160035560043560a01c6105025760243560a01c610502576000610120525b610120516064013560a01c6105025760206101205101610120526101006101205110156103cd576103a1565b600454331461041b576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b6004353b1561050257600060006101446347d2d5d3610140526040602461016037606480356101a05280602001356101c05280604001356101e0528060600135610200528060800135610220528060a00135610240528060c00135610260528060e00135610280525061015c60006004355af115610502576000600355005b6347c8715f8114156104b25760045460005260206000f35b63680c77838114156104ca5760055460005260206000f35b633c2fcbf48114156104e25760065460005260206000f35b635866507a8114156104fa5760075460005260206000f35b505b60006000fd5b600080fd5b61004261054903610042600039610042610549036000f35b600080fd000000000000000000000000d6dabbc2b275114a2366555d6c481ef08fdc2556000000000000000000000000e8ea8bae250028a8709a3841e0ae1a44820d677b

Deployed Bytecode

0x600436101561000d576104fc565b600035601c52600051346105025763e3a8d3ab8114156100cc5760043560a01c6105025760243560a01c610502576004543314610089576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b60043560065560243560075560043561014052602435610160527f8f5425b30e6270c1011973f0ccf6d7795cc10623631523e4c45d2837d337d5746040610140a1005b63c9653b9581141561016e576006543314610126576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b600754610140523360045561014051600555336101605261014051610180527fe8d7597c306457cd1fa4eb0e165a1a4c3aea9808e274ea97c6b5d9f73a3c477f6040610160a1005b633ea1c6f481141561021d5760005461050257600160005560043560a01c6105025760243560a01c6105025760045433146101e8576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b6004353b1561050257600060006024636b441a40610140526024356101605261015c60006004355af115610502576000600055005b63a8f22cf181141561026d5760015461050257600160015560043560a01c610502576004353b156105025760006000600463e5ea47b86101405261015c60006004355af115610502576000600155005b634344ce7181141561036e5760025461050257600160025560043560a01c6105025760243560011c61050257600454610160526005546101805260006101405261014061012060006002818352015b6101205160200261016001513314156102d857600183526102e9565b5b81516001018083528114156102bc575b50505061014051610339576308c379a06101a05260206101c052600d6101e0527f4163636573732064656e69656400000000000000000000000000000000000000610200526101e05060646101bcfd5b6004353b15610502576000600060246390b22997610140526024356101605261015c60006004355af115610502576000600255005b63259ad26d81141561049a5760035461050257600160035560043560a01c6105025760243560a01c610502576000610120525b610120516064013560a01c6105025760206101205101610120526101006101205110156103cd576103a1565b600454331461041b576308c379a061014052602061016052600d610180527f4163636573732064656e696564000000000000000000000000000000000000006101a05261018050606461015cfd5b6004353b1561050257600060006101446347d2d5d3610140526040602461016037606480356101a05280602001356101c05280604001356101e0528060600135610200528060800135610220528060a00135610240528060c00135610260528060e00135610280525061015c60006004355af115610502576000600355005b6347c8715f8114156104b25760045460005260206000f35b63680c77838114156104ca5760055460005260206000f35b633c2fcbf48114156104e25760065460005260206000f35b635866507a8114156104fa5760075460005260206000f35b505b60006000fd5b600080fd

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

000000000000000000000000d6dabbc2b275114a2366555d6c481ef08fdc2556000000000000000000000000e8ea8bae250028a8709a3841e0ae1a44820d677b

-----Decoded View---------------
Arg [0] : _ownership_admin (address): 0xD6dABBc2b275114a2366555d6C481EF08FDC2556
Arg [1] : _emergency_admin (address): 0xe8eA8bAE250028a8709A3841E0Ae1a44820d677b

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000d6dabbc2b275114a2366555d6c481ef08fdc2556
Arg [1] : 000000000000000000000000e8ea8bae250028a8709a3841e0ae1a44820d677b


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

Validator Index Block Amount
View All Withdrawals

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