sui-local-dev-usdc
Installation
SKILL.md
Sui Local Dev Network with USDC
Set up a local Sui validator network, deploy a mock USDC coin (6 decimals, matching Circle's native USDC on Sui), and fund developer addresses with both SUI and USDC for local testing.
Prerequisites
- Sui CLI installed (
sui --version). Install or manage versions withsuiup(https://github.com/MystenLabs/suiup). - No existing
~/.sui/sui_configconflicts —--force-regenesiswipes state between runs.
How It Works
- Start local network —
sui start --with-faucet --force-regenesisspins up a local validator, fullnode, and faucet. - Create Move package —
sui move new usdcscaffolds a coin package with aUSDCone-time witness. - Publish USDC coin —
sui client publishdeploys the package; theinitfunction createsTreasuryCap<USDC>andCoinMetadata<USDC>, then mints an initial supply to the publisher. - Request faucet SUI —
sui client faucetfunds the active address with free SUI for gas. - Mint more USDC —
sui client call --function mintuses theTreasuryCapto mint additional USDC to any address.