# V2 ABI Package Provenance

## Scope and invariant

This package is frozen against V2 commit
`a80144d1acbbbbf24b9eca7cd91e61daad0c0ad6` (`baseline/V2_HEAD_COMMIT.txt`).
The generator is intentionally offline: it uses only the pinned checkout and
frozen local evidence. It never performs an explorer/Sourcify request, consults
an arbitrary mirror, decompiles bytecode, or infers an ABI from a contract
name. It does not write under the V2 checkout.

## Result

- **36 traceable ABI records** cover all 36 distinct names in
  `baseline/deployments.json`.
- **18 records** are normalized copies of canonical ABI JSON under
  `repos/vaultfire-contracts-repo/abis`.
- **17 records** are ABI arrays emitted by local `solc` from exact, explicit
  Solidity source closures enumerated in `baseline/v2_abi_sources.json`.
  The manifest stores every source path/hash, the standard-input hash, compiler
  version, source contract name, and deployment-script evidence.
- **1 record** (`VaultfireBatchOnboarder`) is the canonicalized `ABI` field
  from a frozen successful, uncached response to the Base Blockscout V1
  [`getsourcecode` endpoint](https://base.blockscout.com/api?module=contract&action=getsourcecode&address=0x82c6a0dd34F5cF57F8B98Ee118e911B977618890)
  for its exact Base deployment. The evidence keeps
  the raw explorer JSON, the `pplx_sdk.content.fetch` response envelope, and
  retrieval metadata under
  `baseline/verified-source/blockscout/base/0x82c6a0dd34f5cf57f8b98ee118e911b977618890/`.
  The manifest pins hashes for all three files, validates that the fetch
  envelope contains the exact raw response, and binds the response contract
  name, chain ID, address, compiler version, source hash, ABI-field hash, and
  canonical ABI hash before generating the ABI.
- The deployment labels `VKPDelegationRegistry` and `VKPSessionKeyManager`
  are explicitly mapped to the source contracts `DelegationRegistry` and
  `SessionKeyManager`, respectively. The ABI is emitted under the deployed
  label; no Solidity interface is renamed or fabricated.
- The public deployment label `VaultfireTrustAttestation` is an explicit alias
  for the exact source contract `TrustPortabilityExtension`, not an attestation
  interface inferred from its label. Its source closure is compiled with
  `solc` `0.8.25+commit.b61c2a91`, `viaIR=true`, optimizer runs `200`, and
  Cancun EVM settings. The resulting runtime is 12,259 bytes with SHA-256
  `d76f00942be66a3ed6d0153f397f628ce15103f0c86b14f84117728349f1a81e`.
  The manifest requires that exact runtime observation for every frozen
  deployment: Base `0xc0f8704EF84Ca58Fa0AF4836669d358574FFE1f4`,
  Avalanche `0x5F7680a9a720c03812532A735D1165D9f97c0Cd1`, Arbitrum
  `0x1a7391DD19Dadab89757E58F4Cf988455263533e`, and Polygon
  `0x1a7391DD19Dadab89757E58F4Cf988455263533e`.
- The local compiled-artifact directories investigated for this baseline were
  empty. No ABI is sourced from a pre-existing local compiled artifact.

## Reproduction and validation

```text
python3 baseline/build_v2_abi_package.py --v2-root /path/to/pinned/v2-repo \
  --compiler 0.8.25+commit.b61c2a91=/path/to/solc-0.8.25
python3 baseline/check_v2_abi_package.py --v2-root /path/to/pinned/v2-repo
python3 baseline/check_v2_abi_package.py --strict --v2-root /path/to/pinned/v2-repo
python3 -m unittest -v tests/test_v2_abi_package.py
```

The normal check validates canonical payload JSON, ABI hashes, signatures,
coverage, sort order, and (when `--v2-root` is supplied) all pinned input
hashes. For the recovered alias it also reconstructs the exact standard
compiler input and requires the compiled-runtime commitment to equal every
frozen deployed runtime observation. Strict mode is expected to exit 0 only
while that complete binding remains intact.

The builder refuses to use its default compiler for the recovered alias. A
caller must explicitly supply an executable whose `--version` output contains
`0.8.25+commit.b61c2a91`; a different compiler, source-unit path, setting, ABI,
or runtime hash is rejected.
