For the complete documentation index, see llms.txt. This page is also available as Markdown.
How to Mint and Retire TRU Tokens
This guide provides the smart contract information needed to mint (purchase) and retire (sell) TRU tokens on Ethereum. These operations can be performed directly via smart contract calls.
Contract Addresses
TRU Token Contract
0xf65B5C5104c4faFD4b709d9D60a185eAE063276c
This is the ERC-20 token contract for TRU on Ethereum mainnet.
Purchase Contract
0x764C64b2A09b09Acb100B80d8c505Aa6a0302EF2
This is the contract that handles minting and retiring TRU tokens in exchange for ETH.
Minting TRU Tokens
Minting (purchasing) TRU tokens requires ONE transaction.
Function Call
Function: buyTRU(uint256 amount)
Parameters:
amount - The number of TRU tokens you want to purchase (in wei units, where 1 TRU = 10^18 wei)
Payment: You must send ETH with this transaction. The amount of ETH required depends on the current TRU/ETH price in the reserve.
So first you will need to request the ETH/TRU price with getPurchasePrice()
This will return the value you will need to send in the buyTRU function.
ABI for buyTRU
Retiring TRU Tokens
Retiring (selling) TRU tokens requires TWO transactions.
Transaction 1: Approve
Before you can retire TRU tokens, you must first approve the Purchase contract to spend your TRU tokens.
Contract: TRU Token Contract (0xf65B5C5104c4faFD4b709d9D60a185eAE063276c)