Skip to main content

Send and track a transaction

Use Ethereum-compatible tooling with a running local devnet. Signing happens in your wallet or client, outside the node.

Foundry / cast​

Install Foundry and start the devnet. Set a key printed by local startup; use only the public development fixtures on this valueless network.

export ETH_RPC_URL=http://127.0.0.1:30400
export JOLTZU_DEV_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

cast chain-id
cast block-number
cast send --private-key "$JOLTZU_DEV_KEY" \
0x000000000000000000000000000000000000beef --value 1ether
cast balance 0x000000000000000000000000000000000000beef --ether

Foundry's ether unit suffix means 10^18 base units. Here it is 1 JOLT, not Ethereum ETH. The first command uses a publicly known local devnet key. Never fund it on a network with value.

Read with JavaScript​

Run this from a separate Node.js application:

npm install ethers@6
import {JsonRpcProvider, formatEther} from 'ethers';

const provider = new JsonRpcProvider('http://127.0.0.1:30400');
const network = await provider.getNetwork();
if (network.chainId !== 31337n) throw new Error('Unexpected local chain');
const balance = await provider.getBalance(
'0x000000000000000000000000000000000000beef',
);
console.log(`${formatEther(balance)} JOLT`);

Use an external signer for writes. Do not send a private key to RPC; eth_accounts is empty and node-side signing methods are unavailable.

Follow a submitted hash​

# Replace TRANSACTION_HASH with the hash returned by your submission.
curl http://127.0.0.1:30400 \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceipt","params":["TRANSACTION_HASH"]}'

This last command is a template: replace the placeholder with a 32-byte 0x hash. A null result means there is no committed receipt available. Bound retries; a timeout is not proof of rejection. A receipt with status: "0x1" succeeded; "0x0" failed execution and can still have charged gas.

Before retrying after a transport error, query the known hash and nonce. Identical signed pending bytes are idempotent by hash; a new transaction or nonce is a new operation. Errors and limits covers recovery.