Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.stablenet.network/llms.txt

Use this file to discover all available pages before exploring further.

Send WKRC on StableNet Testnet and confirm it on the Explorer.

Prerequisites

  • StableNet Testnet added to your wallet (Connect to StableNet)
  • Testnet WKRC from the Faucet
  • Node.js ≥ 18 (for ethers.js / viem) or Foundry (for cast)

Send with ethers.js

npm install ethers
import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider(
  "https://api.test.stablenet.network"
);
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);

const tx = await wallet.sendTransaction({
  to: "0xRECIPIENT_ADDRESS",
  value: ethers.parseEther("0.01"),       // 0.01 WKRC
  maxPriorityFeePerGas: ethers.parseUnits("27600", "gwei"), // minimum tip
});

console.log("tx hash:", tx.hash);
const receipt = await tx.wait();
console.log("confirmed in block:", receipt?.blockNumber);
Never hardcode private keys. Use environment variables or a keystore.

Send with viem

import { createWalletClient, createPublicClient, http, parseEther, parseGwei, defineChain } from "viem";
import { privateKeyToAccount } from "viem/accounts";

const stablenet = defineChain({
  id: 8283,
  name: "StableNet Testnet",
  nativeCurrency: { name: "WKRC", symbol: "WKRC", decimals: 18 },
  rpcUrls: { default: { http: ["https://api.test.stablenet.network"] } },
  blockExplorers: {
    default: { name: "Explorer", url: "https://explorer.stablenet.network" },
  },
});

const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const client = createWalletClient({ account, chain: stablenet, transport: http() });
const publicClient = createPublicClient({ chain: stablenet, transport: http() });

const hash = await client.sendTransaction({
  to: "0xRECIPIENT_ADDRESS",
  value: parseEther("0.01"),
  maxPriorityFeePerGas: parseGwei("27600"),
});

const receipt = await publicClient.waitForTransactionReceipt({ hash });
console.log("confirmed in block:", receipt.blockNumber);

Send with Foundry cast

cast send 0xRECIPIENT_ADDRESS \
  --value 0.01ether \
  --priority-gas-price 27600gwei \
  --rpc-url https://api.test.stablenet.network \
  --private-key $PRIVATE_KEY
blockHash            0xabc...
blockNumber          78547
transactionHash      0xdef...
status               1 (success)

Verify on Explorer

Open explorer.stablenet.network and search for your transaction hash. You should see:
  • Status: Success
  • From: your wallet address
  • To: recipient address
  • Value: amount transferred in WKRC
StableNet has 1-second deterministic finality. Your transaction is final as soon as it appears in a block — no additional confirmations needed.

Gas tip requirement

StableNet requires a minimum maxPriorityFeePerGas of 27,600 Gwei. Transactions with a lower tip will be rejected. The examples above include this value.

Next steps

Deploy a Contract

Deploy a Solidity contract using Foundry.

Fee Delegation

Let your app pay gas on behalf of users.