|
1 | | -import { ethers, run, getNamedAccounts } from 'hardhat' |
| 1 | +import { ethers, run, getNamedAccounts, deployments } from 'hardhat' |
2 | 2 | import fs from 'fs' |
3 | 3 | import assert from 'assert' |
4 | 4 | import readline from 'readline' |
5 | 5 |
|
6 | 6 | const PARALLEL = 128 |
7 | 7 |
|
8 | 8 | async function sendTestMessages() { |
9 | | - const { deployer } = await getNamedAccounts() |
10 | | - const inbox = await ethers.getContract('InboxStub', deployer) |
11 | | - const seqInbox = await ethers.getContract('SequencerInboxStub', deployer) |
| 9 | + const inbox = await ethers.getContractAt( |
| 10 | + 'InboxStub', |
| 11 | + ( |
| 12 | + await deployments.get('InboxStub') |
| 13 | + ).address |
| 14 | + ) |
| 15 | + const seqInbox = await ethers.getContractAt( |
| 16 | + 'SequencerInboxStub', |
| 17 | + ( |
| 18 | + await deployments.get('SequencerInboxStub') |
| 19 | + ).address |
| 20 | + ) |
12 | 21 | const msgRoot = '../arbitrator/prover/test-cases/rust/data/' |
13 | 22 | const gasOpts = { |
14 | 23 | gasLimit: ethers.utils.hexlify(250000), |
@@ -59,8 +68,18 @@ describe('OneStepProof', function () { |
59 | 68 | for (const [path, file] of proofs) { |
60 | 69 | it('Should pass ' + file + ' proofs', async function () { |
61 | 70 | const proofs = JSON.parse(fs.readFileSync(path).toString('utf8')) |
62 | | - const osp = await ethers.getContract('OneStepProofEntry') |
63 | | - const bridge = await ethers.getContract('BridgeStub') |
| 71 | + const osp = await ethers.getContractAt( |
| 72 | + 'OneStepProofEntry', |
| 73 | + ( |
| 74 | + await deployments.get('OneStepProofEntry') |
| 75 | + ).address |
| 76 | + ) |
| 77 | + const bridge = await ethers.getContractAt( |
| 78 | + 'BridgeStub', |
| 79 | + ( |
| 80 | + await deployments.get('BridgeStub') |
| 81 | + ).address |
| 82 | + ) |
64 | 83 |
|
65 | 84 | const promises = [] |
66 | 85 | const isdone = [] |
|
0 commit comments