# Contract Functions

#### `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`**`, f`**`lashFee`**`,`` `**`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)*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oiler.network/oiler-network/products/nafta/contract-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
