MaatAddressProviderV1
For managing roles and addresses, we have MaatAddressProviderV1
contract. All other contracts do not know each other, instead they use this contract to get each other addresses from registry. Also it uses upgradeability pattern by OpenZeppelin for possible future upgrades that require additional contracts.
Write methods
initialize
function initialize(address _admin)
Upgradeable contract must not use constructor, so we have this method for initializing contract with admin address.
Params
_admin
address
Address of the admin
addStrategy
function addStrategy(address strategy)
Adds a new strategy to the list of supported strategies. Vaults can add only strategies from this list. Only callable by the admin.
Params
strategy
address
Address of the strategy to add
removeStrategy
function removeStrategy(address strategy)
Removes a strategy from the list of supported strategies. Vaults not currently using this strategy won’t be able to add it, but vaults already using it can continue doing so. Only callable by the admin.
Params
strategy
address
Address of the strategy to remove
addVault
function addVault(address vault)
Adds a new vault to the list of supported vaults. Oracle will use this data for initialization PPS and for updating global PPS. Only callable by the admin.
Params
vault
address
Address of the vault to add
removeVault
function removeVault(address vault)
Removes a vault from the list of supported vaults. Only callable by the admin.
Params
vault
address
Address of the vault to remove
changeOracle
function changeOracle(address newOracle)
Changes the oracle address. Only callable by the admin.
Params
newOracle
address
Address of the new oracle
changeIncentiveController
function changeIncentiveController(address newIncentiveController)
Changes the incentive controller address. Only callable by the admin.
Params
newIncentiveController
address
Address of the new incentive controller
changeAdmin
function changeAdmin(address newAdmin)
Changes the admin address. Only callable by the admin.
Params
newAdmin
address
Address of the new admin
Read methods
getVaults
function getVaults()
Gets the list of vaults.
Returns
address[]
Array of vault addresses
getStrategies
function getStrategies()
Gets the list of currently supported strategies.
Returns
address[]
Array of strategy addresses
oracle
function oracle()
Gets the oracle address.
Returns
address
Address of the oracle
stargateAdapter
function stargateAdapter()
Gets the stargate adapter address.
Returns
address
Address of the stargate adapter
incentiveController
function incentiveController()
Gets the incentive controller address.
Returns
address
Address of the incentive controller
Last updated