The verified GLD reference contract below is deployed on Tavchain Testnet, chain ID 771002. Deploy your own instance when following this guide.
Before you begin
Install a maintained, even-numbered Node.js release supported by Hardhat, at least 22.13.0. The reference environment uses Node.js 24.22.1 on Linux x64. These instructions have not been validated on Windows or macOS. The first install and compiler download require internet access.Download the starter
Download the source ZIP and its SHA-256 checksum. Extract the ZIP and open a terminal in the extractedtavchain-hardhat-starter3 directory.
Archive SHA-256:
Install and compile
Run the contract tests
- Fixed initial supply, deployer balance and Gold/GLD metadata.
- A ten-GLD transfer, its Transfer event and resulting balances.
- Rejected overdrawing with unchanged balances and supply.
Deploy on the local development chain
GLDTokenModule deployment and its local address. The in-process network ends when the command exits. Its address and state do not represent a public Tavchain deployment.
Check the public network without signing
Prepare a public test account
Use a fresh account holding only valueless Test TAV. Connect to Tavchain Testnet, chain ID 771002, and obtain Test TAV from the faucet. Keep your public account address available so you can check the deployer. Store only this dedicated account’s private key through Hardhat’s hidden prompt:--dev. A compromised host or dependency can expose the key while unlocked. Do not use keystore get, which prints the secret.
Deploy to Tavchain Testnet
--reset to create a second deployment.
Verify without unlocking the key
ReplaceCONTRACT_ADDRESS with your successful deployment’s address:
TAVCHAIN_PRIVATE_KEY, check that you selected hardhat.verify.config.ts. Do not expose a signing key in CI to solve a verification-only connection problem.
The npm import path differs from Remix’s versioned import. Keep the original build and compiler input for source verification; do not mix artifacts from the two workflows.
Example deployment
View the deployed GLD example
View the deployed GLD example
The starter’s GLD example is deployed on Tavchain Testnet, chain ID 771002. Open its verified source and compiler settings to inspect the original contract and OpenZeppelin imports.
At block 10833, after the demonstrated transfer, the deploying account held 990 GLD and the recipient held 10 GLD. Supply remained 1,000 GLD. Later transactions may change those balances. Deployment and transfer fees totaled 0.000671911875 Test TAV; this observed fee is not a quote for future transactions.The transfer uses the existing token contract’s
transfer method. Follow Create and transfer an ERC-20 token to perform a transfer with your own deployed instance. The downloadable starter’s Ignition module deploys the token; it does not include a separate public-transfer module.Deploy your own instance when following the guide. Its address, transaction hash and fee will differ. The source retains the kit’s MIT notice and third-party notices.