Skip to content

RootChainGaugeProxy

ProxyOwnership contract for the RootChainGaugeFactory.

Contract Source & Deployment

RootChainGaugeFactoryProxy contract is deployed on the Ethereum mainnet at: 0x017dB2B92233018973902858B31269Ed071E1D39.
Source code available on Github.

Admin functions for the RootChainFactory or RootChainGauges must be invoked through the RootChainGaugeFactoryProxy, necessitating a successful DAO vote.

Additionally, there is a contract manager who can call functions like set_bridger, set_implementation, and set_call_proxy.

The manager CANNOT kill gauges or alter the admins of this contract!

For more details on what the admin functions do, please refer to the RootChainGaugeFactory documentation.

Admin and Manager Ownership

The Proxy has the usual ownersip and emergency admins and the usual functions to changes those variables.

commit_set_admins

RootChainFactory.commit_set_admins(_o_admin: address, _e_admin: address):

Guarded Method

This function is only callable by the ownership_admin.

Function to commit a new ownership and emergency admins.

Emits: CommitAdmins

Input Type Description
_o_admin address New Ownership Admin Address
_e_admin address New Emergency Admin Address
Source code
event CommitAdmins:
    ownership_admin: indexed(address)
    emergency_admin: indexed(address)

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

@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)
>>> RootChainFactory.commit_set_admins():        

accept_set_admin

RootChainFactory.accept_set_admins():

Guarded Method

This function is only callable by the future_ownership_admin.

Function to accept the ownership and emergency admin changes.

Emits: ApplyAdmins

Source code
event ApplyAdmins:
    ownership_admin: indexed(address)
    emergency_admin: indexed(address)

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

@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)
>>> RootChainFactory.accept_set_admins():        

manager

RootChainFactory.manager() -> address: view

Function to accept the ownership and emergency admin changes.

Emits: ApplyAdmins

Source code
manager: public(address)
>>> RootChainFactory.manager():
'0x7f3026195D1b689d187D28A182CCE16B8BEcF77f'        

set_manager

RootChainFactory.set_manager(_new_manager: address):

Guarded Method

This function is only callable by either the ownership_admin, emergency_admin or manager.

Function to accept the ownership and emergency admin changes.

Emits: ApplyAdmins

Input Type Description
_new_manager address New Manager Address
Source code
event SetManager:
    _manager: indexed(address)

manager: public(address)

@external
def set_manager(_new_manager: address):
    """
    @notice Set the manager account which is not capable of killing gauges.
    @param _new_manager The new manager account
    """
    assert msg.sender in [self.ownership_admin, self.emergency_admin, self.manager]
    self.manager = _new_manager
    log SetManager(_new_manager)
>>> RootChainFactory.set_manager('todo'):