|
1 |
| -const { artifacts, ethers, run, network } = require('hardhat'); |
| 1 | +const { artifacts, ethers, run } = require('hardhat'); |
2 | 2 | const { keccak256 } = require('ethereum-cryptography/keccak');
|
3 | 3 | const { bytesToHex, hexToBytes } = require('ethereum-cryptography/utils');
|
4 | 4 | const linker = require('solc/linker');
|
5 | 5 |
|
6 | 6 | const { SIGNER_TYPE, getSigner } = require('./get-signer');
|
7 |
| -const { parseEther } = require('ethers/lib/utils'); |
8 | 7 |
|
9 | 8 | const ADDRESS_REGEX = /^0x[a-f0-9]{40}$/i;
|
10 | 9 |
|
11 |
| -/** |
12 |
| - * Supports both mainnet and tenderly networks |
13 |
| - */ |
14 | 10 | const usage = () => {
|
15 | 11 | console.log(`
|
16 | 12 | Usage:
|
@@ -192,19 +188,6 @@ async function main() {
|
192 | 188 |
|
193 | 189 | const signer = await getSigner(opts.kms ? SIGNER_TYPE.AWS_KMS : SIGNER_TYPE.LOCAL);
|
194 | 190 |
|
195 |
| - if (network.name === 'tenderly') { |
196 |
| - const { TENDERLY_SNAPSHOT_ID } = process.env; |
197 |
| - if (TENDERLY_SNAPSHOT_ID) { |
198 |
| - await ethers.provider.send('evm_revert', [TENDERLY_SNAPSHOT_ID]); |
199 |
| - console.info(`Reverted to snapshot ${TENDERLY_SNAPSHOT_ID}`); |
200 |
| - } else { |
201 |
| - const snapshotId = await ethers.provider.send('evm_snapshot', []); |
202 |
| - console.info(`Snapshot ID: ${snapshotId}`); |
203 |
| - process.env.TENDERLY_SNAPSHOT_ID = snapshotId; |
204 |
| - } |
205 |
| - await ethers.provider.send('tenderly_setBalance', [signer.address, ethers.utils.hexValue(parseEther('100'))]); |
206 |
| - } |
207 |
| - |
208 | 191 | // make sure the contracts are compiled and we're not deploying an outdated artifact
|
209 | 192 | await run('compile');
|
210 | 193 |
|
|
0 commit comments