Skip to content

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

NetworkJSON-RPCchain-id
Public testnethttps://testnet.acechain.io/rpc122766
Local nodehttp://127.0.0.1:18545122766

The native gas token is ACE (9 decimals).

Before you start

  • A checkout of the chain repository (provides the mint_token example).
  • A funded, auth-keyed account. On a node with the devnet feature the example uses ace_faucet to 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 1000000

Or 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:

  1. Derived a deterministic devnet identity (Ed25519 auth key).
  2. Funded it via ace_faucet, then registered the auth key (SetAuthPubkey).
  3. ace_buildTokenCreate → signed → ace_submitSignedPayload (CreateMint).
  4. 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

Released under the Apache-2.0 License · Testnet · GitHub