Change account status
In order to cope with the theft of the user's private key, we provide a freeze function for NFT accounts.
Mint accounts can initiate a freeze operation on the NFT account, but the frozen NFT account can not perform transfer, close and other operations.
In addition, users can also use burn instruction to destroy their own NFT, but the destruction is irreversible!
Freeze the NFT account.
$ ppl-nft freeze --address 62Tt6NNUxQbBYx6x5P1s42t7
KWQdDamn9ATb6Ls5HYVv
freezing a nft 62Tt6NNUxQbBYx6x5P1s42t7KWQdDamn9ATb6Ls5HYVv
freeze nft: 62Tt6NNUxQbBYx6x5P1s42t7KWQdDamn9ATb6Ls5HYVv
Signature: 4QMDpudrM916x5rt28XPvVwtGhANtcNarcVJ3WvpjzSHVnkezCGuRX8Q8remYcTaFyNP6iJBUDS3ZVTkCgrZkrRMAfterwards, check the NFT account information again:
./ppl-nft nft-info 62Tt6NNUxQbBYx6x5P1s42t7KWQdDamn9ATb6Ls5HYVv
Mint : 2ZYMxZojdocSbwcGg4W92H3hVE9qgMBo7XQg9aug6uKs
Owner: DySd8hi7Z4jrV3ixAk5dT1kPJQzKMiUyyCF38DiJypLY
State: Frozen
Token id: 1
Token url: http://my.asset.uri.path
Close authority: NoneThe status of the NFT account has changed to Frozen, then the account transfer operation will not be allowed:
The final transaction execution is failed and an error is reported.
The third error message indicates that Account is Frozen, corresponding to error 0x11, so it is confirmed that the freeze operation has successfully frozen the NFT account. In response to the freeze operation, you can use the thaw instruction to thaw the program.
After thawing, the account status will be restored to normal and the transfer operation will be successfully supported:
The Burn operation is executed in the NFT account.
You need to be cautious when using this instruction, because this irreversible operation will destroy the NFT you own:
Re-check NFT information after account destruction.
You can see that the lookup failed and reported the error: AccountNotFound, which indicates that the NFT account has been destroyed.
Note:
The freeze instruction requires the freeze authority permission, and the burn instruction requires the close authority permission, which can be viewed by the mint-info instruction and nft-info instruction respectively.
If the corresponding permission is set to None, it will default to the account owner address.
Last updated