@0xsequence/catapult 1.3.1 → 1.3.3
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/README.md +32 -11
- package/dist/lib/__tests__/deployer.spec.js +1 -1
- package/dist/lib/__tests__/deployer.spec.js.map +1 -1
- package/dist/lib/core/__tests__/engine.spec.js +26 -2
- package/dist/lib/core/__tests__/engine.spec.js.map +1 -1
- package/dist/lib/core/__tests__/json-integration.spec.js +1 -1
- package/dist/lib/core/__tests__/json-integration.spec.js.map +1 -1
- package/dist/lib/core/__tests__/multi-platform-verification.spec.js +1 -1
- package/dist/lib/core/__tests__/multi-platform-verification.spec.js.map +1 -1
- package/dist/lib/core/__tests__/static-action.spec.js +1 -1
- package/dist/lib/core/__tests__/static-action.spec.js.map +1 -1
- package/dist/lib/core/engine.d.ts +9 -1
- package/dist/lib/core/engine.d.ts.map +1 -1
- package/dist/lib/core/engine.js +106 -14
- package/dist/lib/core/engine.js.map +1 -1
- package/dist/lib/deployer.d.ts.map +1 -1
- package/dist/lib/deployer.js +5 -1
- package/dist/lib/deployer.js.map +1 -1
- package/dist/lib/events/__tests__/event-system.spec.js +30 -0
- package/dist/lib/events/__tests__/event-system.spec.js.map +1 -1
- package/dist/lib/events/cli-adapter.d.ts.map +1 -1
- package/dist/lib/events/cli-adapter.js +5 -1
- package/dist/lib/events/cli-adapter.js.map +1 -1
- package/dist/lib/events/types.d.ts +1 -1
- package/dist/lib/events/types.d.ts.map +1 -1
- package/dist/lib/std/templates/assured-deployment.yaml +4 -3
- package/dist/lib/std/templates/era-evm-predeploy.yaml +35 -0
- package/dist/lib/std/templates/erc-2470.yaml +3 -0
- package/dist/lib/std/templates/min-balance.yaml +3 -0
- package/dist/lib/std/templates/nano-universal-deployer.yaml +2 -0
- package/dist/lib/std/templates/raw-erc-2470.yaml +3 -0
- package/dist/lib/std/templates/raw-nano-universal-deployer.yaml +3 -0
- package/dist/lib/std/templates/raw-sequence-universal-deployer-2.yaml +4 -0
- package/dist/lib/std/templates/sequence-universal-deployer-2.yaml +4 -0
- package/package.json +1 -1
- package/src/lib/__tests__/deployer.spec.ts +1 -3
- package/src/lib/core/__tests__/engine.spec.ts +33 -2
- package/src/lib/core/__tests__/json-integration.spec.ts +1 -1
- package/src/lib/core/__tests__/multi-platform-verification.spec.ts +1 -1
- package/src/lib/core/__tests__/static-action.spec.ts +1 -1
- package/src/lib/core/engine.ts +122 -15
- package/src/lib/deployer.ts +5 -1
- package/src/lib/events/__tests__/event-system.spec.ts +51 -2
- package/src/lib/events/cli-adapter.ts +8 -4
- package/src/lib/events/types.ts +1 -1
- package/src/lib/std/templates/assured-deployment.yaml +4 -3
- package/src/lib/std/templates/era-evm-predeploy.yaml +35 -0
- package/src/lib/std/templates/erc-2470.yaml +3 -0
- package/src/lib/std/templates/min-balance.yaml +3 -0
- package/src/lib/std/templates/nano-universal-deployer.yaml +2 -0
- package/src/lib/std/templates/raw-erc-2470.yaml +3 -0
- package/src/lib/std/templates/raw-nano-universal-deployer.yaml +3 -0
- package/src/lib/std/templates/raw-sequence-universal-deployer-2.yaml +4 -0
- package/src/lib/std/templates/sequence-universal-deployer-2.yaml +4 -0
package/src/lib/core/engine.ts
CHANGED
|
@@ -8,6 +8,13 @@ import { createDefaultVerificationRegistry, VerificationPlatformRegistry } from
|
|
|
8
8
|
import { BuildInfo } from '../types/buildinfo'
|
|
9
9
|
import { ethers } from 'ethers'
|
|
10
10
|
|
|
11
|
+
export type EngineOptions = {
|
|
12
|
+
eventEmitter?: DeploymentEventEmitter
|
|
13
|
+
verificationRegistry?: VerificationPlatformRegistry
|
|
14
|
+
noPostCheckConditions?: boolean
|
|
15
|
+
allowMultipleNicksMethodTests?: boolean
|
|
16
|
+
}
|
|
17
|
+
|
|
11
18
|
/**
|
|
12
19
|
* The ExecutionEngine is the core component that runs jobs and their actions.
|
|
13
20
|
* It interprets the declarative YAML files, resolves values, interacts with the
|
|
@@ -19,13 +26,16 @@ export class ExecutionEngine {
|
|
|
19
26
|
private readonly events: DeploymentEventEmitter
|
|
20
27
|
private readonly verificationRegistry: VerificationPlatformRegistry
|
|
21
28
|
private readonly noPostCheckConditions: boolean
|
|
29
|
+
private readonly allowMultipleNicksMethodTests: boolean
|
|
30
|
+
private nicksMethodTested: boolean = false
|
|
22
31
|
|
|
23
|
-
constructor(templates: Map<string, Template>,
|
|
32
|
+
constructor(templates: Map<string, Template>, options?: EngineOptions) {
|
|
24
33
|
this.resolver = new ValueResolver()
|
|
25
34
|
this.templates = templates
|
|
26
|
-
this.events = eventEmitter || deploymentEvents
|
|
27
|
-
this.verificationRegistry = verificationRegistry || createDefaultVerificationRegistry()
|
|
28
|
-
this.noPostCheckConditions = noPostCheckConditions ?? false
|
|
35
|
+
this.events = options?.eventEmitter || deploymentEvents
|
|
36
|
+
this.verificationRegistry = options?.verificationRegistry || createDefaultVerificationRegistry()
|
|
37
|
+
this.noPostCheckConditions = options?.noPostCheckConditions ?? false
|
|
38
|
+
this.allowMultipleNicksMethodTests = options?.allowMultipleNicksMethodTests ?? false
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
/**
|
|
@@ -781,6 +791,18 @@ export class ExecutionEngine {
|
|
|
781
791
|
break
|
|
782
792
|
}
|
|
783
793
|
case 'test-nicks-method': {
|
|
794
|
+
if (this.nicksMethodTested && !this.allowMultipleNicksMethodTests) {
|
|
795
|
+
try {
|
|
796
|
+
if (context.getOutput(`${action.name}.success`) === true) {
|
|
797
|
+
// Return previous result
|
|
798
|
+
break
|
|
799
|
+
}
|
|
800
|
+
} catch (e) {
|
|
801
|
+
throw new Error(`Nick's method test already performed this run`)
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
this.nicksMethodTested = true
|
|
805
|
+
|
|
784
806
|
// Default bytecode if none provided
|
|
785
807
|
const defaultBytecode = '0x608060405234801561001057600080fd5b5061013d806100206000396000f3fe60806040526004361061001e5760003560e01c80639c4ae2d014610023575b600080fd5b6100cb6004803603604081101561003957600080fd5b81019060208101813564010000000081111561005457600080fd5b82018360208201111561006657600080fd5b8035906020019184600183028401116401000000008311171561008857600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506100cd915050565b005b60008183516020850134f56040805173ffffffffffffffffffffffffffffffffffffffff83168152905191925081900360200190a050505056fea264697066735822122033609f614f03931b92d88c309d698449bb77efcd517328d341fa4f923c5d8c7964736f6c63430007060033'
|
|
786
808
|
|
|
@@ -1104,9 +1126,76 @@ export class ExecutionEngine {
|
|
|
1104
1126
|
|
|
1105
1127
|
// Generate a valid ECDSA signature using Nick's method approach
|
|
1106
1128
|
const result = await this.generateNicksMethodTransaction(bytecode, defaultGasPrice, defaultGasLimit)
|
|
1107
|
-
const
|
|
1129
|
+
const {signedTx, unsignedTx} = result
|
|
1108
1130
|
eoaAddress = result.eoaAddress
|
|
1109
1131
|
wallet = result.wallet
|
|
1132
|
+
|
|
1133
|
+
// Simulate the contract creation transaction
|
|
1134
|
+
try {
|
|
1135
|
+
const simulationTx = {
|
|
1136
|
+
...unsignedTx,
|
|
1137
|
+
from: eoaAddress,
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1140
|
+
if (unsignedTx.gasPrice) {
|
|
1141
|
+
// Check gas price
|
|
1142
|
+
const gasPrice = await context.provider.getFeeData().then(data => data.gasPrice)
|
|
1143
|
+
if (!gasPrice) {
|
|
1144
|
+
this.events.emitEvent({
|
|
1145
|
+
type: "debug_info",
|
|
1146
|
+
level: "debug",
|
|
1147
|
+
data: {
|
|
1148
|
+
message: `Legacy gas price not available.`,
|
|
1149
|
+
},
|
|
1150
|
+
});
|
|
1151
|
+
} else if (BigInt(unsignedTx.gasPrice.toString()) < gasPrice) {
|
|
1152
|
+
this.events.emitEvent({
|
|
1153
|
+
type: "debug_info",
|
|
1154
|
+
level: "warn",
|
|
1155
|
+
data: {
|
|
1156
|
+
message: `Gas price (${unsignedTx.gasPrice}) is lower than the current gas price (${gasPrice}). This may cause the transaction to not be mined.`,
|
|
1157
|
+
},
|
|
1158
|
+
});
|
|
1159
|
+
}
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
if (simulationTx.gasLimit) {
|
|
1163
|
+
// Simulate the transaction expected gas usage
|
|
1164
|
+
const estimatedGas = await context.provider.estimateGas(simulationTx);
|
|
1165
|
+
const estimatedGasStr = estimatedGas.toString();
|
|
1166
|
+
const simulationTxGasLimitStr = simulationTx.gasLimit.toString();
|
|
1167
|
+
if (estimatedGas > BigInt(simulationTxGasLimitStr)) {
|
|
1168
|
+
this.events.emitEvent({
|
|
1169
|
+
type: "debug_info",
|
|
1170
|
+
level: "warn",
|
|
1171
|
+
data: {
|
|
1172
|
+
message: `Estimated gas (${estimatedGasStr}) is greater than gas provided in the transaction (${simulationTxGasLimitStr}). This may cause the transaction to revert.`,
|
|
1173
|
+
},
|
|
1174
|
+
});
|
|
1175
|
+
} else {
|
|
1176
|
+
this.events.emitEvent({
|
|
1177
|
+
type: "debug_info",
|
|
1178
|
+
level: "debug",
|
|
1179
|
+
data: {
|
|
1180
|
+
message: `Estimated gas: ${estimatedGasStr}, Gas provided: ${simulationTxGasLimitStr}`,
|
|
1181
|
+
},
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
} catch (simulationError) {
|
|
1186
|
+
this.events.emitEvent({
|
|
1187
|
+
type: "debug_info",
|
|
1188
|
+
level: "warn",
|
|
1189
|
+
data: {
|
|
1190
|
+
message: `Simulation failed: ${
|
|
1191
|
+
simulationError instanceof Error
|
|
1192
|
+
? simulationError.message
|
|
1193
|
+
: String(simulationError)
|
|
1194
|
+
}`,
|
|
1195
|
+
},
|
|
1196
|
+
});
|
|
1197
|
+
// Continue with the test even if simulation fails
|
|
1198
|
+
}
|
|
1110
1199
|
|
|
1111
1200
|
this.events.emitEvent({
|
|
1112
1201
|
type: 'debug_info',
|
|
@@ -1199,11 +1288,11 @@ export class ExecutionEngine {
|
|
|
1199
1288
|
type: 'debug_info',
|
|
1200
1289
|
level: 'debug',
|
|
1201
1290
|
data: {
|
|
1202
|
-
message: `[NICK'S METHOD DEBUG] Broadcasting Nick's method transaction. RawTx: ${
|
|
1291
|
+
message: `[NICK'S METHOD DEBUG] Broadcasting Nick's method transaction. RawTx: ${signedTx.substring(0, 100)}...`
|
|
1203
1292
|
}
|
|
1204
1293
|
})
|
|
1205
1294
|
|
|
1206
|
-
const deployTx = await context.provider.broadcastTransaction(
|
|
1295
|
+
const deployTx = await context.provider.broadcastTransaction(signedTx)
|
|
1207
1296
|
|
|
1208
1297
|
this.events.emitEvent({
|
|
1209
1298
|
type: 'debug_info',
|
|
@@ -1300,7 +1389,7 @@ export class ExecutionEngine {
|
|
|
1300
1389
|
bytecode: string,
|
|
1301
1390
|
gasPrice: ethers.BigNumberish,
|
|
1302
1391
|
gasLimit: ethers.BigNumberish
|
|
1303
|
-
): Promise<{
|
|
1392
|
+
): Promise<{ unsignedTx: ethers.TransactionRequest; signedTx: string; eoaAddress: string; wallet: ethers.HDNodeWallet }> {
|
|
1304
1393
|
// Generate a random private key for the test
|
|
1305
1394
|
const wallet = ethers.Wallet.createRandom()
|
|
1306
1395
|
|
|
@@ -1324,9 +1413,10 @@ export class ExecutionEngine {
|
|
|
1324
1413
|
const eoaAddress = parsedTx.from!
|
|
1325
1414
|
|
|
1326
1415
|
return {
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1416
|
+
unsignedTx,
|
|
1417
|
+
signedTx,
|
|
1418
|
+
eoaAddress,
|
|
1419
|
+
wallet,
|
|
1330
1420
|
}
|
|
1331
1421
|
}
|
|
1332
1422
|
|
|
@@ -1350,9 +1440,26 @@ export class ExecutionEngine {
|
|
|
1350
1440
|
const connectedWallet = wallet.connect(context.provider)
|
|
1351
1441
|
|
|
1352
1442
|
// Estimate gas for a simple transfer
|
|
1353
|
-
const
|
|
1443
|
+
const feeData = await context.provider.getFeeData()
|
|
1444
|
+
const txGas = feeData.maxFeePerGas ? {
|
|
1445
|
+
maxFeePerGas: feeData.maxFeePerGas,
|
|
1446
|
+
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas || ethers.parseUnits('20', 'gwei')
|
|
1447
|
+
} : {
|
|
1448
|
+
gasPrice: feeData.gasPrice || undefined,
|
|
1449
|
+
}
|
|
1450
|
+
const effectiveGasPrice = txGas.maxFeePerGas || txGas.gasPrice
|
|
1451
|
+
if (!effectiveGasPrice) {
|
|
1452
|
+
this.events.emitEvent({
|
|
1453
|
+
type: 'action_failed',
|
|
1454
|
+
level: 'error',
|
|
1455
|
+
data: {
|
|
1456
|
+
message: `No gas price available`
|
|
1457
|
+
}
|
|
1458
|
+
})
|
|
1459
|
+
return
|
|
1460
|
+
}
|
|
1354
1461
|
const gasLimit = 21000n // Standard gas limit for ETH transfer
|
|
1355
|
-
const gasCost =
|
|
1462
|
+
const gasCost = effectiveGasPrice * gasLimit
|
|
1356
1463
|
|
|
1357
1464
|
// Check if we have enough balance to cover gas costs
|
|
1358
1465
|
if (remainingBalance <= gasCost) {
|
|
@@ -1384,8 +1491,8 @@ export class ExecutionEngine {
|
|
|
1384
1491
|
const returnTx = await connectedWallet.sendTransaction({
|
|
1385
1492
|
to: await (await context.getResolvedSigner()).getAddress(),
|
|
1386
1493
|
value: amountToSend,
|
|
1387
|
-
|
|
1388
|
-
|
|
1494
|
+
gasLimit: gasLimit,
|
|
1495
|
+
...txGas,
|
|
1389
1496
|
})
|
|
1390
1497
|
|
|
1391
1498
|
await returnTx.wait()
|
package/src/lib/deployer.ts
CHANGED
|
@@ -154,7 +154,11 @@ export class Deployer {
|
|
|
154
154
|
|
|
155
155
|
// 4. Execute the plan.
|
|
156
156
|
const verificationRegistry = createDefaultVerificationRegistry(this.options.etherscanApiKey)
|
|
157
|
-
const engine = new ExecutionEngine(this.loader.templates,
|
|
157
|
+
const engine = new ExecutionEngine(this.loader.templates, {
|
|
158
|
+
eventEmitter: this.events,
|
|
159
|
+
verificationRegistry,
|
|
160
|
+
noPostCheckConditions: this.noPostCheckConditions
|
|
161
|
+
})
|
|
158
162
|
|
|
159
163
|
// Track if any jobs have failed
|
|
160
164
|
let hasFailures = false
|
|
@@ -11,7 +11,7 @@ describe('Event System', () => {
|
|
|
11
11
|
beforeEach(() => {
|
|
12
12
|
eventEmitter = new DeploymentEventEmitter()
|
|
13
13
|
cliAdapter = new CLIEventAdapter(eventEmitter, 3)
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
// Mock console methods
|
|
16
16
|
consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(() => {})
|
|
17
17
|
consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(() => {})
|
|
@@ -339,5 +339,54 @@ describe('Event System', () => {
|
|
|
339
339
|
|
|
340
340
|
expect(handler).not.toHaveBeenCalled()
|
|
341
341
|
})
|
|
342
|
+
|
|
343
|
+
it('should respect debug_info event level for verbosity filtering', () => {
|
|
344
|
+
// Test with verbosity 0 (default) - should NOT show any debug_info events
|
|
345
|
+
cliAdapter.setVerbosity(0)
|
|
346
|
+
|
|
347
|
+
eventEmitter.emitEvent({
|
|
348
|
+
type: 'debug_info',
|
|
349
|
+
level: 'warn',
|
|
350
|
+
data: {
|
|
351
|
+
message: 'This warning should NOT be shown at verbosity 0'
|
|
352
|
+
}
|
|
353
|
+
})
|
|
354
|
+
|
|
355
|
+
expect(consoleLogSpy).not.toHaveBeenCalled()
|
|
356
|
+
|
|
357
|
+
// Clear previous calls
|
|
358
|
+
consoleLogSpy.mockClear()
|
|
359
|
+
|
|
360
|
+
// Test with verbosity 3 - should show warn level with correct formatting
|
|
361
|
+
cliAdapter.setVerbosity(3)
|
|
362
|
+
|
|
363
|
+
eventEmitter.emitEvent({
|
|
364
|
+
type: 'debug_info',
|
|
365
|
+
level: 'warn',
|
|
366
|
+
data: {
|
|
367
|
+
message: 'This warning should be shown at verbosity 3'
|
|
368
|
+
}
|
|
369
|
+
})
|
|
370
|
+
|
|
371
|
+
expect(consoleLogSpy).toHaveBeenCalledWith(
|
|
372
|
+
expect.stringContaining('[WARN] This warning should be shown at verbosity 3')
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
// Clear previous calls
|
|
376
|
+
consoleLogSpy.mockClear()
|
|
377
|
+
|
|
378
|
+
// Test with verbosity 3 - should show debug level with correct formatting
|
|
379
|
+
eventEmitter.emitEvent({
|
|
380
|
+
type: 'debug_info',
|
|
381
|
+
level: 'debug',
|
|
382
|
+
data: {
|
|
383
|
+
message: 'This debug message should be shown at verbosity 3'
|
|
384
|
+
}
|
|
385
|
+
})
|
|
386
|
+
|
|
387
|
+
expect(consoleLogSpy).toHaveBeenCalledWith(
|
|
388
|
+
expect.stringContaining('[DEBUG] This debug message should be shown at verbosity 3')
|
|
389
|
+
)
|
|
390
|
+
})
|
|
342
391
|
})
|
|
343
|
-
})
|
|
392
|
+
})
|
|
@@ -5,7 +5,7 @@ import { DeploymentEventEmitter } from './emitter'
|
|
|
5
5
|
/**
|
|
6
6
|
* Verbosity levels for filtering console output:
|
|
7
7
|
* 0 (default): Critical info only - errors, warnings, main deployment steps
|
|
8
|
-
* 1 (-v): Add transaction details and verification steps
|
|
8
|
+
* 1 (-v): Add transaction details and verification steps
|
|
9
9
|
* 2 (-vv): Add action details and file operations
|
|
10
10
|
* 3 (-vvv): Full debug - show everything including template transitions
|
|
11
11
|
*/
|
|
@@ -81,7 +81,7 @@ export class CLIEventAdapter {
|
|
|
81
81
|
if (level1Events.has(eventType)) return 1
|
|
82
82
|
if (level2Events.has(eventType)) return 2
|
|
83
83
|
if (level3Events.has(eventType)) return 3
|
|
84
|
-
|
|
84
|
+
|
|
85
85
|
// Default to level 3 for any new events we haven't categorized
|
|
86
86
|
return 3
|
|
87
87
|
}
|
|
@@ -314,7 +314,11 @@ export class CLIEventAdapter {
|
|
|
314
314
|
break
|
|
315
315
|
|
|
316
316
|
case 'debug_info':
|
|
317
|
-
|
|
317
|
+
const levelPrefix = event.level.toUpperCase()
|
|
318
|
+
const levelColor = event.level === 'warn' ? chalk.yellow :
|
|
319
|
+
event.level === 'info' ? chalk.blue :
|
|
320
|
+
chalk.gray
|
|
321
|
+
console.log(levelColor(` [${levelPrefix}] ${event.data.message}`))
|
|
318
322
|
break
|
|
319
323
|
|
|
320
324
|
default:
|
|
@@ -338,4 +342,4 @@ export class CLIEventAdapter {
|
|
|
338
342
|
public destroy(): void {
|
|
339
343
|
this.emitter.removeAllListeners()
|
|
340
344
|
}
|
|
341
|
-
}
|
|
345
|
+
}
|
package/src/lib/events/types.ts
CHANGED
|
@@ -13,17 +13,18 @@
|
|
|
13
13
|
# code before the call data, hence the wrapping pattern.
|
|
14
14
|
name: "assured-deployment"
|
|
15
15
|
type: "template"
|
|
16
|
+
description: "Wraps a factory call with a CREATE that runs a minimal assurance program"
|
|
16
17
|
|
|
17
18
|
arguments:
|
|
18
|
-
# The address that is expected to exist after the factory call (e.g., CREATE2 result)
|
|
19
19
|
targetAddress:
|
|
20
20
|
type: "address"
|
|
21
|
-
|
|
21
|
+
description: "The address that is expected to exist after the factory call (e.g., CREATE2 result)"
|
|
22
22
|
factoryAddress:
|
|
23
23
|
type: "address"
|
|
24
|
-
|
|
24
|
+
description: "The factory that will perform the deployment"
|
|
25
25
|
callData:
|
|
26
26
|
type: "bytes"
|
|
27
|
+
description: "The encoded call to the factory (e.g., abi-encoded deploy(...))"
|
|
27
28
|
|
|
28
29
|
actions:
|
|
29
30
|
- type: "create-contract"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Calls the EVM predeploy manager to deploy preapproved contracts to ZK Era chains.
|
|
2
|
+
# The ZKSync Era predeploy manager is 0x0000000000000000000000000000000000008014.
|
|
3
|
+
# https://github.com/matter-labs/era-contracts/blob/540762151e3b030cac8ea274284b249f549e2c2a/system-contracts/contracts/EvmPredeploysManager.sol
|
|
4
|
+
name: "era-evm-predeploy"
|
|
5
|
+
type: "template"
|
|
6
|
+
description: "Deploy an approved predeployed contract to the EVM"
|
|
7
|
+
|
|
8
|
+
arguments:
|
|
9
|
+
evmPredeployManager:
|
|
10
|
+
type: "address"
|
|
11
|
+
description: "The address of the EVM predeploy manager"
|
|
12
|
+
address:
|
|
13
|
+
type: "address"
|
|
14
|
+
description: "The address of the predeployed contract to deploy"
|
|
15
|
+
bytecode:
|
|
16
|
+
type: "bytes"
|
|
17
|
+
description: "The deployment bytecode of the predeployed contract to deploy"
|
|
18
|
+
|
|
19
|
+
skip_condition:
|
|
20
|
+
- type: "contract-exists"
|
|
21
|
+
arguments:
|
|
22
|
+
address: "{{address}}"
|
|
23
|
+
|
|
24
|
+
actions:
|
|
25
|
+
- name: "deploy"
|
|
26
|
+
type: "send-transaction"
|
|
27
|
+
arguments:
|
|
28
|
+
to: "{{evmPredeployManager}}"
|
|
29
|
+
data:
|
|
30
|
+
type: "abi-encode"
|
|
31
|
+
arguments:
|
|
32
|
+
signature: "deployPredeployedContract(address,bytes)"
|
|
33
|
+
values:
|
|
34
|
+
- "{{address}}"
|
|
35
|
+
- "{{bytecode}}"
|
|
@@ -7,12 +7,15 @@ type: "template"
|
|
|
7
7
|
arguments:
|
|
8
8
|
creationCode:
|
|
9
9
|
type: "bytes"
|
|
10
|
+
description: "The creation code of the contract to deploy"
|
|
10
11
|
salt:
|
|
11
12
|
type: "bytes32"
|
|
13
|
+
description: "The salt for deployment"
|
|
12
14
|
|
|
13
15
|
returns:
|
|
14
16
|
address:
|
|
15
17
|
type: "address"
|
|
18
|
+
description: "The address of the deployed contract"
|
|
16
19
|
|
|
17
20
|
setup:
|
|
18
21
|
skip_condition:
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
name: "min-balance"
|
|
2
2
|
type: "template"
|
|
3
|
+
description: "Ensures a minimum balance for any given address"
|
|
3
4
|
|
|
4
5
|
arguments:
|
|
5
6
|
address:
|
|
6
7
|
type: "address"
|
|
8
|
+
description: "The address to check the balance of"
|
|
7
9
|
balance:
|
|
8
10
|
type: "uint256"
|
|
11
|
+
description: "The minimum balance required"
|
|
9
12
|
|
|
10
13
|
actions:
|
|
11
14
|
- type: "send-transaction"
|
|
@@ -7,10 +7,12 @@ type: "template"
|
|
|
7
7
|
arguments:
|
|
8
8
|
creationCode:
|
|
9
9
|
type: "bytes"
|
|
10
|
+
description: "The creation code of the contract to deploy"
|
|
10
11
|
|
|
11
12
|
returns:
|
|
12
13
|
address:
|
|
13
14
|
type: "address"
|
|
15
|
+
description: "The address of the deployed contract"
|
|
14
16
|
|
|
15
17
|
setup:
|
|
16
18
|
skip_condition:
|
|
@@ -4,12 +4,15 @@ type: "template"
|
|
|
4
4
|
arguments:
|
|
5
5
|
creationCode:
|
|
6
6
|
type: "bytes"
|
|
7
|
+
description: "The creation code of the contract to deploy"
|
|
7
8
|
salt:
|
|
8
9
|
type: "bytes32"
|
|
10
|
+
description: "The salt for deployment"
|
|
9
11
|
|
|
10
12
|
returns:
|
|
11
13
|
address:
|
|
12
14
|
type: "address"
|
|
15
|
+
description: "The address of the deployed contract"
|
|
13
16
|
|
|
14
17
|
setup:
|
|
15
18
|
skip_condition:
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
name: "raw-nano-universal-deployer"
|
|
2
2
|
type: "template"
|
|
3
|
+
description: "Deploy a contract using the Nano Universal Deployer"
|
|
3
4
|
|
|
4
5
|
arguments:
|
|
5
6
|
creationCode:
|
|
6
7
|
type: "bytes"
|
|
8
|
+
description: "The creation code of the contract to deploy"
|
|
7
9
|
|
|
8
10
|
returns:
|
|
9
11
|
address:
|
|
10
12
|
type: "address"
|
|
13
|
+
description: "The address of the deployed contract"
|
|
11
14
|
|
|
12
15
|
setup:
|
|
13
16
|
skip_condition:
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
name: "raw-sequence-universal-deployer-2"
|
|
2
2
|
type: "template"
|
|
3
|
+
description: "Deploy a contract using the Sequence Universal Deployer v2"
|
|
3
4
|
|
|
4
5
|
arguments:
|
|
5
6
|
creationCode:
|
|
6
7
|
type: "bytes"
|
|
8
|
+
description: "The creation code of the contract to deploy"
|
|
7
9
|
salt:
|
|
8
10
|
type: "bytes32"
|
|
11
|
+
description: "The salt for deployment"
|
|
9
12
|
|
|
10
13
|
returns:
|
|
11
14
|
address:
|
|
12
15
|
type: "address"
|
|
16
|
+
description: "The address of the deployed contract"
|
|
13
17
|
|
|
14
18
|
setup:
|
|
15
19
|
- type: "nano-universal-deployer"
|
|
@@ -3,16 +3,20 @@
|
|
|
3
3
|
# fails to deploy. This ensures that the gas estimation is accurate and the transaction won't silently fail with out of gas.
|
|
4
4
|
name: "sequence-universal-deployer-2"
|
|
5
5
|
type: "template"
|
|
6
|
+
description: "Deploy a contract using the Sequence Universal Deployer v2"
|
|
6
7
|
|
|
7
8
|
arguments:
|
|
8
9
|
creationCode:
|
|
9
10
|
type: "bytes"
|
|
11
|
+
description: "The creation code of the contract to deploy"
|
|
10
12
|
salt:
|
|
11
13
|
type: "bytes32"
|
|
14
|
+
description: "The salt for deployment"
|
|
12
15
|
|
|
13
16
|
returns:
|
|
14
17
|
address:
|
|
15
18
|
type: "address"
|
|
19
|
+
description: "The address of the deployed contract"
|
|
16
20
|
|
|
17
21
|
setup:
|
|
18
22
|
- type: "nano-universal-deployer"
|