@agenticprimitives/contracts 0.1.0-alpha.2
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 +67 -0
- package/CLAUDE.md +40 -0
- package/LICENSE +21 -0
- package/README.md +45 -0
- package/deployments-anvil.json +1 -0
- package/deployments-base-sepolia.json +1 -0
- package/dist/abi/AgentNameAttributeResolver.json +798 -0
- package/dist/abi/AgentNamePredicates.json +1 -0
- package/dist/abi/AgentNameRegistry.json +826 -0
- package/dist/abi/AgentNameUniversalResolver.json +222 -0
- package/dist/abi/AgentProfilePredicates.json +1 -0
- package/dist/abi/AgentProfileResolver.json +1044 -0
- package/dist/abi/AgentRelationship.json +583 -0
- package/dist/abi/AgentRelationshipPredicates.json +1 -0
- package/dist/abi/AgenticGovernance.json +259 -0
- package/dist/abi/AllowedMethodsEnforcer.json +108 -0
- package/dist/abi/AllowedTargetsEnforcer.json +103 -0
- package/dist/abi/ApprovedHashRegistry.json +114 -0
- package/dist/abi/AttributeStorage.json +557 -0
- package/dist/abi/CaveatEnforcerBase.json +130 -0
- package/dist/abi/GovernanceManaged.json +43 -0
- package/dist/abi/IAttributeReader.json +98 -0
- package/dist/abi/ICaveatEnforcer.json +98 -0
- package/dist/abi/IDelegationManager.json +211 -0
- package/dist/abi/IERC7579Module.json +34 -0
- package/dist/abi/IERC7579ModuleLifecycle.json +60 -0
- package/dist/abi/IGovernanceView.json +34 -0
- package/dist/abi/MultiSendCallOnly.json +29 -0
- package/dist/abi/MultiSendCallOnlyHarness.json +42 -0
- package/dist/abi/OntologyTermRegistry.json +397 -0
- package/dist/abi/P256Verifier.json +1 -0
- package/dist/abi/PermissionlessSubregistry.json +207 -0
- package/dist/abi/RelationshipTypeRegistry.json +455 -0
- package/dist/abi/ShapeRegistry.json +627 -0
- package/dist/abi/SmartAgentModuleTypes.json +1 -0
- package/dist/abi/TimestampEnforcer.json +108 -0
- package/dist/abi/ValueEnforcer.json +103 -0
- package/dist/abi/WebAuthnLib.json +1 -0
- package/dist/abi/index.d.ts +35 -0
- package/dist/abi/index.js +35 -0
- package/package.json +48 -0
- package/spec.md +52 -0
- package/src/AgentAccount.sol +1374 -0
- package/src/AgentAccountFactory.sol +274 -0
- package/src/ApprovedHashRegistry.sol +57 -0
- package/src/IAgentAccount.sol +138 -0
- package/src/SmartAgentPaymaster.sol +281 -0
- package/src/UniversalSignatureValidator.sol +136 -0
- package/src/agency/DelegationManager.sol +374 -0
- package/src/agency/ICaveatEnforcer.sol +62 -0
- package/src/agency/IDelegationManager.sol +69 -0
- package/src/custody/CustodyPolicy.sol +892 -0
- package/src/custody/IERC7579Module.sol +60 -0
- package/src/enforcers/AllowedMethodsEnforcer.AUDIT.md +51 -0
- package/src/enforcers/AllowedMethodsEnforcer.sol +48 -0
- package/src/enforcers/AllowedTargetsEnforcer.AUDIT.md +49 -0
- package/src/enforcers/AllowedTargetsEnforcer.sol +44 -0
- package/src/enforcers/CaveatEnforcerBase.sol +19 -0
- package/src/enforcers/QuorumEnforcer.AUDIT.md +71 -0
- package/src/enforcers/QuorumEnforcer.sol +191 -0
- package/src/enforcers/TimestampEnforcer.AUDIT.md +50 -0
- package/src/enforcers/TimestampEnforcer.sol +43 -0
- package/src/enforcers/ValueEnforcer.AUDIT.md +51 -0
- package/src/enforcers/ValueEnforcer.sol +41 -0
- package/src/governance/AgenticGovernance.sol +140 -0
- package/src/governance/GovernanceManaged.sol +75 -0
- package/src/governance/IGovernance.sol +15 -0
- package/src/identity/AgentProfilePredicates.sol +40 -0
- package/src/identity/AgentProfileResolver.sol +194 -0
- package/src/libraries/MultiSendCallOnly.sol +95 -0
- package/src/libraries/P256Verifier.sol +47 -0
- package/src/libraries/SignatureSlotRecovery.sol +196 -0
- package/src/libraries/WebAuthnLib.sol +164 -0
- package/src/naming/AgentNameAttributeResolver.sol +95 -0
- package/src/naming/AgentNamePredicates.sol +74 -0
- package/src/naming/AgentNameRegistry.sol +362 -0
- package/src/naming/AgentNameUniversalResolver.sol +210 -0
- package/src/naming/PermissionlessSubregistry.sol +98 -0
- package/src/ontology/AttributeStorage.sol +289 -0
- package/src/ontology/OntologyTermRegistry.sol +146 -0
- package/src/ontology/ShapeRegistry.sol +240 -0
- package/src/relationships/AgentRelationship.sol +289 -0
- package/src/relationships/AgentRelationshipPredicates.sol +44 -0
- package/src/relationships/RelationshipTypeRegistry.sol +143 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "afterHook",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "",
|
|
8
|
+
"type": "bytes",
|
|
9
|
+
"internalType": "bytes"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "",
|
|
13
|
+
"type": "bytes",
|
|
14
|
+
"internalType": "bytes"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "",
|
|
18
|
+
"type": "bytes32",
|
|
19
|
+
"internalType": "bytes32"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "",
|
|
23
|
+
"type": "address",
|
|
24
|
+
"internalType": "address"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "",
|
|
28
|
+
"type": "address",
|
|
29
|
+
"internalType": "address"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "",
|
|
33
|
+
"type": "address",
|
|
34
|
+
"internalType": "address"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "",
|
|
38
|
+
"type": "uint256",
|
|
39
|
+
"internalType": "uint256"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "",
|
|
43
|
+
"type": "bytes",
|
|
44
|
+
"internalType": "bytes"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"outputs": [],
|
|
48
|
+
"stateMutability": "pure"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "function",
|
|
52
|
+
"name": "beforeHook",
|
|
53
|
+
"inputs": [
|
|
54
|
+
{
|
|
55
|
+
"name": "terms",
|
|
56
|
+
"type": "bytes",
|
|
57
|
+
"internalType": "bytes"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "",
|
|
61
|
+
"type": "bytes",
|
|
62
|
+
"internalType": "bytes"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "",
|
|
66
|
+
"type": "bytes32",
|
|
67
|
+
"internalType": "bytes32"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "",
|
|
71
|
+
"type": "address",
|
|
72
|
+
"internalType": "address"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "",
|
|
76
|
+
"type": "address",
|
|
77
|
+
"internalType": "address"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "",
|
|
81
|
+
"type": "address",
|
|
82
|
+
"internalType": "address"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "",
|
|
86
|
+
"type": "uint256",
|
|
87
|
+
"internalType": "uint256"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "",
|
|
91
|
+
"type": "bytes",
|
|
92
|
+
"internalType": "bytes"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"outputs": [],
|
|
96
|
+
"stateMutability": "view"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "error",
|
|
100
|
+
"name": "TimestampExpired",
|
|
101
|
+
"inputs": []
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "error",
|
|
105
|
+
"name": "TimestampNotYetValid",
|
|
106
|
+
"inputs": []
|
|
107
|
+
}
|
|
108
|
+
]
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "function",
|
|
4
|
+
"name": "afterHook",
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"name": "",
|
|
8
|
+
"type": "bytes",
|
|
9
|
+
"internalType": "bytes"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "",
|
|
13
|
+
"type": "bytes",
|
|
14
|
+
"internalType": "bytes"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "",
|
|
18
|
+
"type": "bytes32",
|
|
19
|
+
"internalType": "bytes32"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "",
|
|
23
|
+
"type": "address",
|
|
24
|
+
"internalType": "address"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "",
|
|
28
|
+
"type": "address",
|
|
29
|
+
"internalType": "address"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "",
|
|
33
|
+
"type": "address",
|
|
34
|
+
"internalType": "address"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "",
|
|
38
|
+
"type": "uint256",
|
|
39
|
+
"internalType": "uint256"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"name": "",
|
|
43
|
+
"type": "bytes",
|
|
44
|
+
"internalType": "bytes"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"outputs": [],
|
|
48
|
+
"stateMutability": "pure"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "function",
|
|
52
|
+
"name": "beforeHook",
|
|
53
|
+
"inputs": [
|
|
54
|
+
{
|
|
55
|
+
"name": "terms",
|
|
56
|
+
"type": "bytes",
|
|
57
|
+
"internalType": "bytes"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "",
|
|
61
|
+
"type": "bytes",
|
|
62
|
+
"internalType": "bytes"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "",
|
|
66
|
+
"type": "bytes32",
|
|
67
|
+
"internalType": "bytes32"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "",
|
|
71
|
+
"type": "address",
|
|
72
|
+
"internalType": "address"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"name": "",
|
|
76
|
+
"type": "address",
|
|
77
|
+
"internalType": "address"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "",
|
|
81
|
+
"type": "address",
|
|
82
|
+
"internalType": "address"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "value",
|
|
86
|
+
"type": "uint256",
|
|
87
|
+
"internalType": "uint256"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "",
|
|
91
|
+
"type": "bytes",
|
|
92
|
+
"internalType": "bytes"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"outputs": [],
|
|
96
|
+
"stateMutability": "pure"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"type": "error",
|
|
100
|
+
"name": "ValueExceedsLimit",
|
|
101
|
+
"inputs": []
|
|
102
|
+
}
|
|
103
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[]
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Generated by scripts/build-abi.mjs — do not edit by hand.
|
|
2
|
+
import type { Abi } from 'viem';
|
|
3
|
+
|
|
4
|
+
export declare const AgenticGovernance: Abi;
|
|
5
|
+
export declare const AgentNameAttributeResolver: Abi;
|
|
6
|
+
export declare const AgentNamePredicates: Abi;
|
|
7
|
+
export declare const AgentNameRegistry: Abi;
|
|
8
|
+
export declare const AgentNameUniversalResolver: Abi;
|
|
9
|
+
export declare const AgentProfilePredicates: Abi;
|
|
10
|
+
export declare const AgentProfileResolver: Abi;
|
|
11
|
+
export declare const AgentRelationship: Abi;
|
|
12
|
+
export declare const AgentRelationshipPredicates: Abi;
|
|
13
|
+
export declare const AllowedMethodsEnforcer: Abi;
|
|
14
|
+
export declare const AllowedTargetsEnforcer: Abi;
|
|
15
|
+
export declare const ApprovedHashRegistry: Abi;
|
|
16
|
+
export declare const AttributeStorage: Abi;
|
|
17
|
+
export declare const CaveatEnforcerBase: Abi;
|
|
18
|
+
export declare const GovernanceManaged: Abi;
|
|
19
|
+
export declare const IAttributeReader: Abi;
|
|
20
|
+
export declare const ICaveatEnforcer: Abi;
|
|
21
|
+
export declare const IDelegationManager: Abi;
|
|
22
|
+
export declare const IERC7579Module: Abi;
|
|
23
|
+
export declare const IERC7579ModuleLifecycle: Abi;
|
|
24
|
+
export declare const IGovernanceView: Abi;
|
|
25
|
+
export declare const MultiSendCallOnly: Abi;
|
|
26
|
+
export declare const MultiSendCallOnlyHarness: Abi;
|
|
27
|
+
export declare const OntologyTermRegistry: Abi;
|
|
28
|
+
export declare const P256Verifier: Abi;
|
|
29
|
+
export declare const PermissionlessSubregistry: Abi;
|
|
30
|
+
export declare const RelationshipTypeRegistry: Abi;
|
|
31
|
+
export declare const ShapeRegistry: Abi;
|
|
32
|
+
export declare const SmartAgentModuleTypes: Abi;
|
|
33
|
+
export declare const TimestampEnforcer: Abi;
|
|
34
|
+
export declare const ValueEnforcer: Abi;
|
|
35
|
+
export declare const WebAuthnLib: Abi;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Generated by scripts/build-abi.mjs — do not edit by hand.
|
|
2
|
+
// Each export is a viem-compatible ABI array.
|
|
3
|
+
|
|
4
|
+
export { default as AgenticGovernance } from './AgenticGovernance.json' with { type: 'json' };
|
|
5
|
+
export { default as AgentNameAttributeResolver } from './AgentNameAttributeResolver.json' with { type: 'json' };
|
|
6
|
+
export { default as AgentNamePredicates } from './AgentNamePredicates.json' with { type: 'json' };
|
|
7
|
+
export { default as AgentNameRegistry } from './AgentNameRegistry.json' with { type: 'json' };
|
|
8
|
+
export { default as AgentNameUniversalResolver } from './AgentNameUniversalResolver.json' with { type: 'json' };
|
|
9
|
+
export { default as AgentProfilePredicates } from './AgentProfilePredicates.json' with { type: 'json' };
|
|
10
|
+
export { default as AgentProfileResolver } from './AgentProfileResolver.json' with { type: 'json' };
|
|
11
|
+
export { default as AgentRelationship } from './AgentRelationship.json' with { type: 'json' };
|
|
12
|
+
export { default as AgentRelationshipPredicates } from './AgentRelationshipPredicates.json' with { type: 'json' };
|
|
13
|
+
export { default as AllowedMethodsEnforcer } from './AllowedMethodsEnforcer.json' with { type: 'json' };
|
|
14
|
+
export { default as AllowedTargetsEnforcer } from './AllowedTargetsEnforcer.json' with { type: 'json' };
|
|
15
|
+
export { default as ApprovedHashRegistry } from './ApprovedHashRegistry.json' with { type: 'json' };
|
|
16
|
+
export { default as AttributeStorage } from './AttributeStorage.json' with { type: 'json' };
|
|
17
|
+
export { default as CaveatEnforcerBase } from './CaveatEnforcerBase.json' with { type: 'json' };
|
|
18
|
+
export { default as GovernanceManaged } from './GovernanceManaged.json' with { type: 'json' };
|
|
19
|
+
export { default as IAttributeReader } from './IAttributeReader.json' with { type: 'json' };
|
|
20
|
+
export { default as ICaveatEnforcer } from './ICaveatEnforcer.json' with { type: 'json' };
|
|
21
|
+
export { default as IDelegationManager } from './IDelegationManager.json' with { type: 'json' };
|
|
22
|
+
export { default as IERC7579Module } from './IERC7579Module.json' with { type: 'json' };
|
|
23
|
+
export { default as IERC7579ModuleLifecycle } from './IERC7579ModuleLifecycle.json' with { type: 'json' };
|
|
24
|
+
export { default as IGovernanceView } from './IGovernanceView.json' with { type: 'json' };
|
|
25
|
+
export { default as MultiSendCallOnly } from './MultiSendCallOnly.json' with { type: 'json' };
|
|
26
|
+
export { default as MultiSendCallOnlyHarness } from './MultiSendCallOnlyHarness.json' with { type: 'json' };
|
|
27
|
+
export { default as OntologyTermRegistry } from './OntologyTermRegistry.json' with { type: 'json' };
|
|
28
|
+
export { default as P256Verifier } from './P256Verifier.json' with { type: 'json' };
|
|
29
|
+
export { default as PermissionlessSubregistry } from './PermissionlessSubregistry.json' with { type: 'json' };
|
|
30
|
+
export { default as RelationshipTypeRegistry } from './RelationshipTypeRegistry.json' with { type: 'json' };
|
|
31
|
+
export { default as ShapeRegistry } from './ShapeRegistry.json' with { type: 'json' };
|
|
32
|
+
export { default as SmartAgentModuleTypes } from './SmartAgentModuleTypes.json' with { type: 'json' };
|
|
33
|
+
export { default as TimestampEnforcer } from './TimestampEnforcer.json' with { type: 'json' };
|
|
34
|
+
export { default as ValueEnforcer } from './ValueEnforcer.json' with { type: 'json' };
|
|
35
|
+
export { default as WebAuthnLib } from './WebAuthnLib.json' with { type: 'json' };
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agenticprimitives/contracts",
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
|
+
"description": "Solidity contracts + ABIs + flattened sources + per-network deployment addresses for the agenticprimitives stack.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/agentictrustlabs/agenticprimitives.git",
|
|
9
|
+
"directory": "packages/contracts"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/agentictrustlabs/agenticprimitives/tree/master/packages/contracts",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/agentictrustlabs/agenticprimitives/issues"
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
"./abi": "./dist/abi/index.js",
|
|
17
|
+
"./abi/*": "./dist/abi/*.json",
|
|
18
|
+
"./deployments/*": "./deployments-*.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"LICENSE",
|
|
22
|
+
"README.md",
|
|
23
|
+
"AUDIT.md",
|
|
24
|
+
"CLAUDE.md",
|
|
25
|
+
"spec.md",
|
|
26
|
+
"src",
|
|
27
|
+
"dist/abi",
|
|
28
|
+
"dist/flat",
|
|
29
|
+
"deployments-*.json"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"setup": "bash setup.sh",
|
|
33
|
+
"build": "forge build && pnpm run build:abi",
|
|
34
|
+
"build:abi": "node scripts/build-abi.mjs",
|
|
35
|
+
"build:flat": "node scripts/build-flat.mjs",
|
|
36
|
+
"test": "forge test",
|
|
37
|
+
"typecheck": "echo 'no TS in this package; ABIs are JSON' && exit 0",
|
|
38
|
+
"deploy:anvil": "forge script script/Deploy.s.sol --rpc-url http://127.0.0.1:8545 --broadcast --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80",
|
|
39
|
+
"deploy:base-sepolia": "DEPLOY_NETWORK=base-sepolia forge script script/Deploy.s.sol --rpc-url $BASE_SEPOLIA_RPC --broadcast --private-key $PRIVATE_KEY",
|
|
40
|
+
"deploy:paymaster:base-sepolia": "DEPLOY_NETWORK=base-sepolia forge script script/DeployPaymaster.s.sol --rpc-url $BASE_SEPOLIA_RPC --broadcast --private-key $PRIVATE_KEY --sig 'run()'",
|
|
41
|
+
"deploy:paymaster:anvil": "DEPLOY_NETWORK=anvil forge script script/DeployPaymaster.s.sol --rpc-url http://127.0.0.1:8545 --broadcast --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --sig 'run()'",
|
|
42
|
+
"verify:base-sepolia": "bash scripts/verify-base-sepolia.sh",
|
|
43
|
+
"clean": "rm -rf out cache broadcast dist"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/spec.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# `@agenticprimitives/contracts` — spec
|
|
2
|
+
|
|
3
|
+
The on-chain enforcement layer for the agenticprimitives stack. This package
|
|
4
|
+
is the canonical home for Solidity sources, Foundry tests, deployment scripts,
|
|
5
|
+
per-network deployment JSON, ABIs, and flattened sources.
|
|
6
|
+
|
|
7
|
+
## Why this is its own package
|
|
8
|
+
|
|
9
|
+
Per **EXT3-001** + the H7 audit, the contracts must be installable from npm so
|
|
10
|
+
a consumer of the TypeScript packages can also pull ABIs, deployment
|
|
11
|
+
addresses, and verification scripts without cloning the monorepo.
|
|
12
|
+
|
|
13
|
+
## Surface
|
|
14
|
+
|
|
15
|
+
| Subpath | Content |
|
|
16
|
+
|---|---|
|
|
17
|
+
| `@agenticprimitives/contracts/abi` | One JSON ABI per source contract under `src/`. Index.js re-exports each as a named export typed as viem `Abi`. |
|
|
18
|
+
| `@agenticprimitives/contracts/abi/<Contract>.json` | A single ABI for direct import. |
|
|
19
|
+
| `@agenticprimitives/contracts/deployments/<network>` | The `deployments-<network>.json` for chain `network`. |
|
|
20
|
+
|
|
21
|
+
The Solidity source under `src/` is also shipped (`files: [src, ...]`) so
|
|
22
|
+
downstream auditors and integrators can read + flatten the canonical source
|
|
23
|
+
without cloning the repo.
|
|
24
|
+
|
|
25
|
+
## Build flow
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
forge build → out/<File>.sol/<Contract>.json (forge artifacts)
|
|
29
|
+
pnpm build:abi → dist/abi/<Contract>.json (just the ABI array)
|
|
30
|
+
pnpm build:flat → dist/flat/<Contract>.flat.sol (forge flatten output)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Both `build:abi` and `build:flat` are wired so `pnpm build` produces the
|
|
34
|
+
complete publishable shape.
|
|
35
|
+
|
|
36
|
+
## Per-network artifacts
|
|
37
|
+
|
|
38
|
+
| File | Network | Status |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `deployments-base-sepolia.json` | Base Sepolia (84532) | testnet |
|
|
41
|
+
| `deployments-anvil.json` | local Anvil | dev |
|
|
42
|
+
|
|
43
|
+
## Verification
|
|
44
|
+
|
|
45
|
+
`pnpm verify:base-sepolia` runs `forge verify-contract` against BaseScan for
|
|
46
|
+
every entry in `deployments-base-sepolia.json`. Requires `BASESCAN_API_KEY`
|
|
47
|
+
+ `BASE_SEPOLIA_RPC` in env. See `scripts/verify-base-sepolia.sh`.
|
|
48
|
+
|
|
49
|
+
## Audit cross-reference
|
|
50
|
+
|
|
51
|
+
See [AUDIT.md](./AUDIT.md). The system audit lives at
|
|
52
|
+
[`docs/audits/2026-05-packages-contracts-production-readiness.md`](../../docs/audits/2026-05-packages-contracts-production-readiness.md).
|