Skip to main content

ERC-721/NEP-171 compatibility

caution

If unsure it is not recommended to set-up ERC-721/NEP-171 compatibiliy. This is a more technical concept and requires deeper knowledge of blockchain tools.

Introduction

ERC721 and NEP-171 are blockchain standards for representing ownership of non-fungible tokens, NFTs (each item is unique). ERC-721 and NEP-171 have essentially same purpose except ERC-721 is a Solidity standard for EVM-compatible blockchains such as Ethereum, Polygon, Aurora, Taraxa, Evmos or Avalanche while NEP-171 is the equivalent on the Near blockchain.

They provide a protocol for asking the contract/workflow

  • 'who is the current owner of the item?'
  • and also events to notify that 'a new owner for item X has been set!'.

Every item in Toolblox can be considered a non-fungible token. However, it is not always straightforward to determine 'who is the owner of an item?'. For simple assets such as 'NFT images' it is clear, but for business objects such as a 'Loan' it is not - does the loan belong to the lender or the lendee? For this purpose the interface compatibility as well as ownership scope in Toolblox are opt-in. Also, please refer to Blokchain feature matrix for availability.

Benefits

The main benefit of setting up ERC721/NEP171 is compatibility with external systems.

  • For example, NFT workflows can be exposed to wallets, meaning the owner can display owned images in external applications.
  • Having the compatibility unlocks other DeFi capabilities - for example an asset registered in Toolblox can be fractionalized, collateralized or insured by other external tools.

Set-up

Step 1. Set token symbol

MyTKN as symbol for my erc721/nep171 workflow

Step 2. Set up ownership scope

A workflow might have serveral roles and several states. For uniquely identifying the owner in each state it is required to map states to roles:

Step 3. Choose ERC721 compatiblity

In the Deployment step, choose the ERC721 (NFT) compatibility. In case of Near blockchain choose NEP171. Thats it!

Step 4. Configure NFT wallet

The contract is now ready and the NFTs visible in NFT wallets such as MetaMask Mobile (iOS/Android). Check out this resource on how to add NFT's to Metamask Mobile. Some blockchains, such as Near, do not need any further configuration - their wallets automatically display owned NFTs.

How to configure Metamask

Copy contract id from blockchain explorer

Add NFTs and copy contract address from blockchain explorer.

Add token to metamask

Configure Metamask with the contract address as NFTs.