How to create NFT Contracts on VeChain (quick)
What is an NFT?
A none-fungible-token (NFT) is a unique token that can be exchanged with others. It is like a unique item with a serial number that can be given to anybody and can not be duplicated.
NFT for VeChain were introduced with VIP-181 at the end of 2018 and are best known for their use of Economic and X Nodes. It is basically a standardized interface for a smart contract.
The original idea can be found on Ethereum with ERC-721 which was born during the CryptoKitties hype. VIP-181 and ERC-721 use the same function names and are compatible with each other.
OpenZeppelin, a platform aimed at Ethereum/Solidity developers, has a lot of libraries and smart contracts that have been audited and tested within a lot of other contracts. They have a lot of templates for most ERC standards — ERC-721 is among them.
This leads to a rather short list of underwhelming tasks that will create our custom NFT Contract. Here we go:
Setup Token Contract
- Setup the project based on “Create and deploy Smart Contracts on VeChain” or clone the example project
- Add the OpenZeppelin templates via
yarn add @openzeppelin/contracts
- Create a contract that supports…