Skip to main content
Deploy and manage an ERC-20 stablecoin with mint, burn, and pause controls, all transactions signed and broadcast through DFNS managed wallets.

Get the code

Clone the repository to follow along.
Stablecoin issuers need to deploy a token contract, mint and burn supply, and freeze transfers in emergencies, all while keeping signing keys secure. This solution blueprint shows how to do that with DFNS wallets handling the key management and transaction signing. The StableCoin contract supports:

Minting

Create tokens and send to any address

Burning

Destroy tokens from the caller’s balance

Pausing

Halt all token transfers (emergency controls)

Role-based access

Restrict minting to authorized addresses via MINTER_ROLE

Prerequisites

  1. Clone the stablecoin-management solution
  2. Create a DFNS organization if you don’t have one already, and note the organization id
  3. Create a service account for API access (see the service account guide)
  4. Create the “Bank” wallet on an EVM-compatible network (e.g.: Ethereum Sepolia)
  5. Fund your wallet with Testnet ETH for gas fees (see using testnets)
  6. Make sure you have installed Node.js v18+

Project Structure

Configuration

1

Clone and install

2

Set up environment variables

Copy the example environment file and fill in your values:
.env
3

Compile contracts

Deploy

This deploys a StableCoin contract called “Bank AUD” (bAUD) with the Bank wallet as owner. The script outputs the deployed contract address.
Once your contract is deployed, you can also interact with it directly from the DFNS dashboard using the Bring Your Own ABI feature. Import your contract’s ABI and call its functions (mint, burn, pause, etc.) without any code. See the smart contract interaction guide.

Manage with the Operations CLI

Use the interactive CLI to manage the deployed stablecoin:
The CLI provides these operations:

Example: mint, verify, burn

This walkthrough mints 100 bAUD to a destination wallet, checks the balance, burns tokens from the Bank wallet, and verifies the updated balance. The token uses 6 decimals, so 100 tokens = 100000000.
1

Create a destination wallet

Create a new wallet on the same network as the stablecoin contract. This wallet will receive the minted tokens. Copy its address from the dashboard.
2

Mint 100 bAUD

Run the CLI and select Mint, using the destination wallet address as the recipient:
3

Check the balance

Open the destination wallet in the DFNS dashboard. The token balance shows 100 bAUD.
Last modified on July 8, 2026