ConfiguratorPool

This module is used to creating, deleting and setting custom pools.

Write Methods

createPool

function createPool(string memory name) public nonReentrant returns (uint32 poolId)

Creating a new custom pool.

Parameter NameTypeDescription

name

string

The name of the pool

deletePool

function deletePool(uint32 poolId) public

Deleting a custom pool which does not has any asset.

Parameter NameTypeDescription

poolId

uint32

The id of the pool

setPoolName

function setPoolName(uint32 poolId, string calldata name) public

Changing the name of the pool.

Parameter NameTypeDescription

poolId

uint32

The id of the pool

name

string

The new name of the pool

addPoolGroup

function addPoolGroup(uint32 poolId, uint8 groupId) public

Adding a new group to the pool. The group will be used for classify the collateral and interest rate. Each asset must belong to only one group.

Parameter NameTypeDescription

poolId

uint32

The id of the pool

groupId

uint32

The id of the group and the value MUST be in [1, 2, 3]

removePoolGroup

function removePoolGroup(uint32 poolId, uint8 groupId) public

Removing a group from the pool. The to be deleted group MUST does not have any asset belong to this group.

Parameter NameTypeDescription

poolId

uint32

The id of the pool

groupId

uint32

The id of the group and the value MUST be in [1, 2, 3]

Last updated