Different modules of the fMint protocol are connected through the Address Provider contract. Each protocol part is registered on the provider and other modules obtain the contract address here.
Access Address Provider
You need the Address Provider ABI and address to be able to access the contract, make changes of the references and obtain addresses of known modules.
You can use a general getAddress call to get an address of known fMint protocol module, or you can use a single-purpose call for each fMint module. Please consider the best way of using the provider based on your specific use case. The code below demonstrates both ways of doing so.
// use general call with identifier>adrProvider.getAddress.call("price_oracle_proxy");"0xb4120a75d22d800a61bdfad65be3786a20db10b7"// use a module specific call>adrProvider.getRewardToken.call();"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83"
Available Modules
The Address Provider registrates following modules. An internal identifier of each module is listed.
Core fMint Contract fantom_mint
Collateral Pool Contract collateral_pool
Debt Pool Contract debt_pool
Price Oracle Proxy Contract price_oracle_proxy
Reward Distribution Contract reward_distribution
Reward ERC20 Token Contract erc20_reward_token
Token Registry Contract token_registry
Please check the AddressProvider contract source code for all the details about modules and their references.
Update Module Address
Address of any module of the fMint protocol can be changed through the Address Provider contract. To change a module address please use a module specific update function.
Please make sure to use maximum caution when changing fMint module address. All the fMint modules may be affected by the change. Also, changing the Collateral or Debt pool may directly affect users' positions and their funds invested in the protocol.