Developer Guides
Local Development
Develop against an Arbitrum fork with stubbed industrial feeds before touching mainnet.
Recommended loop
- Start Anvil forked from Arbitrum One.
- Deploy or attach local contract addresses.
- Run oracle in
stubmode with fixture events. - Run agency against the fork with simulation enabled.
- Assert invariants with Foundry tests.
Anvil fork
anvil --fork-url $ARB_RPC_URL --chain-id 42161 # in another shell forge script script/DeployLocal.s.sol --rpc-url http://127.0.0.1:8545 --broadcast
Oracle stub mode
export ORACLE_MODE=stub export FIXTURES=./fixtures/orders.json python -m oracle.runtime
Stub mode publishes deterministic scores so Agency/SPOOL paths can be tested without live ERP/vision.
Agency with simulation
export SIM_FORK_URL=http://127.0.0.1:8545 export POLICY_ENGINE=0x… npm run agency:dev
Contract tests
cd packages/contracts forge test -vv forge test --match-path test/Fork.t.sol --fork-url $ARB_RPC_URL
Tip
Pin fork block numbers in CI so oracle + spool integration tests stay reproducible.