From e0f619bb6cee6d19bb274f3ff1a0d131455a63f4 Mon Sep 17 00:00:00 2001 From: rustvalve Date: Wed, 20 Sep 2023 17:55:23 +0300 Subject: [PATCH] TIP-4.8 (ITransferableNft) docs --- src/standard/TIP-4/8.md | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 src/standard/TIP-4/8.md diff --git a/src/standard/TIP-4/8.md b/src/standard/TIP-4/8.md new file mode 100644 index 000000000..1d0884bab --- /dev/null +++ b/src/standard/TIP-4/8.md @@ -0,0 +1,51 @@ +--- +title: 4.8. Transferable NFT +sidebar_position: 8 +slug: /standard/TIP-4.8 +--- + +# Transferable NFT (TIP-4.7) +Requires: [TIP-4.1](1.md) +Requires: [TIP-6.1](./../TIP-6/1.md) + +## Abstract + +This standard provides information on the availability of NFT change of ownership + +## Motivation + +The [TIP-4.1](1.md) standard includes only the event to be triggered by an NFT transfer and does not provide any additional information. +At the same time, some contracts should not be able to be transferred to another owner. +In such a case, the transfer will not work and the dapp must know this in order to provide information about it to the user and not to call inactive functions + +```solidity +interface ITIP4_8 { + event TransferLocked(); + event TransferUnlocked(); + + function isTransferable() external responsible view returns(bool); +} +``` + +**TIP4_8.transferable()** + +```solidity +function isTransferable() external responsible view returns(bool); +``` + +Returns information about whether the transfer is available. This value may change if lock/unlock is provided by the implementation + +### Events + +```solidity +event TransferLocked(); +event TransferUnlocked(); +``` + +**TransferLocked** + +You MUST emit it when the transfer is locked + +**TransferUnlocked** + +You MUST emit it when the transfer is unlocked. If unlocking occurs just before the transfer itself (e.g. there was a timed lock), the event MUST also be emited together with the unlocking