Thirdweb Logo

Token


The Token contract is suited for projects in which you want to create your own currency. This currency can be purchased and traded between users on an exchange, utilized to buy and sell NFTs in a marketplace, and much more.

This can be combined with other contracts like NFT Drop, Splits, Edition Drop, and Marketplace for even greater functionality.

Check out the documentation here.

Total Supply

Loading...


How It Works

export default function Token() {
const { contract: tokenContract } = useContract(contractAddresses[4].address);
const { data: totalSupply } = useTokenSupply(tokenContract);
return (
<div>
<h3>Total Supply</h3>
<p>
{totalSupply === undefined
? "Loading..."
: "" +
totalSupply?.displayValue +
" " +
totalSupply?.symbol +
""}
</p>
</div>
);
}