@0xsequence/catapult 1.3.11 → 1.3.13

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 (35) hide show
  1. package/dist/index.js +0 -0
  2. package/dist/lib/core/__tests__/engine.spec.js +20 -0
  3. package/dist/lib/core/__tests__/engine.spec.js.map +1 -1
  4. package/dist/lib/core/__tests__/json-integration.spec.js +36 -0
  5. package/dist/lib/core/__tests__/json-integration.spec.js.map +1 -1
  6. package/dist/lib/core/resolver.d.ts +1 -0
  7. package/dist/lib/core/resolver.d.ts.map +1 -1
  8. package/dist/lib/core/resolver.js +24 -5
  9. package/dist/lib/core/resolver.js.map +1 -1
  10. package/dist/lib/parsers/template.d.ts.map +1 -1
  11. package/dist/lib/parsers/template.js +3 -0
  12. package/dist/lib/parsers/template.js.map +1 -1
  13. package/dist/lib/types/__tests__/read-json-value.spec.js +12 -0
  14. package/dist/lib/types/__tests__/read-json-value.spec.js.map +1 -1
  15. package/dist/lib/types/conditions.d.ts +2 -2
  16. package/dist/lib/types/conditions.d.ts.map +1 -1
  17. package/dist/lib/types/values.d.ts +8 -2
  18. package/dist/lib/types/values.d.ts.map +1 -1
  19. package/package.json +2 -2
  20. package/src/lib/core/__tests__/engine.spec.ts +24 -1
  21. package/src/lib/core/__tests__/json-integration.spec.ts +40 -0
  22. package/src/lib/core/resolver.ts +32 -5
  23. package/src/lib/parsers/template.ts +5 -1
  24. package/src/lib/types/__tests__/read-json-value.spec.ts +15 -1
  25. package/src/lib/types/conditions.ts +2 -2
  26. package/src/lib/types/values.ts +9 -1
  27. package/dist/lib/network-match.d.ts +0 -3
  28. package/dist/lib/network-match.d.ts.map +0 -1
  29. package/dist/lib/network-match.js +0 -62
  30. package/dist/lib/network-match.js.map +0 -1
  31. package/dist/lib/std/templates/create4.yaml +0 -172
  32. package/dist/lib/utils/create4.d.ts +0 -78
  33. package/dist/lib/utils/create4.d.ts.map +0 -1
  34. package/dist/lib/utils/create4.js +0 -237
  35. package/dist/lib/utils/create4.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { AddressValue, BooleanValue } from './values';
1
+ import { AddressValue, BooleanValue, ValueEmptyValue } from './values';
2
2
  export interface ContractExistsCondition {
3
3
  type: 'contract-exists';
4
4
  arguments: {
@@ -13,5 +13,5 @@ export interface JobCompletedCondition {
13
13
  };
14
14
  }
15
15
  export declare function isJobCompletedCondition(obj: any): obj is JobCompletedCondition;
16
- export type Condition = BooleanValue | ContractExistsCondition | JobCompletedCondition;
16
+ export type Condition = BooleanValue | ContractExistsCondition | JobCompletedCondition | ValueEmptyValue;
17
17
  //# sourceMappingURL=conditions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../../src/lib/types/conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAKrD,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE;QACP,OAAO,EAAE,YAAY,CAAC;KACzB,CAAC;CACL;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,uBAAuB,CASlF;AAKD,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;CACL;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,qBAAqB,CAS9E;AAOD,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,uBAAuB,GAAG,qBAAqB,CAAC"}
1
+ {"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../../../src/lib/types/conditions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAKtE,MAAM,WAAW,uBAAuB;IACpC,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE;QACP,OAAO,EAAE,YAAY,CAAC;KACzB,CAAC;CACL;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,uBAAuB,CASlF;AAKD,MAAM,WAAW,qBAAqB;IAClC,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE;QACP,GAAG,EAAE,MAAM,CAAC;KACf,CAAC;CACL;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,qBAAqB,CAS9E;AAOD,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,uBAAuB,GAAG,qBAAqB,GAAG,eAAe,CAAC"}
@@ -73,13 +73,19 @@ export interface ReadJsonValue {
73
73
  type: 'read-json';
74
74
  arguments: {
75
75
  json: Value<any>;
76
- path: Value<string>;
76
+ path: Value<string | number>;
77
77
  };
78
78
  }
79
79
  export interface ResolveJsonValue {
80
80
  type: 'resolve-json';
81
81
  arguments: Value<any>;
82
82
  }
83
+ export interface ValueEmptyValue {
84
+ type: 'value-empty';
85
+ arguments: {
86
+ value: Value<any>;
87
+ };
88
+ }
83
89
  export interface SliceBytesValue {
84
90
  type: 'slice-bytes';
85
91
  arguments: {
@@ -89,7 +95,7 @@ export interface SliceBytesValue {
89
95
  range?: Value<string>;
90
96
  };
91
97
  }
92
- export type ValueResolver = AbiEncodeValue | AbiPackValue | ConstructorEncodeValue | ComputeCreateValue | ComputeCreate2Value | ReadBalanceValue | BasicArithmeticValue | CallValue | ContractExistsValue | JobCompletedValue | ReadJsonValue | ResolveJsonValue | SliceBytesValue;
98
+ export type ValueResolver = AbiEncodeValue | AbiPackValue | ConstructorEncodeValue | ComputeCreateValue | ComputeCreate2Value | ReadBalanceValue | BasicArithmeticValue | CallValue | ContractExistsValue | JobCompletedValue | ReadJsonValue | ResolveJsonValue | ValueEmptyValue | SliceBytesValue;
93
99
  export type Value<T = string | number | boolean> = T | Reference | ValueResolver;
94
100
  export type BytesValue = Value<string>;
95
101
  export type AddressValue = Value<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"values.d.ts","sourceRoot":"","sources":["../../../src/lib/types/values.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAK/B,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE;QACT,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACzB,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,EAAE;QACT,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACvB,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,SAAS,EAAE;QACT,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC7B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;QACvB,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE;QACT,eAAe,EAAE,YAAY,CAAC;QAC9B,KAAK,EAAE,YAAY,CAAC;KACrB,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,iBAAiB,CAAC;IACxB,SAAS,EAAE;QACT,eAAe,EAAE,YAAY,CAAC;QAC9B,IAAI,EAAE,UAAU,CAAC;QACjB,QAAQ,EAAE,UAAU,CAAC;KACtB,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,cAAc,CAAC;IACrB,SAAS,EA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eAAe,CAAC;AAOpB,MAAM,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,IAAI,CAAC,GAAG,SAAS,GAAG,aAAa,CAAC;AAGjF,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AACvC,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AACzC,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;AAClD,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/catapult",
3
- "version": "1.3.11",
3
+ "version": "1.3.13",
4
4
  "description": "Ethereum contract deployment CLI tool",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -65,4 +65,4 @@
65
65
  "engines": {
66
66
  "node": ">=16.0.0"
67
67
  }
68
- }
68
+ }
@@ -1207,6 +1207,29 @@ describe('ExecutionEngine', () => {
1207
1207
  const result = await (engine as any).evaluateSkipConditions(conditions, context, new Map())
1208
1208
  expect(result).toBe(false)
1209
1209
  })
1210
+
1211
+ it('should return true when a value-empty condition resolves to true', async () => {
1212
+ context.setOutput('payloadMap', { 10: '0xdeadbeef' })
1213
+ const scope = new Map<string, any>([['missingChainId', 999]])
1214
+
1215
+ const conditions = [
1216
+ {
1217
+ type: 'value-empty',
1218
+ arguments: {
1219
+ value: {
1220
+ type: 'read-json',
1221
+ arguments: {
1222
+ json: '{{payloadMap}}',
1223
+ path: '{{missingChainId}}'
1224
+ }
1225
+ }
1226
+ }
1227
+ }
1228
+ ]
1229
+
1230
+ const result = await (engine as any).evaluateSkipConditions(conditions, context, scope)
1231
+ expect(result).toBe(true)
1232
+ })
1210
1233
  })
1211
1234
 
1212
1235
  describe('topologicalSortActions', () => {
@@ -1863,4 +1886,4 @@ describe('ExecutionEngine', () => {
1863
1886
  )
1864
1887
  })
1865
1888
  })
1866
- })
1889
+ })
@@ -211,6 +211,46 @@ describe('JSON Integration Tests', () => {
211
211
  const result = await resolver.resolve(value, context)
212
212
  expect(result).toBe('0xabcdef')
213
213
  })
214
+
215
+ it('should allow numeric network chain IDs to index top-level maps', async () => {
216
+ const value: ReadJsonValue = {
217
+ type: 'read-json',
218
+ arguments: {
219
+ json: {
220
+ 999: {
221
+ executeCalldata: '0xfeedface'
222
+ }
223
+ },
224
+ path: '{{Network().chainId}}'
225
+ }
226
+ }
227
+
228
+ const result = await resolver.resolve(value, context)
229
+ expect(result).toEqual({ executeCalldata: '0xfeedface' })
230
+ })
231
+
232
+ it('should let value-empty detect missing top-level map entries', async () => {
233
+ const value = {
234
+ type: 'value-empty',
235
+ arguments: {
236
+ value: {
237
+ type: 'read-json',
238
+ arguments: {
239
+ json: {
240
+ 999: {
241
+ executeCalldata: '0xfeedface'
242
+ }
243
+ },
244
+ path: '{{missingChainId}}'
245
+ }
246
+ }
247
+ }
248
+ } as const
249
+
250
+ const scope = new Map<string, any>([['missingChainId', 10]])
251
+ const result = await resolver.resolve(value, context, scope)
252
+ expect(result).toBe(true)
253
+ })
214
254
  })
215
255
 
216
256
  describe('JsonRequestAction integration', () => {
@@ -13,6 +13,7 @@ import {
13
13
  ContractExistsValue,
14
14
  JobCompletedValue,
15
15
  ReadJsonValue,
16
+ ValueEmptyValue,
16
17
  SliceBytesValue,
17
18
  } from '../types'
18
19
  import { ExecutionContext } from './context'
@@ -190,6 +191,8 @@ export class ValueResolver {
190
191
  return this.resolveReadJson(resolvedArgs as ReadJsonValue['arguments'])
191
192
  case 'resolve-json':
192
193
  return this.resolveJsonValue(resolvedArgs, context)
194
+ case 'value-empty':
195
+ return this.resolveValueEmpty(resolvedArgs as ValueEmptyValue['arguments'])
193
196
  case 'slice-bytes':
194
197
  return this.resolveSliceBytes(resolvedArgs as SliceBytesValue['arguments'])
195
198
  default:
@@ -482,18 +485,20 @@ export class ValueResolver {
482
485
  throw new Error('read-json: json argument is required')
483
486
  }
484
487
 
485
- if (typeof path !== 'string') {
486
- throw new Error('read-json: path must be a string')
488
+ if (typeof path !== 'string' && typeof path !== 'number') {
489
+ throw new Error('read-json: path must be a string or number')
487
490
  }
491
+
492
+ const normalizedPath = String(path)
488
493
 
489
494
  // If path is empty, return the entire JSON object
490
- if (path === '') {
495
+ if (normalizedPath === '') {
491
496
  return json
492
497
  }
493
498
 
494
499
  try {
495
500
  // Split the path by dots to handle nested access
496
- const pathParts = path.split('.')
501
+ const pathParts = normalizedPath.split('.')
497
502
  let current = json
498
503
 
499
504
  for (const part of pathParts) {
@@ -514,7 +519,7 @@ export class ValueResolver {
514
519
 
515
520
  return current
516
521
  } catch (error) {
517
- throw new Error(`read-json: Failed to access path "${path}": ${error instanceof Error ? error.message : String(error)}`)
522
+ throw new Error(`read-json: Failed to access path "${normalizedPath}": ${error instanceof Error ? error.message : String(error)}`)
518
523
  }
519
524
  }
520
525
 
@@ -533,6 +538,28 @@ export class ValueResolver {
533
538
  }
534
539
  }
535
540
 
541
+ private resolveValueEmpty(args: ValueEmptyValue['arguments']): boolean {
542
+ const { value } = args
543
+
544
+ if (value === undefined || value === null) {
545
+ return true
546
+ }
547
+
548
+ if (typeof value === 'string') {
549
+ return value === '' || value === '0x'
550
+ }
551
+
552
+ if (Array.isArray(value)) {
553
+ return value.length === 0
554
+ }
555
+
556
+ if (typeof value === 'object') {
557
+ return Object.keys(value).length === 0
558
+ }
559
+
560
+ return false
561
+ }
562
+
536
563
  private resolveSliceBytes(args: SliceBytesValue['arguments']): string {
537
564
  const { value, start, end, range } = args
538
565
 
@@ -18,6 +18,10 @@ function isCondition(item: any): item is Condition {
18
18
  return true
19
19
  }
20
20
 
21
+ if (item.type === 'value-empty') {
22
+ return !!(item.arguments && typeof item.arguments === 'object' && 'value' in item.arguments)
23
+ }
24
+
21
25
  // The 'basic-arithmetic' ValueResolver can also act as a Condition
22
26
  // if it performs a boolean comparison operation.
23
27
  if (item.type === 'basic-arithmetic') {
@@ -128,4 +132,4 @@ export function parseTemplate(yamlContent: string): Template {
128
132
  }
129
133
 
130
134
  return template
131
- }
135
+ }
@@ -94,6 +94,20 @@ describe('ReadJsonValue', () => {
94
94
  expect(value.arguments.path).toBe('{{fieldPath}}')
95
95
  })
96
96
 
97
+ it('should support numeric keys in path', () => {
98
+ const value: ReadJsonValue = {
99
+ type: 'read-json',
100
+ arguments: {
101
+ json: {
102
+ 137: { calldata: '0xdeadbeef' }
103
+ },
104
+ path: 137
105
+ }
106
+ }
107
+
108
+ expect(value.arguments.path).toBe(137)
109
+ })
110
+
97
111
  it('should support both json and path as template variables', () => {
98
112
  const value: ReadJsonValue = {
99
113
  type: 'read-json',
@@ -261,4 +275,4 @@ describe('ReadJsonValue', () => {
261
275
  expect(value.arguments.path).toBe('data.transactions.0.hash')
262
276
  })
263
277
  })
264
- })
278
+ })
@@ -1,4 +1,4 @@
1
- import { AddressValue, BooleanValue } from './values'
1
+ import { AddressValue, BooleanValue, ValueEmptyValue } from './values'
2
2
 
3
3
  /**
4
4
  * A condition that checks if a contract has code at a given address.
@@ -47,4 +47,4 @@ export function isJobCompletedCondition(obj: any): obj is JobCompletedCondition
47
47
  * check type like 'contract-exists', or any ValueResolver that produces a
48
48
  * boolean result (e.g., `basic-arithmetic` with an 'eq' operation).
49
49
  */
50
- export type Condition = BooleanValue | ContractExistsCondition | JobCompletedCondition;
50
+ export type Condition = BooleanValue | ContractExistsCondition | JobCompletedCondition | ValueEmptyValue;
@@ -91,7 +91,7 @@ export interface ReadJsonValue {
91
91
  type: 'read-json';
92
92
  arguments: {
93
93
  json: Value<any>; // The JSON object to read from
94
- path: Value<string>; // The path to the value (e.g., "txs.data" or "user.profile.name")
94
+ path: Value<string | number>; // The path to the value (e.g., "txs.data", 1, or "user.profile.name")
95
95
  };
96
96
  }
97
97
 
@@ -100,6 +100,13 @@ export interface ResolveJsonValue {
100
100
  arguments: Value<any>;
101
101
  }
102
102
 
103
+ export interface ValueEmptyValue {
104
+ type: 'value-empty';
105
+ arguments: {
106
+ value: Value<any>;
107
+ };
108
+ }
109
+
103
110
  export interface SliceBytesValue {
104
111
  type: 'slice-bytes';
105
112
  arguments: {
@@ -126,6 +133,7 @@ export type ValueResolver =
126
133
  | JobCompletedValue
127
134
  | ReadJsonValue
128
135
  | ResolveJsonValue
136
+ | ValueEmptyValue
129
137
  | SliceBytesValue;
130
138
 
131
139
  /**
@@ -1,3 +0,0 @@
1
- import { Network } from './types';
2
- export declare function resolveRequestedNetworks(requests: string[], networks: Network[]): number[];
3
- //# sourceMappingURL=network-match.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"network-match.d.ts","sourceRoot":"","sources":["../../src/lib/network-match.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AA8BjC,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,CAyC1F"}
@@ -1,62 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveRequestedNetworks = resolveRequestedNetworks;
4
- function normalize(input) {
5
- return input
6
- .toLowerCase()
7
- .replace(/[^a-z0-9]+/g, ' ')
8
- .replace(/\s+/g, ' ')
9
- .trim();
10
- }
11
- function scoreNameMatch(candidateName, query) {
12
- const c = normalize(candidateName);
13
- const q = normalize(query);
14
- if (!q || !c)
15
- return 0;
16
- if (c === q)
17
- return 100;
18
- if (c.startsWith(q))
19
- return 90;
20
- if (c.includes(q))
21
- return 75;
22
- const qTokens = q.split(' ');
23
- const allTokensPresent = qTokens.every(t => c.includes(t));
24
- if (allTokensPresent)
25
- return 70;
26
- return 0;
27
- }
28
- function resolveRequestedNetworks(requests, networks) {
29
- const chainIds = [];
30
- for (const req of requests) {
31
- const asNumber = Number(req);
32
- if (!Number.isNaN(asNumber)) {
33
- const found = networks.find(n => n.chainId === asNumber);
34
- if (found) {
35
- chainIds.push(found.chainId);
36
- continue;
37
- }
38
- }
39
- let bestScore = -1;
40
- let bestMatches = [];
41
- for (const n of networks) {
42
- const s = scoreNameMatch(n.name, req);
43
- if (s > bestScore) {
44
- bestScore = s;
45
- bestMatches = [n];
46
- }
47
- else if (s === bestScore && s > 0) {
48
- bestMatches.push(n);
49
- }
50
- }
51
- if (bestScore < 60 || bestMatches.length === 0) {
52
- throw new Error(`No network matched "${req}". Available: ${networks.map(n => `${n.name} (${n.chainId})`).join(', ')}`);
53
- }
54
- if (bestMatches.length > 1) {
55
- const candidates = bestMatches.map(n => `${n.name} (${n.chainId})`).join(', ');
56
- throw new Error(`Ambiguous network "${req}". Possible matches: ${candidates}`);
57
- }
58
- chainIds.push(bestMatches[0].chainId);
59
- }
60
- return chainIds;
61
- }
62
- //# sourceMappingURL=network-match.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"network-match.js","sourceRoot":"","sources":["../../src/lib/network-match.ts"],"names":[],"mappings":";;AA8BA,4DAyCC;AArED,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,KAAK;SACT,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE,CAAA;AACX,CAAC;AAED,SAAS,cAAc,CAAC,aAAqB,EAAE,KAAa;IAC1D,MAAM,CAAC,GAAG,SAAS,CAAC,aAAa,CAAC,CAAA;IAClC,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;IAE1B,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,CAAC,CAAA;IACtB,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,GAAG,CAAA;IACvB,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,CAAA;IAC9B,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,CA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,CAAA;YACrB,CAAC;QACH,CAAC;QAED,IAAI,SAAS,GAAG,EAAE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,iBAAiB,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACxH,CAAC;QACD,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAC9E,MAAM,IAAI,KAAK,CAAC,sBAAsB,GAAG,wBAAwB,UAAU,EAAE,CAAC,CAAA;QAChF,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;IACvC,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC"}
@@ -1,172 +0,0 @@
1
- name: "create4"
2
- type: "template"
3
- description: "Deploy chain-specific bytecodes through the CREATE4 universal deployer"
4
-
5
- arguments:
6
- create4Address:
7
- type: "address"
8
- description: "Address of the deployed CREATE4 contract"
9
- salt:
10
- type: "bytes32"
11
- description: "Plan salt mixed with the plan root (32-byte hex string)"
12
- bytecodes:
13
- type: "json"
14
- description: "Dictionary with per-chain entries and a fallback. Keys should be chain ids plus `fallback`, and may include `sharedConstructor`. Each entry can provide `initCode` directly or `creationCode` + optional `constructor`."
15
-
16
- returns:
17
- address:
18
- type: "address"
19
- description: "Deterministic address of the deployed contract"
20
- planRoot:
21
- type: "bytes32"
22
- description: "Merkle root committed to for this plan"
23
- deploymentSalt:
24
- type: "bytes32"
25
- description: "CREATE3 salt derived from the plan root and user salt"
26
- mode:
27
- type: "string"
28
- description: "Either 'chain' or 'fallback' depending on what was deployed"
29
-
30
- setup:
31
- actions:
32
- - type: "static"
33
- name: "validate-create4-factory"
34
- arguments:
35
- value:
36
- type: "contract-exists"
37
- arguments:
38
- address: "{{create4Address}}"
39
- selectors: ["0x9e0fae72", "0x8a056fe6"]
40
- - type: "static"
41
- name: "create4-plan"
42
- arguments:
43
- value:
44
- type: "create4-plan"
45
- arguments:
46
- deployerAddress: "{{create4Address}}"
47
- chainId: "{{Network().chainId}}"
48
- salt: "{{salt}}"
49
- bytecodes:
50
- type: "resolve-json"
51
- arguments: "{{bytecodes}}"
52
-
53
- skip_condition:
54
- - type: "contract-exists"
55
- arguments:
56
- address:
57
- type: "read-json"
58
- arguments:
59
- json: "{{create4-plan.value}}"
60
- path: "address"
61
-
62
- actions:
63
- - name: "create4-deploy"
64
- template: "assured-deployment"
65
- skip_condition:
66
- - type: "basic-arithmetic"
67
- arguments:
68
- operation: "eq"
69
- values:
70
- - type: "read-json"
71
- arguments:
72
- json: "{{create4-plan.value}}"
73
- path: "target.modeFlag"
74
- - "0"
75
- arguments:
76
- targetAddress:
77
- type: "read-json"
78
- arguments:
79
- json: "{{create4-plan.value}}"
80
- path: "address"
81
- factoryAddress: "{{create4Address}}"
82
- callData:
83
- type: "abi-encode"
84
- arguments:
85
- signature: "deploy(bytes32[],bytes,uint64,bytes32)"
86
- values:
87
- - type: "read-json"
88
- arguments:
89
- json: "{{create4-plan.value}}"
90
- path: "target.proof"
91
- - type: "read-json"
92
- arguments:
93
- json: "{{create4-plan.value}}"
94
- path: "target.initCode"
95
- - type: "read-json"
96
- arguments:
97
- json: "{{create4-plan.value}}"
98
- path: "target.nextChainId"
99
- - "{{salt}}"
100
-
101
- - name: "create4-deploy-fallback"
102
- template: "assured-deployment"
103
- skip_condition:
104
- - type: "basic-arithmetic"
105
- arguments:
106
- operation: "eq"
107
- values:
108
- - type: "read-json"
109
- arguments:
110
- json: "{{create4-plan.value}}"
111
- path: "target.modeFlag"
112
- - "1"
113
- arguments:
114
- targetAddress:
115
- type: "read-json"
116
- arguments:
117
- json: "{{create4-plan.value}}"
118
- path: "address"
119
- factoryAddress: "{{create4Address}}"
120
- callData:
121
- type: "abi-encode"
122
- arguments:
123
- signature: "deployFallback(bytes32,bytes32,bytes32[],bytes32[],bytes,bytes32)"
124
- values:
125
- - type: "read-json"
126
- arguments:
127
- json: "{{create4-plan.value}}"
128
- path: "target.gapLeafPrefix"
129
- - type: "read-json"
130
- arguments:
131
- json: "{{create4-plan.value}}"
132
- path: "target.gapLeafHash"
133
- - type: "read-json"
134
- arguments:
135
- json: "{{create4-plan.value}}"
136
- path: "target.gapProof"
137
- - type: "read-json"
138
- arguments:
139
- json: "{{create4-plan.value}}"
140
- path: "target.proof"
141
- - type: "read-json"
142
- arguments:
143
- json: "{{create4-plan.value}}"
144
- path: "target.initCode"
145
- - "{{salt}}"
146
-
147
- outputs:
148
- address:
149
- type: "read-json"
150
- arguments:
151
- json: "{{create4-plan.value}}"
152
- path: "address"
153
- planRoot:
154
- type: "read-json"
155
- arguments:
156
- json: "{{create4-plan.value}}"
157
- path: "planRoot"
158
- deploymentSalt:
159
- type: "read-json"
160
- arguments:
161
- json: "{{create4-plan.value}}"
162
- path: "deploymentSalt"
163
- plan:
164
- type: "read-json"
165
- arguments:
166
- json: "{{create4-plan.value}}"
167
- path: "plan"
168
- mode:
169
- type: "read-json"
170
- arguments:
171
- json: "{{create4-plan.value}}"
172
- path: "target.mode"
@@ -1,78 +0,0 @@
1
- export interface Create4ConstructorSpec {
2
- types?: readonly string[];
3
- values?: readonly any[];
4
- }
5
- export type Create4BytecodeEntry = string | {
6
- initCode?: string;
7
- creationCode?: string;
8
- constructor?: Create4ConstructorSpec;
9
- label?: string;
10
- chainId?: string | number | bigint;
11
- };
12
- export type Create4BytecodeDictionary = {
13
- fallback: Create4BytecodeEntry;
14
- sharedConstructor?: Create4ConstructorSpec | null;
15
- chains?: Record<string, Create4BytecodeEntry>;
16
- } & Record<string, any>;
17
- export interface ComputeCreate4PlanArgs {
18
- deployerAddress: string;
19
- chainId: string | number | bigint;
20
- salt?: string | null;
21
- bytecodes: Create4BytecodeDictionary;
22
- }
23
- export interface SerializedChainLeaf {
24
- chainId: string;
25
- nextChainId: string;
26
- label?: string;
27
- initCode: string;
28
- initCodeHash: string;
29
- prefix: string;
30
- leafHash: string;
31
- proof: string[];
32
- }
33
- export interface SerializedFallbackLeaf {
34
- chainId: string;
35
- nextChainId: string;
36
- initCode: string;
37
- initCodeHash: string;
38
- prefix: string;
39
- leafHash: string;
40
- proof: string[];
41
- }
42
- export interface Create4ChainTarget {
43
- mode: 'chain';
44
- modeFlag: string;
45
- chainId: string;
46
- nextChainId: string;
47
- initCode: string;
48
- initCodeHash: string;
49
- proof: string[];
50
- }
51
- export interface Create4FallbackTarget {
52
- mode: 'fallback';
53
- modeFlag: string;
54
- gapChainId: string;
55
- gapNextChainId: string;
56
- gapLeafPrefix: string;
57
- gapLeafHash: string;
58
- gapProof: string[];
59
- initCode: string;
60
- initCodeHash: string;
61
- proof: string[];
62
- }
63
- export interface Create4PlanComputationResult {
64
- factoryAddress: string;
65
- chainId: string;
66
- planRoot: string;
67
- salt: string;
68
- deploymentSalt: string;
69
- address: string;
70
- target: Create4ChainTarget | Create4FallbackTarget;
71
- plan: {
72
- root: string;
73
- leaves: SerializedChainLeaf[];
74
- fallback: SerializedFallbackLeaf;
75
- };
76
- }
77
- export declare function computeCreate4Plan(args: ComputeCreate4PlanArgs): Create4PlanComputationResult;
78
- //# sourceMappingURL=create4.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create4.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/create4.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,sBAAsB;IACrC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACzB,MAAM,CAAC,EAAE,SAAS,GAAG,EAAE,CAAA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