Issuing a TRC-721 token
Deploy your own TRC-721 collection and mint NFTs — step-by-step walkthrough using TronLink and TronScan.
Prerequisites
This guide walks you through deploying your own TRC-721 collection on TRON and minting your first NFT. The workflow uses TronLink (browser wallet) and TronScan (block explorer with contract compilation and deployment).
By the end you will have:
- A deployed TRC-721 contract on the Shasta testnet.
- At least one NFT minted to an address you control.
- The collection registered on TronScan so wallets can discover it.
- The NFT visible in your TronLink wallet's collectibles tab.
Swap shasta.tronscan.org for tronscan.org throughout when you are ready to deploy on Mainnet.
Step 1 — Prepare a TRON account
Install the TronLink browser extension. Ensure you have an active TRON account with a balance of at least 350 TRX. A standard deployment typically costs between 150 and 250 TRX via Energy burn (calculated at 100 sun per Energy unit), plus minor Bandwidth fees. Maintaining a 350 TRX balance provides a necessary buffer for potential retries. For testnet environments, obtain free tokens through the Shasta testnet faucet.
Step 2 — Customize the contract
Start from the TRC-721 contract example. At the bottom of the file, the deployable contract is:
contract TRC721Token is TRC721, TRC721Enumerable, TRC721MetadataMintable {
constructor() public TRC721Metadata("Your Token Name", "YTN") {}
}Change "Your Token Name" to your collection name and "YTN" to your short symbol. Save the file.
Step 3 — Deploy the contract with TronScan
TronScan has a built-in contract compiler that handles Solidity compilation and deployment in one flow. (If you prefer command-line tools, you can deploy with TronBox or TronIDE instead.)
Step 3.1 — Connect TronLink
Open the compiler page and click Connect Wallet. Approve the connection in TronLink.
Step 3.2 — Upload the contract code
Paste your customized contract from Step 2 into the editor. The editor accepts a single-file source — the reference implementation is already one self-contained file.
Step 3.3 — Compile
Set the compiler version 0.5.10. The reference contract is written for pragma solidity 0.5.10 and will not compile on newer toolchains without modification.
Click Compile. A successful compile produces a list of contracts. If the editor shows error output, check the most common causes:
- Compiler version mismatch — must be in the 0.5.10 range above.
- Missing dependency files (other contracts the source
imports). - Source size limit — split the contract or remove unused libraries.
Fix the issue in the editor and recompile.
Step 3.4 — Deploy
From the compiled contracts list, select TRC721Token (the deployable composite — not one of the parent contracts).
Click Deploy. TronLink opens a signature prompt. Review the Energy and fee estimate, then Accept. TronScan returns the deployed contract address once the transaction is confirmed.
Copy and save the contract address — you need it for every subsequent step.
Step 4 — Mint your first NFT
Open the deployed contract on TronScan using the address from Step 3.4. Switch to the Contract > Write Contract tab.
Find the mintWithTokenURI function. Fill in three arguments:
| Argument | What to enter |
|---|---|
to | The address that will own the minted NFT. Use your own address to mint to yourself. |
tokenId | A unique integer identifier — every token in the collection must have a different tokenId. |
tokenURI | A URL pointing to the JSON metadata file describing this NFT (see below). |
Metadata URIThe
tokenURIshould point to a JSON file with at leastname,description, andimagefields. For hosted, decentralized metadata, see Uploading NFT metadata to BTFS. For the JSON schema, see TRC-721 — metadata extension.
Only the deployer can mintOut of the box the contract uses the
MinterRolepattern, so only the address that deployed the contract can mint. To allow additional minters, see theMinterRolelogic in the contract example.
Click Send. TronLink prompts for signature. Accept. A true return value means the mint succeeded.
Step 5 — Register the collection on TronScan
Registering the collection makes it visible to wallets and explorers — without this step, holders would need to manually add the contract address to see their tokens.
Open the TronScan token creation page and pick TRC721 as the token type.
Fill in the registration form:
- Contract address — the address from Step 3.4.
- Name and symbol — must match the contract constructor values.
- Token icon — a small PNG/JPG representing the collection.
- Website, social links, and description — optional but recommended for discoverability.
Sign from the deployer addressTronScan enforces that only the account that deployed the contract can register it. Switch TronLink to the deployer account before submitting.
Submit the form. TronLink prompts for signature. Accept. A success message confirms registration.
Step 6 — View the collection in TronLink
Open the TronLink app on your phone (or the Assets tab in the browser extension).
-
Tap the + Add Assets button.

-
Search by contract address.

-
Paste the TRC-721 contract address and confirm.

The collection now appears in your assets list.
Tap it to see the specific NFTs you own.
Use Send from any NFT detail page to transfer it to another address.
A success confirmation indicates the NFT has been transferred.
What to do next
- Mint more NFTs — repeat Step 4 with different
tokenIdandtokenURIvalues. - Set up minter access control — out of the box, only the deployer can mint. See the
MinterRolelogic in the contract example to add additional minters. - Host metadata on BTFS — see Uploading NFT metadata to BTFS to keep your collection decentralized.
- Audit before mainnet — before deploying a production collection, have the contract audited. See Security best practices.
Related resources
- TRC-721 — standard overview
- TRC-721 contract example — full reference implementation
- TRC-721 contract interaction — read and write from a deployed TRC-721
- TRC-721 protocol interfaces — function reference
- Security best practices — audit and deployment checklist
Updated 12 days ago