Without Aurora ETH
How the contracts were deployed and the keeper runs with only NEAR.
The Aurora relayer rejects transactions with gas price 0. The Aurora engine accepts them when its submit method is called directly on NEAR, and then the NEAR account pays NEAR gas. scripts/aurora-submit.mjs builds on that:
- Forge simulates a script against Aurora (no
--broadcast). - The script signs each transaction from the dry run at gas price 0.
- It hands the raw transaction to
aurora.submitthrough near-cli-rs, waits for the receipt, and fails on a revert. Nonces already used are skipped, so a run can resume.
pnpm rpc:testnet &
export WALLET_PK=… # the Aurora signer; the simulation reads it too
cd contracts && forge script script/Deploy.s.sol --rpc-url aurora_testnet --legacy
NEAR_SIGNER=you.testnet node ../scripts/aurora-submit.mjs broadcast/Deploy.s.sol/1313161555/dry-run/run-latest.jsonThat is how Pearn's testnet contracts, the oracle's first sync and the demo markets went live.
The keeper
.github/workflows/keeper.yml calls oracle.sync() every 12 hours the same way. The NEAR account pearn-sync.testnet signs with a function-call key that can only call aurora.submit (5 NEAR allowance). The Aurora signer is a separate keeper wallet holding no ETH.
Why a local RPC proxy
Foundry sends a bare block hash in some requests, and Aurora's RPC rejects that. pnpm rpc:testnet (scripts/aurora-rpc.mjs) rewrites it to the EIP-1898 form.