CrossLending
Write Methods
crossBorrowERC20
function crossBorrowERC20( uint32 poolId, address asset, uint8[] calldata groups, uint256[] calldata amounts, address onBehalf, address receiver )
Borrow an amount of underlying asset from the pool with cross margin mode.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset to deposit |
groups | uint8[] | The interest rate class group of underlying asset |
amounts | uint256[] | The underlying amount to be deposited, expressed in underlying asset decimals units |
onBehalfOf | address | address whom will record the balance. Use |
receiver | address | address whom will receive the balance. Use |
crossRepayERC20
Repay an amount of underlying asset into the pool with cross margin mode.
Parameter Name | Type | Description |
---|---|---|
poolId | uint32 | The id of the pool |
asset | address | The address of the underlying asset to deposit |
groups | uint8[] | The interest rate class group of underlying asset |
amounts | uint256[] | The underlying amount to be deposited, expressed in underlying asset decimals units |
onBehalfOf | address | address whom will record the balance. Use |
Last updated