Skip to main content
Ankara Chain RWA tokens are ERC-20 (or Soroban SEP-41) contracts, so every token represents a fractional share of the underlying real-world asset. When you deploy a token with TokenFactory, the contract starts with a zero total supply and a status of DRAFT. Minting moves shares into investor wallets and, on first mint, transitions the token to ACTIVE — signalling that the asset is live and tradeable. You can also mint additional shares to an already-ACTIVE token, for example when a farmland holding expands or new investors are admitted.

Mint via the CLI

The fastest way to mint during development is the interactive ankara mint command. It reads your deployed contracts from ankara.config.json and prompts for the recipient and amount:
1

Select token

If you have multiple deployed tokens, the CLI lists them. Choose the one you want to mint from.
2

Enter recipient address

Provide the investor’s EVM address (0x...) or Stellar public key (G...).
3

Enter amount

Enter the number of tokens in whole units (e.g. 1000). The CLI converts this to wei (1000 * 10^18) before broadcasting.
4

Confirm and broadcast

Review the summary and press Enter. The tx hash and (on Polygon Amoy) an explorer link are printed when the transaction confirms.
You can also pass flags to skip the prompts:

Mint via the SDK

Use AssetRegistry.mint() to call the token contract directly from TypeScript. This is the same call the CLI makes under the hood.
registry.mint() accepts any EVM address or Stellar public key for to, and a bigint for amount. The amount is always 18-decimal fixed-point, so use ethers.parseEther() for human-readable values.
The connected signer (or stellarSecretKey) must hold the MINTER_ROLE on the token contract. If you deployed the token yourself, your address is the admin and has this role automatically.

Batch minting via the CLI

To distribute tokens to many investor wallets in one step, use ankara batch-mint. Provide a CSV file with one address,amount pair per line:
Example investors.csv:
The command sends one transaction per row and prints the tx hash for each. Use this for investor onboarding flows where individual recipients are known upfront.

Transfer management and permissioned transfers

By default, Ankara Chain tokens are freely transferable between any addresses. You can gate transfers so that only KYC-verified addresses can receive tokens by attaching a WhitelistVerifier contract to the token. When a verifier is set on the token contract, any transfer to an un-verified address reverts on-chain. Set the verifier address when you deploy — pass identityVerifier in your deploy options — or update it later through AssetRegistry:
To read the currently-attached verifier:
If your platform already manages a KYC list off-chain, deploy a WhitelistVerifier that reads from that list and attach it to every token at deploy time. Investors who pass KYC are whitelisted on-chain once, then can receive any token from your factory without further action.

Checking balances

Via AssetRegistry

Via the useTokenBalance React hook

In a React or Next.js application, use the useTokenBalance hook — no signer required:
See the React Hooks guide for full usage details.

Token lifecycle

Minting interacts with the AssetStatus enum that every Ankara Chain token carries on-chain: The first mint() call automatically transitions the token from DRAFT to ACTIVE. Subsequent mints on an already-ACTIVE token do not change its status. You can also read and update the status directly:
Setting status to REDEEMED is irreversible on-chain. Confirm the real-world asset has been fully wound down before calling setStatus(AssetStatus.REDEEMED).