Skip to content

Commit b7aceb9

Browse files
committed
Fixes
1 parent d0f13eb commit b7aceb9

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

hardhat/tasks/task-test-integration-dual.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const {
77

88
task('test:integration:dual', 'run integrated layer 1 and layer 2 production tests')
99
.addFlag('deploy', 'Deploy l1 and l2 instances before running the tests')
10+
.addFlag('connect', 'Connect already deployed l1 and l2 instances before running the tests')
1011
.setAction(async (taskArguments, hre) => {
1112
hre.config.paths.tests = './test/integration/dual/';
1213

@@ -27,11 +28,10 @@ task('test:integration:dual', 'run integrated layer 1 and layer 2 production tes
2728

2829
await compileInstance({ useOvm: true });
2930
await deployInstance({ useOvm: true, providerUrl, providerPort: providerPortL2 });
30-
31-
await connectInstances({ providerUrl, providerPortL1, providerPortL2 });
3231
}
3332

3433
if (taskArguments.connect) {
34+
await connectInstances({ providerUrl, providerPortL1, providerPortL2 });
3535
}
3636

3737
await hre.run('test', taskArguments);

hardhat/tasks/task-test-integration-l1.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const { task } = require('hardhat/config');
22
const { compileInstance, deployInstance } = require('../../test/integration/utils/deploy');
33

44
task('test:integration:l1', 'run isolated layer 1 production tests')
5-
.addFlag('deploy', 'Deploy an l1 instance before running tests')
5+
.addFlag('compile', 'Compile an l1 instance before running the tests')
6+
.addFlag('deploy', 'Deploy an l1 instance before running the tests')
67
.setAction(async (taskArguments, hre) => {
78
hre.config.paths.tests = './test/integration/l1/';
89

@@ -16,8 +17,11 @@ task('test:integration:l1', 'run isolated layer 1 production tests')
1617

1718
taskArguments.maxMemory = true;
1819

19-
if (taskArguments.deploy) {
20+
if (taskArguments.compile) {
2021
await compileInstance({ useOvm: false });
22+
}
23+
24+
if (taskArguments.deploy) {
2125
await deployInstance({ useOvm: false, providerUrl, providerPort });
2226
}
2327

hardhat/tasks/task-test-integration-l2.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ const { task } = require('hardhat/config');
22
const { compileInstance, deployInstance } = require('../../test/integration/utils/deploy');
33

44
task('test:integration:l2', 'run isolated layer 2 production tests')
5-
.addFlag('deploy', 'Deploy an l2 instance before running tests')
5+
.addFlag('compile', 'Compile an l2 instance before running the tests')
6+
.addFlag('deploy', 'Deploy an l2 instance before running the tests')
67
.setAction(async (taskArguments, hre) => {
78
hre.config.paths.tests = './test/integration/l2/';
89

@@ -16,9 +17,12 @@ task('test:integration:l2', 'run isolated layer 2 production tests')
1617

1718
taskArguments.maxMemory = true;
1819

20+
if (taskArguments.compile) {
21+
await compileInstance({ useOvm: true });
22+
}
23+
1924
if (taskArguments.deploy) {
20-
await compileInstance({ useOvm: false });
21-
await deployInstance({ useOvm: false, providerUrl, providerPort });
25+
await deployInstance({ useOvm: true, providerUrl, providerPort });
2226
}
2327

2428
await hre.run('test', taskArguments);

test/integration/utils/deploy.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ const commands = {
77
connectBridge: require('../../../publish/src/commands/connect-bridge').connectBridge,
88
};
99

10+
const {
11+
constants: { OVM_MAX_GAS_LIMIT },
12+
} = require('../../../.');
13+
1014
async function compileInstance({ useOvm }) {
1115
await commands.build({
1216
useOvm,
@@ -24,11 +28,11 @@ async function deployInstance({ useOvm, providerUrl, providerPort }) {
2428
freshDeploy: true,
2529
yes: true,
2630
providerUrl: `${providerUrl}:${providerPort}`,
27-
gasPrice: '1',
28-
useOvm: false,
31+
gasPrice: useOvm ? '0' : '1',
32+
useOvm,
2933
privateKey,
3034
methodCallGasLimit: '3500000',
31-
contractDeploymentGasLimit: '9500000',
35+
contractDeploymentGasLimit: useOvm ? OVM_MAX_GAS_LIMIT : '9500000',
3236
ignoreCustomParameters: false,
3337
});
3438
}

0 commit comments

Comments
 (0)