Issuing a TRC-721 Token
1 Create a TRON Account
Install the Chrome extension of TronLink to prepare for your issuance. You may create a new account in the extension via the following three ways:
-
create a new account directly
-
restore from a mnemonic phrase, private key, or Keystore
-
pair a hardware wallet
350 TRX is required in your account as the minimum.
2 Modify Code of Your TRC-721 Contract
You may modify the TRC721Token.sol file to customize the name and symbol of your token. Remember to save the changes.
TRC-721 contract template: template
3 Deploy a TRC-721 Smart Contract
Deploy with TRONSCAN: Contract Compiler
3.1 Connect Wallet
3.2 Upload Contract Code
3.3 Compile the Contract
Please choose the compiler version between 0.5.5 and 0.5.14.
Click "Compile" to compile the code. If the following content is returned, the compilation is successful.
3.4 Deploy the Contract
Remember to choose TRC721Token, for it is the main contract.
Click "Deploy" to deploy the contract and sign in the TronLink popup.
4 Mint an NFT Token
Log in to TRONSCAN with your wallet, and use the contract address to open the deployed TRC-721 contract. In this section, the TZ4NjvdqyCbWmZxXEEAb3bXhfT8f6YGxJd contract on the Nile testnet is used as an example:
- Choose "Contract > Write Contract".
- Find the mintWithTokenURI method, and fill in the to_address, tokenId, and the tokenURI corresponding to coral.json.
Metadata URI
For the generation of metadata URI, please refer to Uploading NFT Metadata to BTFS Network .
- Click 'send', and accept the signature. A 'true' will be displayed if the token is minted successfully.
5 Record the TRC-721 Token
Record with TRONSCAN: Record tool
- Select the token type.
Select TRC721 and click "Confirm".
- Enter the TRC-721 token information.
Enter the basic information, contract address, and social media information of the token. Fields with asterisks (*) are required information.
Please note that the recording process must be logged in with the deployer address.
Confirm all information required for the TRC-721 token and click "Submit".
You will see a popup from TronLink asking for your signature. Click "Accept" to sign the message.
- When the following content is displayed, the token is recorded.
6 Follow & Transfer the TRC-721 Token in TronLink App
- Click the add assets button.
- Click the search button.
- Input the TRC-721 contract address and click the add button.
This indicates the token has been added.
- Click the TRC-721 token. Wendy is used in this example.
- Select Wendy 721 in the collectible list.
- Click "Send" to transfer the TRC-721 token.
- Input the address for receiving and enter your wallet password.
- The token has been successfully transferred.
Updated 5 days ago