Builder Code Integration & Verification
Shell Script + X Layer Builder Codes

CLI Script Guide

send-erc8021.sh sends ERC-8021 attributed transactions on a fixed interval using only python3 and curl — no extra dependencies required. The script derives your address from the private key, encodes the Builder Code as an ERC-8021 Schema 0 data suffix, signs the transaction locally, and broadcasts it via raw JSON-RPC.

Quick Start

Make the script executable, then run it with your private key and Builder Code. It will print your derived address and balance on startup, then send one transaction per minute. The default RPC endpoints are public and may be rate-limited — use -r to pass a private endpoint if you hit errors.

Step 1 — Download the script
curl -O https://builder-code.vercel.app/send-erc8021.sh
Step 2 — Make executable
chmod +x send-erc8021.sh
Step 3 — Run on X Layer Testnet (default)
./send-erc8021.sh \
-k 0xYOUR_PRIVATE_KEY \
-b YOUR-BUILDER-CODE
Step 4 — Run on X Layer Mainnet
./send-erc8021.sh \
-k 0xYOUR_PRIVATE_KEY \
-b YOUR-BUILDER-CODE \
-n mainnet
Custom RPC and interval
./send-erc8021.sh \
-k 0xYOUR_PRIVATE_KEY \
-b YOUR-BUILDER-CODE \
-r https://your-rpc.example.com \
-i 30
# sends every 30 seconds

Expected Output

On startup the script prints your address, balance, and data suffix so you can verify everything before the first send.

Terminal output
════════════════════════════════════════════════════ ERC-8021 Attribution Sender ════════════════════════════════════════════════════ Network: testnet (chain 1952) RPC: https://testrpc.xlayer.tech/terigon Builder Code: your-builder-code Interval: 60s ════════════════════════════════════════════════════ Address: 0xYourDerivedAddress Data suffix: 0x796f75722d6275696c6465722d636f6465100080218021802180218021802180218021 Chain ID: 1952 RPC: https://testrpc.xlayer.tech/terigon Interval: 60s Balance: 0.199999 OKB (199999130000000000 wei) Press Ctrl+C to stop. [2026-04-10 23:32:19] #1 nonce=2 gas_price=0.02 gwei gas_limit=23312 est_cost=0.00000047 OKB balance=0.19999913 OKB [2026-04-10 23:32:19] #1 ✓ 0xabc123... Explorer: https://www.okx.com/web3/explorer/xlayer-test/tx/0xabc123... Next send in 60s...