Get the code
Clone the repository to follow along.
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_ROLEPrerequisites
- Clone the stablecoin-management solution
- Create a DFNS organization if you don’t have one already, and note the organization id
- Create a service account for API access (see the service account guide)
- Create the “Bank” wallet on an EVM-compatible network (e.g.: Ethereum Sepolia)
- Fund your wallet with Testnet ETH for gas fees (see using testnets)
- 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
StableCoin contract called “Bank AUD” (bAUD) with the Bank wallet as owner. The script outputs the deployed contract address.
Manage with the Operations CLI
Use the interactive CLI to manage the deployed stablecoin: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.