You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following standard allows for the implementation of a standard API for Native Non-Fungible Tokens (NFT) using the Sway Language. This standard provides basic functionality as well as on-chain metadata for other applications to use.
A Non-Fungible Token is a unique token that has an identifier that distinguishes itself from other tokens within the same token contract. These tokens are not fungible with one another and may contain metadata or other traits giving them distinctive characteristics.
Some common applications of an NFT include artwork/collectibles, DeFi short positions, deeds, and more.
Motivation
A standard interface for Non-Fungible Tokens on Fuel allows external applications to interact with each token individually, whether that be decentralized exchanges, wallets, or Fuel's Scripts and Predicates.
There has been a discussion of the Non-Fungile Token Standard on the Fuel Forum. This discussion can be found here.
There has also been a Non-Fungile Token Standard implementation added to the Sway-Libs repository before the creation of the Sway-Standards repository. The introduction of this standard in the Sway-Standards repository will deprecate the Sway-Libs Non-Fungible Token Standard.
Specification
The Non-Fungible Token Standard inherits the specification and functionality from the SRC-20 standard. Non-Fungible Tokens on Fuel are Native Assets.
Restrictions
Non-Fungible Tokens SHALL have a total supply of one per asset.
Non-Fungible Tokens SHALL have a decimal of 0u8.
Rationale
As the SRC-721 Fungible Token Standard leverages Native Assets on Fuel, we do not require the implementation of certain functions such as transfer. This is done directly within the FuelVM and there is no smart contract that requires updating of balances. As Fuel is UTXO based, any transfer events may be indexed on transaction receipts.
Following this, we have omitted the inclusion of any transfer functions or events. The provided specification outlines only the required functions and events to implement fully functional Non-Fungible tokens on the Fuel Network. Additional functionality and properties may be added as needed.
This standard does not introduce any security concerns, as it does not call external contracts, nor does it define any mutations of the contract state.
Abstract
The following standard allows for the implementation of a standard API for Native Non-Fungible Tokens (NFT) using the Sway Language. This standard provides basic functionality as well as on-chain metadata for other applications to use.
A Non-Fungible Token is a unique token that has an identifier that distinguishes itself from other tokens within the same token contract. These tokens are not fungible with one another and may contain metadata or other traits giving them distinctive characteristics.
Some common applications of an NFT include artwork/collectibles, DeFi short positions, deeds, and more.
Motivation
A standard interface for Non-Fungible Tokens on Fuel allows external applications to interact with each token individually, whether that be decentralized exchanges, wallets, or Fuel's Scripts and Predicates.
Prior Art
The SRC-721 Non-Fungible Token Standard naming pays homage to the ERC-721 Non-Fungible Token Standard seen on Ethereum.
There has been a discussion of the Non-Fungile Token Standard on the Fuel Forum. This discussion can be found here.
There has also been a Non-Fungile Token Standard implementation added to the Sway-Libs repository before the creation of the Sway-Standards repository. The introduction of this standard in the Sway-Standards repository will deprecate the Sway-Libs Non-Fungible Token Standard.
Specification
The Non-Fungible Token Standard inherits the specification and functionality from the SRC-20 standard. Non-Fungible Tokens on Fuel are Native Assets.
Restrictions
0u8
.Rationale
As the SRC-721 Fungible Token Standard leverages Native Assets on Fuel, we do not require the implementation of certain functions such as transfer. This is done directly within the FuelVM and there is no smart contract that requires updating of balances. As Fuel is UTXO based, any transfer events may be indexed on transaction receipts.
Following this, we have omitted the inclusion of any transfer functions or events. The provided specification outlines only the required functions and events to implement fully functional Non-Fungible tokens on the Fuel Network. Additional functionality and properties may be added as needed.
Backwards Compatibility
This standard extends the SRC-20 standard.
Security Considerations
This standard does not introduce any security concerns, as it does not call external contracts, nor does it define any mutations of the contract state.
Example ABI
This draft standard is to be released as
v0.1
.The text was updated successfully, but these errors were encountered: