FlashLoan

Write Methods

flashLoanERC20

function flashLoanERC20(
    uint32 poolId,
    address[] calldata assets,
    uint256[] calldata amounts,
    address receiverAddress,
    bytes calldata params
  ) public

Allows smart contracts to access the ERC20 tokens within one transaction, as long as the tokens taken are returned.

flashLoanERC721

function flashLoanERC721(
    uint32 poolId,
    address[] calldata nftAssets,
    uint256[] calldata nftTokenIds,
    address receiverAddress,
    bytes calldata params
  ) public

Allows smart contracts to access the ERC721 tokens within one transaction, as long as the tokens taken are returned.

Only the NFT owner can do the flash loan for his owned NFTs.

Last updated