Appearance
Mint a token in 5 minutes
A learning-oriented walkthrough: issue a native token on an ACE devnet and mint supply. By the end you will have created a token that is simultaneously an SPL-style token (SVM) and an ERC-20 (EVM) — one balance, no bridge.
Network endpoints
| Network | JSON-RPC | chain-id |
|---|---|---|
| Public testnet | https://testnet.acechain.io/rpc | 122766 |
| Local node | http://127.0.0.1:18545 | 122766 |
The native gas token is ACE (9 decimals).
Before you start
- A checkout of the chain repository (provides the
mint_tokenexample). - A funded, auth-keyed account. On a node with the
devnetfeature the example usesace_faucetto create and fund one for you (see the note below).
Faucet availability
ace_faucet is devnet-only. It works against a local devnet node and against the public endpoint if that node runs the devnet feature. Confirm with:
bash
curl -s -X POST https://testnet.acechain.io/rpc -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","method":"ace_faucet","params":["<32-byte-xid-hex>",1000000],"id":1}'If it returns "faucet is only available on devnet", fund the issuer account another way before minting.
Run it
Against the public testnet:
bash
cargo run -p ace-token-examples --bin mint_token -- \
--rpc https://testnet.acechain.io/rpc \
--chain-id 122766 \
--symbol DEMO --decimals 6 --amount 1000000Or against a local node — swap --rpc http://127.0.0.1:18545.
What just happened
The example walked the real public RPC surface, no internal access:
- Derived a deterministic devnet identity (Ed25519 auth key).
- Funded it via
ace_faucet, then registered the auth key (SetAuthPubkey). ace_buildTokenCreate→ signed →ace_submitSignedPayload(CreateMint).ace_buildTokenMint→ signed →ace_submitSignedPayload(MintToOwner).
The token now lives in the shared state tree. It is reachable from EVM contracts as a standard ERC-20 at a synthetic address — see N-VM shared state.
Next steps
- Issue a token with your own parameters.
- Enforce fixed supply by renouncing the mint authority.
