Skip to content

Seed DEX pairs with test ERC-20 stand-ins

The sanect DEX (Uniswap V2 fork) launches with only WSNCT deployed. To give the dex-app UI meaningful pairs to swap against, deploy four test ERC-20 stand-ins, seed initial liquidity, then point the dex-app at them.

These are mintable test tokens — anyone can call mint() on them. They are NOT bridged assets. The names (TUSD, TUSDC, TWBTC, TWETH) match what mainnet users expect for unit / decimals testing without implying a real peg.

1. Deploy the tokens

bash
cd dex
export RPC=https://rpc.testnet.sanect.com
export DEPLOYER_PRIVATE_KEY=0x<your hex pk>
forge script script/DeployTestTokens.s.sol \
  --rpc-url $RPC \
  --broadcast \
  --private-key $DEPLOYER_PRIVATE_KEY

Save the four printed addresses. Mints 1,000,000 units of each token to the deployer (so 1_000_000 * 10**6 for TUSD/TUSDC, 1_000_000 * 10**8 for TWBTC, 1_000_000 * 10**18 for TWETH).

2. Seed liquidity into the router

Initial reference prices for the testnet (1 SNCT = $0.01):

PairSNCT sideToken sideImplied price
WSNCT / TUSD100,000 WSNCT1,000 TUSD1 SNCT = 0.01 TUSD
WSNCT / TUSDC100,000 WSNCT1,000 TUSDC1 SNCT = 0.01 TUSDC
WSNCT / TWETH30,000 WSNCT0.1 TWETH1 ETH = $3,000 (i.e. 300,000 SNCT)
WSNCT / TWBTC60,000 WSNCT0.01 TWBTC1 BTC = $60,000 (i.e. 6,000,000 SNCT)

Scale these to whatever you can afford from the deployer's SNCT balance — only ratios matter for price; absolute size sets slippage.

For each pair, from the deployer wallet:

bash
# Example for WSNCT/TUSD via cast (replace placeholders)
ROUTER=0x0F5575BC344f6F0b595A7B3a0bDEdE9a90859c6f
WSNCT=0xC09473C15BE5A4B9D1a587a45dC8EF46F6872935
TUSD=0x<address from step 1>

cast send $TUSD "approve(address,uint256)" $ROUTER \
  $(cast --to-wei 1000 mwei) \
  --rpc-url $RPC --private-key $DEPLOYER_PRIVATE_KEY

cast send $ROUTER \
  "addLiquiditySNCT(address,uint256,uint256,uint256,address,uint256)" \
  $TUSD \
  $(cast --to-wei 1000 mwei) \
  0 0 \
  $(cast wallet address $DEPLOYER_PRIVATE_KEY) \
  $(($(date +%s) + 1800)) \
  --value $(cast --to-wei 100000 ether) \
  --rpc-url $RPC --private-key $DEPLOYER_PRIVATE_KEY

Repeat with TUSDC, TWBTC (8-decimal token amount), and TWETH.

3. Wire dex-app

On the Railway dex-app service, set:

NEXT_PUBLIC_TEST_TUSD=0x...
NEXT_PUBLIC_TEST_TUSDC=0x...
NEXT_PUBLIC_TEST_TWBTC=0x...
NEXT_PUBLIC_TEST_TWETH=0x...

Redeploy. The TokenSelector dropdown will now show SNCT, WSNCT, TUSD, TUSDC, TWBTC, and TWETH.