Destroy Farm NFT
SDK example for destroying farm NFT - clean up unstaked farming positions and recover storage fees
Destroy a Farm position NFT. Find your NFT through Farm position discovery. This example uses FARM.v3 on TON mainnet.
The NFT is transferred from the owner wallet to the zero address.
import { TonClient } from "@ton/ton";
import { FARM } from "@ston-fi/sdk";
const client = new TonClient({
endpoint: "https://toncenter.com/api/v2/jsonRPC",
});
const farmNft = client.open(FARM.v3.NftItem.create(
"<your owned Farm v3 NFT address>", // Farm v3 nft address
));
// Destroy farm NFT from the owner's wallet
const txParams = await farmNft.getDestroyTxParams({
queryId: 12345,
});Send the built parameters through your wallet using the transaction sending guide.
Check the result
Confirm that the Farm NFT is no longer owned by the sending wallet.
Last updated