@0xsequence/catapult 1.4.0 → 1.5.0

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.
Files changed (163) hide show
  1. package/README.md +27 -0
  2. package/dist/lib/__tests__/network-loader.spec.js.map +1 -1
  3. package/dist/lib/core/__tests__/resolver.spec.js +22 -0
  4. package/dist/lib/core/__tests__/resolver.spec.js.map +1 -1
  5. package/dist/lib/core/__tests__/sign-actions.spec.d.ts +2 -0
  6. package/dist/lib/core/__tests__/sign-actions.spec.d.ts.map +1 -0
  7. package/dist/lib/core/__tests__/sign-actions.spec.js +128 -0
  8. package/dist/lib/core/__tests__/sign-actions.spec.js.map +1 -0
  9. package/dist/lib/core/__tests__/signer.spec.d.ts +2 -0
  10. package/dist/lib/core/__tests__/signer.spec.d.ts.map +1 -0
  11. package/dist/lib/core/__tests__/signer.spec.js +40 -0
  12. package/dist/lib/core/__tests__/signer.spec.js.map +1 -0
  13. package/dist/lib/core/context.d.ts +3 -2
  14. package/dist/lib/core/context.d.ts.map +1 -1
  15. package/dist/lib/core/context.js +3 -2
  16. package/dist/lib/core/context.js.map +1 -1
  17. package/dist/lib/core/engine.d.ts +4 -0
  18. package/dist/lib/core/engine.d.ts.map +1 -1
  19. package/dist/lib/core/engine.js +173 -0
  20. package/dist/lib/core/engine.js.map +1 -1
  21. package/dist/lib/core/signer.d.ts +7 -0
  22. package/dist/lib/core/signer.d.ts.map +1 -0
  23. package/dist/lib/core/signer.js +60 -0
  24. package/dist/lib/core/signer.js.map +1 -0
  25. package/dist/lib/parsers/__tests__/source.spec.js +37 -0
  26. package/dist/lib/parsers/__tests__/source.spec.js.map +1 -1
  27. package/dist/lib/parsers/source.js +1 -1
  28. package/dist/lib/parsers/source.js.map +1 -1
  29. package/dist/lib/provenance.js +51 -2
  30. package/dist/lib/provenance.js.map +1 -1
  31. package/dist/lib/types/actions.d.ts +26 -2
  32. package/dist/lib/types/actions.d.ts.map +1 -1
  33. package/dist/lib/types/actions.js +3 -0
  34. package/dist/lib/types/actions.js.map +1 -1
  35. package/dist/lib/types/source.d.ts +2 -0
  36. package/dist/lib/types/source.d.ts.map +1 -1
  37. package/package.json +4 -1
  38. package/.eslintrc.json +0 -29
  39. package/.github/workflows/ci.yml +0 -181
  40. package/CONCEPT.md +0 -24
  41. package/contracts/checked-call.huff +0 -65
  42. package/eslint.config.js +0 -48
  43. package/examples/jobs/guards-v1.yaml +0 -17
  44. package/examples/jobs/sequence-seq-0001-patch.yaml +0 -59
  45. package/examples/jobs/sequence-v1.yaml +0 -59
  46. package/examples/templates/sequence-factory-v1.yaml +0 -56
  47. package/jest.config.js +0 -25
  48. package/src/cli.ts +0 -18
  49. package/src/commands/common.ts +0 -61
  50. package/src/commands/dry.ts +0 -209
  51. package/src/commands/etherscan.ts +0 -360
  52. package/src/commands/index.ts +0 -6
  53. package/src/commands/list.ts +0 -262
  54. package/src/commands/provenance.ts +0 -120
  55. package/src/commands/run.ts +0 -146
  56. package/src/commands/utils.ts +0 -215
  57. package/src/index.ts +0 -67
  58. package/src/lib/__tests__/deployer-events.spec.ts +0 -338
  59. package/src/lib/__tests__/deployer.spec.ts +0 -2269
  60. package/src/lib/__tests__/network-loader.spec.ts +0 -150
  61. package/src/lib/__tests__/network-selection.spec.ts +0 -41
  62. package/src/lib/__tests__/network-utils.spec.ts +0 -230
  63. package/src/lib/__tests__/provenance.spec.ts +0 -208
  64. package/src/lib/artifacts/__tests__/fixtures/contract1.json +0 -19
  65. package/src/lib/artifacts/__tests__/fixtures/contract2.json +0 -19
  66. package/src/lib/artifacts/__tests__/fixtures/duplicate-name.json +0 -19
  67. package/src/lib/artifacts/__tests__/fixtures/nested/nested-contract.json +0 -18
  68. package/src/lib/artifacts/__tests__/fixtures/not-an-artifact.json +0 -8
  69. package/src/lib/artifacts/__tests__/fixtures/readme.txt +0 -2
  70. package/src/lib/contracts/__tests__/repository.spec.ts +0 -612
  71. package/src/lib/contracts/repository.ts +0 -411
  72. package/src/lib/core/__tests__/assert-action.spec.ts +0 -474
  73. package/src/lib/core/__tests__/context.spec.ts +0 -37
  74. package/src/lib/core/__tests__/engine.spec.ts +0 -2005
  75. package/src/lib/core/__tests__/graph.spec.ts +0 -125
  76. package/src/lib/core/__tests__/json-integration.spec.ts +0 -425
  77. package/src/lib/core/__tests__/loader.spec.ts +0 -367
  78. package/src/lib/core/__tests__/multi-platform-verification.spec.ts +0 -406
  79. package/src/lib/core/__tests__/resolver.spec.ts +0 -2496
  80. package/src/lib/core/__tests__/static-action.spec.ts +0 -172
  81. package/src/lib/core/context.ts +0 -127
  82. package/src/lib/core/engine.ts +0 -1834
  83. package/src/lib/core/graph.ts +0 -252
  84. package/src/lib/core/loader.ts +0 -253
  85. package/src/lib/core/resolver.ts +0 -873
  86. package/src/lib/deployer.ts +0 -1005
  87. package/src/lib/events/__tests__/event-system.spec.ts +0 -392
  88. package/src/lib/events/cli-adapter.ts +0 -369
  89. package/src/lib/events/emitter.ts +0 -62
  90. package/src/lib/events/index.ts +0 -3
  91. package/src/lib/events/types.ts +0 -520
  92. package/src/lib/index.ts +0 -17
  93. package/src/lib/network-loader.ts +0 -90
  94. package/src/lib/network-selection.ts +0 -73
  95. package/src/lib/network-utils.ts +0 -64
  96. package/src/lib/parsers/__tests__/buildinfo.spec.ts +0 -122
  97. package/src/lib/parsers/__tests__/fixtures/buildinfo/invalid-bytecode-buildinfo.json +0 -62
  98. package/src/lib/parsers/__tests__/fixtures/buildinfo/invalid-json.txt +0 -2
  99. package/src/lib/parsers/__tests__/fixtures/buildinfo/multi-contract-buildinfo.json +0 -89
  100. package/src/lib/parsers/__tests__/fixtures/buildinfo/no-contracts-buildinfo.json +0 -17
  101. package/src/lib/parsers/__tests__/fixtures/buildinfo/simple-buildinfo.json +0 -63
  102. package/src/lib/parsers/__tests__/fixtures/buildinfo/wrong-format.json +0 -4
  103. package/src/lib/parsers/__tests__/job.spec.ts +0 -439
  104. package/src/lib/parsers/__tests__/source.spec.ts +0 -134
  105. package/src/lib/parsers/__tests__/template.spec.ts +0 -111
  106. package/src/lib/parsers/artifact/__tests__/artifact.spec.ts +0 -117
  107. package/src/lib/parsers/artifact/__tests__/fixtures/empty-bytecode.json +0 -5
  108. package/src/lib/parsers/artifact/__tests__/fixtures/hardhat-artifact.json +0 -67
  109. package/src/lib/parsers/artifact/__tests__/fixtures/invalid-bytecode.json +0 -5
  110. package/src/lib/parsers/artifact/__tests__/fixtures/invalid-json.txt +0 -11
  111. package/src/lib/parsers/artifact/__tests__/fixtures/minimal-artifact.json +0 -5
  112. package/src/lib/parsers/artifact/__tests__/fixtures/missing-abi.json +0 -4
  113. package/src/lib/parsers/artifact/__tests__/fixtures/missing-bytecode.json +0 -11
  114. package/src/lib/parsers/artifact/__tests__/fixtures/missing-contract-name.json +0 -11
  115. package/src/lib/parsers/artifact/__tests__/fixtures/simple-artifact.json +0 -40
  116. package/src/lib/parsers/artifact/__tests__/fixtures/wrong-types.json +0 -7
  117. package/src/lib/parsers/artifact/foundry-1.2.ts +0 -72
  118. package/src/lib/parsers/artifact/index.ts +0 -27
  119. package/src/lib/parsers/artifact/types.ts +0 -9
  120. package/src/lib/parsers/buildinfo.ts +0 -127
  121. package/src/lib/parsers/constants.ts +0 -56
  122. package/src/lib/parsers/index.ts +0 -6
  123. package/src/lib/parsers/job.ts +0 -160
  124. package/src/lib/parsers/source.ts +0 -129
  125. package/src/lib/parsers/template.ts +0 -135
  126. package/src/lib/provenance.ts +0 -785
  127. package/src/lib/std/templates/arachnid-deterministic-deployment-proxy.yaml +0 -68
  128. package/src/lib/std/templates/assured-deployment.yaml +0 -46
  129. package/src/lib/std/templates/era-evm-predeploy.yaml +0 -35
  130. package/src/lib/std/templates/erc-2470.yaml +0 -70
  131. package/src/lib/std/templates/min-balance.yaml +0 -35
  132. package/src/lib/std/templates/nano-universal-deployer.yaml +0 -61
  133. package/src/lib/std/templates/raw-erc-2470.yaml +0 -62
  134. package/src/lib/std/templates/raw-nano-universal-deployer.yaml +0 -54
  135. package/src/lib/std/templates/raw-sequence-universal-deployer-2.yaml +0 -52
  136. package/src/lib/std/templates/sequence-universal-deployer-2.yaml +0 -61
  137. package/src/lib/types/__tests__/json-request-action.spec.ts +0 -243
  138. package/src/lib/types/__tests__/read-json-value.spec.ts +0 -278
  139. package/src/lib/types/__tests__/resolve-json-value.spec.ts +0 -769
  140. package/src/lib/types/actions.ts +0 -148
  141. package/src/lib/types/artifacts.ts +0 -21
  142. package/src/lib/types/buildinfo.ts +0 -116
  143. package/src/lib/types/conditions.ts +0 -50
  144. package/src/lib/types/contracts.ts +0 -26
  145. package/src/lib/types/definitions.ts +0 -77
  146. package/src/lib/types/index.ts +0 -9
  147. package/src/lib/types/network.ts +0 -33
  148. package/src/lib/types/project.ts +0 -9
  149. package/src/lib/types/source.ts +0 -26
  150. package/src/lib/types/task.ts +0 -9
  151. package/src/lib/types/values.ts +0 -221
  152. package/src/lib/utils/assertion.ts +0 -24
  153. package/src/lib/utils/validation.ts +0 -116
  154. package/src/lib/validation/contract-references.ts +0 -210
  155. package/src/lib/validation/index.ts +0 -1
  156. package/src/lib/verification/__tests__/etherscan.spec.ts +0 -710
  157. package/src/lib/verification/__tests__/sourcify.spec.ts +0 -288
  158. package/src/lib/verification/etherscan.ts +0 -547
  159. package/src/lib/verification/sourcify.ts +0 -248
  160. package/test_validation/artifacts/TestContract.json +0 -9
  161. package/test_validation/jobs/test-missing.yaml +0 -16
  162. package/test_validation/networks.yaml +0 -3
  163. package/tsconfig.json +0 -36
@@ -1,148 +0,0 @@
1
- import { AddressValue, BytesValue, Uint256Value, Value } from './values'
2
- import { Contract } from './contracts'
3
- import { Condition } from './conditions'
4
-
5
- // --- Primitive Actions ---
6
- // These are the basic building blocks that interact with the blockchain.
7
-
8
- export interface SendTransactionAction {
9
- type: 'send-transaction';
10
- arguments: {
11
- to: AddressValue;
12
- value?: Uint256Value;
13
- data?: BytesValue;
14
- gasMultiplier?: number;
15
- };
16
- }
17
-
18
- export interface SendSignedTransactionAction {
19
- type: 'send-signed-transaction';
20
- arguments: {
21
- transaction: BytesValue;
22
- };
23
- }
24
-
25
- export interface VerifyContractAction {
26
- type: 'verify-contract';
27
- arguments: {
28
- address: AddressValue;
29
- contract: Value<Contract>; // The contract to verify
30
- constructorArguments?: BytesValue; // Optional constructor args as hex string
31
- platform?: Value<string | string[]>; // Platform(s) to verify on, defaults to "all" (tries all configured platforms)
32
- };
33
- }
34
-
35
- export interface StaticAction {
36
- type: 'static';
37
- arguments: {
38
- value: Value<any>;
39
- };
40
- }
41
-
42
- export interface CreateContractAction {
43
- type: 'create-contract';
44
- arguments: {
45
- data: BytesValue; // The contract bytecode (creation code)
46
- value?: Uint256Value; // ETH to send with the contract creation
47
- gasMultiplier?: number; // Optional gas multiplier
48
- };
49
- }
50
-
51
- export interface TestNicksMethodAction {
52
- type: 'test-nicks-method';
53
- arguments: {
54
- bytecode?: BytesValue;
55
- gasPrice?: Uint256Value;
56
- gasLimit?: Uint256Value;
57
- fundingAmount?: Uint256Value;
58
- };
59
- }
60
-
61
- export interface JsonRequestAction {
62
- type: 'json-request';
63
- arguments: {
64
- url: Value<string>;
65
- method?: Value<string>; // GET, POST, PUT, DELETE, etc. Defaults to GET
66
- headers?: Value<Record<string, string>>; // Optional headers
67
- body?: Value<any>; // JSON body for POST/PUT requests
68
- };
69
- }
70
-
71
- export interface AssertAction {
72
- type: 'assert';
73
- arguments: {
74
- /** Source of the ACTUAL value: either `to`+`signature` (eth_call) or `actual` (a value). */
75
- to?: AddressValue;
76
- signature?: string;
77
- values?: any[];
78
- actual?: Value<any>;
79
- /** Exactly one comparator key whose value is the EXPECTED value. */
80
- eq?: Value<any>;
81
- neq?: Value<any>;
82
- gt?: Value<any>;
83
- lt?: Value<any>;
84
- gte?: Value<any>;
85
- lte?: Value<any>;
86
- /** Optional message for the error. */
87
- message?: string;
88
- };
89
- }
90
-
91
- // A union of all primitive action types.
92
- export type PrimitiveAction = SendTransactionAction | SendSignedTransactionAction | VerifyContractAction | StaticAction | CreateContractAction | TestNicksMethodAction | JsonRequestAction | AssertAction;
93
-
94
- const primitiveActionTypes = [
95
- 'send-transaction',
96
- 'send-signed-transaction',
97
- 'verify-contract',
98
- 'static',
99
- 'create-contract',
100
- 'test-nicks-method',
101
- 'json-request',
102
- 'assert',
103
- ] as const;
104
-
105
- /**
106
- * A set of all built-in primitive action types.
107
- * This is useful for efficiently checking if an action type is a primitive.
108
- */
109
- export const PRIMITIVE_ACTION_TYPES = new Set<string>(primitiveActionTypes);
110
-
111
- /**
112
- * A type guard to check if a given action `type` corresponds to a primitive action.
113
- * @param type The action type string.
114
- * @returns `true` if the type is a primitive action type.
115
- */
116
- export function isPrimitiveActionType(type: string): type is (typeof primitiveActionTypes)[number] {
117
- return PRIMITIVE_ACTION_TYPES.has(type);
118
- }
119
-
120
- // --- Template Call Action ---
121
- // In your YAML, using another template as an action is done by specifying its name
122
- // in the 'type' field (e.g., `type: 'min-balance'`). This type captures that pattern.
123
-
124
- export interface TemplateCallAction {
125
- /**
126
- * The name of the template to call, e.g., 'min-balance'.
127
- * This property acts as a discriminator.
128
- */
129
- type: string;
130
- arguments: Record<string, Value<any>>;
131
- }
132
-
133
- /**
134
- * An Action is what appears in a `actions` array in your YAML.
135
- * It's either a primitive action or a call to another template.
136
- *
137
- * The `type` field is used to discriminate. Your parser will need to have a list
138
- * of known primitive action types (`send-transaction`, etc.) to distinguish them
139
- * from template names.
140
- */
141
- export type Action = (PrimitiveAction | TemplateCallAction) & {
142
- /** An optional name for the action, allowing its outputs to be referenced. */
143
- name?: string;
144
- /** A list of conditions that, if any are met, will cause this action to be skipped. */
145
- skip_condition?: Condition[];
146
- /** A list of action names within the same job/template that must complete first. */
147
- depends_on?: string[];
148
- };
@@ -1,21 +0,0 @@
1
- export interface CompilerInfo {
2
- version: string
3
- // Future settings like optimizer runs can be added here
4
- }
5
-
6
- export interface Artifact {
7
- // --- Core Information ---
8
- contractName: string
9
- abi: any[]
10
- bytecode: string // aka creationCode, initCode
11
-
12
- // --- Optional Information for Verification & Debugging ---
13
- deployedBytecode?: string // aka runtimeBytecode
14
- sourceName?: string // e.g., "contracts/MyContract.sol"
15
- source?: string // The full source code content for verification
16
- compiler?: CompilerInfo
17
-
18
- // --- Internal Management Properties (added by the loader) ---
19
- _path: string // The absolute path to the artifact file
20
- _hash: string // A hash of the artifact file's content (e.g., MD5)
21
- }
@@ -1,116 +0,0 @@
1
- export interface BuildInfoSource {
2
- content?: string
3
- urls?: string[]
4
- keccak256?: string
5
- }
6
-
7
- export interface BuildInfoInput {
8
- language: string
9
- sources: Record<string, BuildInfoSource>
10
- settings: {
11
- optimizer?: {
12
- enabled: boolean
13
- runs: number
14
- }
15
- evmVersion?: string
16
- remappings?: string[]
17
- viaIR?: boolean
18
- libraries?: Record<string, Record<string, string>>
19
- outputSelection: Record<string, Record<string, string[]>>
20
- [key: string]: any
21
- }
22
- }
23
-
24
- export interface BuildInfoError {
25
- component?: string
26
- errorCode?: string
27
- formattedMessage?: string
28
- message?: string
29
- severity?: 'error' | 'warning' | 'info'
30
- sourceLocation?: {
31
- file: string
32
- start: number
33
- end: number
34
- }
35
- type?: string
36
- }
37
-
38
- export interface BuildInfoBytecode {
39
- functionDebugData?: Record<string, any>
40
- generatedSources?: any[]
41
- linkReferences?: Record<string, Record<string, Array<{ length: number; start: number }>>>
42
- object: string
43
- opcodes?: string
44
- sourceMap?: string
45
- }
46
-
47
- export interface BuildInfoContract {
48
- abi: any[]
49
- metadata?: string
50
- storageLayout?: {
51
- storage: Array<{
52
- astId: number
53
- contract: string
54
- label: string
55
- offset: number
56
- slot: string
57
- type: string
58
- }>
59
- types: Record<string, {
60
- encoding: string
61
- label: string
62
- numberOfBytes: string
63
- [key: string]: any
64
- }>
65
- }
66
- userdoc?: any
67
- devdoc?: any
68
- ir?: string
69
- irOptimized?: string
70
- evm: {
71
- assembly?: string
72
- legacyAssembly?: any
73
- bytecode: BuildInfoBytecode
74
- deployedBytecode: BuildInfoBytecode
75
- methodIdentifiers?: Record<string, string>
76
- gasEstimates?: any
77
- }
78
- }
79
-
80
- export interface BuildInfoOutput {
81
- errors?: BuildInfoError[]
82
- sources: Record<string, {
83
- id: number
84
- ast?: any
85
- }>
86
- contracts: Record<string, Record<string, BuildInfoContract>>
87
- }
88
-
89
- export interface BuildInfo {
90
- _format?: 'hh-sol-build-info-1' | 'ethers-rs-sol-build-info-1' // Optional for factory-style formats
91
- id: string
92
- solcVersion: string
93
- solcLongVersion?: string // Optional for factory-style formats
94
- input: BuildInfoInput
95
- output: BuildInfoOutput
96
- // Optional extension keys for zkSync/zkEVM
97
- zksolcVersion?: string
98
- eraVersion?: string
99
- zkevmVersion?: string
100
- [key: string]: any // Allow additional unknown keys for forward compatibility
101
- }
102
-
103
- export interface ExtractedContract {
104
- contractName: string
105
- sourceName: string
106
- fullyQualifiedName: string // e.g., "src/Counter.sol:Counter"
107
- abi: any[]
108
- bytecode: string
109
- deployedBytecode?: string
110
- source?: string
111
- compiler: {
112
- version: string
113
- }
114
- buildInfoId: string
115
- buildInfoPath?: string
116
- }
@@ -1,50 +0,0 @@
1
- import { AddressValue, BooleanValue, ValueEmptyValue } from './values'
2
-
3
- /**
4
- * A condition that checks if a contract has code at a given address.
5
- */
6
- export interface ContractExistsCondition {
7
- type: 'contract-exists';
8
- arguments: {
9
- address: AddressValue;
10
- };
11
- }
12
-
13
- export function isContractExistsCondition(obj: any): obj is ContractExistsCondition {
14
- return (
15
- obj &&
16
- typeof obj === 'object' &&
17
- obj.type === 'contract-exists' &&
18
- obj.arguments &&
19
- typeof obj.arguments === 'object' &&
20
- 'address' in obj.arguments
21
- );
22
- }
23
-
24
- /**
25
- * A condition that checks if a dependency job has been successfully completed.
26
- */
27
- export interface JobCompletedCondition {
28
- type: 'job-completed';
29
- arguments: {
30
- job: string;
31
- };
32
- }
33
-
34
- export function isJobCompletedCondition(obj: any): obj is JobCompletedCondition {
35
- return (
36
- obj &&
37
- typeof obj === 'object' &&
38
- obj.type === 'job-completed' &&
39
- obj.arguments &&
40
- typeof obj.arguments === 'object' &&
41
- typeof obj.arguments.job === 'string'
42
- );
43
- }
44
-
45
- /**
46
- * A condition is something that resolves to a boolean. It can be a specific
47
- * check type like 'contract-exists', or any ValueResolver that produces a
48
- * boolean result (e.g., `basic-arithmetic` with an 'eq' operation).
49
- */
50
- export type Condition = BooleanValue | ContractExistsCondition | JobCompletedCondition | ValueEmptyValue;
@@ -1,26 +0,0 @@
1
- import { CompilerInfo } from './artifacts'
2
- import { SourceProvenance } from './source'
3
-
4
- export interface Contract {
5
- // The ultimate, unambiguous identifier
6
- uniqueHash: string
7
-
8
- // Core Information - Only creationCode is truly required
9
- creationCode: string
10
- runtimeBytecode?: string
11
- abi?: any[]
12
-
13
- // Source Information
14
- sourceName?: string // e.g., "contracts/MyToken.sol"
15
- contractName?: string
16
- source?: string // The full source code
17
-
18
- // Compilation Information
19
- compiler?: CompilerInfo
20
- buildInfoId?: string // The ID from the build-info file it was found in
21
- sourceProvenance?: SourceProvenance // Repository/ref/build metadata for the preferred build-info source
22
-
23
- // Internal Management - tracks all file paths from which this contract's data was hydrated
24
- _sources: Set<string>
25
- _sourceProvenance?: Map<string, SourceProvenance>
26
- }
@@ -1,77 +0,0 @@
1
- import { Action } from './actions'
2
- import { Condition } from './conditions'
3
- import { Value } from './values'
4
-
5
- // --- Template Definition ---
6
-
7
- export interface TemplateArgument {
8
- type: string; // e.g., 'address', 'bytes32', 'uint256'
9
- description?: string;
10
- }
11
-
12
- export interface Template {
13
- /** Optional discriminator to explicitly mark this document as a template */
14
- type?: 'template';
15
- name: string;
16
- description?: string;
17
- arguments?: Record<string, TemplateArgument>;
18
- returns?: Record<string, TemplateArgument>;
19
- setup?: {
20
- skip_condition?: Condition[];
21
- actions?: Action[];
22
- };
23
- actions: Action[];
24
- skip_condition?: Condition[];
25
- outputs?: Record<string, Value<any>>;
26
- _path?: string; // Path to the template file for relative artifact resolution
27
- }
28
-
29
- // --- Job Definition ---
30
-
31
- export interface JobAction {
32
- name: string; // Unique name for this action within the job
33
- template?: string; // Name of the template to use (for template actions)
34
- type?: string; // Type of primitive action (for primitive actions)
35
- arguments: Record<string, Value<any>>;
36
- skip_condition?: Condition[];
37
- depends_on?: string[];
38
- /**
39
- * Output selection/override for this action when writing job outputs.
40
- * - boolean: legacy flag. true marks the whole action for inclusion, false excludes.
41
- * - object: custom output map. Keys become output keys under this action's name,
42
- * values are Value<any> that will be resolved at job time, overriding template outputs.
43
- */
44
- output?: boolean | Record<string, Value<any>>;
45
- }
46
-
47
- export interface Job {
48
- name: string;
49
- version: string;
50
- description?: string;
51
- depends_on?: string[]; // Names of other jobs this job depends on
52
- actions: JobAction[];
53
- only_networks?: number[]
54
- skip_networks?: number[]
55
- /** Minimum EVM hardfork required to run this job (e.g. "london", "paris", "shanghai", "cancun") */
56
- min_evm_version?: string
57
- skip_condition?: Condition[];
58
- /**
59
- * Pure gate conditions: if ANY condition is true, the job is skipped BEFORE execution.
60
- * Unlike skip_condition, these are NOT post-execution-checked. Use this for jobs that
61
- * generate artifacts (e.g., Safe/multisig transaction payloads) and should skip when
62
- * already in desired state, without requiring convergence within the run.
63
- */
64
- skip_if?: Condition[];
65
- constants?: Record<string, Value<any>>; // Optional job-level constants
66
- deprecated?: boolean; // Optional flag to mark the job as deprecated
67
- _path?: string; // Path to the job file for relative artifact resolution
68
- }
69
-
70
- // --- Constants Definition (top-level documents) ---
71
-
72
- export interface ConstantsDocument {
73
- type: 'constants';
74
- name?: string;
75
- constants: Record<string, Value<any>>;
76
- _path?: string; // Source file path
77
- }
@@ -1,9 +0,0 @@
1
- export * from './network'
2
- export * from './project'
3
- export * from './values'
4
- export * from './conditions'
5
- export * from './actions'
6
- export * from './definitions'
7
- export * from './artifacts'
8
- export * from './buildinfo'
9
- export * from './source'
@@ -1,33 +0,0 @@
1
- /**
2
- * Represents a blockchain network configuration
3
- */
4
- export interface Network {
5
- /** The human-readable name of the network */
6
- name: string
7
-
8
- /** The chain ID of the network */
9
- chainId: number
10
-
11
- /** The RPC URL endpoint for the network */
12
- rpcUrl: string
13
-
14
- /** Supported verification platforms */
15
- supports?: string[]
16
-
17
- /** Optional gas limit to use for all transactions on this network */
18
- gasLimit?: number
19
-
20
- /** Whether this is a test network */
21
- testnet?: boolean
22
-
23
- /**
24
- * The EVM hardfork version supported by this network, e.g. "istanbul", "berlin", "london",
25
- * "paris", "shanghai", "cancun". Used to filter jobs that require a minimum EVM version.
26
- */
27
- evmVersion?: string
28
-
29
- /**
30
- * Integrator-owned metadata bag. Keys are not validated by Catapult.
31
- */
32
- params?: Record<string, unknown>
33
- }
@@ -1,9 +0,0 @@
1
- import { Network } from './network'
2
-
3
- /**
4
- * Represents a deployment project with its associated networks
5
- */
6
- export interface Project {
7
- /** List of networks available for this project */
8
- networks: Network[]
9
- }
@@ -1,26 +0,0 @@
1
- export interface SourceProvenance {
2
- repo: string
3
- ref?: string
4
- commit?: string
5
- build?: string
6
- sourceDocumentPath?: string
7
- buildInfoPath?: string
8
- }
9
-
10
- export interface SourceProvenanceOverride {
11
- repo?: string
12
- ref?: string
13
- commit?: string
14
- build?: string
15
- }
16
-
17
- export interface BuildInfoSourceProvenance extends SourceProvenance {
18
- contracts?: Record<string, SourceProvenanceOverride>
19
- }
20
-
21
- export interface SourceDocument {
22
- type: 'source'
23
- build_info: Record<string, BuildInfoSourceProvenance>
24
- warnings?: string[]
25
- _path?: string
26
- }
@@ -1,9 +0,0 @@
1
- import { Action } from './actions'
2
- import { Condition } from './conditions'
3
-
4
- export interface Task {
5
- name: string
6
- description?: string
7
- action: Action
8
- checks: Condition[]
9
- }