ConfigurationManager

The ConfigurationManager is the management layer of the protocol; it sets global or specific vault's parameters as a cap, withdraws fee, migration destination, and the vaultController role for each vault.

src: https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol

View Methods

getParameter

https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L34

function getParameter(address target, bytes32 name) external view returns (uint256);

Retrieves the value of a parameter set to contract. If the value is not a uint256, you will need to perform encoding/decoding operations

Parameters

NameTypeDescription

target

address

The contract target address

name

bytes32

The parameter name

Returns

NameTypeDescription

_0

uint256

The stored parameter

getGlobalParameter

https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L40

function getGlobalParameter(bytes32 name) external view returns (uint256);

Retrieves the value of a global parameter. If the value is not a uint256, you will need to perform encoding/decoding operations

Parameters

NameTypeDescription

name

bytes32

The parameter name

Returns

NameTypeDescription

_0

uint256

The stored parameter

getCap

https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L57

function getCap(address target) external view returns (uint256);

Retrieves the value of the cap set to a contract. If the value is not a uint256, you will need to perform encoding/decoding operations

Parameters

NameTypeDescription

target

address

The contract target address

Returns

NameTypeDescription

_0

uint256

The stored cap

getVaultMigration

https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L73

function getVaultMigration(address oldVault) external view returns (address);

Retrieves the value of the destination contract of an original vault.

Parameters

NameTypeDescription

oldVault

address

The origin vault

Returns

NameTypeDescription

_0

address

The destination vault

Write Methods

setParameter

https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L22

function setParameter(address target, bytes32 name, uint256 value) external onlyOwner;

Set specific parameters to a contract or globally across multiple contracts. Use address(0) to set a global parameter.

Parameters

NameTypeDescription

target

address

The contract target address

name

bytes32

The parameter name

value

uint256

The parameter value

setCap

https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L48

function setCap(address target, uint256 value) external onlyOwner;

Set the cap of a target vault.

Parameters

NameTypeDescription

target

address

The contract target address

value

uint256

The cap value

setVaultMigration

https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L64

function setVaultMigration(address oldVault, address newVault) external onlyOwner;

Sets the allowance to migrate to a vault address.

Parameters

NameTypeDescription

oldVault

address

The current vault address

newVault

address

The vault where assets are going to be migrated to

Last updated