# Base fork gate validation results

## Implemented gate

- Deterministic Base-only V3 deployment/rollback simulation:
  `v3-src/test/fork/base/BasePilotDeploymentRollbackV3.t.sol`.
- Non-broadcasting bootstrap simulation script:
  `v3-src/script/BasePilotForkSimulation.s.sol`.
- Optional endpoint checks for every supported configured EVM chain (Base,
  Avalanche, Arbitrum, Polygon):
  `v3-src/test/fork/SupportedChainForkAvailabilityV3.t.sol`.
- CI/local harness: `ci/fork-gates.sh` and `.github/workflows/v3-fork-gates.yml`.

The Base test verifies constructor ordering using a predicted governance CREATE
address, final ownership bindings, Base-only/default-closed controller state,
allowlists and caps, guardian target immutability, timelocked rollback,
controller release with writes disabled, pull-payment withdrawal after pause,
and non-mutation of two read-only V2 Base witnesses.

## Current official Base fork checkpoint

The current integrated checkpoint ran `ci/fork-gates.sh` with
`BASE_RPC_URL=https://mainnet.base.org`. It passed:

- **121 RPC-free Foundry tests**;
- **4 availability tests**: Base executed successfully, while Avalanche,
  Arbitrum, and Polygon logged explicit skips because their RPC URLs were not
  supplied; and
- **1 Base deployment/rollback simulation** on the official Base-mainnet fork.

The simulation remained ephemeral and non-broadcasting. It did not read a
private key or modify Base state.

## Earlier local-only checkpoint

| Command | Result |
| --- | --- |
| `forge build` | PASS (then-current script/test sources) |
| `forge fmt --check` | PASS |
| `ci/fork-gates.sh` with no RPC credentials | PASS: 71 RPC-free tests passed; 4 endpoint checks logged skips; Base fork simulation logged skip |
| Base fork test with a local isolated Anvil chain configured as `8453` | PASS: 1 test passed. Inert bytecode was seeded solely at the two V2 witness addresses to exercise pre/post read-only checks; this is a control-flow smoke test, not Base evidence. |
| `forge script script/BasePilotForkSimulation.s.sol:BasePilotForkSimulation -vv` with the same local endpoint | PASS, no `--broadcast`, gas used 27,279,441 |

## Remaining boundaries and gaps

- The official Base fork is now recorded. This document must not characterize
  the current gate as emulator-only or claim that no real Base fork ran.
- `AVAX_RPC_URL`, `ARB_RPC_URL`, and `POLYGON_RPC_URL` were not supplied for
  the current checkpoint, so those availability tests are explicit skips rather
  than successful non-Base fork validations.
- The gate remains intentionally explicit: missing credentials log a skip;
  `REQUIRE_FORK_RPCS=1` makes missing endpoints fail protected CI.
- A trial of `forge script` with `--fork-url` against the local Anvil endpoint
  triggered a Foundry Optimism fee-scalar panic. The documented script command
  does not use `--fork-url`; it creates the selected fork internally and
  completed successfully against the same isolated endpoint. This does not
  affect the Foundry test path.

No live deployment, broadcast, private-key read, production-configuration
change, or remote push occurred.
