forge, cast)
Network: StableNet Testnet (Chain ID 8283)
Prerequisites
Before you start, make sure you have:-
Foundry installed — run
forge --versionto check. If not, install it: -
A funded testnet wallet. Get free KRC from the faucet:
Faucet
Request testnet KRC — no sign-up required.Explorer
Verify your balance before deploying.
StableNet enforces a minimum priority fee of 27,600 Gwei. The deploy commands in this guide include this value. Transactions below this threshold will be rejected.
Network Details
| Parameter | Value |
|---|---|
| Chain ID | 8283 |
| RPC URL | https://api.test.stablenet.network |
| Explorer | explorer.stablenet.network |
| Faucet | faucet.stablenet.network |
| WKRC Contract | 0x0000000000000000000000000000000000001000 |
| Minimum Gas Tip | 27,600 Gwei |
NativeCoinAdapter system contract at the address above. The same balance you use to pay gas is also the balance tracked by WKRC.balanceOf().
Steps
Write WKRCPayment.sol
Delete the placeholder Compile to confirm there are no errors:Expected output:
src/Counter.sol and create src/WKRCPayment.sol:Deploy to Testnet
Export your private key and run the deploy script:Successful output looks like:Save the Contract Address — you will need it in the next step.
Block inclusion may take up to 1–2 minutes. If
cast times out, your transaction is still in the mempool and will be confirmed shortly.Approve WKRC and send a payment
Before calling Confirm the allowance was consumed:
pay(), your wallet must approve the deployed contract to pull WKRC. Use cast to send both transactions:Verify on Explorer
Open explorer.stablenet.network and search for your contract address.You should see:
- The deployment transaction
- The
approvetransaction on the WKRC contract - The
paycall on your contract, with aPaymentevent in the logs
Payment event confirms that the WKRC transfer was recorded on-chain.What just happened?
- WKRC is the KRW-pegged native coin of StableNet. It works exactly like any ERC-20 token —
approve,transferFrom, andbalanceOfall follow the standard interface. WKRCPayment.pay()uses the ERC-20transferFrompattern: the user first approves the contract as a spender, then the contract pulls the tokens. This is the standard pattern for on-chain payment flows.- 27,600 Gwei priority fee is enforced by the network’s
GovValidatorgovernance contract. All transactions — including contract deploys — must meet this minimum.
Troubleshooting
- “replacement transaction underpriced” — use
--gas-price 80000000000000 --priority-gas-price 35000000000000 - “transfer amount exceeds balance” — lower the gas price and retry
Next Steps
EVM Compatibility Reference
Supported
eth_* RPC methods, StableNet vs Ethereum differences, and fee delegation (tx type 0x16).Network Information
Full network parameters — Chain IDs, system contract addresses.
API Reference
JSON-RPC methods with curl and ethers.js examples.
Explorer
Inspect your contract and transactions on-chain.

