IPoolManagerGovernor

Git Source

Inherits: IGovernorMiniBravo

This contract contains the data and logic necessary for the pool manager governance

Functions

POOL_MANAGER_FACTORY

Returns the pool manager factory contract

function POOL_MANAGER_FACTORY() external view returns (IPoolManagerFactory _poolManagerFactory);

Returns

NameTypeDescription
_poolManagerFactoryIPoolManagerFactoryThe pool manager factory

feeManager

Returns the fee manager

function feeManager() external view returns (IFeeManager _feeManager);

Returns

NameTypeDescription
_feeManagerIFeeManagerThe fee manager

poolLiquidity

Returns the pool liquidity

function poolLiquidity() external view returns (uint256 _poolLiquidity);

Returns

NameTypeDescription
_poolLiquidityuint256The pool liquidity

seederBalance

Returns the liquidity seeded by the given donor

function seederBalance(address _donor) external view returns (uint256 _seederBalance);

Parameters

NameTypeDescription
_donoraddressThe donor's address

Returns

NameTypeDescription
_seederBalanceuint256The amount of liquidity seeded by the donor

seederBurned

Returns the liquidity seeded by the given donor that they burned

function seederBurned(address _donor) external view returns (uint256 _seederBurned);

Parameters

NameTypeDescription
_donoraddressThe donor's address

Returns

NameTypeDescription
_seederBurneduint256The amount of liquidity seeded by the donor that they burned

priceOracle

Returns the price oracle

function priceOracle() external view returns (IPriceOracle _priceOracle);

Returns

NameTypeDescription
_priceOracleIPriceOracleThe price oracle

proposeFeeManagerChange

Creates a proposal to change the fee manager

_newFeeManager must be equal to the current fee manager on the pool manager factory and different from the current fee manager

function proposeFeeManagerChange(IFeeManager _newFeeManager) external;

Parameters

NameTypeDescription
_newFeeManagerIFeeManagerThe new fee manager to be set up

acceptFeeManagerChange

Votes yes on the proposal to change the fee manager

function acceptFeeManagerChange(IFeeManager _newFeeManager) external;

Parameters

NameTypeDescription
_newFeeManagerIFeeManagerThe new fee manager to be set up

proposeMigrate

Creates a proposal to migrate

_migrationContract must be equal to the current migration contract on the pool manager factory and different from the current migration contract

function proposeMigrate(address _migrationContract) external;

Parameters

NameTypeDescription
_migrationContractaddressThe migration contract

acceptMigrate

Votes yes on the proposal to migrate

function acceptMigrate(address _migrationContract) external;

Parameters

NameTypeDescription
_migrationContractaddressThe migration contract

proposePriceOracleChange

Creates a proposal to change the price's oracle

_newPriceOracle must be equal to the current price oracle on the pool manager factory and different from the current price's oracle

function proposePriceOracleChange(IPriceOracle _newPriceOracle) external;

Parameters

NameTypeDescription
_newPriceOracleIPriceOracleThe new price oracle to be set up

acceptPriceOracleChange

Votes yes on the proposal to change the prices oracle

function acceptPriceOracleChange(IPriceOracle _newPriceOracle) external;

Parameters

NameTypeDescription
_newPriceOracleIPriceOracleThe new price oracle to be set up

Events

FeeManagerMigrated

Emitted when an old fee manager migrates to a new fee manager

event FeeManagerMigrated(IFeeManager _newFeeManager);

PriceOracleSet

Emitted when the price oracle is set

event PriceOracleSet(IPriceOracle _newPriceOracle);

Errors

PoolManager_FeeManagerMismatch

Thrown when the fee manager does not match the pool manager factory fee manager

error PoolManager_FeeManagerMismatch(IFeeManager _expected, IFeeManager _actual);

PoolManager_FeeManagerAlreadySet

Thrown when trying to set an already set fee manager

error PoolManager_FeeManagerAlreadySet();

PoolManager_PriceOracleMismatch

Thrown when the price oracle inputted does not match the poolManagerFactory priceOracle

error PoolManager_PriceOracleMismatch(IPriceOracle _expected, IPriceOracle _actual);

PoolManager_PriceOracleAlreadySet

Thrown when trying to set an already set price oracle

error PoolManager_PriceOracleAlreadySet();

PoolManager_MigrationContractMismatch

Thrown when the migration contract inputted does not match the poolManagerFactory migration contract

error PoolManager_MigrationContractMismatch(address _expected, address _actual);

PoolManager_MigrationFailed

Thrown when trying to migrate to a new PoolManager unsuccessful

error PoolManager_MigrationFailed();

Enums

Methods

The methods that are available for governance

enum Methods {
    Migrate,
    FeeManagerChange,
    PriceOracleChange
}