Mint an ERC-721 token to represent your digital asset on the Oasis Ethereum ParaTime, and send this newly minted unique token to friends and family! Could worth millions one day, who knows?
:warning: Warning: Pasting the private key of an account with a lot of value (i.e. a holding account) is not recommended whatsoever. Instead, please only transfer a tiny amount of value to a new one-off development account address and only use this new development account when writing and deploying your contracts. After all, you only need enough value to pay for gas; nothing else. Keep your holding account safe by never sharing its private keys.
contract MyNFTis to mint the ERC-721 tokens. Here, you can specify a symbol for your ERC-721 tokens.
totalSupplyfunction in BUIDL, and see that it returns 0. There is no token in this contract yet. The next step is to mint ERC-721 tokens with digital assets.
mintTokenfunction. Enter an address in
toto assign the owner of the new ERC721 token. Enter an integer number in
tokenIdto set the unique id of the ERC721 token. Enter the URL of your digital asset, such as an image or a video, in
urito associate the digital asset with the ERC721 token.
to, tokenId, uriparameters in the
mintTokenfunction. Please note, every token id can only correspond to one digital asset URL. If you want to mint a new ERC-721 token for a new URL, you need to use a different token id.
totalSupplyfunction again, and it returns 1 this time.
ownerOffunction. It returns the address we just entered in the
tokenURIfunction, it returns the URL we just entered in the
approvefunction gives permission to
tokenIdtoken to another account. The function caller must own the
tokenIdtoken. So we need to import the private key of the owner account of
tokenIdtoken into BUIDL.
Please ignore this step if you use the same account to deploy the ERC-721 smart contract and receive the minted ERC 721 Token. Just call the
approvefunction. Enter an address in
toto assign the receiver of the given ERC721. Enter the id in
tokenIdto transfer the unique NFT Token. Different
tokenIdmeans different NFT Tokens.
from. Enter the receiver address in
to. Enter the id in
tokenId. The three parameters will make sure you are transferring the correct NFT Token.
balanceOffunctions to see the status of the given token. The owner of the given token has been transferred to