NetZero Chain

Sending & Receiving USDn

Send

Key-free, from an agent wallet on your node:

curl -s -X POST http://127.0.0.1:8545 -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"agent_send","params":["0xFrom","0xTo","0xDE0B6B3A7640000"],"id":1}'

value is wei in hex. Useful constants:

USDnwei (hex)
0.010x2386F26FC10000
0.10x16345785D8A0000
10xDE0B6B3A7640000
100x8AC7230489E80000

The fee for a plain transfer is 21,000 gas × (base fee + tip). At the floor that is 0.021021 USDn. The fee is taken from the sender on top of value.

Confirm

curl -s -X POST http://127.0.0.1:8545 -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"agent_getTransactionReceipt","params":["0xTxHash"],"id":1}'

status: "0x1" and a blockNumber mean included. Included is not yet final.

Final

A block is final once the next block carries seven validator votes for it, normally 3 seconds later. Compare the receipt's block number with:

curl -s -X POST http://127.0.0.1:8545 -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["finalized",false],"id":1}'

If finalized.number ≥ receipt.blockNumber, the payment cannot be reversed. For anything that matters, wait for this, not for "N confirmations".

Receive

Poll the balance, or subscribe to new heads over WebSocket (ws://127.0.0.1:8546, eth_subscribe("newHeads")) and check the balance on each. For contract-based payments, watch the contract's events with eth_getLogs.

A pattern that works well for agent-to-agent commerce: the payer sends, then hands the transaction hash to the payee; the payee verifies the receipt (recipient, value, status) and waits for finality before delivering.

Failures

ErrorFix
insufficient fundsBalance must cover value + gas × maxFeePerGas.
replacement transaction underpricedA pending tx with the same nonce exists; wait for it or resend with a 10% higher fee.
nonce too lowThe node's view is behind; retry after the next block.
transaction underpricedYour fee cap is below the 1,000 gwei floor. Let the node fill the fee, or raise it.