This guide covers how to test the KUSD system on KalyChain testnet.
Network: KalyChain Testnet
Chain ID: 3889
RPC URL: https://testnetrpc.kalychain.io/rpc
Explorer: https://testnet.kalyscan.io
| Contract | Address |
|---|---|
| Vat | 0x30e50aD44cd1890A6bf9F09Bf6b8AfE62a6a390D |
| Kusd (Token) | 0xd15F19c457AaaCB7A389B305Dac8611Cd2294c36 |
| Spotter | 0x4007599DcE3EB87F58A42C7f5e085994bf01Dd6E |
| Jug | 0x78170E93a14ed75C0FB7cAE9Ef8fd6D1a7D059D3 |
| Pot | 0xBF790a6d2b3c658a90a8B64eeF75D3a23BfE6849 |
| Dog | 0xfeadEe95bF43B9ECf2E0a89Dd58D98D17Aba27C2 |
| Vow | 0x12af8412fB89929E2C56b4b9ded7eaC06705d2DC |
| Flapper | 0x81ff754992C10A01683Cb71B326B0285D55D0e77 |
| Flopper | 0x00822453CD591143c5665a76818bFF0529d1de40 |
| End | 0x356F523079e3f33186B1B59F9cfAB7eCde1c477D |
| Cure | 0xD3A6614B06F7eC703f21308639ceF08C215b0960 |
| KusdJoin | 0xB4d2fB8F90C018762CD403B690061CE04189e381 |
| Token | Address | Decimals |
|---|---|---|
| MockWBTC | 0x92631B8Be684d41d0dF9eb473D9E3995CDb2a797 |
8 |
| MockWETH | 0x68E7492e64FF0592a6D82E5C0323b8a8DDBfB884 |
18 |
| MockUSDT | 0xeE9940240B94821937812c43a6264e5aA417f161 |
6 |
| MockUSDC | 0x148d19609F3Ad595F8455225510f89cF0F121013 |
6 |
| MockDAI | 0x7BE7a4338143C417D2D71C96eA8560767c6E4477 |
18 |
- Gem:
0x92631B8Be684d41d0dF9eb473D9E3995CDb2a797 - GemJoin:
0x43147ADD4C2DB64BA9154273Fd0795ae7085E76f - Clipper:
0x8F33Cd3Bac73C5b8bD0ecfcDee82Ec8b8b5bcaa7 - Calc:
0x531aCB028BFC68A186969769A7dc912e834fE996 - Oracle:
0x85a8386367755965C95E31B06778B2c89082E316
- Gem:
0x68E7492e64FF0592a6D82E5C0323b8a8DDBfB884 - GemJoin:
0xf4E8C15337DBcc1DF320B677F6D36e266895f124 - Clipper:
0xdDDBfC8F2e9Bf2a347c9658Af8Db66293df26774 - Calc:
0x8Ee83625b89Ed59c154A889480CC54Ae25926E09 - Oracle:
0x935216C74e1838E7090f31756ce0f64a34A5aAce
- Gem:
0xeE9940240B94821937812c43a6264e5aA417f161 - GemJoin:
0x8aC47Ea2C9aEB0501DbF9741FCeB1dFf8f4e5C40 - Clipper:
0x3CFc46A275C5CBdFc6DBAd5c39590dF616F8D190 - Calc:
0x9fDc324dB23c997FC17022742F0b7adE7134446a - Oracle:
0xf8Be6Ed01e7AE968118cf3db72E7641C59A9Dc4f
- Gem:
0x148d19609F3Ad595F8455225510f89cF0F121013 - GemJoin:
0x92448d63dc9d345DF69Ce8b6322D31F6abF35591 - Clipper:
0xb6b82Aa8A96C769DA355F5CEe56309BB6E0473Ad - Calc:
0xe9e09fFE77916016e39FD0245C9f0495D0Ed21c1 - Oracle:
0x930e5F6D686A19794bc7a1615a40032182D359D7
- Gem:
0x7BE7a4338143C417D2D71C96eA8560767c6E4477 - GemJoin:
0x3209e83e489f7e6e5ef9Ea820076C9B4BBC8Fb5d - Clipper:
0xe745818d1BfDC7dfE5556aa97a55059D18b9de38 - Calc:
0xDaF2a190a2e75eDdE038cC75b596F8520D57430B - Oracle:
0x301F4fbd60156568d87932c42b3C17Bd5F0f33BD
The mock tokens deployed on testnet have a public mint() function that anyone can call for testing purposes.
Important: You must specify gas settings explicitly for KalyChain:
--gas-limit 500000--gas-price 21000000000(21 gwei)--legacy(use legacy transaction format)
cast send 0x92631B8Be684d41d0dF9eb473D9E3995CDb2a797 \
"mint(address,uint256)" \
YOUR_ADDRESS \
100000000000 \
--rpc-url https://testnetrpc.kalychain.io/rpc \
--private-key $PRIVATE_KEY \
--gas-limit 500000 \
--gas-price 21000000000 \
--legacycast send 0x68E7492e64FF0592a6D82E5C0323b8a8DDBfB884 \
"mint(address,uint256)" \
YOUR_ADDRESS \
1000000000000000000000 \
--rpc-url https://testnetrpc.kalychain.io/rpc \
--private-key $PRIVATE_KEY \
--gas-limit 500000 \
--gas-price 21000000000 \
--legacycast send 0xeE9940240B94821937812c43a6264e5aA417f161 \
"mint(address,uint256)" \
YOUR_ADDRESS \
1000000000000 \
--rpc-url https://testnetrpc.kalychain.io/rpc \
--private-key $PRIVATE_KEY \
--gas-limit 500000 \
--gas-price 21000000000 \
--legacycast send 0x148d19609F3Ad595F8455225510f89cF0F121013 \
"mint(address,uint256)" \
YOUR_ADDRESS \
1000000000000 \
--rpc-url https://testnetrpc.kalychain.io/rpc \
--private-key $PRIVATE_KEY \
--gas-limit 500000 \
--gas-price 21000000000 \
--legacycast send 0x7BE7a4338143C417D2D71C96eA8560767c6E4477 \
"mint(address,uint256)" \
YOUR_ADDRESS \
1000000000000000000000 \
--rpc-url https://testnetrpc.kalychain.io/rpc \
--private-key $PRIVATE_KEY \
--gas-limit 500000 \
--gas-price 21000000000 \
--legacycast call TOKEN_ADDRESS "balanceOf(address)(uint256)" YOUR_ADDRESS --rpc-url https://testnetrpc.kalychain.io/rpcExample:
cast call 0x92631B8Be684d41d0dF9eb473D9E3995CDb2a797 "balanceOf(address)(uint256)" 0xae51f2efe70e57b994be8f7f97c4dc824c51802a --rpc-url https://testnetrpc.kalychain.io/rpcBefore depositing collateral, you need to approve the GemJoin contract:
cast send MOCK_TOKEN_ADDRESS \
"approve(address,uint256)" \
GEMJOIN_ADDRESS \
999999999999999999999999999999 \
--rpc-url https://testnetrpc.kalychain.io/rpc \
--private-key $PRIVATE_KEY \
--gas-limit 500000 \
--gas-price 21000000000 \
--legacyExample for WBTC:
cast send 0x92631B8Be684d41d0dF9eb473D9E3995CDb2a797 \
"approve(address,uint256)" \
0x43147ADD4C2DB64BA9154273Fd0795ae7085E76f \
999999999999999999999999999999 \
--rpc-url https://testnetrpc.kalychain.io/rpc \
--private-key $PRIVATE_KEY \
--gas-limit 500000 \
--gas-price 21000000000 \
--legacycast send GEMJOIN_ADDRESS \
"join(address,uint256)" \
YOUR_ADDRESS \
AMOUNT \
--rpc-url https://testnetrpc.kalychain.io/rpc \
--private-key $PRIVATE_KEY \
--gas-limit 500000 \
--gas-price 21000000000 \
--legacyThis requires interacting with the Vat contract directly. See the MakerDAO documentation for detailed vault operations.
- Gas Settings: Always use the gas settings shown above for KalyChain testnet
- Mock Tokens: These are ONLY for testnet testing - they have no value
- Public Mint: Anyone can mint mock tokens on testnet for testing
- Oracle Prices: The oracle prices are set by the oracle system deployed separately
- Ownership: All contracts are currently owned by the deployer EOA:
0xaE51f2EfE70e57b994BE8F7f97C4dC824c51802a
Make sure you're using the correct gas settings:
--gas-limit 500000--gas-price 21000000000--legacy
The KalyChain testnet explorer may lag behind the actual chain state. Use RPC calls to verify transactions:
cast receipt TRANSACTION_HASH --rpc-url https://testnetrpc.kalychain.io/rpccast code CONTRACT_ADDRESS --rpc-url https://testnetrpc.kalychain.io/rpcIf it returns 0x, the contract is not deployed at that address.