Nafta Contract Functions
Nafta Pool - Adding/Removing/Editing NFTs

Oiler.Nafta contract addresses:

addNFT (nftAddress, nftId, flashFee, pricePerBlock, maxLongtermBlocks)

Add your NFT to the pool

Parameters

  • address nftAddress: The address of NFT contract
  • uint256 nftId: ID of the NFT token you want to add
  • uint256 flashFee: The fee user has to pay for a single rent (in WETH9) [Range: 0-4722.36648 ETH]
  • uint256 pricePerBlock: If renting longterm - this is the price per block (0 if not renting longterm) [Range: 0-4722.36648 ETH]
  • uint256 maxLongtermBlocks: Maximum amount of blocks for longterm rent [Range: 0-16777216]

editNFT (nftAddress, nftId, flashFee, pricePerBlock, maxLongtermBlocks)

Edit your NFT prices

Parameters

  • address nftAddress: The address of NFT contract
  • uint256 nftId: ID of the NFT token you have in the pool
  • uint256 flashFee: The fee user has to pay for a single rent (in WETH9) [Range: 0-4722.36648 ETH]
  • uint256 pricePerBlock: If renting longterm - this is the price per block (0 if not renting longterm) [Range: 0-4722.36648 ETH]
  • uint256 maxLongtermBlocks: Maximum amount of blocks for longterm rent [Range: 0-16777216]

removeNFT (nftAddress, nftId)

Remove your NFT from the pool

Parameters

  • address nftAddress: The address of NFT contract
  • uint256 nftId: ID of the NFT token you want to remove

withdrawEarnings ()

Withdraw your earnings

Parameters

No parameters. Withdraws for msg.sender

flashloan (nftAddress, nftId, maxLoanPrice, receiverAddress, data)

Execute a Flashloan of NFT

Parameters

  • address nftAddress: The address of NFT contract
  • uint256 nftId: ID of the NFT token you want to flashloan
  • uint256 maxLoanPrice: Price the user is willing to pay for the flashloan
  • address receiverAddress: the contract that will receive the NFT (has to implement INFTFlashLoanReceiver interface)
  • bytes data: calldata that will be passed to the receiver contract (optional)

lendLong (nftAddress, nftId, maxPricePerBlock, receiverAddress, blocks)

Buy a longterm rent for any NFT and don't pay any fees for each flashloan() use. Nobody else will be able to use it while your rent lasts (even the original owner!)

Parameters

  • address nftAddress: The address of NFT contract
  • uint256 nftId: ID of the NFT token you want to rent
  • uint256 maxPricePerBlock: Price the user is willing to pay per block for renting the NFT
  • address receiverAddress: Who will receive the longterm rent BorrowerNFT
  • uint256 blocks: How many blocks you want to rent (price is calculated per-block)
Last modified 15d ago