IsolateLending

Write Methods

isolateBorrow

function isolateBorrow(
    uint32 poolId,
    address nftAsset,
    uint256[] calldata nftTokenIds,
    address asset,
    uint256[] calldata amounts,
    address onBehalf,
    address receiver
  ) public

Borrow an amount of underlying asset from the pool with isolate margin mode.

Parameter NameTypeDescription

poolId

uint32

The id of the pool

nftAsset

address

The address of the underlying asset to used as collateral

nftTokenIds

uint256[]

The token id list of the underlying asset to used as collateral

asset

address

The address of the underlying asset to be borrowed

amounts

uint256[]

The underlying amount to be borrowed, expressed in underlying asset decimals units

onBehalfOf

address

address whom will record the balance. Use msg.sender when the balance should be record to the caller.

receiver

address

address whom will receive the balance. Use msg.sender when the balance should be sent to the caller.

isolateRepay

function isolateRepay(
    uint32 poolId,
    address nftAsset,
    uint256[] calldata nftTokenIds,
    address asset,
    uint256[] calldata amounts,
    address onBehalf
  ) public payable

Repay an amount of underlying asset into the pool with isolate margin mode.

Parameter NameTypeDescription

poolId

uint32

The id of the pool

nftAsset

address

The address of the underlying asset to used as collateral

nftTokenIds

uint256[]

The token id list of the underlying asset to used as collateral

asset

address

The address of the underlying asset to be repaid

amounts

uint256[]

The underlying amount to be repaid, expressed in underlying asset decimals units

onBehalfOf

address

address whom will record the balance. Use msg.sender when the balance should be record to the caller.

Last updated