From c802cb9a8de7bc85a4585438ad460f53432555a4 Mon Sep 17 00:00:00 2001 From: Aleksandr Kuperman Date: Tue, 9 Apr 2024 10:17:33 +0100 Subject: [PATCH] chore: linter fix --- .../test/fx_goerli_mumbai_hello_world.js | 2 ++ .../test/fx_mumbai_goerli_token_transfer.js | 33 +++++-------------- .../wormhole/test/deploy_00_mock_timelock.js | 1 - .../deploy_03_womholel2receiverl1sender.js | 1 - .../l1_l2_l1/deploy_04_womholel1receiver.js | 1 - .../l1_l2_l1/deploy_05_womholel1sender.js | 1 - .../proposal_01_goerli_sync_mainnet.js | 2 -- scripts/proposals/proposal_04_CM_guard.js | 2 -- .../proposals/proposal_04_CM_guard_goerli.js | 2 -- scripts/proposals/proposal_05_CM_guard.js | 1 - 10 files changed, 10 insertions(+), 36 deletions(-) diff --git a/scripts/deployment/bridges/polygon/test/fx_goerli_mumbai_hello_world.js b/scripts/deployment/bridges/polygon/test/fx_goerli_mumbai_hello_world.js index 568a47b..d193d90 100644 --- a/scripts/deployment/bridges/polygon/test/fx_goerli_mumbai_hello_world.js +++ b/scripts/deployment/bridges/polygon/test/fx_goerli_mumbai_hello_world.js @@ -34,6 +34,8 @@ async function main() { const fxChildTunnelABI = parsedFile["abi"]; const fxChildTunnel = new ethers.Contract(fxChildTunnelAddress, fxChildTunnelABI, mumbaiProvider); const verifyFxChildAddress = await fxChildTunnel.fxChild(); + + const fxChildAddress = "0xCf73231F28B7331BBe3124B907840A94851f9f11"; if (fxChildAddress == verifyFxChildAddress) { console.log("Successfully connected to the test fxChildTunnel contract"); } diff --git a/scripts/deployment/bridges/polygon/test/fx_mumbai_goerli_token_transfer.js b/scripts/deployment/bridges/polygon/test/fx_mumbai_goerli_token_transfer.js index a63cf42..03af9af 100644 --- a/scripts/deployment/bridges/polygon/test/fx_mumbai_goerli_token_transfer.js +++ b/scripts/deployment/bridges/polygon/test/fx_mumbai_goerli_token_transfer.js @@ -18,38 +18,15 @@ async function main() { }); const fs = require("fs"); - // FxRoot address on goerli - const fxRootAddress = "0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA"; - const fxRootJSON = "artifacts/lib/fx-portal/contracts/FxRoot.sol/FxRoot.json"; - let contractFromJSON = fs.readFileSync(fxRootJSON, "utf8"); - let parsedFile = JSON.parse(contractFromJSON); - const fxRootABI = parsedFile["abi"]; - const fxRoot = new ethers.Contract(fxRootAddress, fxRootABI, goerliProvider); - - // FxChild address on mumbai - const fxChildAddress = "0xCf73231F28B7331BBe3124B907840A94851f9f11"; - const fxChildJSON = "artifacts/lib/fx-portal/contracts/FxChild.sol/FxChild.json"; - contractFromJSON = fs.readFileSync(fxChildJSON, "utf8"); - parsedFile = JSON.parse(contractFromJSON); - const fxChildABI = parsedFile["abi"]; - const fxChild = new ethers.Contract(fxChildAddress, fxChildABI, mumbaiProvider); // ChildMockERC20 address on mumbai const mockChildERC20Address = "0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994"; const mockChildERC20JSON = "artifacts/contracts/bridges/test/ChildMockERC20.sol/ChildMockERC20.json"; - contractFromJSON = fs.readFileSync(mockChildERC20JSON, "utf8"); - parsedFile = JSON.parse(contractFromJSON); + let contractFromJSON = fs.readFileSync(mockChildERC20JSON, "utf8"); + let parsedFile = JSON.parse(contractFromJSON); const mockChildERC20ABI = parsedFile["abi"]; const mockChildERC20 = new ethers.Contract(mockChildERC20Address, mockChildERC20ABI, mumbaiProvider); - // BridgedERC20 address on goerli - const bridgedERC20Address = "0x88e4ad16Bd4953Bbe74589942b368969037a7d81"; - const bridgedERC20JSON = "artifacts/contracts/bridges/BridgedERC20.sol/BridgedERC20.json"; - contractFromJSON = fs.readFileSync(bridgedERC20JSON, "utf8"); - parsedFile = JSON.parse(contractFromJSON); - const bridgedERC20ABI = parsedFile["abi"]; - const bridgedERC20 = new ethers.Contract(bridgedERC20Address, bridgedERC20ABI, goerliProvider); - // Test deployed FxERC20ChildTunnel address on mumbai const fxERC20ChildTunnelAddress = "0x1d333b46dB6e8FFd271b6C2D2B254868BD9A2dbd"; const fxERC20ChildTunnelJSON = "artifacts/contracts/bridges/FxERC20ChildTunnel.sol/FxERC20ChildTunnel.json"; @@ -58,6 +35,9 @@ async function main() { const fxERC20ChildTunnelABI = parsedFile["abi"]; const fxERC20ChildTunnel = new ethers.Contract(fxERC20ChildTunnelAddress, fxERC20ChildTunnelABI, mumbaiProvider); const verifyFxChildAddress = await fxERC20ChildTunnel.fxChild(); + + // FxChild address on mumbai + const fxChildAddress = "0xCf73231F28B7331BBe3124B907840A94851f9f11"; if (fxChildAddress == verifyFxChildAddress) { console.log("Successfully connected to the test fxERC20ChildTunnel contract"); } @@ -70,6 +50,9 @@ async function main() { const fxERC20RootTunnelABI = parsedFile["abi"]; const fxERC20RootTunnel = new ethers.Contract(fxERC20RootTunnelAddress, fxERC20RootTunnelABI, goerliProvider); const verifyFxRootAddress = await fxERC20RootTunnel.fxRoot(); + + // FxRoot address on goerli + const fxRootAddress = "0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA"; if (fxRootAddress == verifyFxRootAddress) { console.log("Successfully connected to the test fxERC20RootTunnel contract"); } diff --git a/scripts/deployment/bridges/wormhole/test/deploy_00_mock_timelock.js b/scripts/deployment/bridges/wormhole/test/deploy_00_mock_timelock.js index 2594c6f..c7fb757 100644 --- a/scripts/deployment/bridges/wormhole/test/deploy_00_mock_timelock.js +++ b/scripts/deployment/bridges/wormhole/test/deploy_00_mock_timelock.js @@ -11,7 +11,6 @@ async function main() { const useLedger = parsedData.useLedger; const derivationPath = parsedData.derivationPath; const providerName = "sepolia"; - const gasPriceInGwei = parsedData.gasPriceInGwei; let EOA; const provider = await ethers.providers.getDefaultProvider(providerName); diff --git a/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_03_womholel2receiverl1sender.js b/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_03_womholel2receiverl1sender.js index 81460f8..c595da1 100644 --- a/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_03_womholel2receiverl1sender.js +++ b/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_03_womholel2receiverl1sender.js @@ -11,7 +11,6 @@ async function main() { const useLedger = parsedData.useLedger; const derivationPath = parsedData.derivationPath; const providerName = parsedData.providerName; - const gasPriceInGwei = parsedData.gasPriceInGwei; let EOA; const provider = new ethers.providers.JsonRpcProvider(parsedData.networkURL); diff --git a/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_04_womholel1receiver.js b/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_04_womholel1receiver.js index 523d560..bc73235 100644 --- a/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_04_womholel1receiver.js +++ b/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_04_womholel1receiver.js @@ -11,7 +11,6 @@ async function main() { const useLedger = parsedData.useLedger; const derivationPath = parsedData.derivationPath; const providerName = "sepolia"; - const gasPriceInGwei = parsedData.gasPriceInGwei; let EOA; const provider = await ethers.providers.getDefaultProvider(providerName); diff --git a/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_05_womholel1sender.js b/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_05_womholel1sender.js index 617f615..7653cc5 100644 --- a/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_05_womholel1sender.js +++ b/scripts/deployment/bridges/wormhole/test/l1_l2_l1/deploy_05_womholel1sender.js @@ -11,7 +11,6 @@ async function main() { const useLedger = parsedData.useLedger; const derivationPath = parsedData.derivationPath; const providerName = parsedData.providerName; - const gasPriceInGwei = parsedData.gasPriceInGwei; let EOA; const provider = new ethers.providers.JsonRpcProvider(parsedData.networkURL); diff --git a/scripts/proposals/proposal_01_goerli_sync_mainnet.js b/scripts/proposals/proposal_01_goerli_sync_mainnet.js index 942c344..d1c0db3 100644 --- a/scripts/proposals/proposal_01_goerli_sync_mainnet.js +++ b/scripts/proposals/proposal_01_goerli_sync_mainnet.js @@ -7,9 +7,7 @@ async function main() { const globalsFile = "globals.json"; const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); let parsedData = JSON.parse(dataFromJSON); - const providerName = parsedData.providerName; - const provider = await ethers.providers.getDefaultProvider(providerName); const signers = await ethers.getSigners(); // EOA address diff --git a/scripts/proposals/proposal_04_CM_guard.js b/scripts/proposals/proposal_04_CM_guard.js index b96bae2..1dc3897 100644 --- a/scripts/proposals/proposal_04_CM_guard.js +++ b/scripts/proposals/proposal_04_CM_guard.js @@ -8,7 +8,6 @@ async function main() { const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); let parsedData = JSON.parse(dataFromJSON); - const timelockAddress = parsedData.timelockAddress; const treasuryAddress = parsedData.treasuryAddress; const depositoryAddress = parsedData.depositoryAddress; const serviceRegistryTokenUtilityAddress = "0x3Fb926116D454b95c669B6Bf2E7c3bad8d19affA"; @@ -20,7 +19,6 @@ async function main() { const homeMediatorAddress = "0x15bd56669F57192a97dF41A2aa8f4403e9491776"; const fxRootAddress = parsedData.fxRootAddress; const fxGovernorTunnelAddress = "0x9338b5153AE39BB89f50468E608eD9d764B755fD"; - const CMAddress = parsedData.CM; diff --git a/scripts/proposals/proposal_04_CM_guard_goerli.js b/scripts/proposals/proposal_04_CM_guard_goerli.js index 1a8d096..8af273e 100644 --- a/scripts/proposals/proposal_04_CM_guard_goerli.js +++ b/scripts/proposals/proposal_04_CM_guard_goerli.js @@ -8,7 +8,6 @@ async function main() { const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); let parsedData = JSON.parse(dataFromJSON); - const timelockAddress = parsedData.timelockAddress; const treasuryAddress = parsedData.treasuryAddress; const depositoryAddress = "0x5FDc466f4A7547c876eF40CD30fFA2A89F1EcDE7"; const serviceRegistryTokenUtilityAddress = "0x6d9b08701Af43D68D991c074A27E4d90Af7f2276"; @@ -21,7 +20,6 @@ async function main() { const homeMediatorAddress = "0x670Ac235EE13C0B2a5065282bBB0c61cfB354592"; const fxRootAddress = "0x3d1d3E34f7fB6D26245E6640E1c50710eFFf15bA"; const fxGovernorTunnelAddress = "0x17806E2a12d5E0F48C9803cd397DB3F044DA3b77"; - const CMAddress = parsedData.CM; diff --git a/scripts/proposals/proposal_05_CM_guard.js b/scripts/proposals/proposal_05_CM_guard.js index a816bee..5e65435 100644 --- a/scripts/proposals/proposal_05_CM_guard.js +++ b/scripts/proposals/proposal_05_CM_guard.js @@ -13,7 +13,6 @@ async function main() { const multisig = await ethers.getContractAt("GnosisSafe", parsedData.CM); const nonce = await multisig.nonce(); - const timelockAddress = parsedData.timelockAddress; const guardCMAddress = parsedData.guardCMAddress; // Construct the payload for the multisig to swap the guard by the Timelock