From ed1f5db8901a5a4f54a23d198991c8a0bb4c9565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Jakub=20Nani=C5=A1ta?= Date: Wed, 20 Nov 2024 11:07:12 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20ESLint=20update=20journey:=20fix?= =?UTF-8?q?ing=20small=20warnings=20[1/N]=20(#1057)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/hardhat/MyNativeOFTAdapter.test.ts | 4 +--- examples/native-oft-adapter/test/hardhat/MyOFT.test.ts | 4 +--- examples/oapp-read/test/hardhat/MyOAppRead.test.ts | 4 +--- examples/oapp/test/hardhat/MyOApp.test.ts | 4 +--- examples/oft-adapter/test/hardhat/MyOFTAdapter.test.ts | 4 +--- examples/oft-solana/test/hardhat/MyOFT.test.ts | 4 +--- .../oft-upgradeable/test/hardhat/MyOFTUpgradeable.test.ts | 4 +--- examples/oft/test/hardhat/MyOFT.test.ts | 4 +--- examples/onft721/test/hardhat/MyONFT721.test.ts | 4 +--- examples/uniswap-read/test/hardhat/UniswapV3QuoteDemo.test.ts | 3 +-- 10 files changed, 10 insertions(+), 29 deletions(-) diff --git a/examples/native-oft-adapter/test/hardhat/MyNativeOFTAdapter.test.ts b/examples/native-oft-adapter/test/hardhat/MyNativeOFTAdapter.test.ts index 3fea89a05..b926a1ebb 100644 --- a/examples/native-oft-adapter/test/hardhat/MyNativeOFTAdapter.test.ts +++ b/examples/native-oft-adapter/test/hardhat/MyNativeOFTAdapter.test.ts @@ -33,9 +33,7 @@ describe('MyNativeOFTAdapter Test', function () { // Fetching the first three signers (accounts) from Hardhat's local Ethereum network const signers = await ethers.getSigners() - ownerA = signers.at(0)! - ownerB = signers.at(1)! - endpointOwner = signers.at(2)! + ;[ownerA, ownerB, endpointOwner] = signers // The EndpointV2Mock contract comes from @layerzerolabs/test-devtools-evm-hardhat package // and its artifacts are connected as external artifacts to this project diff --git a/examples/native-oft-adapter/test/hardhat/MyOFT.test.ts b/examples/native-oft-adapter/test/hardhat/MyOFT.test.ts index cad308a34..257bc5218 100644 --- a/examples/native-oft-adapter/test/hardhat/MyOFT.test.ts +++ b/examples/native-oft-adapter/test/hardhat/MyOFT.test.ts @@ -30,9 +30,7 @@ describe('MyOFT Test', function () { // Fetching the first three signers (accounts) from Hardhat's local Ethereum network const signers = await ethers.getSigners() - ownerA = signers.at(0)! - ownerB = signers.at(1)! - endpointOwner = signers.at(2)! + ;[ownerA, ownerB, endpointOwner] = signers // The EndpointV2Mock contract comes from @layerzerolabs/test-devtools-evm-hardhat package // and its artifacts are connected as external artifacts to this project diff --git a/examples/oapp-read/test/hardhat/MyOAppRead.test.ts b/examples/oapp-read/test/hardhat/MyOAppRead.test.ts index c56b5d22b..362c3d635 100644 --- a/examples/oapp-read/test/hardhat/MyOAppRead.test.ts +++ b/examples/oapp-read/test/hardhat/MyOAppRead.test.ts @@ -30,9 +30,7 @@ describe('MyOApp Test', function () { // Fetching the first three signers (accounts) from Hardhat's local Ethereum network const signers = await ethers.getSigners() - ownerA = signers.at(0)! - ownerB = signers.at(1)! - endpointOwner = signers.at(2)! + ;[ownerA, ownerB, endpointOwner] = signers // The EndpointV2Mock contract comes from @layerzerolabs/test-devtools-evm-hardhat package // and its artifacts are connected as external artifacts to this project diff --git a/examples/oapp/test/hardhat/MyOApp.test.ts b/examples/oapp/test/hardhat/MyOApp.test.ts index d1a2ef940..7d24f80cc 100644 --- a/examples/oapp/test/hardhat/MyOApp.test.ts +++ b/examples/oapp/test/hardhat/MyOApp.test.ts @@ -28,9 +28,7 @@ describe('MyOApp Test', function () { // Fetching the first three signers (accounts) from Hardhat's local Ethereum network const signers = await ethers.getSigners() - ownerA = signers.at(0)! - ownerB = signers.at(1)! - endpointOwner = signers.at(2)! + ;[ownerA, ownerB, endpointOwner] = signers // The EndpointV2Mock contract comes from @layerzerolabs/test-devtools-evm-hardhat package // and its artifacts are connected as external artifacts to this project diff --git a/examples/oft-adapter/test/hardhat/MyOFTAdapter.test.ts b/examples/oft-adapter/test/hardhat/MyOFTAdapter.test.ts index 09073aa51..77068aea7 100644 --- a/examples/oft-adapter/test/hardhat/MyOFTAdapter.test.ts +++ b/examples/oft-adapter/test/hardhat/MyOFTAdapter.test.ts @@ -37,9 +37,7 @@ describe('MyOFTAdapter Test', function () { // Fetching the first three signers (accounts) from Hardhat's local Ethereum network const signers = await ethers.getSigners() - ownerA = signers.at(0)! - ownerB = signers.at(1)! - endpointOwner = signers.at(2)! + ;[ownerA, ownerB, endpointOwner] = signers // The EndpointV2Mock contract comes from @layerzerolabs/test-devtools-evm-hardhat package // and its artifacts are connected as external artifacts to this project diff --git a/examples/oft-solana/test/hardhat/MyOFT.test.ts b/examples/oft-solana/test/hardhat/MyOFT.test.ts index cad308a34..257bc5218 100644 --- a/examples/oft-solana/test/hardhat/MyOFT.test.ts +++ b/examples/oft-solana/test/hardhat/MyOFT.test.ts @@ -30,9 +30,7 @@ describe('MyOFT Test', function () { // Fetching the first three signers (accounts) from Hardhat's local Ethereum network const signers = await ethers.getSigners() - ownerA = signers.at(0)! - ownerB = signers.at(1)! - endpointOwner = signers.at(2)! + ;[ownerA, ownerB, endpointOwner] = signers // The EndpointV2Mock contract comes from @layerzerolabs/test-devtools-evm-hardhat package // and its artifacts are connected as external artifacts to this project diff --git a/examples/oft-upgradeable/test/hardhat/MyOFTUpgradeable.test.ts b/examples/oft-upgradeable/test/hardhat/MyOFTUpgradeable.test.ts index 30fb25713..ce11c5f45 100644 --- a/examples/oft-upgradeable/test/hardhat/MyOFTUpgradeable.test.ts +++ b/examples/oft-upgradeable/test/hardhat/MyOFTUpgradeable.test.ts @@ -24,9 +24,7 @@ describe('MyOFTUpgradeable Test', () => { // Fetching the first three signers (accounts) from Hardhat's local Ethereum network const signers = await ethers.getSigners() - ownerA = signers.at(0)! - ownerB = signers.at(1)! - endpointOwner = signers.at(2)! + ;[ownerA, ownerB, endpointOwner] = signers // The EndpointV2Mock contract comes from @layerzerolabs/test-devtools-evm-hardhat package // and its artifacts are connected as external artifacts to this project diff --git a/examples/oft/test/hardhat/MyOFT.test.ts b/examples/oft/test/hardhat/MyOFT.test.ts index cad308a34..257bc5218 100644 --- a/examples/oft/test/hardhat/MyOFT.test.ts +++ b/examples/oft/test/hardhat/MyOFT.test.ts @@ -30,9 +30,7 @@ describe('MyOFT Test', function () { // Fetching the first three signers (accounts) from Hardhat's local Ethereum network const signers = await ethers.getSigners() - ownerA = signers.at(0)! - ownerB = signers.at(1)! - endpointOwner = signers.at(2)! + ;[ownerA, ownerB, endpointOwner] = signers // The EndpointV2Mock contract comes from @layerzerolabs/test-devtools-evm-hardhat package // and its artifacts are connected as external artifacts to this project diff --git a/examples/onft721/test/hardhat/MyONFT721.test.ts b/examples/onft721/test/hardhat/MyONFT721.test.ts index eba0bb1a0..19fa05e2d 100644 --- a/examples/onft721/test/hardhat/MyONFT721.test.ts +++ b/examples/onft721/test/hardhat/MyONFT721.test.ts @@ -30,9 +30,7 @@ describe('MyONFT721 Test', function () { // Fetching the first three signers (accounts) from Hardhat's local Ethereum network const signers = await ethers.getSigners() - ownerA = signers.at(0)! - ownerB = signers.at(1)! - endpointOwner = signers.at(2)! + ;[ownerA, ownerB, endpointOwner] = signers // The EndpointV2Mock contract comes from @layerzerolabs/test-devtools-evm-hardhat package // and its artifacts are connected as external artifacts to this project diff --git a/examples/uniswap-read/test/hardhat/UniswapV3QuoteDemo.test.ts b/examples/uniswap-read/test/hardhat/UniswapV3QuoteDemo.test.ts index 65723b5bd..6646bcda1 100644 --- a/examples/uniswap-read/test/hardhat/UniswapV3QuoteDemo.test.ts +++ b/examples/uniswap-read/test/hardhat/UniswapV3QuoteDemo.test.ts @@ -24,8 +24,7 @@ describe('UniswapV3QuoteDemo Test', function () { // Fetching the first three signers (accounts) from Hardhat's local Ethereum network const signers = await ethers.getSigners() - ownerA = signers.at(0)! - endpointOwner = signers.at(1)! + ;[ownerA, endpointOwner] = signers // The EndpointV2Mock contract comes from @layerzerolabs/test-devtools-evm-hardhat package // and its artifacts are connected as external artifacts to this project