Skip to content

Commit

Permalink
revert: remove viewer deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
shark0der committed Jan 14, 2025
1 parent cea77ac commit 2fa1aed
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions scripts/create2/deploy.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
const { artifacts, ethers, run, network } = require('hardhat');
const { artifacts, ethers, run } = require('hardhat');
const { keccak256 } = require('ethereum-cryptography/keccak');
const { bytesToHex, hexToBytes } = require('ethereum-cryptography/utils');
const linker = require('solc/linker');

const { SIGNER_TYPE, getSigner } = require('./get-signer');
const { parseEther } = require('ethers/lib/utils');

const ADDRESS_REGEX = /^0x[a-f0-9]{40}$/i;

/**
* Supports both mainnet and tenderly networks
*/
const usage = () => {
console.log(`
Usage:
Expand Down Expand Up @@ -192,19 +188,6 @@ async function main() {

const signer = await getSigner(opts.kms ? SIGNER_TYPE.AWS_KMS : SIGNER_TYPE.LOCAL);

if (network.name === 'tenderly') {
const { TENDERLY_SNAPSHOT_ID } = process.env;
if (TENDERLY_SNAPSHOT_ID) {
await ethers.provider.send('evm_revert', [TENDERLY_SNAPSHOT_ID]);
console.info(`Reverted to snapshot ${TENDERLY_SNAPSHOT_ID}`);
} else {
const snapshotId = await ethers.provider.send('evm_snapshot', []);
console.info(`Snapshot ID: ${snapshotId}`);
process.env.TENDERLY_SNAPSHOT_ID = snapshotId;
}
await ethers.provider.send('tenderly_setBalance', [signer.address, ethers.utils.hexValue(parseEther('100'))]);
}

// make sure the contracts are compiled and we're not deploying an outdated artifact
await run('compile');

Expand Down

0 comments on commit 2fa1aed

Please sign in to comment.