@agenticprimitives/contracts 1.0.0-alpha.4 → 1.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUDIT.md +304 -47
- package/README.md +19 -8
- package/deployments-base-sepolia.json +1 -0
- package/dist/abi/AgentAccount.json +1647 -0
- package/dist/abi/AgentAccountFactory.json +472 -0
- package/dist/abi/AgentNameRegistry.json +46 -0
- package/dist/abi/AgreementRegistry.json +432 -0
- package/dist/abi/AttestationRegistry.json +436 -0
- package/dist/abi/CallDataHashEnforcer.json +119 -0
- package/dist/abi/CustodyPolicy.json +1111 -0
- package/dist/abi/DelegationManager.json +645 -0
- package/dist/abi/GeoFeatureRegistry.json +625 -0
- package/dist/abi/IAgentAccount.json +262 -0
- package/dist/abi/IAgentAccountFactoryAccessor.json +15 -0
- package/dist/abi/IAgentAccountFactoryView.json +41 -0
- package/dist/abi/IAgentAccountPauseView.json +15 -0
- package/dist/abi/IAgenticPrimitivesAgentAccount.json +15 -0
- package/dist/abi/IApprovedHashRegistryView.json +26 -0
- package/dist/abi/ICustodyPolicyFactoryView.json +15 -0
- package/dist/abi/ICustodyPolicyPauseView.json +15 -0
- package/dist/abi/IDelegationManager.json +171 -0
- package/dist/abi/IERC7579HookLike.json +44 -0
- package/dist/abi/IERC7579ModuleLike.json +28 -0
- package/dist/abi/PermissionlessSubregistry.json +5 -0
- package/dist/abi/QuorumEnforcer.json +295 -0
- package/dist/abi/SignatureSlotRecovery.json +88 -0
- package/dist/abi/SkillDefinitionRegistry.json +491 -0
- package/dist/abi/SmartAgentPaymaster.json +664 -0
- package/dist/abi/UniversalSignatureValidator.json +65 -0
- package/dist/abi/index.d.ts +23 -0
- package/dist/abi/index.js +23 -0
- package/dist/deployments/base-sepolia.d.ts +37 -0
- package/dist/deployments/base-sepolia.js +35 -0
- package/dist/deployments/index.d.ts +8 -0
- package/dist/deployments/index.js +13 -0
- package/package.json +20 -3
- package/src/AgentAccount.sol +130 -9
- package/src/AgentAccountFactory.sol +34 -5
- package/src/SmartAgentPaymaster.sol +2 -0
- package/src/UniversalSignatureValidator.sol +3 -0
- package/src/agency/DelegationManager.sol +155 -0
- package/src/agency/IDelegationManager.sol +35 -0
- package/src/agreement/AgreementRegistry.sol +306 -0
- package/src/attestation/AttestationRegistry.sol +320 -0
- package/src/custody/CustodyPolicy.sol +79 -2
- package/src/enforcers/AllowedMethodsEnforcer.sol +6 -0
- package/src/enforcers/AllowedTargetsEnforcer.sol +6 -0
- package/src/enforcers/CallDataHashEnforcer.sol +61 -0
- package/src/enforcers/QuorumEnforcer.sol +8 -0
- package/src/enforcers/TimestampEnforcer.sol +7 -0
- package/src/enforcers/ValueEnforcer.sol +6 -0
- package/src/geo/GeoFeatureRegistry.sol +197 -0
- package/src/naming/AgentNameRegistry.sol +25 -13
- package/src/naming/AgentNameUniversalResolver.sol +1 -1
- package/src/naming/PermissionlessSubregistry.sol +19 -2
- package/src/relationships/AgentRelationship.sol +8 -0
- package/src/skills/SkillDefinitionRegistry.sol +187 -0
package/AUDIT.md
CHANGED
|
@@ -1,67 +1,324 @@
|
|
|
1
1
|
# `@agenticprimitives/contracts` — Security & Architecture Audit
|
|
2
2
|
|
|
3
|
-
**Status:** alpha (Base Sepolia testnet
|
|
4
|
-
**Last refreshed:** 2026-
|
|
3
|
+
**Status:** alpha (Base Sepolia testnet, deployed end-to-end)
|
|
4
|
+
**Last refreshed:** 2026-06-01 (R9 wave landed — Foundry invariant suites + Halmos symbolic proofs + Echidna nightly + Medusa weekend; H-6 `MAX_INITIAL_CUSTODIANS = 32` cap closed; supply-chain CVE allowlist; AEL spec 237 + Package Design v2 spec 238)
|
|
5
|
+
**Prior refresh:** 2026-06-01 (R6 contracts hardening wave landed)
|
|
5
6
|
**Owners:** contracts package CODEOWNERS
|
|
6
|
-
**System audit cross-reference:** [docs/
|
|
7
|
+
**System audit cross-reference:** [`docs/architecture/product-readiness-audit.md`](../../docs/architecture/product-readiness-audit.md)
|
|
8
|
+
**Prior dossier:** [`docs/audits/2026-05-packages-contracts-production-readiness.md`](../../docs/audits/2026-05-packages-contracts-production-readiness.md) (per-contract findings table)
|
|
9
|
+
**Recon doc:** [`docs/audits/r6-contracts-recon-2026-05-31.md`](../../docs/audits/r6-contracts-recon-2026-05-31.md) (R6 wave triage)
|
|
10
|
+
|
|
11
|
+
> **Reader's note for external auditors.** This dossier is the AUDIT-ready summary of the security posture of every contract under `src/`. It pairs with `specs/214-production-audit-dossier.md` (the target shape we're auditing toward), the [`docs/audits/`](../../docs/audits) folder (threat model, architecture diagram, evidence checklist), and the **R10 internal readiness assessment** at [`docs/audits/2026-06-01-r10-internal-readiness-assessment.md`](../../docs/audits/2026-06-01-r10-internal-readiness-assessment.md) (active P0/P1/P2/P3 backlog). For finding-level detail use the cross-references at the bottom of each section.
|
|
12
|
+
>
|
|
13
|
+
> **Coverage stack as of R9 (2026-06-01):** 680 Foundry tests across 37 .sol files + 7 Halmos symbolic proofs + 4 Echidna nightly properties + 4 Medusa weekend properties. R6 (2026-06-01), H1-H4 (2026-05-23), and earlier waves are all reflected. Static analysis (Slither + Aderyn + CodeQL) + Solhint security lint are PR-blocking; pnpm-audit + gitleaks + SBOM in the security workflow.
|
|
7
14
|
|
|
8
15
|
## 1. Charter
|
|
9
16
|
|
|
10
17
|
This package ships the **on-chain enforcement layer** for the agenticprimitives stack:
|
|
11
18
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
| File | Role |
|
|
20
|
+
|---|---|
|
|
21
|
+
| `AgentAccount.sol` | ERC-4337 v0.7 SA (UUPS-upgradeable, ERC-7579 module-host, ERC-1271 verifier, WebAuthn-supporting) |
|
|
22
|
+
| `AgentAccountFactory.sol` | CREATE2 deterministic deployer; salt derives from auth methods + scope (NEVER from a name, per ADR-0010) |
|
|
23
|
+
| `agency/DelegationManager.sol` + `enforcers/*` | Scoped ERC-7710 delegation with on-chain caveat enforcement (AllowedTargets, AllowedMethods, Timestamp, Value, Quorum) |
|
|
24
|
+
| `custody/CustodyPolicy.sol` | Multi-sig custodian / trustee quorum + scheduled-action machinery (spec 213 carve-out, ERC-7579 module) |
|
|
25
|
+
| `SmartAgentPaymaster.sol` | ERC-4337 paymaster — three validation modes (dev / allowlist / verifying-paymaster) |
|
|
26
|
+
| `naming/{AgentNameRegistry, PermissionlessSubregistry, AgentNameUniversalResolver}.sol` | `.agent` + `.impact` TLDs + hierarchical registry + resolver |
|
|
27
|
+
| `identity/AgentProfileResolver.sol` | ERC-1056-style profile / AgentCard facet resolver |
|
|
28
|
+
| `ontology/{OntologyTermRegistry, ShapeRegistry, AttributeStorage}.sol` | SHACL shape + JSON-LD predicate registries |
|
|
29
|
+
| `relationships/AgentRelationship.sol` | Public on-chain edge model (⚠ Privacy Fork — see EXT-019; remains *experimental* surface) |
|
|
30
|
+
| `governance/{AgenticGovernance, GovernanceManaged}.sol` | System-wide pause flag + governance-managed base (R6.8 added `whenNotPaused` modifier via inheritance) |
|
|
31
|
+
| `libraries/{WebAuthnLib, P256Verifier, SignatureSlotRecovery, MultiSendCallOnly}.sol` | Security-critical primitives |
|
|
32
|
+
| `UniversalSignatureValidator.sol` | Single-entry signature validator per spec 214 SB-4 (ERC-6492 + ERC-1271 + raw ECDSA fanout) |
|
|
33
|
+
| `ApprovedHashRegistry.sol` | v=1 pre-approved hash signature path |
|
|
23
34
|
|
|
24
|
-
|
|
35
|
+
**Public addresses per network:** [`deployments-base-sepolia.json`](./deployments-base-sepolia.json) — committed; the source of truth, surfaced to TypeScript consumers via the generated [`@agenticprimitives/contracts/deployments/base-sepolia`](./dist/deployments/) subpath (R7.3).
|
|
25
36
|
|
|
26
37
|
## 2. Security invariants (DO NOT BREAK)
|
|
27
38
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
| # | Invariant | Status | Evidence |
|
|
40
|
+
|---|---|---|---|
|
|
41
|
+
| 2.1 | **EIP-712 typehashes byte-match the off-chain TS constants.** | ✅ CLOSED R11.4 | `packages/delegation/test/integration/cross-stack-typehashes.test.ts` + `pnpm check:eip712-typehash-equality` assert TS/Solidity equality. Keep this command in the public self-audit validation ledger. |
|
|
42
|
+
| 2.2 | **`AgentAccount` storage uses ERC-7201 namespaced slots + 50-slot gap.** | ✅ CLOSED H7-C.6 | `pnpm check:storage-layouts` (snapshot under CI) |
|
|
43
|
+
| 2.3 | **WebAuthn assertion verification pins RP-ID + UP flag.** | ✅ CLOSED H7-C.1 / CON-WEBAUTHN-001 | `_setupInitialPasskey` rejects zero rpIdHash (`AgentAccount.sol:354-356`); R6.10 added `_validateUserOp` happy-path test pack |
|
|
44
|
+
| 2.4 | **P256Verifier dispatcher rejects silent Daimo fallback.** | ✅ CLOSED H7-C.2 / CON-P256-001 | `P256Verifier.sol` |
|
|
45
|
+
| 2.5 | **`SignatureSlotRecovery` bounds-checks `v=0` + `v=2` slots.** | ✅ CLOSED H7-C.3 / CON-SIG-SLOT-001/-002 | `libraries/SignatureSlotRecovery.sol` |
|
|
46
|
+
| 2.6 | **`AgentNameRegistry.initializeRoot` cannot be frontrun.** | ✅ CLOSED H7-C.4 / CON-NAMING-001 | `AgentNameRegistry.sol:144-147` — immutable `initializer` + same-tx deploy |
|
|
47
|
+
| 2.7 | **`DelegationManager.redeemDelegation` is `nonReentrant`.** | ✅ CLOSED SC5 §6.2 | OpenZeppelin `ReentrancyGuard` mixin on `redeemDelegation` |
|
|
48
|
+
| 2.8 | **Factory + Paymaster governance is timelock + multisig, not a deployer EOA.** | ⏳ OPEN — N1 (operator-deferred) | Testnet currently uses the disclosed demo deployer; production rotation runbook is § 4 below |
|
|
49
|
+
| 2.9 | **Pause surfaces wired on critical paths.** | ✅ CLOSED R6.5 / R6.6 / R6.8 — pause matrix in § 3.4 | See § 3.4 |
|
|
50
|
+
| 2.10 | **`PermissionlessSubregistry.register` is `nonReentrant`.** | ✅ CLOSED R6.2 / CON-SUBREGISTRY-003 | `PermissionlessSubregistry.sol:register` |
|
|
51
|
+
| 2.11 | **Stateless enforcers don't need a pause check.** | ✅ CLOSED R6.7 / CON-ENFORCER-PAUSE-001 | Documented + test-locked in `test/EnforcerPauseInvariantR67.t.sol` |
|
|
52
|
+
| 2.12 | **CustodyPolicy reinstall is permanently forbidden.** | ✅ CLOSED audit C-11 | `CustodyPolicy.sol:onUninstall` + `onInstall` reinstall gate; tested in `CustodyPolicyWave2C.t.sol` |
|
|
53
|
+
| 2.13 | **`SmartAgentPaymaster.getHash` binds `address(entryPoint)` + chainId.** | ✅ CLOSED H7-C.7 / CON-PAYMASTER-004 | `SmartAgentPaymaster.sol:206-222`; tested in `SmartAgentPaymasterValidateR610.t.sol` |
|
|
54
|
+
| 2.14 | **`SmartAgentPaymaster` constructor takes EXPLICIT `devMode` (no implicit fail-open).** | ✅ CLOSED R5.7 / PKG-PAYMASTER-002 / external audit P0-2 | `SmartAgentPaymaster.sol:126-141`; tested in `SmartAgentPaymaster.t.sol::test_R5_7_*` |
|
|
37
55
|
|
|
38
|
-
## 3.
|
|
56
|
+
## 3. Per-contract notes for the external review
|
|
39
57
|
|
|
40
|
-
|
|
58
|
+
### 3.1 `AgentAccount.sol` + `AgentAccountFactory.sol`
|
|
59
|
+
|
|
60
|
+
- **ERC-4337 v0.7 + ERC-7579.** AgentAccount is a thin core (custody / threshold / spend / sessions live in modules, NOT inlined) — see spec 209 + `feedback_erc7579_module_architecture`.
|
|
61
|
+
- **UUPS upgradeable** with `_authorizeUpgrade` gated by `onlySelf` (modifier requires `msg.sender == address(this)`). The ONLY path is a re-entrant call from `upgradeToWithAuthorization` — that function is **explicitly disabled (`LegacyUpgradePathDisabled()`)** per H7-A.5 / audit C-3 closure. Per-account upgrades route through `CustodyPolicy.ApplySystemUpdate` (T5 / 24h timelock by default).
|
|
62
|
+
- **Pause coverage (R6.5):** `whenNotPaused` on `execute`, `executeBatch`, `executeFromModule`, `installModule`, `executePendingUpgrade`, `addCustodian` (6 functions). Recovery paths INTENTIONALLY UNGUARDED: `uninstallModule`, `cancelPendingUpgrade`, `removeCustodian` — incident response must remain functional under pause. Test pack: `test/AgentAccountPauseR65.t.sol` (14 tests).
|
|
63
|
+
- **`isValidSignature` dispatch:** type byte 0x01 → WebAuthn, type byte 0x02 → ECDSA, raw fallback → custodian sig. WebAuthn path pins per-credential rpIdHash + requires UP flag.
|
|
64
|
+
- **CREATE2 salt invariant.** Salt MUST derive from auth methods + scope, NEVER from a name (ADR-0010 + spec 220). Credential rotation does NOT change the SA address (ADR-0011 + spec 221).
|
|
65
|
+
|
|
66
|
+
### 3.2 `agency/DelegationManager.sol` + `enforcers/*`
|
|
67
|
+
|
|
68
|
+
- **5 enforcers.** AllowedMethods, AllowedTargets, Timestamp, Value, Quorum. All five are **stateless validators**: `beforeHook` / `afterHook` are pure / view, no SSTORE, no events. Invariant locked in `test/EnforcerPauseInvariantR67.t.sol` (R6.7) — see § 3.3.
|
|
69
|
+
- **EIP-712 Caveat typehash** = `keccak256("Caveat(address enforcer,bytes terms)")` — EXCLUDES `args` (audit F-1 — the inclusion bug caused every caveat-carrying delegation to fail on-chain ERC-1271 redeem AND let a redeemer's chosen args ride inside the delegator's signature). `packages/delegation/src/hash.ts` mirrors this.
|
|
70
|
+
- **Test posture:** DelegationManager 95.8% lines / 88.2% branches (post-R6 aggregator).
|
|
71
|
+
- **QuorumEnforcer:** payload-hash binding closed in H7 (`QuorumEnforcer.sol` checks `keccak256(args) == decoded_payload_hash`). R6.9 aggregator confirms 95.5% lines / 100% branches.
|
|
72
|
+
|
|
73
|
+
### 3.3 Pause invariant for enforcers (R6.7)
|
|
74
|
+
|
|
75
|
+
All five enforcer `beforeHook` / `afterHook` functions are `external view` AND read no storage. Pause is not applicable because there is no state to mutate. The invariant is documented in source and **test-locked**: `test/EnforcerPauseInvariantR67.t.sol::SideEffectfulEnforcer` mock proves any future enforcer that writes state would fail the test.
|
|
76
|
+
|
|
77
|
+
### 3.4 Pause matrix (R6.5 / R6.6 / R6.8)
|
|
78
|
+
|
|
79
|
+
Pause is system-wide via `AgenticGovernance.setPaused(bool)`. Each consumer reads the flag via a fail-soft staticcall (governance == EOA / non-conforming contract → treated as "not paused" — legacy/test compat) per `_pausedSafe()` in `GovernanceManaged.sol:69-74`.
|
|
80
|
+
|
|
81
|
+
| Contract | Guarded paths | Unguarded (intentional) | Closure |
|
|
82
|
+
|---|---|---|---|
|
|
83
|
+
| `AgentAccount` | execute, executeBatch, executeFromModule, installModule, executePendingUpgrade, addCustodian | uninstallModule, cancelPendingUpgrade, removeCustodian (recovery primitives) | R6.5 |
|
|
84
|
+
| `CustodyPolicy` | scheduleCustodyChange, applyCustodyChange | cancelScheduledChange (allow recovery cancel during incident), onUninstall (operator escape) | R6.6 |
|
|
85
|
+
| `AgentNameRegistry` | register, backfillLabel, setOwner, setResolver, setSubregistry, renew, setPrimaryName (7 functions) | initializeRoot (deployer init, runs ONCE per TLD anyway) | R6.8 |
|
|
86
|
+
| `PermissionlessSubregistry` | (no own guard — inherits via inner `REGISTRY.register` call) | — | Transitive R6.8 coverage; proven by `test_R6_8_subregistryRegister_pausedRevertsTransitively` |
|
|
87
|
+
| `SmartAgentPaymaster` | `_validatePaymasterUserOp` (early reverts on governance.isPaused()) | — | H7-C.10 / EXT3-010 |
|
|
88
|
+
|
|
89
|
+
### 3.5 `custody/CustodyPolicy.sol`
|
|
90
|
+
|
|
91
|
+
- **One ERC-7579 module per AgentAccount,** factory-immutable per spec 213 § 2.4. Per-account install via `onInstall(initData)` with ABI: `(uint8 mode, uint8 recoveryApprovals, address[] trustees, uint8[7] thresholds, uint32[7] timelocks, uint256 t3Ceiling, address approvedHashReg)`.
|
|
92
|
+
- **16 CustodyAction enum cases** (per § `_applyCustodyChange` dispatcher). Coverage by branch family in R6.10b + R6.10c — final state: **81.4% lines / 53% branches** (R6.10b) → after R6.10c **92.4% lines / 68% branches**.
|
|
93
|
+
- **Audit C-6..C-11 closures:** zero `credentialIdDigest` rejected, RotateAllCustodians wire shape add+remove, CustodyPolicy reinstall permanently forbidden, etc. See `test/CustodyPolicyWave2C.t.sol`.
|
|
94
|
+
- **Pause coverage (R6.6):** `scheduleCustodyChange` + `applyCustodyChange` guarded with `whenAccountNotPaused(account)`; `cancelScheduledChange` UNGUARDED intentionally (recovery cancel during incident).
|
|
95
|
+
- **Threshold defaults (spec § 5.1):** T4 default = max(N − 2, 1); T5 default = max(N − 1, 1); T6 default = `recoveryApprovals`. Factory derives `recoveryApprovals = trustees/2 + 1` if not overridden.
|
|
96
|
+
|
|
97
|
+
### 3.6 `SmartAgentPaymaster.sol` — economics + paymaster modes
|
|
98
|
+
|
|
99
|
+
**Three validation modes:**
|
|
100
|
+
|
|
101
|
+
| Mode | Constructor wiring | Sponsor behavior | Use case |
|
|
102
|
+
|---|---|---|---|
|
|
103
|
+
| **Dev** | `devMode_=true` | Accept every userOp (no sig check) | Testnet only — Deploy.s.sol auto-flips devMode=true via `_isTestnetNetwork()` |
|
|
104
|
+
| **Allowlist** | `devMode_=false`, `verifyingSigner_=address(0)` | Only senders in `_acceptList` are sponsored | Allowlist mode — fail-closed (every userOp reverts `SenderNotAccepted` until `setAccepted` runs) |
|
|
105
|
+
| **Verifying** | `devMode_=false`, `verifyingSigner_=<EOA>` | EOA signs over `getHash(userOp, validUntil, validAfter)` off-chain | Production preferred — Pimlico / Stackup / Alchemy reference pattern |
|
|
106
|
+
|
|
107
|
+
**Hash binding (CON-PAYMASTER-004 / H7-C.7):**
|
|
108
|
+
```
|
|
109
|
+
keccak256(abi.encode(
|
|
110
|
+
userOp.sender, userOp.nonce, keccak256(userOp.initCode), keccak256(userOp.callData),
|
|
111
|
+
userOp.accountGasLimits, userOp.preVerificationGas, userOp.gasFees,
|
|
112
|
+
block.chainid, address(this), address(entryPoint()),
|
|
113
|
+
validUntil, validAfter
|
|
114
|
+
))
|
|
115
|
+
```
|
|
116
|
+
Binds `address(entryPoint())` so a long-lived signed envelope CANNOT survive an EntryPoint redeploy.
|
|
117
|
+
|
|
118
|
+
**Pause integration:** `_validatePaymasterUserOp` runs the governance.isPaused() staticcall FIRST. Pause flips paymaster to reject-all without operator intervention.
|
|
119
|
+
|
|
120
|
+
**Economics:**
|
|
121
|
+
- Stake: 0.0005 ETH at deploy (paid from deployer at constructor time via Deploy.s.sol).
|
|
122
|
+
- Deposit: 0.001 ETH at deploy.
|
|
123
|
+
- 1-day unstake delay (BasePaymaster default; cannot be reduced).
|
|
124
|
+
- Topup: operator endpoint `/paymaster/topup` (`apps/demo-a2a/src/index.ts:2329+`) — capped at 0.002 ETH per call (`TOPUP_MAX_WEI`) and gated below 0.005 ETH floor (`TOPUP_TARGET_FLOOR`). The signer is wrapped in `createSpendCappedAccount` so a `value > PAYMASTER_TOPUP_CAP_WEI` tx throws BEFORE the HSM round-trip even if the app-layer cap is bypassed (R5.12).
|
|
41
125
|
|
|
42
|
-
|
|
126
|
+
**Coverage (R6.10):** 98.2% lines / 100% branches; the full validation path is exercised via `vm.prank(address(ep))` calls in `test/SmartAgentPaymasterValidateR610.t.sol` (20 tests).
|
|
43
127
|
|
|
44
|
-
|
|
128
|
+
### 3.7 `UniversalSignatureValidator.sol` — single signature entrypoint
|
|
45
129
|
|
|
46
|
-
|
|
47
|
-
|
|
130
|
+
Per spec 214 SB-4. **One library function consumers call (`validateSig(signer, hash, sig)`)** that internally:
|
|
131
|
+
|
|
132
|
+
1. If `sig` looks like ERC-6492 (`0x6492...` magic suffix): execute the prefix calldata at the magic-named factory, then re-evaluate.
|
|
133
|
+
2. If `signer` has code: call `signer.isValidSignature(hash, sig)` (ERC-1271) and check magic value.
|
|
134
|
+
3. Otherwise: ECDSA `ecrecover` against `signer`.
|
|
135
|
+
|
|
136
|
+
**The signer-agnostic property** — caller passes one address + one hash + one signature, regardless of whether the SA is deployed, undeployed-but-counterfactual, or an EOA. Consumers (demo-a2a SIWE verify, off-chain delegation verify) never branch on signer kind.
|
|
137
|
+
|
|
138
|
+
**Coverage (R6.9 aggregator):** 94.4% lines / 83.3% branches.
|
|
139
|
+
|
|
140
|
+
### 3.8 `naming/*`
|
|
141
|
+
|
|
142
|
+
- **Multi-root registry.** `.agent` (deployed via Deploy.s.sol) + `.impact` (added 2026-06-01 via `script/AddImpactTld.s.sol`). Each TLD has an immutable initializer set at construction — front-run-proof.
|
|
143
|
+
- **PermissionlessSubregistry per TLD** — one-name-per-caller, no whitelist. Backing the `<handle>.impact-agent.{me,io}` subdomain mapping.
|
|
144
|
+
- **`reverseResolveString` (spec/222)** is the canonical reverse path — NO `eth_getLogs` walker fallback (ADR-0012, ADR-0013).
|
|
145
|
+
- **Pause coverage (R6.8):** all mutating functions guarded; `initializeRoot` exempt because it runs ONCE per TLD ever.
|
|
146
|
+
|
|
147
|
+
### 3.9 `relationships/AgentRelationship.sol` — ⚠ Privacy Fork
|
|
148
|
+
|
|
149
|
+
EXT-019 status: **experimental** — public on-chain edges leak the social graph. Production deployments where membership / participation is sensitive should NOT register relationships on this contract; the package's `AUDIT.md` makes this explicit. A future spec covers an encrypted-edge variant.
|
|
150
|
+
|
|
151
|
+
## 4. Upgrade & governance — production posture
|
|
152
|
+
|
|
153
|
+
### 4.1 The production gate (open audit item N1)
|
|
154
|
+
|
|
155
|
+
**Current testnet state.** Deployer EOA `0x31ed17fb99e82E02085Ab4B3cbdaB05489098b44` is publicly disclosed (intentional — keeps the demo reproducible from a clean clone) and currently holds: governance role on AgenticGovernance; bundler signer + session issuer on AgentAccountFactory; initial owner + governance pointer on SmartAgentPaymaster.
|
|
156
|
+
|
|
157
|
+
**Why this is testnet-only.** Any holder of the disclosed key could rotate factory roles to a hostile address (factory `setBundlerSigner` is `onlyGovernance`), pause the paymaster, or withdraw paymaster stake after the 1-day unstake delay.
|
|
158
|
+
|
|
159
|
+
**Production runbook.** Before any production network deploy:
|
|
160
|
+
|
|
161
|
+
1. Generate a clean deployer key inside KMS (gcp-kms / aws-kms recommended). Never touches a developer's filesystem.
|
|
162
|
+
2. Deploy AgenticGovernance under a multisig owner. Suggested: 3-of-5 Safe with a 24h TimelockController.
|
|
163
|
+
3. Deploy contracts with `Deploy.s.sol`, passing the clean deployer address + the multisig.
|
|
164
|
+
4. The deploy script's `setBundlerSigner` / `setSessionIssuer` runs in the same broadcast — atomic.
|
|
165
|
+
5. After successful deploy, REVOKE the deployer key entirely (KMS scheduled destroy).
|
|
166
|
+
6. The preflight gate `scripts/check-production-deploy.ts:gateOnLeakedDeployerKey` refuses deploys when `.env.deploy.local` references the disclosed deployer EOA (with explicit `AGENTICPRIMITIVES_DEMO_KEYS_ACCEPTED=true` override for testnet runs).
|
|
167
|
+
|
|
168
|
+
### 4.2 Upgrade pattern
|
|
169
|
+
|
|
170
|
+
- AgentAccount: UUPSUpgradeable. `_authorizeUpgrade` gated by `onlySelf`. Per-account upgrades routed through `CustodyPolicy.ApplySystemUpdate` (T5 / 24h timelock by default).
|
|
171
|
+
- AgenticGovernance: NOT upgradeable. Operator deploys a new governance instance to migrate.
|
|
172
|
+
- AgentAccountFactory + SmartAgentPaymaster + DelegationManager + CustodyPolicy + naming/* + enforcers: NOT upgradeable. Redeploy + migrate-by-naming-handle. The 2026-06-01 R6 redeploy + `.impact` re-init demonstrates the runbook.
|
|
173
|
+
|
|
174
|
+
### 4.3 TimelockController
|
|
175
|
+
|
|
176
|
+
`Deploy.s.sol` deploys an OpenZeppelin TimelockController with a 24h minimum delay. Owner = the multisig deployed in step 4.1. Production governance flows queue → wait 24h → execute.
|
|
48
177
|
|
|
49
178
|
## 5. Test posture
|
|
50
179
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
180
|
+
**Forge:** 635 tests across 28 contracts (all pass, 2026-06-01).
|
|
181
|
+
|
|
182
|
+
**Coverage (R6.9 per-contract aggregator):**
|
|
183
|
+
|
|
184
|
+
| Category | Lines | Branches | Functions |
|
|
185
|
+
|---|---:|---:|---:|
|
|
186
|
+
| security-critical (11 contracts) | **90.3%** | **76.6%** | 93.4% |
|
|
187
|
+
| core (1) | 100% | 100% | 100% |
|
|
188
|
+
| naming-ontology (7) | 71.2% | 61.0% | 69.3% |
|
|
189
|
+
| identity (3) | 79.6% | 50.0% | 70.4% |
|
|
190
|
+
| governance (2) | 97.8% | 66.7% | 100% |
|
|
191
|
+
| library (4) | 77.7% | 79.5% | 100% |
|
|
192
|
+
| **Overall (28)** | **83.1%** | **70.6%** | 81.8% |
|
|
193
|
+
|
|
194
|
+
All 11 security-critical contracts ≥ 75% lines (the audit-floor). Branches: 10/11 ≥ 80%; CustodyPolicy at 68% is the remaining outlier (the `_applyChangeApprovalsRequired` tier-matrix edges — diminishing returns).
|
|
195
|
+
|
|
196
|
+
**SAST:** Slither runs on every PR (fail-on `high`); Aderyn runs as a second-opinion AI scanner (artifact-uploaded, non-blocking) — R6.3.
|
|
197
|
+
|
|
198
|
+
**Storage layouts:** `pnpm check:storage-layouts` snapshot-locks AgentAccount + CustodyPolicy + DelegationManager + SmartAgentPaymaster slot layouts (R1.3 / C6). Any drift fails CI explicitly.
|
|
199
|
+
|
|
200
|
+
**Symbolic verification (R9.3 + R9.3.x):** Halmos symbolic-execution proofs LIVE in `test/halmos/`. PR-blocking via the `halmos` job in `.github/workflows/security.yml`. Current proof set (7 proofs, terminate in 0.13s):
|
|
201
|
+
|
|
202
|
+
| Proof | Target | File |
|
|
203
|
+
|---|---|---|
|
|
204
|
+
| R8.2 UV-required gate | `WebAuthnLib.verify(..., requireUv = true)` rejects when UV bit unset, for ALL inputs | `WebAuthnLibUvR82.halmos.t.sol::check_R82_uvNotSet_with_requireUvTrue_alwaysRejects` |
|
|
205
|
+
| H7-C.1 UP-required gate | `WebAuthnLib.verify` rejects when UP bit unset, regardless of `requireUv` | `WebAuthnLibUvR82.halmos.t.sol::check_H7C1_upNotSet_alwaysRejects_regardlessOfRequireUv` |
|
|
206
|
+
| `setDelegationManager` onlySelf | External caller cannot rotate the delegation root of trust | `AgentAccountOnlySelf.halmos.t.sol::check_onlySelf_setDelegationManager_revertsForExternalCaller` |
|
|
207
|
+
| `removeCustodian` onlySelf | External caller cannot kick custodians | same file |
|
|
208
|
+
| `setUpgradeTimelock` onlySelf | External caller cannot disable the upgrade timelock | same file |
|
|
209
|
+
| `upgradeToAndCall` onlySelf (UUPS hook) | **Catastrophic if bypassable — Halmos proves it isn't.** External caller cannot swap the implementation | same file |
|
|
210
|
+
| `removePasskey` onlySelf | External caller cannot un-register a credential | same file |
|
|
211
|
+
|
|
212
|
+
Each proof: caller address symbolic, all args symbolic, only constraint is `caller != address(acct)`. Halmos explores every other input dimension.
|
|
213
|
+
|
|
214
|
+
**Foundry stateful invariants (R9.1 + R9.2):** in `test/invariant/`. 15 invariants × 25,600 calls each per CI run, PR-blocking.
|
|
215
|
+
|
|
216
|
+
| Suite | Invariants |
|
|
217
|
+
|---|---|
|
|
218
|
+
| `CustodyPolicy.invariant.t.sol` | thresholds nonzero • recoveryApprovals ≤ trusteeCount • mode ∈ {0..3} • changeCount monotonic • uninstalled views zero |
|
|
219
|
+
| `DelegationManager.invariant.t.sol` | revocation irreversible • hash deterministic • domain separator immutable • root/open constants unchanged • revoked-set monotonic |
|
|
220
|
+
| `SmartAgentPaymaster.invariant.t.sol` | devMode locked • governance immutable • verifyingSigner locked • arbitrary-sender not accepted • governance gate holds for fresh caller |
|
|
221
|
+
|
|
222
|
+
**Echidna nightly fuzz (R9.4):** `test/echidna/CustodyPolicyEchidna.t.sol` — 4 properties × 50,000 sequences × 4 parallel workers, runs nightly at 02:17 UTC via `.github/workflows/contracts-echidna-nightly.yml`. Artifact-only (`continue-on-error: true`); corpus uploaded as a 30-day-retained artifact. Smoke run: 1.3M calls / 4524 unique instructions / all 4 properties PASS in 26 seconds.
|
|
223
|
+
|
|
224
|
+
**Medusa weekend fuzz (R9.5):** `test/medusa/CustodyPolicyMedusa.t.sol` — 4 properties × 4-hour budget × 4 parallel workers, runs Saturday 03:17 UTC via `.github/workflows/contracts-medusa-weekend.yml`. Different EVM engine (go-ethereum vs Echidna's HEVM) — independent coverage graphs. Artifact-only; 60-day corpus retention.
|
|
225
|
+
|
|
226
|
+
**Stack mix rationale.** Each tool has a different blind spot:
|
|
227
|
+
- Foundry invariants — stateful random + seeded shrinking; PR-blocking; catches per-PR regressions.
|
|
228
|
+
- Halmos — symbolic execution; covers ALL paths but bounded; PR-blocking on narrow proofs.
|
|
229
|
+
- Echidna — stateful ABI-aware random + coverage-guided; nightly; catches multi-step sequence bugs Foundry's seed strategy doesn't explore.
|
|
230
|
+
- Medusa — different EVM + different coverage-guidance strategy; weekly; deep-corpus regression coverage.
|
|
231
|
+
|
|
232
|
+
A regression that slips one tool's coverage graph can still be caught by another.
|
|
233
|
+
|
|
234
|
+
## 6. Public API surface (audit scope)
|
|
235
|
+
|
|
236
|
+
All `*.sol` files under `src/` + the JSON ABIs published under `dist/abi/`. Consumers MUST import ABIs via the npm-published `@agenticprimitives/contracts/abi` subpath, NOT by reading `out/` directly.
|
|
237
|
+
|
|
238
|
+
The `dist/deployments/` subpath (R7.3) exposes per-network contract addresses to TypeScript consumers — a single source of truth replacing per-app hardcoded tables.
|
|
239
|
+
|
|
240
|
+
## 7. Known findings (cross-reference)
|
|
241
|
+
|
|
242
|
+
See [`docs/audits/2026-05-packages-contracts-production-readiness.md`](../../docs/audits/2026-05-packages-contracts-production-readiness.md) § 3 (Per-contract findings) + § 4 (Cross-cutting).
|
|
243
|
+
|
|
244
|
+
**Open at 2026-06-01:**
|
|
245
|
+
|
|
246
|
+
| Finding | Severity | Notes |
|
|
247
|
+
|---|---|---|
|
|
248
|
+
| N1 (system audit) | P0 | Leaked deployer key — testnet-only acceptance; production runbook in § 4.1 above |
|
|
249
|
+
| External Solidity audit | High (gate-level) | Cyfrin / CodeHawks contest planned; refer to R10 readiness doc P1.10 |
|
|
250
|
+
| CON-WEBAUTHN-AUTHDATA-len | Medium | Authenticator-data length check (open across H7) |
|
|
251
|
+
| EIP-712 cross-stack typehash equality | Medium | Test file LIVE (`packages/delegation/test/integration/cross-stack-typehashes.test.ts`) — 6 tests pass; wrapper command `pnpm check:eip712-typehash-equality` is part of the public self-audit validation ledger. |
|
|
252
|
+
| Kontrol / Certora formal verification | Medium | Halmos covers narrow proofs; Kontrol/Certora are R10 P2.2/P2.3 deferred to post-audit |
|
|
253
|
+
| Encrypted-edge AgentRelationship | Low | EXT-019; product decision pending |
|
|
254
|
+
|
|
255
|
+
**Closed since prior refresh (R9 wave, 2026-06-01):**
|
|
256
|
+
|
|
257
|
+
- Halmos symbolic verification — landed in R9.3 + R9.3.x (7 proofs)
|
|
258
|
+
- Foundry stateful invariants — landed in R9.1 + R9.2 (15 invariants)
|
|
259
|
+
- Echidna nightly + Medusa weekend — landed in R9.4 + R9.5
|
|
260
|
+
- Aderyn H-6 (`MAX_INITIAL_CUSTODIANS = 32`) — R9.6 cap with 6 regression tests
|
|
261
|
+
- Slither M-1 (PermissionlessSubregistry cross-function reentrancy) — false positive triaged + `slither-disable-next-line` annotated; full triage in [`docs/audits/r9-static-analysis-triage.md`](../../docs/audits/r9-static-analysis-triage.md)
|
|
262
|
+
|
|
263
|
+
**Closed in R6 (2026-06-01):**
|
|
264
|
+
|
|
265
|
+
- CON-SUBREGISTRY-003 (subregistry reentrancy guard) — R6.2
|
|
266
|
+
- CON-AgentAccount-005 (system-pause coverage) — R6.5
|
|
267
|
+
- CON-CustodyPolicy-005 (system-pause coverage) — R6.6
|
|
268
|
+
- CON-NAMING-005 (naming layer pause coverage) — R6.8
|
|
269
|
+
- CON-ENFORCER-PAUSE-001 (stateless validator invariant) — R6.7
|
|
270
|
+
- CON-SmartAgentPaymaster-001 (validation-path coverage 50.9% → 98.2%) — R6.10
|
|
271
|
+
- CON-CustodyPolicy-001 (branch coverage 30% → 68%) — R6.10b/c
|
|
272
|
+
|
|
273
|
+
## 8. Pre-publication checklist
|
|
274
|
+
|
|
275
|
+
- [x] License (MIT) + AUDIT.md (this file) + LICENSE + `publishConfig.access=public` — H7-A.2
|
|
276
|
+
- [x] Extracted as `@agenticprimitives/contracts` — H7-A.2 / EXT3-001
|
|
277
|
+
- [x] WebAuthn / P-256 / SignatureSlot / Naming hardening — H7-C.1..C.4
|
|
278
|
+
- [x] Coverage ≥ 75% lines on every security-critical contract — R6.10 (final security-critical floor cleared)
|
|
279
|
+
- [x] Storage-layout snapshots committed — H7-C.6
|
|
280
|
+
- [x] System-wide pause wired on critical paths — R6.5 / R6.6 / R6.8
|
|
281
|
+
- [x] Subregistry reentrancy guarded — R6.2
|
|
282
|
+
- [x] Stateless-enforcer invariant test-locked — R6.7
|
|
283
|
+
- [x] Cross-stack typehash test green — H7-D.9 / R11.4 closure; lives at `packages/delegation/test/integration/cross-stack-typehashes.test.ts` (6 tests pass) and runs through `pnpm check:eip712-typehash-equality`.
|
|
284
|
+
- [x] Halmos symbolic harness on top-3 invariants — R9.3 + R9.3.x landed (7 proofs, PR-blocking).
|
|
285
|
+
- [x] Echidna nightly stateful fuzzing — R9.4 (nightly schedule, artifact-only).
|
|
286
|
+
- [x] Medusa weekend coverage-guided fuzzing — R9.5 (weekly schedule, artifact-only).
|
|
287
|
+
- [x] H-6 / ATL-SEC-05 — initial custodians cap closed at construction — R9.6.
|
|
288
|
+
- [ ] Governance pattern: Safe + Timelock(24h); deployer EOA renounces — H7-C.9 / EXT3-009 (production-deploy item; runbook in § 4.1; R10 P1.1)
|
|
289
|
+
- [ ] On-chain governance-shape verifier script — R10 P1.2 (post-deploy gate that fails CI if `factory.governance() != multisig` etc.)
|
|
290
|
+
- [ ] Kontrol / Certora formal verification on top-3 invariants — R10 P2.2 / P2.3 (post-audit)
|
|
291
|
+
- [ ] One external Solidity audit firm engagement — Cyfrin / CodeHawks (planned)
|
|
292
|
+
- [x] Per-network deployments JSON committed — R7.3 (`deployments-base-sepolia.json` in tree)
|
|
293
|
+
- [x] Generated TS deployments module — R7.3 (`@agenticprimitives/contracts/deployments/<network>`)
|
|
294
|
+
- [x] ABI sync doctrine — R7.2 (`pnpm check:abi-sync` against Foundry truth)
|
|
295
|
+
|
|
296
|
+
## 9. Threat model summary
|
|
297
|
+
|
|
298
|
+
For the full threat model see [`docs/audits/threat-model.md`](../../docs/audits/threat-model.md). Quick reference for external reviewers:
|
|
299
|
+
|
|
300
|
+
| Adversary | Capability | Mitigation |
|
|
301
|
+
|---|---|---|
|
|
302
|
+
| **Hostile bundler** | Submits crafted userOps to drain paymaster | Verifying-paymaster mode (preferred prod) — paymaster signs each envelope; OR allowlist mode — fail-closed |
|
|
303
|
+
| **Leaked credential** | Owns a passkey / EOA on a multi-custody SA | CustodyPolicy quorum + 24h timelock + trustee recovery; ADR-0011 — credential rotation preserves SA address |
|
|
304
|
+
| **Front-runner** | Watches mempool for the deployer's first `initializeRoot` tx | Immutable `initializer` set at construction; deploy script runs both in the SAME tx (R6.8 / H7-C.4) |
|
|
305
|
+
| **Cross-EntryPoint replay** | Reuses a paymaster envelope against a redeployed EntryPoint | `getHash` binds `address(entryPoint())` — H7-C.7 / CON-PAYMASTER-004 |
|
|
306
|
+
| **Caveat author** | Picks `args` to slip a redeem through a delegator's signature | Caveat typehash EXCLUDES `args` — audit F-1 closure |
|
|
307
|
+
| **Reentrant subregistry caller** | Mock registry re-enters during inner `register` call | `nonReentrant` on `PermissionlessSubregistry.register` — R6.2 |
|
|
308
|
+
| **Governance pause bypass** | Calls during incident | `whenNotPaused` modifier on all write surfaces; recovery primitives explicitly exempt |
|
|
309
|
+
| **WebAuthn rp-id swap** | Registers passkey for one origin, signs for another | `_setupInitialPasskey` rejects zero `rpIdHash`; per-credential rpIdHash stored + checked at verify time |
|
|
310
|
+
|
|
311
|
+
## 10. Audit engagement targets
|
|
312
|
+
|
|
313
|
+
External engagements considered:
|
|
314
|
+
|
|
315
|
+
- **Cyfrin** — full-engagement contract audit; AgentAccount + AgentAccountFactory + CustodyPolicy + DelegationManager + SmartAgentPaymaster + 5 enforcers.
|
|
316
|
+
- **CodeHawks contest** — broader-surface contest including the naming layer + UniversalSignatureValidator.
|
|
317
|
+
- **Spearbit** — alternative full-engagement (research-grade review).
|
|
318
|
+
- **OpenZeppelin** — alternative full-engagement (large-firm review).
|
|
319
|
+
|
|
320
|
+
Pre-engagement deliverables: this file + threat model + architecture diagram + evidence checklist + spec 214 (already in `docs/audits/` + `specs/`). Pre-engagement code freeze: master branch with R6 wave landed + the R7 audit-driven hardening (R7.2 / R7.3 / R7.4 / R7.5) closed.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
**Reviewer feedback** welcome — please file findings at https://github.com/agentictrustlabs/agenticprimitives/issues with the `audit-finding` label, OR encrypt and email to security@agentictrustlabs.com (PGP key in [`docs/audits/evidence-checklist.md`](../../docs/audits/evidence-checklist.md) § PGP).
|
package/README.md
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@agenticprimitives/contracts`
|
|
2
2
|
|
|
3
|
-
Solidity contracts
|
|
3
|
+
The Solidity contracts that back the agenticprimitives stack — ERC-4337 v0.7 Smart Agent core, ERC-7710 delegation manager + 5 enforcers, ERC-7579 modular CustodyPolicy, SmartAgentPaymaster (3 modes), `.agent` / `.impact` TLD naming, ontology + profile resolvers, identity facets, and an ERC-6492-aware UniversalSignatureValidator. **All sources are present and audited under `src/`**; this is not a stub. The package publishes ABI + per-network deployments + flattened sources for downstream consumers.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
- `AgentAccountFactory.sol` — CREATE2 factory for deterministic addressing
|
|
7
|
-
- `DelegationManager.sol` — delegation registry + revocation
|
|
8
|
-
- `ICaveatEnforcer.sol` + `enforcers/*` — the four enforcers our demo uses (Timestamp, AllowedTargets, AllowedMethods, Value)
|
|
5
|
+
For the security & invariant breakdown see [`AUDIT.md`](./AUDIT.md). For the architecture rationale + per-file role see [`CLAUDE.md`](./CLAUDE.md). For the current security review checklist see [`docs/audits/2026-05-packages-contracts-production-readiness.md`](../../docs/audits/2026-05-packages-contracts-production-readiness.md).
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
**Current contract roster** (28 contracts under `src/`, 635 Foundry tests):
|
|
8
|
+
- `AgentAccount.sol` — UUPSUpgradeable + ERC-7579 + ERC-1271 + WebAuthn-supporting SA
|
|
9
|
+
- `AgentAccountFactory.sol` — CREATE2 deterministic deploys; salt from auth methods + scope (NEVER from a name)
|
|
10
|
+
- `SmartAgentPaymaster.sol` — verifying-paymaster + allowlist + devMode (testnet only) modes
|
|
11
|
+
- `agency/DelegationManager.sol` + `enforcers/{AllowedMethods,AllowedTargets,Timestamp,Value,Quorum}Enforcer.sol`
|
|
12
|
+
- `custody/CustodyPolicy.sol` — 16-action ERC-7579 module, T4/T5/T6 quorum tiers + 24h default T5 timelock
|
|
13
|
+
- `naming/{AgentNameRegistry,AgentNameUniversalResolver,AgentNameAttributeResolver,PermissionlessSubregistry}.sol`
|
|
14
|
+
- `identity/AgentProfileResolver.sol` + `ontology/{OntologyTermRegistry,ShapeRegistry,AttributeStorage}.sol`
|
|
15
|
+
- `relationships/{AgentRelationship,RelationshipTypeRegistry}.sol` (⚠ Privacy Fork — see AUDIT.md § 3.9)
|
|
16
|
+
- `governance/{AgenticGovernance,GovernanceManaged}.sol` — system pause + governance base
|
|
17
|
+
- `libraries/{WebAuthnLib,P256Verifier,SignatureSlotRecovery,MultiSendCallOnly}.sol`
|
|
18
|
+
- `UniversalSignatureValidator.sol` — single signature entrypoint (ERC-6492 + ERC-1271 + raw ECDSA fanout per spec 214 SB-4)
|
|
19
|
+
- `ApprovedHashRegistry.sol` — v=1 pre-approved hash signature path
|
|
11
20
|
|
|
12
|
-
|
|
21
|
+
Deployed addresses (Base Sepolia testnet): [`deployments-base-sepolia.json`](./deployments-base-sepolia.json) (committed, public; surfaced to TypeScript consumers via the generated `@agenticprimitives/contracts/deployments/base-sepolia` subpath).
|
|
22
|
+
|
|
23
|
+
**Production deployment is deferred** — the testnet uses a publicly disclosed deployer EOA intentionally (keeps the demo reproducible). See [`AUDIT.md` § 4.1](./AUDIT.md#41-the-production-gate-open-audit-item-n1) for the production rotation runbook.
|
|
13
24
|
|
|
14
25
|
## Setup
|
|
15
26
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"agentAccountFactory":"0x6f7Fc9B36977F55666548e0a73D9063F0D88A760","agentAccountImplementation":"0x11f1523D9883BdF382993d70C601D307ED0F1f13","agentNameRegistry":"0x6e660e41CFd0B410827fb96D21c26600AF6abF2f","agentNameResolver":"0x324F5A60c5DE45244c70a43cA3A6B1462d80fF5f","agentNameUniversalResolver":"0x40587e3591F7051ba7534177aB1F0B366034040e","agentProfileResolver":"0x748D005E8B3b366132F209F066821B2713A6e19e","agentRelationship":"0x5c3bf13822a37c84Dc617C920dB61a8217f6311d","agreementRegistry":"0x3B1DB6AC972b649E9E0960F0816F4D1EC3264c22","allowedMethodsEnforcer":"0x1500601201aA339249e2B78c42952Cf26CD12Ea7","allowedTargetsEnforcer":"0xfA1c40F9dC4ACC4d339D2eDE0003872154292CEa","approvedHashRegistry":"0xE01c1356F4B10FEfa8Ab210020B802cf3e900759","attestationRegistry":"0x16EB207C65A63E3ae256F49a4B11e785fE001139","callDataHashEnforcer":"0x7267eF129fCf341717D7f3469DDf7A0135d00b61","chainId":84532,"custodyPolicy":"0x5e3e3Bda33c799f2403a30aE35bf81deff236283","delegationManager":"0xBC5AE6213E91E076232a6c8e3942746f06A50154","deployer":"0x31ed17fb99e82E02085Ab4B3cbdaB05489098b44","entryPoint":"0x7707C2b483CcADc3E72C2d39d216aC1C337FCd9d","geoFeatureRegistry":"0x0A9f10cb72D6Fb5C89Aa5865f397957729cF71F0","ontologyTermRegistry":"0xa9635EbfDb993395df6CD03b0DEE21E5b2A66Ec1","permissionlessSubregistry":"0xF38fdcd8eC83360C2F73CEEa52ae419D37aCaB5F","permissionlessSubregistryDemoAgent":"0x1c698cBFE2733301614a245a505E20eB5597a972","quorumEnforcer":"0xeB88df4492FB8Eb254f6017eD0463d42CF6FC8e7","relationshipTypeRegistry":"0x7c5FfD0aB55C52f6aa00c04D2a30457579A3083B","shapeRegistry":"0xAe431c6F000235d30ae28f507493215815eF88E2","skillDefinitionRegistry":"0xc0A26f8bac0482E0F8e3a61762F5862Bc21a2D11","smartAgentPaymaster":"0x0e54A8Cc986C86530f0593817E8CafE01FC52983","timestampEnforcer":"0xf9AeF60b8cb4939bF5B1AF48E777dad99Ef1084f","universalSignatureValidator":"0x7A282fFf06E6DC73613A31F55345535e24CB6832","valueEnforcer":"0x4be1B537b9583E69D9baBf8af1dc5371A4a750C5"}
|