# SPCX USDG Asset Gateway The only listed parent asset is USDG at 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 on Robinhood Chain (4663). On SPCX Chain (46630022) the representation is bUSDG, not a new issuer deployment. Both use 6 decimals. Native SPCX gas and the SPCXC project token are separate assets. Read GET https://spcxchain.network/mainnet/api/assets/status. Require the exact identities, reciprocal contracts, asset.ready=true and BACKED_AT_OBSERVED_HEADS. Read deployed addresses from configuration. ## CLI and unsigned API ```sh python3 spcx-mainnet.pyz assets export /root/spcx-assets-agent cd /root/spcx-assets-agent python3 assets.py plan --file request.json --out plan.json python3 assets.py send --file plan.json --account AGENT_ACCOUNT --max-gas 0.00002 --max-usdg 1 --max-retryable-spcx 0.0002 ``` Example request, also accepted by POST /mainnet/api/assets/plan: ```json {"action":"deposit","account":"PUBLIC_ADDRESS","amount":"0.01","idempotencyKey":"persist-one-key-before-signing"} ``` Use action=withdraw for the return direction. An optional recipient defaults to account. Receiving addresses for deposits must be externally owned on Robinhood Chain so gas refunds are not aliased. Persist the idempotency key before the first signature and reuse it on retries. Amounts have at most six decimal places. Deposits need exact USDG and parent SPCX allowances. detail.step identifies approval/reset-approval versus the actual deposit. After an approval receipt request the same action again. Parent ETH pays transaction gas; parent SPCX funds destination execution; the gateway asset fee is zero. Price feeds and the fee keeper never change the bridged amount. send requires three explicit caps. --max-gas uses the plan's gasCurrency (parent ETH or child SPCX). --max-usdg bounds asset units. --max-retryable-spcx separately bounds parent SPCX execution funding and may be 0 for withdrawals/payouts. The numbers above are examples; use your simulated quote. The CLI rechecks the plan, nonce and signed envelope, and journals signed bytes before one broadcast attempt. Repeating send inspects its existing hash. Unknown submissions never trigger an automatic retry. rebroadcast explicitly reuses only recorded bytes after checking the current simulation and nonce. Owned encrypted V3 wallets can use --keystore PATH. Unattended agents may add --yes and --password-file pointing to a private mode-0600 file from their operator credential service. No API accepts keys or passwords. ## Tracking and recovery ```sh python3 assets.py track --side parent --hash DEPOSIT_TX python3 assets.py track --side child --hash WITHDRAWAL_TX python3 assets.py backing --account PUBLIC_ADDRESS ``` HTTP equivalents: GET /mainnet/api/assets/track?side=parent|child&hash=HASH and GET /mainnet/api/assets/relay. A deposit waits separately for parent finality and child execution. action=resend with account and depositId can recreate a failed/expired ticket. It preserves the original recipient and amount, locks no additional USDG, and costs a newly authorized SPCX gas payment. Child replay protection prevents duplicate minting. Sponsors cannot redirect the refund or asset. Already delivered deposits are rejected by the planner. Withdrawals burn bUSDG and wait for a matching confirmed rollup proof. PROOF_READY enables action=payout with account and the source child hash. That zero-native-value transaction pays the original receiver, never the relay. The dedicated bounded relay performs this once enabled, funded and synced. Recovery tools remain available if that service is unavailable. Payout inclusion and parent finality are distinct states. This tracking version handles one gateway withdrawal per source transaction. Do not batch multiple withdrawals into one transaction. Report sampled chain heads with reserve coverage; in-flight deposits/withdrawals can make escrow and supply differ. Issuer controls over original USDG remain in effect.