diff --git a/packages/contracts/.eslintignore b/packages/contracts/.eslintignore deleted file mode 100644 index 02127cba1..000000000 --- a/packages/contracts/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -build/ -cache/ -coverage/ -node_modules/ -truffle.js -cache/ -dist/ diff --git a/packages/contracts/.eslintrc b/packages/contracts/.eslintrc deleted file mode 100644 index 89b53531b..000000000 --- a/packages/contracts/.eslintrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module" - }, - "extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"], - "rules": { - "prefer-const": "warn", - "no-extra-semi": "off", - "@typescript-eslint/no-extra-semi": "off", - "@typescript-eslint/no-inferrable-types": "warn", - "@typescript-eslint/no-empty-function": "warn", - "no-only-tests/no-only-tests": "error" - }, - "plugins": [ - "no-only-tests" - ] -} diff --git a/packages/contracts/.prettierignore b/packages/contracts/.prettierignore deleted file mode 100644 index 4e76680e5..000000000 --- a/packages/contracts/.prettierignore +++ /dev/null @@ -1,4 +0,0 @@ -build -reports -cache -coverage.json \ No newline at end of file diff --git a/packages/contracts/.prettierrc.json b/packages/contracts/.prettierrc.json deleted file mode 100644 index 0b2b67edd..000000000 --- a/packages/contracts/.prettierrc.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "printWidth": 100, - "useTabs": false, - "bracketSpacing": true, - "plugins": ["prettier-plugin-solidity"], - "overrides": [ - { - "files": "*.js", - "options": { - "semi": false, - "trailingComma": "all", - "tabWidth": 2, - "singleQuote": true, - "explicitTypes": "always" - } - }, - { - "files": "*.ts", - "options": { - "semi": false, - "trailingComma": "all", - "tabWidth": 2, - "singleQuote": true, - "explicitTypes": "always" - } - }, - { - "files": "*.sol", - "options": { - "tabWidth": 4, - "singleQuote": false - } - } - ] -} diff --git a/packages/contracts/eslint.config.js b/packages/contracts/eslint.config.js new file mode 100644 index 000000000..c7c0ba1b2 --- /dev/null +++ b/packages/contracts/eslint.config.js @@ -0,0 +1,17 @@ +const config = require('eslint-graph-config') + +module.exports = [ + ...config.default, + { + rules: { + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + '@typescript-eslint/no-unsafe-argument': 'off', + }, + }, + { + ignores: ['**/reports/*'], + }, +] diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index d91c12eec..b90eb1290 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -31,7 +31,7 @@ function loadTasks() { ;['contract', 'bridge', 'deployment', 'migrate', 'verify', 'e2e'].forEach((folder) => { const tasksPath = path.join(__dirname, 'tasks', folder) fs.readdirSync(tasksPath) - .filter((pth) => pth.includes('.ts')) + .filter(pth => pth.includes('.ts')) .forEach((task) => { require(`${tasksPath}/${task}`) }) @@ -110,11 +110,11 @@ function setupNetworkProviders(hardhatConfig) { // Config -const DEFAULT_TEST_MNEMONIC = - 'myth like bonus scare over problem client lizard pioneer submit female collect' +const DEFAULT_TEST_MNEMONIC + = 'myth like bonus scare over problem client lizard pioneer submit female collect' -const DEFAULT_L2_TEST_MNEMONIC = - 'urge never interest human any economy gentle canvas anxiety pave unlock find' +const DEFAULT_L2_TEST_MNEMONIC + = 'urge never interest human any economy gentle canvas anxiety pave unlock find' const config: HardhatUserConfig = { paths: { @@ -233,8 +233,8 @@ const config: HardhatUserConfig = { disambiguatePaths: false, }, defender: { - apiKey: process.env.DEFENDER_API_KEY!, - apiSecret: process.env.DEFENDER_API_SECRET!, + apiKey: process.env.DEFENDER_API_KEY, + apiSecret: process.env.DEFENDER_API_SECRET, }, } diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 633513a57..48d52d57d 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -42,8 +42,6 @@ "@types/sinon-chai": "^3.2.12", "@types/winston": "^2.4.4", "@types/yargs": "^16.0.0", - "@typescript-eslint/eslint-plugin": "^4.0.0", - "@typescript-eslint/parser": "^4.0.0", "@urql/core": "^2.1.3", "arbos-precompiles": "^1.0.2", "bignumber.js": "^9.0.0", @@ -51,10 +49,8 @@ "chai-as-promised": "^7.1.1", "cli-table": "^0.3.6", "dotenv": "^9.0.0", - "eslint": "^7.24.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-no-only-tests": "^2.4.0", - "eslint-plugin-prettier": "^3.4.0", + "eslint": "^8.57.0", + "eslint-graph-config": "workspace:^0.0.1", "ethereum-waffle": "^3.2.0", "ethers": "^5.7.2", "form-data": "^4.0.0", @@ -72,10 +68,7 @@ "isomorphic-fetch": "^3.0.0", "lint-staged": "^10.5.4", "p-queue": "^6.6.1", - "prettier": "^2.2.1", - "prettier-plugin-solidity": "1.0.0-beta.19", "solhint": "^3.3.6", - "solhint-plugin-prettier": "^0.0.5", "solidity-coverage": "^0.7.16", "ts-node": "^10.9.1", "typechain": "^5.0.0", @@ -98,13 +91,11 @@ "test:coverage": "scripts/coverage", "test:upgrade": "scripts/upgrade", "lint": "yarn lint:ts && yarn lint:sol", - "lint:fix": "yarn lint:ts:fix && yarn lint:sol:fix", - "lint:ts": "eslint '**/*.{js,ts}'", - "lint:ts:fix": "yarn prettier:ts && eslint '**/*.{js,ts}' --fix", + "lint:fix": "yarn lint:ts && yarn lint:sol:fix", + "lint:ts": "eslint '**/*.{js,ts}' --fix", "lint:sol": "solhint 'contracts/**/*.sol'", "lint:sol:fix": "yarn prettier:sol && solhint --fix 'contracts/**/*.sol'", "prettier": "yarn prettier:ts && yarn prettier:sol", - "prettier:ts": "prettier --write '**/*.{js,ts,json}'", "prettier:sol": "prettier --write 'contracts/**/*.sol'", "analyze": "scripts/analyze", "myth": "scripts/myth", @@ -118,13 +109,13 @@ "yarn lint:sol:fix" ], "**/*.ts": [ - "yarn lint:ts:fix" + "yarn lint:ts" ], "**/*.js": [ - "yarn lint:ts:fix" + "yarn lint:ts" ], "**/*.json": [ - "yarn lint:ts:fix" + "yarn lint:ts" ] }, "repository": { diff --git a/packages/contracts/scripts/ops/parseTestnetAddresses.ts b/packages/contracts/scripts/ops/parseTestnetAddresses.ts index 96ad27be4..921859368 100755 --- a/packages/contracts/scripts/ops/parseTestnetAddresses.ts +++ b/packages/contracts/scripts/ops/parseTestnetAddresses.ts @@ -16,18 +16,18 @@ interface TeamMember { export const teamAddresses: Array = [] -async function main() { +function main() { const data = fs.readFileSync('indexers.csv', 'utf8') - const entries = data.split('\n').map((e) => e.trim()) + const entries = data.split('\n').map(e => e.trim()) for (const entry of entries) { if (!entry) continue - const [name, address] = entry.split(',').map((e) => e.trim()) + const [name, address] = entry.split(',').map(e => e.trim()) // Verify address try { getAddress(address.trim()) - } catch (err) { + } catch (_) { console.log('Invalid', name, address) process.exit(1) } diff --git a/packages/contracts/tasks/bridge/deposits.ts b/packages/contracts/tasks/bridge/deposits.ts index 94bc7eb56..b8a7838fc 100644 --- a/packages/contracts/tasks/bridge/deposits.ts +++ b/packages/contracts/tasks/bridge/deposits.ts @@ -4,6 +4,13 @@ import { Table } from 'console-table-printer' import { L1ToL2MessageStatus } from '@arbitrum/sdk' import { getL1ToL2MessageStatus } from '@graphprotocol/sdk' +interface PrintEvent { + blockNumber: string + tx: string + amount: string + status: string +} + greTask('bridge:deposits', 'List deposits initiated on L1GraphTokenGateway') .addOptionalParam('startBlock', 'Start block for the search') .addOptionalParam('endBlock', 'End block for the search') @@ -21,7 +28,7 @@ greTask('bridge:deposits', 'List deposits initiated on L1GraphTokenGateway') const events = await Promise.all( ( await gateway.queryFilter(gateway.filters.DepositInitiated(), startBlock, endBlock) - ).map(async (e) => ({ + ).map(async e => ({ blockNumber: `${e.blockNumber} (${new Date( (await graph.l1.provider.getBlock(e.blockNumber)).timestamp * 1000, ).toLocaleString()})`, @@ -48,7 +55,7 @@ greTask('bridge:deposits', 'List deposits initiated on L1GraphTokenGateway') printEvents(events) }) -function printEvents(events: any[]) { +function printEvents(events: PrintEvent[]) { const tablePrinter = new Table({ charLength: { '🚧': 2, '✅': 2, '⚠️': 1, '⌛': 2, '❌': 2 }, columns: [ @@ -64,7 +71,7 @@ function printEvents(events: any[]) { ], }) - events.map((e) => tablePrinter.addRow(e)) + events.map(e => tablePrinter.addRow(e)) tablePrinter.printTable() } diff --git a/packages/contracts/tasks/bridge/withdrawals.ts b/packages/contracts/tasks/bridge/withdrawals.ts index 3e9a6a9b7..d36511813 100644 --- a/packages/contracts/tasks/bridge/withdrawals.ts +++ b/packages/contracts/tasks/bridge/withdrawals.ts @@ -4,6 +4,13 @@ import { L2ToL1MessageStatus } from '@arbitrum/sdk' import { greTask } from '@graphprotocol/sdk/gre' import { getL2ToL1MessageStatus } from '@graphprotocol/sdk' +interface PrintEvent { + blockNumber: string + tx: string + amount: string + status: string +} + greTask('bridge:withdrawals', 'List withdrawals initiated on L2GraphTokenGateway') .addOptionalParam('startBlock', 'Start block for the search') .addOptionalParam('endBlock', 'End block for the search') @@ -21,7 +28,7 @@ greTask('bridge:withdrawals', 'List withdrawals initiated on L2GraphTokenGateway const events = await Promise.all( ( await gateway.queryFilter(gateway.filters.WithdrawalInitiated(), startBlock, endBlock) - ).map(async (e) => ({ + ).map(async e => ({ blockNumber: `${e.blockNumber} (${new Date( (await graph.l2.provider.getBlock(e.blockNumber)).timestamp * 1000, ).toLocaleString()})`, @@ -48,7 +55,7 @@ greTask('bridge:withdrawals', 'List withdrawals initiated on L2GraphTokenGateway printEvents(events) }) -function printEvents(events: any[]) { +function printEvents(events: PrintEvent[]) { const tablePrinter = new Table({ charLength: { '🚧': 2, '✅': 2, '⚠️': 1, '❌': 2 }, columns: [ @@ -64,7 +71,7 @@ function printEvents(events: any[]) { ], }) - events.map((e) => tablePrinter.addRow(e)) + events.map(e => tablePrinter.addRow(e)) tablePrinter.printTable() } diff --git a/packages/contracts/tasks/contract/deploy.ts b/packages/contracts/tasks/contract/deploy.ts index 70d0901d2..3571444d0 100644 --- a/packages/contracts/tasks/contract/deploy.ts +++ b/packages/contracts/tasks/contract/deploy.ts @@ -1,4 +1,4 @@ -import { DeployType, GraphNetworkAddressBook, confirm, deploy } from '@graphprotocol/sdk' +import { confirm, deploy, DeployType, GraphNetworkAddressBook } from '@graphprotocol/sdk' import { greTask } from '@graphprotocol/sdk/gre' greTask('contract:deploy', 'Deploy a contract') diff --git a/packages/contracts/tasks/contract/upgrade.ts b/packages/contracts/tasks/contract/upgrade.ts index d50b30d6f..6825ba06a 100644 --- a/packages/contracts/tasks/contract/upgrade.ts +++ b/packages/contracts/tasks/contract/upgrade.ts @@ -1,5 +1,5 @@ import { greTask } from '@graphprotocol/sdk/gre' -import { DeployType, GraphNetworkAddressBook, deploy } from '@graphprotocol/sdk' +import { deploy, DeployType, GraphNetworkAddressBook } from '@graphprotocol/sdk' greTask('contract:upgrade', 'Upgrades a contract') .addParam('contract', 'Name of the contract to upgrade') diff --git a/packages/contracts/tasks/deployment/config.ts b/packages/contracts/tasks/deployment/config.ts index 375007c3d..76192b1c3 100644 --- a/packages/contracts/tasks/deployment/config.ts +++ b/packages/contracts/tasks/deployment/config.ts @@ -1,15 +1,15 @@ import { + confirm, GraphNetworkConfigContractList, GraphNetworkConfigGeneralParams, updateContractParams, updateGeneralParams, writeConfig, - confirm, } from '@graphprotocol/sdk' import { greTask } from '@graphprotocol/sdk/gre' greTask('update-config', 'Update graph config parameters with onchain data') - .addFlag('dryRun', "Only print the changes, don't write them to the config file") + .addFlag('dryRun', 'Only print the changes, don\'t write them to the config file') .addFlag('skipConfirmation', 'Skip confirmation prompt on write actions.') .setAction(async (taskArgs, hre) => { const networkName = hre.network.name diff --git a/packages/contracts/tasks/e2e/e2e.ts b/packages/contracts/tasks/e2e/e2e.ts index bb8486976..43f23ad1e 100644 --- a/packages/contracts/tasks/e2e/e2e.ts +++ b/packages/contracts/tasks/e2e/e2e.ts @@ -11,7 +11,7 @@ const INIT_TESTS = 'test/e2e/deployment/init/**/*.test.ts' // Built-in test & run tasks don't support GRE arguments // so we pass them by overriding GRE config object -const setGraphConfig = async (args: TaskArguments, hre: HardhatRuntimeEnvironment) => { +const setGraphConfig = (args: TaskArguments, hre: HardhatRuntimeEnvironment) => { const greArgs = [ 'graphConfig', 'l1GraphConfig', @@ -42,7 +42,7 @@ greTask('e2e', 'Run all e2e tests') ] if (args.skipBridge) { - testFiles = testFiles.filter((file) => !/l1|l2/.test(file)) + testFiles = testFiles.filter(file => !/l1|l2/.test(file)) } // Disable secure accounts, we don't need them for this task @@ -84,7 +84,7 @@ greTask('e2e:init', 'Run deployment initialization e2e tests').setAction( greTask('e2e:scenario', 'Run scenario scripts and e2e tests') .addPositionalParam('scenario', 'Name of the scenario to run') - .addFlag('skipScript', "Don't run scenario script") + .addFlag('skipScript', 'Don\'t run scenario script') .setAction(async (args, hre: HardhatRuntimeEnvironment) => { setGraphConfig(args, hre) @@ -126,7 +126,8 @@ greTask('e2e:upgrade', 'Run upgrade tests') await runUpgrade(args, hre, args.post ? 'post' : 'pre') }) -async function runUpgrade(args: any, hre: HardhatRuntimeEnvironment, type: 'pre' | 'post') { +// eslint-disable-next-line @typescript-eslint/no-explicit-any +async function runUpgrade(args: { [key: string]: any }, hre: HardhatRuntimeEnvironment, type: 'pre' | 'post') { const script = `test/e2e/upgrades/${args.upgrade}/${type}-upgrade.ts` const test = `test/e2e/upgrades/${args.upgrade}/${type}-upgrade.test.ts` diff --git a/packages/contracts/tasks/migrate/nitro.ts b/packages/contracts/tasks/migrate/nitro.ts index e3a382467..a399b5002 100644 --- a/packages/contracts/tasks/migrate/nitro.ts +++ b/packages/contracts/tasks/migrate/nitro.ts @@ -19,7 +19,8 @@ greTask( // This adds the testnodes to the SDK configuration subtask('migrate:nitro:register', 'Adds nitro testnodes to SDK config') .addParam('deploymentFile', 'The testnode deployment file to use', 'localNetwork.json') - .setAction(async (taskArgs) => { + // eslint-disable-next-line @typescript-eslint/require-await + .setAction(async (taskArgs): Promise => { helpers.addLocalNetwork(taskArgs.deploymentFile) }) @@ -29,6 +30,7 @@ subtask('migrate:nitro:deployment-file', 'Fetches nitro deployment file from a l 'Path to the file where to deployment file will be saved', 'localNetwork.json', ) + // eslint-disable-next-line @typescript-eslint/require-await .setAction(async (taskArgs) => { console.log(`Attempting to fetch deployment file from testnode...`) @@ -53,7 +55,7 @@ task('migrate:nitro:address-book', 'Write arbitrum addresses to address book') const deployment = JSON.parse(fs.readFileSync(taskArgs.deploymentFile, 'utf-8')) const addressBook = { - '1337': { + 1337: { L1GatewayRouter: { address: deployment.l2Network.tokenBridge.l1GatewayRouter, }, @@ -61,7 +63,7 @@ task('migrate:nitro:address-book', 'Write arbitrum addresses to address book') address: deployment.l2Network.ethBridge.inbox, }, }, - '412346': { + 412346: { L2GatewayRouter: { address: deployment.l2Network.tokenBridge.l2GatewayRouter, }, diff --git a/packages/contracts/tasks/migrate/protocol.ts b/packages/contracts/tasks/migrate/protocol.ts index 3fe21ef2e..38664a573 100644 --- a/packages/contracts/tasks/migrate/protocol.ts +++ b/packages/contracts/tasks/migrate/protocol.ts @@ -1,4 +1,4 @@ -import { GraphChainId, deployGraphNetwork } from '@graphprotocol/sdk' +import { deployGraphNetwork, GraphChainId } from '@graphprotocol/sdk' import { greTask } from '@graphprotocol/sdk/gre' greTask('migrate', 'Deploy protocol contracts') diff --git a/packages/contracts/tasks/test-upgrade.ts b/packages/contracts/tasks/test-upgrade.ts index 93e45d43c..911d2ac75 100644 --- a/packages/contracts/tasks/test-upgrade.ts +++ b/packages/contracts/tasks/test-upgrade.ts @@ -24,7 +24,7 @@ const UPGRADEABLE_CONTRACTS: UpgradeableContract[] = [ ] task('test:upgrade-setup', 'Deploy contracts using an OZ proxy').setAction( - async (taskArgs, hre) => { + async (_, hre) => { const contractAddresses = {} for (const upgradeableContract of UPGRADEABLE_CONTRACTS) { // Deploy libraries diff --git a/packages/contracts/tasks/verify/defender.ts b/packages/contracts/tasks/verify/defender.ts index 68775afef..24ad83f59 100644 --- a/packages/contracts/tasks/verify/defender.ts +++ b/packages/contracts/tasks/verify/defender.ts @@ -7,7 +7,7 @@ import type { VerificationResponse } from '@openzeppelin/hardhat-defender/dist/v import { GraphNetworkContractName, isGraphNetworkContractName } from '@graphprotocol/sdk' async function main( - args: { referenceUrl?: string; contracts: GraphNetworkContractName[] }, + args: { referenceUrl?: string, contracts: GraphNetworkContractName[] }, hre: HRE, ) { const { referenceUrl, contracts } = args @@ -15,16 +15,16 @@ async function main( const summaryPath = process.env.GITHUB_STEP_SUMMARY if (summaryPath) appendFileSync(summaryPath, `# Contracts deployment verification\n\n`) - const workflowUrl = - referenceUrl || - process.env.WORKFLOW_URL || - execSync(`git config --get remote.origin.url`).toString().trim() + const workflowUrl + = referenceUrl + || process.env.WORKFLOW_URL + || execSync(`git config --get remote.origin.url`).toString().trim() const addressBook = graph().addressBook const errs = [] for (const contractName of contracts) { if (!isGraphNetworkContractName(contractName)) { - throw new Error(`Invalid contract name: ${contractName}`) + throw new Error(`Invalid contract name: ${contractName as string}`) } const entry = addressBook.getEntry(contractName) if (!entry || entry.address === constants.AddressZero) { @@ -49,7 +49,7 @@ async function main( if (response.matchType === 'NO_MATCH') { errs.push([contractName, { message: `No bytecode match.` }]) } - } catch (err: any) { + } catch (err) { if (summaryPath) { appendFileSync( summaryPath, diff --git a/packages/contracts/tasks/verify/sourcify.ts b/packages/contracts/tasks/verify/sourcify.ts index a872884bc..027885006 100644 --- a/packages/contracts/tasks/verify/sourcify.ts +++ b/packages/contracts/tasks/verify/sourcify.ts @@ -1,3 +1,4 @@ +/* eslint-disable no-secrets/no-secrets */ /* eslint-disable @typescript-eslint/no-explicit-any */ import axios from 'axios' import FormData from 'form-data' @@ -43,7 +44,7 @@ export async function submitSourcesToSourcify( return } } catch (e) { - console.error(((e as any).response && JSON.stringify((e as any).response.data)) || e) + console.error(((e).response && JSON.stringify((e).response.data)) || e) } console.log(`verifying ${contract.name} (${contract.address} on chain ${chainId}) ...`) @@ -72,6 +73,6 @@ export async function submitSourcesToSourcify( console.error(` => contract ${contract.name} is not verified`) } } catch (e) { - console.error(((e as any).response && JSON.stringify((e as any).response.data)) || e) + console.error(((e).response && JSON.stringify((e).response.data)) || e) } } diff --git a/packages/contracts/tasks/verify/verify.ts b/packages/contracts/tasks/verify/verify.ts index 23cfad023..451409e12 100644 --- a/packages/contracts/tasks/verify/verify.ts +++ b/packages/contracts/tasks/verify/verify.ts @@ -88,7 +88,7 @@ greTask('verifyAll', 'Verifies all contracts on etherscan').setAction(async (arg const contractConfig = getContractConfig(graphConfig, addressBook, contractName, deployer) const contractPath = getContractPath(contractName) - const constructorParams = contractConfig.params.map((p) => p.value.toString()) + const constructorParams = contractConfig.params.map(p => p.value.toString()) if (contractPath) { const contract = addressBook.getEntry(contractName) @@ -119,7 +119,7 @@ greTask('verifyAll', 'Verifies all contracts on etherscan').setAction(async (arg }) // etherscan API throws errors if the contract is already verified -async function safeVerify(hre: HardhatRuntimeEnvironment, taskArguments: any): Promise { +async function safeVerify(hre: HardhatRuntimeEnvironment, taskArguments: unknown): Promise { try { await hre.run('verify', taskArguments) } catch (error) { @@ -129,7 +129,7 @@ async function safeVerify(hre: HardhatRuntimeEnvironment, taskArguments: any): P function getContractPath(contract: string): string | undefined { const files = readDirRecursive('contracts/') - return files.find((f) => path.basename(f) === `${contract}.sol`) + return files.find(f => path.basename(f) === `${contract}.sol`) } function readDirRecursive(dir: string, allFiles: string[] = []) { diff --git a/packages/contracts/test/e2e/deployment/config/controller.test.ts b/packages/contracts/test/e2e/deployment/config/controller.test.ts index 820864542..fea7eadc2 100644 --- a/packages/contracts/test/e2e/deployment/config/controller.test.ts +++ b/packages/contracts/test/e2e/deployment/config/controller.test.ts @@ -60,7 +60,7 @@ describe('Controller configuration', () => { expect(pauseGuardian).eq(namedAccounts.pauseGuardian.address) }) - describe('proxy contract', async function () { + describe('proxy contract', function () { const proxyContracts = isGraphL1ChainId(graph.chainId) ? l1ProxyContracts : l2ProxyContracts for (const contract of proxyContracts) { it(`${contract} should match deployed`, async function () { diff --git a/packages/contracts/test/e2e/deployment/config/l1/bridgeEscrow.test.ts b/packages/contracts/test/e2e/deployment/config/l1/bridgeEscrow.test.ts index 9d6fd606b..bea48aea6 100644 --- a/packages/contracts/test/e2e/deployment/config/l1/bridgeEscrow.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l1/bridgeEscrow.test.ts @@ -6,7 +6,7 @@ describe('[L1] BridgeEscrow configuration', function () { const graph = hre.graph() const { Controller, BridgeEscrow } = graph.contracts - before(async function () { + before(function () { if (isGraphL2ChainId(graph.chainId)) this.skip() }) diff --git a/packages/contracts/test/e2e/deployment/config/l1/curation.test.ts b/packages/contracts/test/e2e/deployment/config/l1/curation.test.ts index 1b7492506..f0fa363c5 100644 --- a/packages/contracts/test/e2e/deployment/config/l1/curation.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l1/curation.test.ts @@ -9,7 +9,7 @@ describe('[L1] Curation configuration', () => { contracts: { Controller, Curation, BancorFormula, GraphCurationToken }, } = graph - before(async function () { + before(function () { if (isGraphL2ChainId(graph.chainId)) this.skip() }) diff --git a/packages/contracts/test/e2e/deployment/config/l1/l1GNS.test.ts b/packages/contracts/test/e2e/deployment/config/l1/l1GNS.test.ts index 5a8fe8924..e33934d5e 100644 --- a/packages/contracts/test/e2e/deployment/config/l1/l1GNS.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l1/l1GNS.test.ts @@ -1,4 +1,3 @@ -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { expect } from 'chai' import hre from 'hardhat' import { isGraphL2ChainId } from '@graphprotocol/sdk' @@ -7,11 +6,8 @@ describe('[L1] GNS', () => { const graph = hre.graph() const { L1GNS, L1GraphTokenGateway } = graph.contracts - let unauthorized: SignerWithAddress - - before(async function () { + before(function () { if (isGraphL2ChainId(graph.chainId)) this.skip() - unauthorized = (await graph.getTestAccounts())[0] }) describe('L1GNS', () => { diff --git a/packages/contracts/test/e2e/deployment/config/l1/l1GraphTokenGateway.test.ts b/packages/contracts/test/e2e/deployment/config/l1/l1GraphTokenGateway.test.ts index be55d9bfe..e188fc89e 100644 --- a/packages/contracts/test/e2e/deployment/config/l1/l1GraphTokenGateway.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l1/l1GraphTokenGateway.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai' import hre from 'hardhat' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { SimpleAddressBook, isGraphL2ChainId } from '@graphprotocol/sdk' +import { isGraphL2ChainId, SimpleAddressBook } from '@graphprotocol/sdk' describe('[L1] L1GraphTokenGateway configuration', function () { const graph = hre.graph() @@ -38,7 +38,7 @@ describe('[L1] L1GraphTokenGateway configuration', function () { expect(escrow).eq(graph.l1.contracts.BridgeEscrow.address) }) - it("inbox should match Arbitrum's Inbox address", async function () { + it('inbox should match Arbitrum\'s Inbox address', async function () { const inbox = await L1GraphTokenGateway.inbox() const arbitrumAddressBook = process.env.ARBITRUM_ADDRESS_BOOK ?? 'arbitrum-addresses-local.json' const arbAddressBook = new SimpleAddressBook(arbitrumAddressBook, graph.l1.chainId) @@ -47,7 +47,7 @@ describe('[L1] L1GraphTokenGateway configuration', function () { expect(inbox.toLowerCase()).eq(arbIInbox.address.toLowerCase()) }) - it("l1Router should match Arbitrum's router address", async function () { + it('l1Router should match Arbitrum\'s router address', async function () { const l1Router = await L1GraphTokenGateway.l1Router() const arbitrumAddressBook = process.env.ARBITRUM_ADDRESS_BOOK ?? 'arbitrum-addresses-local.json' const arbAddressBook = new SimpleAddressBook(arbitrumAddressBook, graph.l1.chainId) diff --git a/packages/contracts/test/e2e/deployment/config/l1/l1Staking.test.ts b/packages/contracts/test/e2e/deployment/config/l1/l1Staking.test.ts index 25d0b3805..185f2a2fe 100644 --- a/packages/contracts/test/e2e/deployment/config/l1/l1Staking.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l1/l1Staking.test.ts @@ -1,4 +1,3 @@ -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { expect } from 'chai' import hre from 'hardhat' import { isGraphL2ChainId } from '@graphprotocol/sdk' @@ -7,11 +6,8 @@ describe('[L1] Staking', () => { const graph = hre.graph() const { L1Staking, L1GraphTokenGateway } = graph.contracts - let unauthorized: SignerWithAddress - - before(async function () { + before(function () { if (isGraphL2ChainId(graph.chainId)) this.skip() - unauthorized = (await graph.getTestAccounts())[0] }) describe('L1Staking', () => { diff --git a/packages/contracts/test/e2e/deployment/config/l1/rewardsManager.test.ts b/packages/contracts/test/e2e/deployment/config/l1/rewardsManager.test.ts index afc9287d6..0f9807d92 100644 --- a/packages/contracts/test/e2e/deployment/config/l1/rewardsManager.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l1/rewardsManager.test.ts @@ -6,7 +6,7 @@ describe('[L1] RewardsManager configuration', () => { const graph = hre.graph() const { RewardsManager } = graph.contracts - before(async function () { + before(function () { if (isGraphL2ChainId(graph.chainId)) this.skip() }) diff --git a/packages/contracts/test/e2e/deployment/config/l2/l2Curation.test.ts b/packages/contracts/test/e2e/deployment/config/l2/l2Curation.test.ts index 3722b6b14..b38f679a6 100644 --- a/packages/contracts/test/e2e/deployment/config/l2/l2Curation.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l2/l2Curation.test.ts @@ -9,7 +9,7 @@ describe('[L2] L2Curation configuration', () => { contracts: { Controller, L2Curation, GraphCurationToken }, } = graph - before(async function () { + before(function () { if (isGraphL1ChainId(graph.chainId)) this.skip() }) diff --git a/packages/contracts/test/e2e/deployment/config/l2/l2GNS.test.ts b/packages/contracts/test/e2e/deployment/config/l2/l2GNS.test.ts index 133d77077..2ebd7cf5e 100644 --- a/packages/contracts/test/e2e/deployment/config/l2/l2GNS.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l2/l2GNS.test.ts @@ -1,4 +1,3 @@ -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { expect } from 'chai' import hre from 'hardhat' import { isGraphL1ChainId } from '@graphprotocol/sdk' @@ -7,11 +6,8 @@ describe('[L2] GNS', () => { const graph = hre.graph() const { L2GNS } = graph.l2.contracts - let unauthorized: SignerWithAddress - - before(async function () { + before(function () { if (isGraphL1ChainId(graph.chainId)) this.skip() - unauthorized = (await graph.getTestAccounts())[0] }) describe('L2GNS', () => { diff --git a/packages/contracts/test/e2e/deployment/config/l2/l2GraphTokenGateway.test.ts b/packages/contracts/test/e2e/deployment/config/l2/l2GraphTokenGateway.test.ts index 45033cb28..cae73cbd9 100644 --- a/packages/contracts/test/e2e/deployment/config/l2/l2GraphTokenGateway.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l2/l2GraphTokenGateway.test.ts @@ -1,7 +1,7 @@ import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { expect } from 'chai' import hre from 'hardhat' -import { SimpleAddressBook, isGraphL1ChainId } from '@graphprotocol/sdk' +import { isGraphL1ChainId, SimpleAddressBook } from '@graphprotocol/sdk' describe('[L2] L2GraphTokenGateway configuration', function () { const graph = hre.graph() @@ -33,7 +33,7 @@ describe('[L2] L2GraphTokenGateway configuration', function () { expect(l1Counterpart).eq(graph.l1.contracts.L1GraphTokenGateway.address) }) - it("l2Router should match Arbitrum's router address", async function () { + it('l2Router should match Arbitrum\'s router address', async function () { const l2Router = await L2GraphTokenGateway.l2Router() // TODO: is there a cleaner way to get the router address? diff --git a/packages/contracts/test/e2e/deployment/config/l2/l2Staking.test.ts b/packages/contracts/test/e2e/deployment/config/l2/l2Staking.test.ts index 0e81d9892..dda82fd85 100644 --- a/packages/contracts/test/e2e/deployment/config/l2/l2Staking.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l2/l2Staking.test.ts @@ -1,4 +1,3 @@ -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { expect } from 'chai' import hre from 'hardhat' import { isGraphL1ChainId } from '@graphprotocol/sdk' @@ -7,11 +6,8 @@ describe('[L2] Staking', () => { const graph = hre.graph() const { L2Staking } = graph.l2.contracts - let unauthorized: SignerWithAddress - - before(async function () { + before(function () { if (isGraphL1ChainId(graph.chainId)) this.skip() - unauthorized = (await graph.getTestAccounts())[0] }) describe('L2Staking', () => { diff --git a/packages/contracts/test/e2e/deployment/config/l2/rewardsManager.test.ts b/packages/contracts/test/e2e/deployment/config/l2/rewardsManager.test.ts index a2846001e..9759ba78d 100644 --- a/packages/contracts/test/e2e/deployment/config/l2/rewardsManager.test.ts +++ b/packages/contracts/test/e2e/deployment/config/l2/rewardsManager.test.ts @@ -6,7 +6,7 @@ describe('[L2] RewardsManager configuration', () => { const graph = hre.graph() const { RewardsManager } = graph.contracts - before(async function () { + before(function () { if (isGraphL1ChainId(graph.chainId)) this.skip() }) diff --git a/packages/contracts/test/e2e/deployment/config/staking.test.ts b/packages/contracts/test/e2e/deployment/config/staking.test.ts index 2d93da605..cfd4110b4 100644 --- a/packages/contracts/test/e2e/deployment/config/staking.test.ts +++ b/packages/contracts/test/e2e/deployment/config/staking.test.ts @@ -5,7 +5,7 @@ import { getItemValue, isGraphL2ChainId } from '@graphprotocol/sdk' describe('Staking configuration', () => { const { graphConfig, - contracts: { Staking, Controller, DisputeManager, AllocationExchange }, + contracts: { Staking, Controller, DisputeManager }, chainId, } = hre.graph() let contractName: string diff --git a/packages/contracts/test/e2e/deployment/init/l1/bridgeEscrow.test.ts b/packages/contracts/test/e2e/deployment/init/l1/bridgeEscrow.test.ts index 98e64d5ab..0abb37278 100644 --- a/packages/contracts/test/e2e/deployment/init/l1/bridgeEscrow.test.ts +++ b/packages/contracts/test/e2e/deployment/init/l1/bridgeEscrow.test.ts @@ -6,11 +6,11 @@ describe('[L1] BridgeEscrow initialization', () => { const graph = hre.graph() const { BridgeEscrow, GraphToken, L1GraphTokenGateway } = graph.contracts - before(async function () { + before(function () { if (isGraphL2ChainId(graph.chainId)) this.skip() }) - it("should allow L1GraphTokenGateway contract to spend MAX_UINT256 tokens on BridgeEscrow's behalf", async function () { + it('should allow L1GraphTokenGateway contract to spend MAX_UINT256 tokens on BridgeEscrow\'s behalf', async function () { const allowance = await GraphToken.allowance(BridgeEscrow.address, L1GraphTokenGateway.address) expect(allowance).eq(hre.ethers.constants.MaxUint256) }) diff --git a/packages/contracts/test/e2e/deployment/init/l1/graphToken.test.ts b/packages/contracts/test/e2e/deployment/init/l1/graphToken.test.ts index be95373c5..87ad5769a 100644 --- a/packages/contracts/test/e2e/deployment/init/l1/graphToken.test.ts +++ b/packages/contracts/test/e2e/deployment/init/l1/graphToken.test.ts @@ -6,7 +6,7 @@ describe('[L1] GraphToken initialization', () => { const graph = hre.graph() const { GraphToken } = graph.contracts - before(async function () { + before(function () { if (isGraphL2ChainId(graph.chainId)) this.skip() }) diff --git a/packages/contracts/test/e2e/deployment/init/l2/graphToken.test.ts b/packages/contracts/test/e2e/deployment/init/l2/graphToken.test.ts index 2debc22d7..c7978ac81 100644 --- a/packages/contracts/test/e2e/deployment/init/l2/graphToken.test.ts +++ b/packages/contracts/test/e2e/deployment/init/l2/graphToken.test.ts @@ -6,7 +6,7 @@ describe('[L2] GraphToken initialization', () => { const graph = hre.graph() const { GraphToken } = graph.contracts - before(async function () { + before(function () { if (isGraphL1ChainId(graph.chainId)) this.skip() }) diff --git a/packages/contracts/test/e2e/scenarios/close-allocations.test.ts b/packages/contracts/test/e2e/scenarios/close-allocations.test.ts index efbb18004..a8ace4c7c 100644 --- a/packages/contracts/test/e2e/scenarios/close-allocations.test.ts +++ b/packages/contracts/test/e2e/scenarios/close-allocations.test.ts @@ -23,10 +23,10 @@ describe('Close allocations', () => { let openAllocations: AllocationFixture[] = [] let closedAllocations: AllocationFixture[] = [] - before(async () => { - allocations = indexerFixtures.map((i) => i.allocations).flat() - openAllocations = allocations.filter((a) => !a.close) - closedAllocations = allocations.filter((a) => a.close) + before(() => { + allocations = indexerFixtures.map(i => i.allocations).flat() + openAllocations = allocations.filter(a => !a.close) + closedAllocations = allocations.filter(a => a.close) }) it(`some allocatons should be open`, async function () { diff --git a/packages/contracts/test/e2e/scenarios/close-allocations.ts b/packages/contracts/test/e2e/scenarios/close-allocations.ts index f37589230..96c59174b 100644 --- a/packages/contracts/test/e2e/scenarios/close-allocations.ts +++ b/packages/contracts/test/e2e/scenarios/close-allocations.ts @@ -9,7 +9,7 @@ import hre from 'hardhat' import { getIndexerFixtures } from './fixtures/indexers' -import { helpers, closeAllocation } from '@graphprotocol/sdk' +import { closeAllocation, helpers } from '@graphprotocol/sdk' import { getGREOptsFromArgv } from '@graphprotocol/sdk/gre' @@ -18,7 +18,7 @@ async function main() { const graph = hre.graph(graphOpts) const indexerFixtures = getIndexerFixtures(await graph.getTestAccounts()) - const ethBalances = indexerFixtures.map((i) => ({ + const ethBalances = indexerFixtures.map(i => ({ address: i.signer.address, balance: i.ethBalance, })) @@ -37,7 +37,7 @@ async function main() { console.log('\n== Close allocations') for (const indexer of indexerFixtures) { - for (const allocation of indexer.allocations.filter((a) => a.close)) { + for (const allocation of indexer.allocations.filter(a => a.close)) { await closeAllocation(graph.contracts, indexer.signer, { allocationId: allocation.signer.address, }) diff --git a/packages/contracts/test/e2e/scenarios/create-subgraphs.test.ts b/packages/contracts/test/e2e/scenarios/create-subgraphs.test.ts index b2ece4dd8..055093dc6 100644 --- a/packages/contracts/test/e2e/scenarios/create-subgraphs.test.ts +++ b/packages/contracts/test/e2e/scenarios/create-subgraphs.test.ts @@ -3,7 +3,7 @@ import hre from 'hardhat' import { recreatePreviousSubgraphId } from '@graphprotocol/sdk' import { BigNumber } from 'ethers' import { CuratorFixture, getCuratorFixtures } from './fixtures/curators' -import { SubgraphFixture, getSubgraphFixtures, getSubgraphOwner } from './fixtures/subgraphs' +import { getSubgraphFixtures, getSubgraphOwner, SubgraphFixture } from './fixtures/subgraphs' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' let curatorFixtures: CuratorFixture[] @@ -55,7 +55,7 @@ describe('Publish subgraphs', () => { let totalSignal: BigNumber = BigNumber.from(0) for (const curator of curatorFixtures) { - const _subgraph = curator.subgraphs.find((s) => s.deploymentId === subgraph.deploymentId) + const _subgraph = curator.subgraphs.find(s => s.deploymentId === subgraph.deploymentId) if (_subgraph) { totalSignal = totalSignal.add(_subgraph.signal) } diff --git a/packages/contracts/test/e2e/scenarios/create-subgraphs.ts b/packages/contracts/test/e2e/scenarios/create-subgraphs.ts index 09306b059..9f2486ff7 100644 --- a/packages/contracts/test/e2e/scenarios/create-subgraphs.ts +++ b/packages/contracts/test/e2e/scenarios/create-subgraphs.ts @@ -8,7 +8,7 @@ import hre from 'hardhat' import { getSubgraphFixtures, getSubgraphOwner } from './fixtures/subgraphs' import { getCuratorFixtures } from './fixtures/curators' import { getGREOptsFromArgv } from '@graphprotocol/sdk/gre' -import { helpers, publishNewSubgraph, mintSignal, setGRTBalances } from '@graphprotocol/sdk' +import { helpers, mintSignal, publishNewSubgraph, setGRTBalances } from '@graphprotocol/sdk' async function main() { const graphOpts = getGREOptsFromArgv() @@ -26,8 +26,8 @@ async function main() { balance: subgraphOwnerFixture.ethBalance, }, ] - curatorFixtures.map((c) => ethBalances.push({ address: c.signer.address, balance: c.ethBalance })) - const grtBalances = curatorFixtures.map((c) => ({ + curatorFixtures.map(c => ethBalances.push({ address: c.signer.address, balance: c.ethBalance })) + const grtBalances = curatorFixtures.map(c => ({ address: c.signer.address, balance: c.grtBalance, })) @@ -45,7 +45,7 @@ async function main() { deploymentId: subgraph.deploymentId, chainId: graph.chainId, }) - const subgraphData = subgraphFixtures.find((s) => s.deploymentId === subgraph.deploymentId) + const subgraphData = subgraphFixtures.find(s => s.deploymentId === subgraph.deploymentId) if (subgraphData) subgraphData.subgraphId = id } @@ -53,7 +53,7 @@ async function main() { console.log('\n== Signaling subgraphs') for (const curator of curatorFixtures) { for (const subgraph of curator.subgraphs) { - const subgraphData = subgraphFixtures.find((s) => s.deploymentId === subgraph.deploymentId) + const subgraphData = subgraphFixtures.find(s => s.deploymentId === subgraph.deploymentId) if (subgraphData) await mintSignal(graph.contracts, curator.signer, { subgraphId: subgraphData.subgraphId, diff --git a/packages/contracts/test/e2e/scenarios/open-allocations.test.ts b/packages/contracts/test/e2e/scenarios/open-allocations.test.ts index 7cbbb7505..159e81505 100644 --- a/packages/contracts/test/e2e/scenarios/open-allocations.test.ts +++ b/packages/contracts/test/e2e/scenarios/open-allocations.test.ts @@ -36,7 +36,7 @@ describe('Open allocations', () => { describe('Allocations', () => { it(`allocations should be open`, async function () { - const allocations = indexerFixtures.map((i) => i.allocations).flat() + const allocations = indexerFixtures.map(i => i.allocations).flat() for (const allocation of allocations) { const state = await Staking.getAllocationState(allocation.signer.address) expect(state).eq(AllocationState.Active) diff --git a/packages/contracts/test/e2e/scenarios/open-allocations.ts b/packages/contracts/test/e2e/scenarios/open-allocations.ts index 2d971224e..8beac8d99 100644 --- a/packages/contracts/test/e2e/scenarios/open-allocations.ts +++ b/packages/contracts/test/e2e/scenarios/open-allocations.ts @@ -7,7 +7,7 @@ import hre from 'hardhat' import { getIndexerFixtures } from './fixtures/indexers' import { getGREOptsFromArgv } from '@graphprotocol/sdk/gre' -import { helpers, allocateFrom, stake, setGRTBalances } from '@graphprotocol/sdk' +import { allocateFrom, helpers, setGRTBalances, stake } from '@graphprotocol/sdk' async function main() { const graphOpts = getGREOptsFromArgv() @@ -15,11 +15,11 @@ async function main() { const indexerFixtures = getIndexerFixtures(await graph.getTestAccounts()) const deployer = await graph.getDeployer() - const indexerETHBalances = indexerFixtures.map((i) => ({ + const indexerETHBalances = indexerFixtures.map(i => ({ address: i.signer.address, balance: i.ethBalance, })) - const indexerGRTBalances = indexerFixtures.map((i) => ({ + const indexerGRTBalances = indexerFixtures.map(i => ({ address: i.signer.address, balance: i.grtBalance, })) diff --git a/packages/contracts/test/e2e/scenarios/send-grt-to-l2.test.ts b/packages/contracts/test/e2e/scenarios/send-grt-to-l2.test.ts index 9b81371b6..3cb5ba83e 100644 --- a/packages/contracts/test/e2e/scenarios/send-grt-to-l2.test.ts +++ b/packages/contracts/test/e2e/scenarios/send-grt-to-l2.test.ts @@ -1,6 +1,6 @@ import { expect } from 'chai' import hre from 'hardhat' -import { getBridgeFixture, BridgeFixture } from './fixtures/bridge' +import { BridgeFixture, getBridgeFixture } from './fixtures/bridge' describe('Bridge GRT to L2', () => { const graph = hre.graph() diff --git a/packages/contracts/test/e2e/upgrades/example/post-upgrade.ts b/packages/contracts/test/e2e/upgrades/example/post-upgrade.ts index b3617dc23..ecd2ca395 100644 --- a/packages/contracts/test/e2e/upgrades/example/post-upgrade.ts +++ b/packages/contracts/test/e2e/upgrades/example/post-upgrade.ts @@ -1,3 +1,7 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/require-await */ +// REMOVE the above lines + import hre from 'hardhat' import { getGREOptsFromArgv } from '@graphprotocol/sdk/gre' diff --git a/packages/contracts/test/e2e/upgrades/example/pre-upgrade.ts b/packages/contracts/test/e2e/upgrades/example/pre-upgrade.ts index 12984e5c6..affbfc34d 100644 --- a/packages/contracts/test/e2e/upgrades/example/pre-upgrade.ts +++ b/packages/contracts/test/e2e/upgrades/example/pre-upgrade.ts @@ -1,3 +1,7 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/require-await */ +// REMOVE the above lines + import hre from 'hardhat' import { getGREOptsFromArgv } from '@graphprotocol/sdk/gre' diff --git a/packages/contracts/test/e2e/upgrades/exponential-rebates/post-upgrade.test.ts b/packages/contracts/test/e2e/upgrades/exponential-rebates/post-upgrade.test.ts index 14534f16e..f212343df 100644 --- a/packages/contracts/test/e2e/upgrades/exponential-rebates/post-upgrade.test.ts +++ b/packages/contracts/test/e2e/upgrades/exponential-rebates/post-upgrade.test.ts @@ -3,7 +3,7 @@ import chaiAsPromised from 'chai-as-promised' import hre from 'hardhat' import { Contract, ethers } from 'ethers' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { helpers, randomHexBytes, AllocationState } from '@graphprotocol/sdk' +import { AllocationState, helpers, randomHexBytes } from '@graphprotocol/sdk' import removedABI from './abis/staking' import allocations from './fixtures/allocations' @@ -32,7 +32,7 @@ describe('[AFTER UPGRADE] Exponential rebates upgrade', () => { describe('> Allocation state transitions', () => { it('Null allocations should remain Null', async function () { - for (const allocation of allocations.filter((a) => a.state === AllocationState.Null)) { + for (const allocation of allocations.filter(a => a.state === AllocationState.Null)) { await expect(Staking.getAllocationState(allocation.id)).to.eventually.equal( AllocationState.Null, ) @@ -40,7 +40,7 @@ describe('[AFTER UPGRADE] Exponential rebates upgrade', () => { }) it('Active allocations should remain Active', async function () { - for (const allocation of allocations.filter((a) => a.state === AllocationState.Active)) { + for (const allocation of allocations.filter(a => a.state === AllocationState.Active)) { await expect(Staking.getAllocationState(allocation.id)).to.eventually.equal( AllocationState.Active, ) @@ -48,7 +48,7 @@ describe('[AFTER UPGRADE] Exponential rebates upgrade', () => { }) it('Closed allocations should remain Closed', async function () { - for (const allocation of allocations.filter((a) => a.state === AllocationState.Closed)) { + for (const allocation of allocations.filter(a => a.state === AllocationState.Closed)) { await expect(Staking.getAllocationState(allocation.id)).to.eventually.equal( AllocationState.Closed, ) @@ -56,7 +56,7 @@ describe('[AFTER UPGRADE] Exponential rebates upgrade', () => { }) it('Finalized allocations should transition to Closed', async function () { - for (const allocation of allocations.filter((a) => a.state === AllocationState.Finalized)) { + for (const allocation of allocations.filter(a => a.state === AllocationState.Finalized)) { await expect(Staking.getAllocationState(allocation.id)).to.eventually.equal( AllocationState.Closed, ) @@ -64,7 +64,7 @@ describe('[AFTER UPGRADE] Exponential rebates upgrade', () => { }) it('Claimed allocations should transition to Closed', async function () { - for (const allocation of allocations.filter((a) => a.state === AllocationState.Claimed)) { + for (const allocation of allocations.filter(a => a.state === AllocationState.Claimed)) { await expect(Staking.getAllocationState(allocation.id)).to.eventually.equal( AllocationState.Closed, ) diff --git a/packages/contracts/test/e2e/upgrades/exponential-rebates/pre-upgrade.ts b/packages/contracts/test/e2e/upgrades/exponential-rebates/pre-upgrade.ts index d5e8ffba1..e4bed87b1 100644 --- a/packages/contracts/test/e2e/upgrades/exponential-rebates/pre-upgrade.ts +++ b/packages/contracts/test/e2e/upgrades/exponential-rebates/pre-upgrade.ts @@ -11,6 +11,7 @@ async function main() { // Make the deployer an asset holder const deployer = await graph.getDeployer() const { governor } = await graph.getNamedAccounts() + // @ts-expect-error asset holder existed back then await Staking.connect(governor).setAssetHolder(deployer.address, true) // Get some funds on the deployer diff --git a/packages/contracts/test/unit/curation/configuration.test.ts b/packages/contracts/test/unit/curation/configuration.test.ts index b0346b60b..8e4695234 100644 --- a/packages/contracts/test/unit/curation/configuration.test.ts +++ b/packages/contracts/test/unit/curation/configuration.test.ts @@ -23,7 +23,7 @@ describe('Curation:Config', () => { const defaults = graph.graphConfig.defaults before(async function () { - ;[me] = await graph.getTestAccounts() + [me] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) diff --git a/packages/contracts/test/unit/curation/curation.test.ts b/packages/contracts/test/unit/curation/curation.test.ts index 428b33b86..ee8e30bd7 100644 --- a/packages/contracts/test/unit/curation/curation.test.ts +++ b/packages/contracts/test/unit/curation/curation.test.ts @@ -1,16 +1,16 @@ import hre from 'hardhat' import { expect } from 'chai' -import { utils, BigNumber, Event } from 'ethers' +import { BigNumber, Event, utils } from 'ethers' import { NetworkFixture } from '../lib/fixtures' import { parseEther } from 'ethers/lib/utils' import { formatGRT, + GraphNetworkContracts, + helpers, randomHexBytes, toBN, toGRT, - helpers, - GraphNetworkContracts, } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' @@ -29,7 +29,7 @@ const chunkify = (total: BigNumber, maxChunks = 10): Array => { if (total.gt(0)) { chunks.push(total) } - return chunks + return chunks as BigNumber[] } const toFloat = (n: BigNumber) => parseFloat(formatGRT(n)) @@ -60,7 +60,7 @@ describe('Curation', () => { reserveBalance: BigNumber, reserveRatio: number, depositAmount: BigNumber, - ) { + ): Promise { // Handle the initialization of the bonding curve if (supply.eq(0)) { const minDeposit = await contracts.Curation.minimumCurationDeposit() @@ -80,8 +80,8 @@ describe('Curation', () => { } // Calculate bonding curve in the test return ( - toFloat(supply) * - ((1 + toFloat(depositAmount) / toFloat(reserveBalance)) ** (reserveRatio / 1000000) - 1) + toFloat(supply) + * ((1 + toFloat(depositAmount) / toFloat(reserveBalance)) ** (reserveRatio / 1000000) - 1) ) } @@ -201,7 +201,7 @@ describe('Curation', () => { before(async function () { // Use stakingMock so we can call collect - ;[me, curator, stakingMock] = await graph.getTestAccounts() + [me, curator, stakingMock] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) @@ -288,7 +288,7 @@ describe('Curation', () => { }) }) - describe('curate', async function () { + describe('curate', function () { it('reject deposit below minimum tokens required', async function () { const tokensToDeposit = (await contracts.Curation.minimumCurationDeposit()).sub(toBN(1)) const tx = contracts.Curation.connect(curator).mint(subgraphDeploymentID, tokensToDeposit, 0) @@ -332,8 +332,8 @@ describe('Curation', () => { }) }) - describe('collect', async function () { - context('> not curated', async function () { + describe('collect', function () { + context('> not curated', function () { it('reject collect tokens distributed to the curation pool', async function () { // Source of tokens must be the staking for this to work await contracts.Controller.connect(governor).setContractProxy( @@ -350,7 +350,7 @@ describe('Curation', () => { }) }) - context('> curated', async function () { + context('> curated', function () { beforeEach(async function () { await contracts.Curation.connect(curator).mint(subgraphDeploymentID, toGRT('1000'), 0) }) @@ -435,7 +435,7 @@ describe('Curation', () => { }) }) - describe('burn', async function () { + describe('burn', function () { beforeEach(async function () { await contracts.Curation.connect(curator).mint(subgraphDeploymentID, tokensToDeposit, 0) }) @@ -528,7 +528,7 @@ describe('Curation', () => { }) }) - describe('conservation', async function () { + describe('conservation', function () { it('should match multiple deposits and redeems back to initial state', async function () { this.timeout(60000) // increase timeout for test runner @@ -573,7 +573,7 @@ describe('Curation', () => { }) }) - describe('multiple minting', async function () { + describe('multiple minting', function () { it('should mint less signal every time due to the bonding curve', async function () { const tokensToDepositMany = [ toGRT('1000'), // should mint if we start with number above minimum deposit diff --git a/packages/contracts/test/unit/disputes/configuration.test.ts b/packages/contracts/test/unit/disputes/configuration.test.ts index 0b94ee18a..baf426815 100644 --- a/packages/contracts/test/unit/disputes/configuration.test.ts +++ b/packages/contracts/test/unit/disputes/configuration.test.ts @@ -15,7 +15,6 @@ const MAX_PPM = 1000000 describe('DisputeManager:Config', () => { let me: SignerWithAddress let governor: SignerWithAddress - let slasher: SignerWithAddress let arbitrator: SignerWithAddress const graph = hre.graph() @@ -26,12 +25,12 @@ describe('DisputeManager:Config', () => { let disputeManager: DisputeManager before(async function () { - ;[me, slasher] = await graph.getTestAccounts() + [me] = await graph.getTestAccounts() ;({ governor, arbitrator } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) - disputeManager = contracts.DisputeManager as DisputeManager + disputeManager = contracts.DisputeManager }) beforeEach(async function () { diff --git a/packages/contracts/test/unit/disputes/poi.test.ts b/packages/contracts/test/unit/disputes/poi.test.ts index 5d482056c..ea644c522 100644 --- a/packages/contracts/test/unit/disputes/poi.test.ts +++ b/packages/contracts/test/unit/disputes/poi.test.ts @@ -11,19 +11,18 @@ import { NetworkFixture } from '../lib/fixtures' import { MAX_PPM } from './common' import { - helpers, deriveChannelKey, + GraphNetworkContracts, + helpers, randomHexBytes, toBN, toGRT, - GraphNetworkContracts, } from '@graphprotocol/sdk' import type { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' const { keccak256 } = utils -describe('DisputeManager:POI', async () => { - let other: SignerWithAddress +describe('DisputeManager:POI', () => { let governor: SignerWithAddress let arbitrator: SignerWithAddress let indexer: SignerWithAddress @@ -95,13 +94,13 @@ describe('DisputeManager:POI', async () => { } before(async function () { - ;[other, indexer, fisherman, assetHolder, rewardsDestination] = await graph.getTestAccounts() + [indexer, fisherman, assetHolder, rewardsDestination] = await graph.getTestAccounts() ;({ governor, arbitrator } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) - disputeManager = contracts.DisputeManager as DisputeManager - epochManager = contracts.EpochManager as EpochManager + disputeManager = contracts.DisputeManager + epochManager = contracts.EpochManager grt = contracts.GraphToken as GraphToken staking = contracts.Staking as IStaking diff --git a/packages/contracts/test/unit/disputes/query.test.ts b/packages/contracts/test/unit/disputes/query.test.ts index ea6f4888e..38b8c04a2 100644 --- a/packages/contracts/test/unit/disputes/query.test.ts +++ b/packages/contracts/test/unit/disputes/query.test.ts @@ -10,25 +10,24 @@ import { IStaking } from '../../../build/types/IStaking' import { NetworkFixture } from '../lib/fixtures' -import { Dispute, createQueryDisputeID, encodeAttestation, MAX_PPM } from './common' +import { createQueryDisputeID, Dispute, encodeAttestation, MAX_PPM } from './common' import { - helpers, deriveChannelKey, + GraphNetworkContracts, + helpers, randomHexBytes, toBN, toGRT, - GraphNetworkContracts, } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -const { AddressZero, HashZero } = constants +const { HashZero } = constants const NON_EXISTING_DISPUTE_ID = randomHexBytes() -describe('DisputeManager:Query', async () => { +describe('DisputeManager:Query', () => { let me: SignerWithAddress - let other: SignerWithAddress let governor: SignerWithAddress let arbitrator: SignerWithAddress let indexer: SignerWithAddress @@ -129,14 +128,14 @@ describe('DisputeManager:Query', async () => { } before(async function () { - ;[me, other, indexer, indexer2, fisherman, fisherman2, assetHolder, rewardsDestination] = - await graph.getTestAccounts() + [me, indexer, indexer2, fisherman, fisherman2, assetHolder, rewardsDestination] + = await graph.getTestAccounts() ;({ governor, arbitrator } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) - disputeManager = contracts.DisputeManager as DisputeManager - epochManager = contracts.EpochManager as EpochManager + disputeManager = contracts.DisputeManager + epochManager = contracts.EpochManager grt = contracts.GraphToken as GraphToken staking = contracts.Staking as IStaking @@ -388,7 +387,7 @@ describe('DisputeManager:Query', async () => { }) }) - describe('reject a dispute', async function () { + describe('reject a dispute', function () { it('reject to reject a dispute if not the arbitrator', async function () { const tx = disputeManager.connect(me).rejectDispute(dispute.id) await expect(tx).revertedWith('Caller is not the Arbitrator') @@ -417,7 +416,7 @@ describe('DisputeManager:Query', async () => { }) }) - describe('draw a dispute', async function () { + describe('draw a dispute', function () { it('reject to draw a dispute if not the arbitrator', async function () { const tx = disputeManager.connect(me).drawDispute(dispute.id) await expect(tx).revertedWith('Caller is not the Arbitrator') diff --git a/packages/contracts/test/unit/epochs.test.ts b/packages/contracts/test/unit/epochs.test.ts index 8aed78c5e..951114dfd 100644 --- a/packages/contracts/test/unit/epochs.test.ts +++ b/packages/contracts/test/unit/epochs.test.ts @@ -4,7 +4,7 @@ import { BigNumber } from 'ethers' import { EpochManager } from '../../build/types/EpochManager' -import { DeployType, deploy, helpers, toBN } from '@graphprotocol/sdk' +import { deploy, DeployType, helpers, toBN } from '@graphprotocol/sdk' import type { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' describe('EpochManager', () => { @@ -18,7 +18,7 @@ describe('EpochManager', () => { const epochLength: BigNumber = toBN('3') before(async function () { - ;[me, governor] = await graph.getTestAccounts() + [me, governor] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) }) @@ -31,7 +31,7 @@ describe('EpochManager', () => { }, graph.addressBook, ) - const { contract: proxyAdmin } = await deploy( + await deploy( DeployType.DeployAndSave, governor, { diff --git a/packages/contracts/test/unit/gateway/bridgeEscrow.test.ts b/packages/contracts/test/unit/gateway/bridgeEscrow.test.ts index 872b82451..34fa860fd 100644 --- a/packages/contracts/test/unit/gateway/bridgeEscrow.test.ts +++ b/packages/contracts/test/unit/gateway/bridgeEscrow.test.ts @@ -25,13 +25,13 @@ describe('BridgeEscrow', () => { const nTokens = toGRT('1000') before(async function () { - ;[tokenReceiver, spender] = await graph.getTestAccounts() + [tokenReceiver, spender] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) grt = contracts.GraphToken as GraphToken - bridgeEscrow = contracts.BridgeEscrow as BridgeEscrow + bridgeEscrow = contracts.BridgeEscrow // Give some funds to the Escrow await grt.connect(governor).mint(bridgeEscrow.address, nTokens) @@ -69,7 +69,7 @@ describe('BridgeEscrow', () => { const tx = bridgeEscrow.connect(tokenReceiver).revokeAll(spender.address) await expect(tx).revertedWith('Only Controller governor') }) - it("revokes a spender's permission to transfer GRT held by the contract", async function () { + it('revokes a spender\'s permission to transfer GRT held by the contract', async function () { await bridgeEscrow.connect(governor).approveAll(spender.address) await bridgeEscrow.connect(governor).revokeAll(spender.address) // We shouldn't be able to transfer _anything_ diff --git a/packages/contracts/test/unit/gateway/l1GraphTokenGateway.test.ts b/packages/contracts/test/unit/gateway/l1GraphTokenGateway.test.ts index c7439a7ba..872ff77fe 100644 --- a/packages/contracts/test/unit/gateway/l1GraphTokenGateway.test.ts +++ b/packages/contracts/test/unit/gateway/l1GraphTokenGateway.test.ts @@ -12,7 +12,7 @@ import { BridgeEscrow } from '../../../build/types/BridgeEscrow' import { NetworkFixture } from '../lib/fixtures' -import { helpers, applyL1ToL2Alias, toBN, toGRT, GraphNetworkContracts } from '@graphprotocol/sdk' +import { applyL1ToL2Alias, GraphNetworkContracts, helpers, toBN, toGRT } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' const { AddressZero } = constants @@ -60,7 +60,7 @@ describe('L1GraphTokenGateway', () => { ) before(async function () { - ;[tokenSender, l2Receiver] = await graph.getTestAccounts() + [tokenSender, l2Receiver] = await graph.getTestAccounts() ;({ governor, pauseGuardian } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) @@ -68,8 +68,8 @@ describe('L1GraphTokenGateway', () => { // Deploy L1 fixtureContracts = await fixture.load(governor) grt = fixtureContracts.GraphToken as GraphToken - l1GraphTokenGateway = fixtureContracts.L1GraphTokenGateway as L1GraphTokenGateway - bridgeEscrow = fixtureContracts.BridgeEscrow as BridgeEscrow + l1GraphTokenGateway = fixtureContracts.L1GraphTokenGateway + bridgeEscrow = fixtureContracts.BridgeEscrow // Deploy L1 arbitrum bridge ;({ bridgeMock, inboxMock, outboxMock, routerMock } = await fixture.loadL1ArbitrumBridge( @@ -78,8 +78,8 @@ describe('L1GraphTokenGateway', () => { // Deploy L2 mock l2MockContracts = await fixture.loadMock(true) - l2GRTMock = l2MockContracts.L2GraphToken as L2GraphToken - l2GRTGatewayMock = l2MockContracts.L2GraphTokenGateway as L2GraphTokenGateway + l2GRTMock = l2MockContracts.L2GraphToken + l2GRTGatewayMock = l2MockContracts.L2GraphTokenGateway // Give some funds to the token sender/router mock await grt.connect(governor).mint(tokenSender.address, senderTokens) @@ -286,10 +286,10 @@ describe('L1GraphTokenGateway', () => { await fixture.configureL1Bridge(governor, fixtureContracts, l2MockContracts) let tx = l1GraphTokenGateway.connect(governor).setPaused(true) await expect(tx).emit(l1GraphTokenGateway, 'PauseChanged').withArgs(true) - await expect(await l1GraphTokenGateway.paused()).eq(true) + expect(await l1GraphTokenGateway.paused()).eq(true) tx = l1GraphTokenGateway.connect(governor).setPaused(false) await expect(tx).emit(l1GraphTokenGateway, 'PauseChanged').withArgs(false) - await expect(await l1GraphTokenGateway.paused()).eq(false) + expect(await l1GraphTokenGateway.paused()).eq(false) }) describe('setPauseGuardian', function () { it('cannot be called by someone other than governor', async function () { @@ -310,10 +310,10 @@ describe('L1GraphTokenGateway', () => { await l1GraphTokenGateway.connect(governor).setPauseGuardian(pauseGuardian.address) let tx = l1GraphTokenGateway.connect(pauseGuardian).setPaused(true) await expect(tx).emit(l1GraphTokenGateway, 'PauseChanged').withArgs(true) - await expect(await l1GraphTokenGateway.paused()).eq(true) + expect(await l1GraphTokenGateway.paused()).eq(true) tx = l1GraphTokenGateway.connect(pauseGuardian).setPaused(false) await expect(tx).emit(l1GraphTokenGateway, 'PauseChanged').withArgs(false) - await expect(await l1GraphTokenGateway.paused()).eq(false) + expect(await l1GraphTokenGateway.paused()).eq(false) }) }) }) diff --git a/packages/contracts/test/unit/gns.test.ts b/packages/contracts/test/unit/gns.test.ts index 21587d221..028d6b729 100644 --- a/packages/contracts/test/unit/gns.test.ts +++ b/packages/contracts/test/unit/gns.test.ts @@ -1,8 +1,8 @@ import hre from 'hardhat' import { expect } from 'chai' -import { ethers, ContractTransaction, BigNumber, Event } from 'ethers' +import { BigNumber, ContractTransaction, ethers, Event } from 'ethers' import { defaultAbiCoder } from 'ethers/lib/utils' -import { SubgraphDeploymentID, formatGRT } from '@graphprotocol/common-ts' +import { formatGRT, SubgraphDeploymentID } from '@graphprotocol/common-ts' import { LegacyGNSMock } from '../../build/types/LegacyGNSMock' import { GraphToken } from '../../build/types/GraphToken' @@ -14,27 +14,27 @@ import { L1GNS } from '../../build/types/L1GNS' import { L1GraphTokenGateway } from '../../build/types/L1GraphTokenGateway' import { AccountDefaultName, + burnSignal, createDefaultName, + deprecateSubgraph, + mintSignal, publishNewSubgraph, publishNewVersion, - mintSignal, - deprecateSubgraph, - burnSignal, } from './lib/gnsUtils' import { - PublishSubgraph, - Subgraph, buildLegacySubgraphId, buildSubgraph, buildSubgraphId, - randomHexBytes, - helpers, - toGRT, - toBN, deploy, DeployType, - loadContractAt, GraphNetworkContracts, + helpers, + loadContractAt, + PublishSubgraph, + randomHexBytes, + Subgraph, + toBN, + toGRT, } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { L2GNS, L2GraphTokenGateway, SubgraphNFT } from '../../build/types' @@ -125,8 +125,8 @@ describe('L1GNS', () => { } // Calculate bonding curve in the test return ( - toFloat(supply) * - ((1 + toFloat(depositAmount) / toFloat(reserveBalance)) ** (reserveRatio / 1000000) - 1) + toFloat(supply) + * ((1 + toFloat(depositAmount) / toFloat(reserveBalance)) ** (reserveRatio / 1000000) - 1) ) } @@ -190,8 +190,7 @@ describe('L1GNS', () => { return tx } - - const deployLegacyGNSMock = async (): Promise => { + const deployLegacyGNSMock = async (): Promise => { const { contract: subgraphDescriptor } = await deploy(DeployType.Deploy, governor, { name: 'SubgraphNFTDescriptor', }) @@ -222,7 +221,7 @@ describe('L1GNS', () => { } before(async function () { - ;[me, other, governor, another] = await graph.getTestAccounts() + [me, other, governor, another] = await graph.getTestAccounts() fixture = new NetworkFixture(graph.provider) @@ -231,17 +230,17 @@ describe('L1GNS', () => { grt = fixtureContracts.GraphToken as GraphToken curation = fixtureContracts.Curation as Curation gns = fixtureContracts.GNS as L1GNS - controller = fixtureContracts.Controller as Controller - l1GraphTokenGateway = fixtureContracts.L1GraphTokenGateway as L1GraphTokenGateway - subgraphNFT = fixtureContracts.SubgraphNFT as SubgraphNFT + controller = fixtureContracts.Controller + l1GraphTokenGateway = fixtureContracts.L1GraphTokenGateway + subgraphNFT = fixtureContracts.SubgraphNFT // Deploy L1 arbitrum bridge await fixture.loadL1ArbitrumBridge(governor) // Deploy L2 mock l2MockContracts = await fixture.loadMock(true) - l2GNSMock = l2MockContracts.L2GNS as L2GNS - l2GRTGatewayMock = l2MockContracts.L2GraphTokenGateway as L2GraphTokenGateway + l2GNSMock = l2MockContracts.L2GNS + l2GRTGatewayMock = l2MockContracts.L2GraphTokenGateway // Configure graph bridge await fixture.configureL1Bridge(governor, fixtureContracts, l2MockContracts) @@ -275,7 +274,7 @@ describe('L1GNS', () => { await fixture.tearDown() }) - describe('Configuration', async function () { + describe('Configuration', function () { describe('setOwnerTaxPercentage', function () { const newValue = 10 @@ -384,7 +383,7 @@ describe('L1GNS', () => { }) }) - describe('publishNewSubgraph', async function () { + describe('publishNewSubgraph', function () { it('should publish a new subgraph and first version with it', async function () { await publishNewSubgraph(me, newSubgraph0, gns, graph.chainId) }) @@ -403,7 +402,7 @@ describe('L1GNS', () => { }) }) - describe('publishNewVersion', async function () { + describe('publishNewVersion', function () { let subgraph: Subgraph beforeEach(async () => { @@ -548,7 +547,7 @@ describe('L1GNS', () => { expect(await gns.subgraphSignal(subgraph.id)).eq(expectedSignal) }) }) - describe('deprecateSubgraph', async function () { + describe('deprecateSubgraph', function () { let subgraph: Subgraph beforeEach(async () => { @@ -586,8 +585,8 @@ describe('L1GNS', () => { }) }) - describe('Curating on names', async function () { - describe('mintSignal()', async function () { + describe('Curating on names', function () { + describe('mintSignal()', function () { it('should deposit into the name signal curve', async function () { const subgraph = await publishNewSubgraph(me, newSubgraph0, gns, graph.chainId) await mintSignal(other, subgraph.id, tokens10000, gns, curation) @@ -617,7 +616,7 @@ describe('L1GNS', () => { }) }) - describe('burnSignal()', async function () { + describe('burnSignal()', function () { let subgraph: Subgraph beforeEach(async () => { @@ -659,7 +658,7 @@ describe('L1GNS', () => { }) }) - describe('transferSignal()', async function () { + describe('transferSignal()', function () { let subgraph: Subgraph let otherNSignal: BigNumber @@ -695,7 +694,7 @@ describe('L1GNS', () => { await expect(tx).revertedWith('GNS: Curator transfer amount exceeds balance') }) }) - describe('withdraw()', async function () { + describe('withdraw()', function () { let subgraph: Subgraph beforeEach(async () => { @@ -727,7 +726,7 @@ describe('L1GNS', () => { }) }) - describe('multiple minting', async function () { + describe('multiple minting', function () { it('should mint less signal every time due to the bonding curve', async function () { const tokensToDepositMany = [ toGRT('1000'), // should mint if we start with number above minimum deposit diff --git a/packages/contracts/test/unit/governance/controller.test.ts b/packages/contracts/test/unit/governance/controller.test.ts index 0d914d268..5b3074865 100644 --- a/packages/contracts/test/unit/governance/controller.test.ts +++ b/packages/contracts/test/unit/governance/controller.test.ts @@ -25,14 +25,14 @@ describe('Managed', () => { let controller: Controller before(async function () { - ;[me, mockController, newMockEpochManager] = await graph.getTestAccounts() + [me, mockController, newMockEpochManager] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) // We just run the fixures to set up a contract with Managed, as this // is cleaner and easier for us to test fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) - epochManager = contracts.EpochManager as EpochManager - controller = contracts.Controller as Controller + epochManager = contracts.EpochManager + controller = contracts.Controller }) beforeEach(async function () { diff --git a/packages/contracts/test/unit/governance/governed.test.ts b/packages/contracts/test/unit/governance/governed.test.ts index 577c20c46..fb94b343a 100644 --- a/packages/contracts/test/unit/governance/governed.test.ts +++ b/packages/contracts/test/unit/governance/governed.test.ts @@ -16,7 +16,7 @@ describe('Governed', () => { let governed: Governed beforeEach(async function () { - ;[me, governor] = await graph.getTestAccounts() + [me, governor] = await graph.getTestAccounts() const factory = await ethers.getContractFactory('GovernedMock') governed = (await factory.connect(governor).deploy()) as Governed diff --git a/packages/contracts/test/unit/governance/pausing.test.ts b/packages/contracts/test/unit/governance/pausing.test.ts index 17b339892..fbb9b3abc 100644 --- a/packages/contracts/test/unit/governance/pausing.test.ts +++ b/packages/contracts/test/unit/governance/pausing.test.ts @@ -1,6 +1,5 @@ import hre from 'hardhat' import { expect } from 'chai' -import { constants } from 'ethers' import { Controller } from '../../../build/types/Controller' import { IStaking } from '../../../build/types/IStaking' @@ -31,14 +30,13 @@ describe('Pausing', () => { await expect(tx).emit(controller, 'PauseChanged').withArgs(setValue) expect(await controller.paused()).eq(setValue) } - const AddressZero = constants.AddressZero before(async function () { - ;[me] = await graph.getTestAccounts() + [me] = await graph.getTestAccounts() ;({ governor, pauseGuardian: guardian } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) staking = contracts.Staking as IStaking - controller = contracts.Controller as Controller + controller = contracts.Controller }) beforeEach(async function () { diff --git a/packages/contracts/test/unit/l2/l2Curation.test.ts b/packages/contracts/test/unit/l2/l2Curation.test.ts index 407eeb09d..f004318f1 100644 --- a/packages/contracts/test/unit/l2/l2Curation.test.ts +++ b/packages/contracts/test/unit/l2/l2Curation.test.ts @@ -1,6 +1,6 @@ import hre from 'hardhat' import { expect } from 'chai' -import { utils, BigNumber, Event, Signer, constants } from 'ethers' +import { BigNumber, constants, Event, Signer, utils } from 'ethers' import { L2Curation } from '../../../build/types/L2Curation' import { GraphToken } from '../../../build/types/GraphToken' @@ -11,12 +11,12 @@ import { GNS } from '../../../build/types/GNS' import { parseEther } from 'ethers/lib/utils' import { formatGRT, + GraphNetworkContracts, + helpers, randomAddress, randomHexBytes, toBN, toGRT, - helpers, - GraphNetworkContracts, } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' @@ -25,7 +25,7 @@ const { AddressZero } = constants const MAX_PPM = 1000000 const chunkify = (total: BigNumber, maxChunks = 10): Array => { - const chunks = [] + const chunks: BigNumber[] = [] while (total.gt(0) && maxChunks > 0) { const m = 1000000 const p = Math.floor(Math.random() * m) @@ -55,12 +55,12 @@ describe('L2Curation:Config', () => { let curation: L2Curation before(async function () { - ;[me] = await graph.getTestAccounts() + [me] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor, true) - curation = contracts.L2Curation as L2Curation + curation = contracts.L2Curation }) beforeEach(async function () { @@ -189,8 +189,8 @@ describe('L2Curation', () => { } const minSupply = signalAmountForMinimumCuration return ( - (await calcLinearBondingCurve(minSupply, minDeposit, depositAmount.sub(minDeposit))) + - toFloat(minSupply) + (await calcLinearBondingCurve(minSupply, minDeposit, depositAmount.sub(minDeposit))) + + toFloat(minSupply) ) } // Calculate bonding curve in the test @@ -343,13 +343,13 @@ describe('L2Curation', () => { before(async function () { // Use stakingMock so we can call collect - ;[me, curator, stakingMock] = await graph.getTestAccounts() + [me, curator, stakingMock] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor, true) curation = contracts.Curation as L2Curation grt = contracts.GraphToken as GraphToken - controller = contracts.Controller as Controller + controller = contracts.Controller gns = contracts.GNS as GNS gnsImpersonator = await helpers.impersonateAccount(gns.address) @@ -427,7 +427,7 @@ describe('L2Curation', () => { }) }) - describe('curate', async function () { + describe('curate', function () { it('reject deposit below minimum tokens required', async function () { // Set the minimum to a value greater than 1 so that we can test await curation.connect(governor).setMinimumCurationDeposit(toBN('2')) @@ -512,7 +512,7 @@ describe('L2Curation', () => { }) }) - describe('curate tax free (from GNS)', async function () { + describe('curate tax free (from GNS)', function () { it('can not be called by anyone other than GNS', async function () { const tokensToDeposit = await curation.minimumCurationDeposit() const tx = curation.connect(curator).mintTaxFree(subgraphDeploymentID, tokensToDeposit) @@ -555,8 +555,8 @@ describe('L2Curation', () => { }) }) - describe('collect', async function () { - context('> not curated', async function () { + describe('collect', function () { + context('> not curated', function () { it('reject collect tokens distributed to the curation pool', async function () { // Source of tokens must be the staking for this to work await controller @@ -569,7 +569,7 @@ describe('L2Curation', () => { }) }) - context('> curated', async function () { + context('> curated', function () { beforeEach(async function () { await curation.connect(curator).mint(subgraphDeploymentID, toGRT('1000'), 0) }) @@ -645,7 +645,7 @@ describe('L2Curation', () => { }) }) - describe('burn', async function () { + describe('burn', function () { beforeEach(async function () { await curation.connect(curator).mint(subgraphDeploymentID, tokensToDeposit, 0) }) @@ -724,7 +724,7 @@ describe('L2Curation', () => { }) }) - describe('conservation', async function () { + describe('conservation', function () { it('should match multiple deposits and redeems back to initial state', async function () { this.timeout(60000) // increase timeout for test runner @@ -761,7 +761,7 @@ describe('L2Curation', () => { }) }) - describe('multiple minting', async function () { + describe('multiple minting', function () { it('should mint the same signal every time due to the flat bonding curve', async function () { const tokensToDepositMany = [ toGRT('1000'), // should mint if we start with number above minimum deposit diff --git a/packages/contracts/test/unit/l2/l2GNS.test.ts b/packages/contracts/test/unit/l2/l2GNS.test.ts index 4b9b7d06c..496a4fe76 100644 --- a/packages/contracts/test/unit/l2/l2GNS.test.ts +++ b/packages/contracts/test/unit/l2/l2GNS.test.ts @@ -1,6 +1,7 @@ +/* eslint-disable no-secrets/no-secrets */ import hre from 'hardhat' import { expect } from 'chai' -import { ethers, ContractTransaction, BigNumber } from 'ethers' +import { BigNumber, ContractTransaction, ethers } from 'ethers' import { defaultAbiCoder, parseEther } from 'ethers/lib/utils' import { NetworkFixture } from '../lib/fixtures' @@ -125,17 +126,17 @@ describe('L2GNS', () => { // Deploy L2 fixtureContracts = await fixture.load(governor, true) - l2GraphTokenGateway = fixtureContracts.L2GraphTokenGateway as L2GraphTokenGateway - gns = fixtureContracts.L2GNS as L2GNS + l2GraphTokenGateway = fixtureContracts.L2GraphTokenGateway + gns = fixtureContracts.L2GNS staking = fixtureContracts.L2Staking as unknown as IL2Staking - curation = fixtureContracts.L2Curation as L2Curation + curation = fixtureContracts.L2Curation grt = fixtureContracts.GraphToken as GraphToken // Deploy L1 mock l1MockContracts = await fixture.loadMock(false) l1GRTMock = l1MockContracts.GraphToken as GraphToken - l1GNSMock = l1MockContracts.L1GNS as L1GNS - l1GRTGatewayMock = l1MockContracts.L1GraphTokenGateway as L1GraphTokenGateway + l1GNSMock = l1MockContracts.L1GNS + l1GRTGatewayMock = l1MockContracts.L1GraphTokenGateway // Deploy L2 arbitrum bridge await fixture.loadL2ArbitrumBridge(governor) @@ -155,7 +156,7 @@ describe('L2GNS', () => { }) // Adapted from the L1 GNS tests but allowing curating to a pre-curated subgraph deployment - describe('publishNewVersion', async function () { + describe('publishNewVersion', function () { let subgraph: Subgraph beforeEach(async () => { @@ -369,8 +370,8 @@ describe('L2GNS', () => { describe('finishing a subgraph transfer from L1', function () { it('publishes the transferred subgraph and mints signal with no tax', async function () { - const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } = - await defaultL1SubgraphParams() + const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } + = await defaultL1SubgraphParams() const callhookData = defaultAbiCoder.encode( ['uint8', 'uint256', 'address'], [toBN(0), l1SubgraphId, me.address], @@ -415,8 +416,8 @@ describe('L2GNS', () => { .withArgs(l2SubgraphId, me.address, expectedNSignal, expectedSignal, curatedTokens) }) it('protects the owner against a rounding attack', async function () { - const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } = - await defaultL1SubgraphParams() + const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } + = await defaultL1SubgraphParams() const collectTokens = curatedTokens.mul(20) await staking.connect(governor).setCurationPercentage(100000) @@ -476,8 +477,8 @@ describe('L2GNS', () => { await expect(tx).emit(gns, 'SubgraphL2TransferFinalized').withArgs(l2SubgraphId) }) it('cannot be called by someone other than the subgraph owner', async function () { - const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } = - await defaultL1SubgraphParams() + const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } + = await defaultL1SubgraphParams() const callhookData = defaultAbiCoder.encode( ['uint8', 'uint256', 'address'], [toBN(0), l1SubgraphId, me.address], @@ -523,8 +524,8 @@ describe('L2GNS', () => { await expect(tx).revertedWith('INVALID_SUBGRAPH') }) it('accepts calls to a pre-curated subgraph deployment', async function () { - const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } = - await defaultL1SubgraphParams() + const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } + = await defaultL1SubgraphParams() const callhookData = defaultAbiCoder.encode( ['uint8', 'uint256', 'address'], [toBN(0), l1SubgraphId, me.address], @@ -622,8 +623,8 @@ describe('L2GNS', () => { // Eth for gas: await helpers.setBalance(await l1GNSMockL2Alias.getAddress(), parseEther('1')) - const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } = - await defaultL1SubgraphParams() + const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } + = await defaultL1SubgraphParams() await transferMockSubgraphFromL1( l1SubgraphId, curatedTokens, @@ -663,8 +664,8 @@ describe('L2GNS', () => { // Eth for gas: await helpers.setBalance(await l1GNSMockL2Alias.getAddress(), parseEther('1')) - const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } = - await defaultL1SubgraphParams() + const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } + = await defaultL1SubgraphParams() await transferMockSubgraphFromL1( l1SubgraphId, curatedTokens, @@ -702,8 +703,8 @@ describe('L2GNS', () => { expect(l2CuratorBalance).eq(prevSignal.add(expectedNewCuratorSignal)) }) it('cannot be called by someone other than the L2GraphTokenGateway', async function () { - const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } = - await defaultL1SubgraphParams() + const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } + = await defaultL1SubgraphParams() await transferMockSubgraphFromL1( l1SubgraphId, curatedTokens, @@ -718,8 +719,8 @@ describe('L2GNS', () => { await expect(tx).revertedWith('ONLY_GATEWAY') }) it('rejects calls if the L1 sender is not the L1GNS', async function () { - const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } = - await defaultL1SubgraphParams() + const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } + = await defaultL1SubgraphParams() await transferMockSubgraphFromL1( l1SubgraphId, curatedTokens, @@ -878,8 +879,8 @@ describe('L2GNS', () => { // Eth for gas: await helpers.setBalance(await l1GNSMockL2Alias.getAddress(), parseEther('1')) - const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } = - await defaultL1SubgraphParams() + const { l1SubgraphId, curatedTokens, subgraphMetadata, versionMetadata } + = await defaultL1SubgraphParams() await transferMockSubgraphFromL1( l1SubgraphId, curatedTokens, diff --git a/packages/contracts/test/unit/l2/l2GraphToken.test.ts b/packages/contracts/test/unit/l2/l2GraphToken.test.ts index cdc6637d6..3b2fe2021 100644 --- a/packages/contracts/test/unit/l2/l2GraphToken.test.ts +++ b/packages/contracts/test/unit/l2/l2GraphToken.test.ts @@ -5,7 +5,7 @@ import { L2GraphToken } from '../../../build/types/L2GraphToken' import { grtTests } from '../lib/graphTokenTests' import { NetworkFixture } from '../lib/fixtures' -import { toGRT, GraphNetworkContracts } from '@graphprotocol/sdk' +import { GraphNetworkContracts, toGRT } from '@graphprotocol/sdk' import type { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' describe('L2GraphToken', () => { @@ -24,11 +24,11 @@ describe('L2GraphToken', () => { let grt: L2GraphToken before(async function () { - ;[mockL1GRT, mockL2Gateway, user] = await graph.getTestAccounts() + [mockL1GRT, mockL2Gateway, user] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor, true) - grt = contracts.L2GraphToken as L2GraphToken + grt = contracts.L2GraphToken }) beforeEach(async function () { @@ -39,7 +39,7 @@ describe('L2GraphToken', () => { await fixture.tearDown() }) - describe('setGateway', async function () { + describe('setGateway', function () { it('cannot be called by someone who is not the governor', async function () { const tx = grt.connect(mockL2Gateway).setGateway(mockL2Gateway.address) await expect(tx).revertedWith('Only Governor can call') @@ -47,10 +47,10 @@ describe('L2GraphToken', () => { it('sets the L2 Gateway address when called by the governor', async function () { const tx = grt.connect(governor).setGateway(mockL2Gateway.address) await expect(tx).emit(grt, 'GatewaySet').withArgs(mockL2Gateway.address) - await expect(await grt.gateway()).eq(mockL2Gateway.address) + expect(await grt.gateway()).eq(mockL2Gateway.address) }) }) - describe('setL1Address', async function () { + describe('setL1Address', function () { it('cannot be called by someone who is not the governor', async function () { const tx = grt.connect(mockL2Gateway).setL1Address(mockL1GRT.address) await expect(tx).revertedWith('Only Governor can call') @@ -58,16 +58,16 @@ describe('L2GraphToken', () => { it('sets the L1 GRT address when called by the governor', async function () { const tx = grt.connect(governor).setL1Address(mockL1GRT.address) await expect(tx).emit(grt, 'L1AddressSet').withArgs(mockL1GRT.address) - await expect(await grt.l1Address()).eq(mockL1GRT.address) + expect(await grt.l1Address()).eq(mockL1GRT.address) }) }) - describe('bridge minting and burning', async function () { + describe('bridge minting and burning', function () { beforeEach(async function () { // Configure the l1Address and gateway await grt.connect(governor).setL1Address(mockL1GRT.address) await grt.connect(governor).setGateway(mockL2Gateway.address) }) - describe('bridgeMint', async function () { + describe('bridgeMint', function () { it('cannot be called by someone who is not the gateway', async function () { const tx = grt.connect(governor).bridgeMint(user.address, toGRT('100')) await expect(tx).revertedWith('NOT_GATEWAY') @@ -75,10 +75,10 @@ describe('L2GraphToken', () => { it('mints GRT into a destination account', async function () { const tx = grt.connect(mockL2Gateway).bridgeMint(user.address, toGRT('100')) await expect(tx).emit(grt, 'BridgeMinted').withArgs(user.address, toGRT('100')) - await expect(await grt.balanceOf(user.address)).eq(toGRT('100')) + expect(await grt.balanceOf(user.address)).eq(toGRT('100')) }) }) - describe('bridgeBurn', async function () { + describe('bridgeBurn', function () { it('cannot be called by someone who is not the gateway', async function () { const tx = grt.connect(governor).bridgeBurn(user.address, toGRT('100')) await expect(tx).revertedWith('NOT_GATEWAY') @@ -99,7 +99,7 @@ describe('L2GraphToken', () => { await grt.connect(user).approve(mockL2Gateway.address, toGRT('20')) const tx = grt.connect(mockL2Gateway).bridgeBurn(user.address, toGRT('20')) await expect(tx).emit(grt, 'BridgeBurned').withArgs(user.address, toGRT('20')) - await expect(await grt.balanceOf(user.address)).eq(toGRT('80')) + expect(await grt.balanceOf(user.address)).eq(toGRT('80')) }) }) it('does not allow the bridge to mint as a regular minter', async function () { diff --git a/packages/contracts/test/unit/l2/l2GraphTokenGateway.test.ts b/packages/contracts/test/unit/l2/l2GraphTokenGateway.test.ts index ab217563a..5718cf571 100644 --- a/packages/contracts/test/unit/l2/l2GraphTokenGateway.test.ts +++ b/packages/contracts/test/unit/l2/l2GraphTokenGateway.test.ts @@ -13,7 +13,7 @@ import { FakeContract, smock } from '@defi-wonderland/smock' use(smock.matchers) import { RewardsManager } from '../../../build/types/RewardsManager' -import { DeployType, GraphNetworkContracts, deploy, helpers, toBN, toGRT } from '@graphprotocol/sdk' +import { deploy, DeployType, GraphNetworkContracts, helpers, toBN, toGRT } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { GraphToken, L1GraphTokenGateway } from '../../../build/types' @@ -49,16 +49,16 @@ describe('L2GraphTokenGateway', () => { ) before(async function () { - ;[me, governor, tokenSender, l1Receiver, l2Receiver, pauseGuardian] = - await graph.getTestAccounts() + [me, governor, tokenSender, l1Receiver, l2Receiver, pauseGuardian] + = await graph.getTestAccounts() fixture = new NetworkFixture(graph.provider) // Deploy L2 fixtureContracts = await fixture.load(governor, true) grt = fixtureContracts.GraphToken as L2GraphToken - l2GraphTokenGateway = fixtureContracts.L2GraphTokenGateway as L2GraphTokenGateway - rewardsManager = fixtureContracts.RewardsManager as RewardsManager + l2GraphTokenGateway = fixtureContracts.L2GraphTokenGateway + rewardsManager = fixtureContracts.RewardsManager // Deploy L2 arbitrum bridge ;({ routerMock } = await fixture.loadL2ArbitrumBridge(governor)) @@ -66,7 +66,7 @@ describe('L2GraphTokenGateway', () => { // Deploy L1 mock l1MockContracts = await fixture.loadMock(false) l1GRTMock = l1MockContracts.GraphToken as GraphToken - l1GRTGatewayMock = l1MockContracts.L1GraphTokenGateway as L1GraphTokenGateway + l1GRTGatewayMock = l1MockContracts.L1GraphTokenGateway callhookReceiverMock = ( await deploy(DeployType.Deploy, governor, { @@ -102,8 +102,7 @@ describe('L2GraphTokenGateway', () => { describe('outboundTransfer', function () { it('reverts because it is paused', async function () { const tx = l2GraphTokenGateway - .connect(tokenSender) - ['outboundTransfer(address,address,uint256,bytes)']( + .connect(tokenSender)['outboundTransfer(address,address,uint256,bytes)']( grt.address, l1Receiver.address, toGRT('10'), @@ -192,10 +191,10 @@ describe('L2GraphTokenGateway', () => { await fixture.configureL2Bridge(governor, fixtureContracts, l1MockContracts) let tx = l2GraphTokenGateway.connect(governor).setPaused(true) await expect(tx).emit(l2GraphTokenGateway, 'PauseChanged').withArgs(true) - await expect(await l2GraphTokenGateway.paused()).eq(true) + expect(await l2GraphTokenGateway.paused()).eq(true) tx = l2GraphTokenGateway.connect(governor).setPaused(false) await expect(tx).emit(l2GraphTokenGateway, 'PauseChanged').withArgs(false) - await expect(await l2GraphTokenGateway.paused()).eq(false) + expect(await l2GraphTokenGateway.paused()).eq(false) }) describe('setPauseGuardian', function () { it('cannot be called by someone other than governor', async function () { @@ -216,10 +215,10 @@ describe('L2GraphTokenGateway', () => { await l2GraphTokenGateway.connect(governor).setPauseGuardian(pauseGuardian.address) let tx = l2GraphTokenGateway.connect(pauseGuardian).setPaused(true) await expect(tx).emit(l2GraphTokenGateway, 'PauseChanged').withArgs(true) - await expect(await l2GraphTokenGateway.paused()).eq(true) + expect(await l2GraphTokenGateway.paused()).eq(true) tx = l2GraphTokenGateway.connect(pauseGuardian).setPaused(false) await expect(tx).emit(l2GraphTokenGateway, 'PauseChanged').withArgs(false) - await expect(await l2GraphTokenGateway.paused()).eq(false) + expect(await l2GraphTokenGateway.paused()).eq(false) }) }) }) @@ -228,8 +227,7 @@ describe('L2GraphTokenGateway', () => { context('> after configuring and unpausing', function () { const testValidOutboundTransfer = async function (signer: Signer, data: string) { const tx = l2GraphTokenGateway - .connect(signer) - ['outboundTransfer(address,address,uint256,bytes)']( + .connect(signer)['outboundTransfer(address,address,uint256,bytes)']( l1GRTMock.address, l1Receiver.address, toGRT('10'), @@ -262,10 +260,10 @@ describe('L2GraphTokenGateway', () => { // For some reason the call count doesn't work properly, // and each function call is counted 12 times. // Possibly related to https://github.com/defi-wonderland/smock/issues/85 ? - //expect(arbSysMock.sendTxToL1).to.have.been.calledOnce + // expect(arbSysMock.sendTxToL1).to.have.been.calledOnce expect(arbSysMock.sendTxToL1).to.have.been.calledWith(l1GRTGatewayMock.address, calldata) const senderBalance = await grt.balanceOf(tokenSender.address) - await expect(senderBalance).eq(toGRT('990')) + expect(senderBalance).eq(toGRT('990')) } before(async function () { await fixture.configureL2Bridge(governor, fixtureContracts, l1MockContracts) @@ -285,8 +283,7 @@ describe('L2GraphTokenGateway', () => { describe('outboundTransfer', function () { it('reverts when called with the wrong token address', async function () { const tx = l2GraphTokenGateway - .connect(tokenSender) - ['outboundTransfer(address,address,uint256,bytes)']( + .connect(tokenSender)['outboundTransfer(address,address,uint256,bytes)']( tokenSender.address, l1Receiver.address, toGRT('10'), @@ -309,8 +306,7 @@ describe('L2GraphTokenGateway', () => { it('reverts when called with nonempty calldata', async function () { await grt.connect(tokenSender).approve(l2GraphTokenGateway.address, toGRT('10')) const tx = l2GraphTokenGateway - .connect(tokenSender) - ['outboundTransfer(address,address,uint256,bytes)']( + .connect(tokenSender)['outboundTransfer(address,address,uint256,bytes)']( l1GRTMock.address, l1Receiver.address, toGRT('10'), @@ -321,8 +317,7 @@ describe('L2GraphTokenGateway', () => { it('reverts when the sender does not have enough GRT', async function () { await grt.connect(tokenSender).approve(l2GraphTokenGateway.address, toGRT('1001')) const tx = l2GraphTokenGateway - .connect(tokenSender) - ['outboundTransfer(address,address,uint256,bytes)']( + .connect(tokenSender)['outboundTransfer(address,address,uint256,bytes)']( l1GRTMock.address, l1Receiver.address, toGRT('1001'), @@ -354,10 +349,10 @@ describe('L2GraphTokenGateway', () => { // Unchanged const senderBalance = await grt.balanceOf(tokenSender.address) - await expect(senderBalance).eq(toGRT('1000')) + expect(senderBalance).eq(toGRT('1000')) // 10 newly minted GRT const receiverBalance = await grt.balanceOf(to) - await expect(receiverBalance).eq(toGRT('10')) + expect(receiverBalance).eq(toGRT('10')) return tx } it('reverts when called by an account that is not the gateway', async function () { @@ -438,7 +433,7 @@ describe('L2GraphTokenGateway', () => { callHookData, ) await expect(tx).revertedWith( - "function selector was not recognized and there's no fallback function", + 'function selector was not recognized and there\'s no fallback function', ) }) }) diff --git a/packages/contracts/test/unit/l2/l2Staking.test.ts b/packages/contracts/test/unit/l2/l2Staking.test.ts index cf28dc872..9394a6116 100644 --- a/packages/contracts/test/unit/l2/l2Staking.test.ts +++ b/packages/contracts/test/unit/l2/l2Staking.test.ts @@ -1,6 +1,6 @@ import hre from 'hardhat' import { expect } from 'chai' -import { ethers, ContractTransaction, BigNumber } from 'ethers' +import { BigNumber, ContractTransaction, ethers } from 'ethers' import { defaultAbiCoder, parseEther } from 'ethers/lib/utils' import { NetworkFixture } from '../lib/fixtures' @@ -9,8 +9,8 @@ import { IL2Staking } from '../../../build/types/IL2Staking' import { L2GraphTokenGateway } from '../../../build/types/L2GraphTokenGateway' import { GraphToken } from '../../../build/types/GraphToken' import { - GraphNetworkContracts, deriveChannelKey, + GraphNetworkContracts, helpers, randomHexBytes, toBN, @@ -79,7 +79,7 @@ describe('L2Staking', () => { } before(async function () { - ;[me, other] = await graph.getTestAccounts() + [me, other] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) @@ -88,14 +88,14 @@ describe('L2Staking', () => { fixtureContracts = await fixture.load(governor, true) grt = fixtureContracts.GraphToken as GraphToken staking = fixtureContracts.Staking as IL2Staking - l2GraphTokenGateway = fixtureContracts.L2GraphTokenGateway as L2GraphTokenGateway + l2GraphTokenGateway = fixtureContracts.L2GraphTokenGateway // Deploy L1 mock l1MockContracts = await fixture.loadMock(false) l1GRTMock = l1MockContracts.GraphToken as GraphToken - l1StakingMock = l1MockContracts.L1Staking as L1Staking - l1GNSMock = l1MockContracts.L1GNS as L1GNS - l1GRTGatewayMock = l1MockContracts.L1GraphTokenGateway as L1GraphTokenGateway + l1StakingMock = l1MockContracts.L1Staking + l1GNSMock = l1MockContracts.L1GNS + l1GRTGatewayMock = l1MockContracts.L1GraphTokenGateway // Deploy L2 arbitrum bridge await fixture.loadL2ArbitrumBridge(governor) diff --git a/packages/contracts/test/unit/lib/fixtures.ts b/packages/contracts/test/unit/lib/fixtures.ts index b66e5bfb7..f65ed5230 100644 --- a/packages/contracts/test/unit/lib/fixtures.ts +++ b/packages/contracts/test/unit/lib/fixtures.ts @@ -1,9 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { Signer, Wallet, providers } from 'ethers' +import { providers, Wallet } from 'ethers' -import { BridgeMock } from '../../../build/types/BridgeMock' -import { InboxMock } from '../../../build/types/InboxMock' -import { OutboxMock } from '../../../build/types/OutboxMock' import { Controller } from '../../../build/types/Controller' import { DisputeManager } from '../../../build/types/DisputeManager' import { EpochManager } from '../../../build/types/EpochManager' @@ -23,15 +20,12 @@ import { L2GraphTokenGateway } from '../../../build/types/L2GraphTokenGateway' import { L2GraphToken } from '../../../build/types/L2GraphToken' import { LibExponential } from '../../../build/types/LibExponential' import { - DeployType, - GraphNetworkContracts, configureL1Bridge, configureL2Bridge, - deploy, deployGraphNetwork, deployMockGraphNetwork, + GraphNetworkContracts, helpers, - loadGraphNetworkContracts, } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' diff --git a/packages/contracts/test/unit/lib/gnsUtils.ts b/packages/contracts/test/unit/lib/gnsUtils.ts index 086231c03..402e0325a 100644 --- a/packages/contracts/test/unit/lib/gnsUtils.ts +++ b/packages/contracts/test/unit/lib/gnsUtils.ts @@ -7,7 +7,7 @@ import { expect } from 'chai' import { L2Curation } from '../../../build/types/L2Curation' import { GraphToken } from '../../../build/types/GraphToken' import { L2GraphToken } from '../../../build/types/L2GraphToken' -import { PublishSubgraph, Subgraph, buildSubgraphId, toBN } from '@graphprotocol/sdk' +import { buildSubgraphId, PublishSubgraph, Subgraph, toBN } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' // Entities @@ -77,7 +77,8 @@ export const publishNewSubgraph = async ( const owner = await gns.ownerOf(subgraphID) expect(owner).eq(account.address) - return { ...subgraph, id: subgraphID } + // TODO: properly type this + return { ...subgraph, id: subgraphID } as unknown as Subgraph } export const publishNewVersion = async ( @@ -134,7 +135,7 @@ export const publishNewVersion = async ( // Only emits this event if there was actual signal to upgrade if (beforeSubgraph.nSignal.gt(0)) { - txResult + await txResult .emit(gns, 'SubgraphUpgraded') .withArgs(subgraphID, newVSignalEstimate, totalAdjustedUp, newSubgraph.subgraphDeploymentID) } diff --git a/packages/contracts/test/unit/lib/graphTokenTests.ts b/packages/contracts/test/unit/lib/graphTokenTests.ts index a51410e13..77682ada9 100644 --- a/packages/contracts/test/unit/lib/graphTokenTests.ts +++ b/packages/contracts/test/unit/lib/graphTokenTests.ts @@ -1,10 +1,10 @@ import hre from 'hardhat' import { expect } from 'chai' -import { constants, BigNumber, Signature, ethers, Wallet } from 'ethers' +import { BigNumber, constants, ethers, Signature, Wallet } from 'ethers' import { L2GraphToken } from '../../../build/types/L2GraphToken' import { GraphToken } from '../../../build/types/GraphToken' -import { toBN, toGRT, helpers, Permit, signPermit, GraphNetworkContracts } from '@graphprotocol/sdk' +import { GraphNetworkContracts, Permit, signPermit, toBN, toGRT } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { NetworkFixture } from './fixtures' @@ -72,7 +72,7 @@ export function grtTests(isL2: boolean): void { } before(async function () { - ;({ governor } = await graph.getNamedAccounts()) + ({ governor } = await graph.getNamedAccounts()) me = new ethers.Wallet(mePrivateKey, graph.provider) other = new ethers.Wallet(otherPrivateKey, graph.provider) @@ -176,7 +176,7 @@ export function grtTests(isL2: boolean): void { }) describe('mint', function () { - describe('mint', async function () { + describe('mint', function () { it('reject mint if not minter', async function () { const tx = grt.connect(me).mint(me.address, toGRT('100')) await expect(tx).revertedWith('Only minter can call') @@ -203,7 +203,7 @@ export function grtTests(isL2: boolean): void { expect(await grt.isMinter(me.address)).eq(true) }) - describe('mint', async function () { + describe('mint', function () { it('should mint', async function () { const beforeTokens = await grt.balanceOf(me.address) diff --git a/packages/contracts/test/unit/payments/allocationExchange.test.ts b/packages/contracts/test/unit/payments/allocationExchange.test.ts index 87df2a55a..d5b0c69e7 100644 --- a/packages/contracts/test/unit/payments/allocationExchange.test.ts +++ b/packages/contracts/test/unit/payments/allocationExchange.test.ts @@ -43,11 +43,11 @@ describe('AllocationExchange', () => { const graph = hre.graph() - async function createVoucher( + function createVoucher( allocationID: string, amount: BigNumber, signerKey: string, - ): Promise { + ): Voucher { const messageHash = solidityKeccak256(['address', 'uint256'], [allocationID, amount]) const messageHashBytes = arrayify(messageHash) const key = new SigningKey(signerKey) @@ -60,16 +60,16 @@ describe('AllocationExchange', () => { } before(async function () { - ;[indexer] = await graph.getTestAccounts() + [indexer] = await graph.getTestAccounts() ;({ governor, allocationExchangeOwner } = await graph.getNamedAccounts()) authority = Wallet.createRandom() fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) - allocationExchange = contracts.AllocationExchange as AllocationExchange + allocationExchange = contracts.AllocationExchange grt = contracts.GraphToken as GraphToken staking = contracts.Staking as IStaking - epochManager = contracts.EpochManager as EpochManager + epochManager = contracts.EpochManager // Give some funds to the indexer and approve staking contract to use funds on indexer behalf const indexerTokens = toGRT('100000') @@ -211,7 +211,7 @@ describe('AllocationExchange', () => { // Initiate a withdrawal const actualAmount = toGRT('2000') // <- withdraw amount - const voucher = await createVoucher(allocationID, actualAmount, authority.privateKey) + const voucher = createVoucher(allocationID, actualAmount, authority.privateKey) const tx = allocationExchange.connect(allocationExchangeOwner).redeem(voucher) await expect(tx) .emit(allocationExchange, 'AllocationRedeemed') @@ -233,7 +233,7 @@ describe('AllocationExchange', () => { // Initiate a withdrawal const actualAmount = toGRT('2000') // <- withdraw amount - const voucher = await createVoucher(allocationID, actualAmount, authority.privateKey) + const voucher = createVoucher(allocationID, actualAmount, authority.privateKey) // First redeem await allocationExchange.connect(allocationExchangeOwner).redeem(voucher) @@ -256,7 +256,7 @@ describe('AllocationExchange', () => { // Initiate a withdrawal const actualAmount = toGRT('2000') // <- withdraw amount - const voucher = await createVoucher(allocationID, actualAmount, authority.privateKey) + const voucher = createVoucher(allocationID, actualAmount, authority.privateKey) const tx = allocationExchange.connect(allocationExchangeOwner).redeem(voucher) await expect(tx).revertedWith('!collect') }) @@ -264,7 +264,7 @@ describe('AllocationExchange', () => { it('reject redeem voucher not signed by the authority', async function () { // Initiate a withdrawal const actualAmount = toGRT('2000') // <- withdraw amount - const voucher = await createVoucher( + const voucher = createVoucher( randomAddress(), actualAmount, Wallet.createRandom().privateKey, // <-- signed by anon @@ -276,14 +276,14 @@ describe('AllocationExchange', () => { it('reject redeem voucher with empty amount', async function () { // Initiate a withdrawal const actualAmount = toGRT('0') // <- withdraw amount - const voucher = await createVoucher(randomAddress(), actualAmount, authority.privateKey) + const voucher = createVoucher(randomAddress(), actualAmount, authority.privateKey) const tx = allocationExchange.connect(allocationExchangeOwner).redeem(voucher) await expect(tx).revertedWith('Exchange: zero tokens voucher') }) it('reject redeem voucher with invalid signature', async function () { const actualAmount = toGRT('2000') // <- withdraw amount - const voucher = await createVoucher(randomAddress(), actualAmount, authority.privateKey) + const voucher = createVoucher(randomAddress(), actualAmount, authority.privateKey) voucher.signature = '0x1234' const tx = allocationExchange.connect(allocationExchangeOwner).redeem(voucher) await expect(tx).revertedWith('Exchange: invalid signature') diff --git a/packages/contracts/test/unit/rewards/rewards.test.ts b/packages/contracts/test/unit/rewards/rewards.test.ts index eb5baa4a8..1070b9ff3 100644 --- a/packages/contracts/test/unit/rewards/rewards.test.ts +++ b/packages/contracts/test/unit/rewards/rewards.test.ts @@ -1,6 +1,6 @@ import hre from 'hardhat' import { expect } from 'chai' -import { constants, BigNumber } from 'ethers' +import { BigNumber, constants } from 'ethers' import { BigNumber as BN } from 'bignumber.js' import { NetworkFixture } from '../lib/fixtures' @@ -12,13 +12,13 @@ import { RewardsManager } from '../../../build/types/RewardsManager' import { IStaking } from '../../../build/types/IStaking' import { - helpers, + deriveChannelKey, formatGRT, + GraphNetworkContracts, + helpers, randomHexBytes, toBN, toGRT, - deriveChannelKey, - GraphNetworkContracts, } from '@graphprotocol/sdk' import type { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' @@ -102,7 +102,7 @@ describe('Rewards', () => { return this.accruedByElapsed(nBlocks) } - async accruedByElapsed(nBlocks: BigNumber | number) { + accruedByElapsed(nBlocks: BigNumber | number) { const n = getRewardsPerSignal( new BN(ISSUANCE_PER_BLOCK.toString()), new BN(nBlocks.toString()), @@ -133,17 +133,17 @@ describe('Rewards', () => { } before(async function () { - ;[delegator, curator1, curator2, indexer1, indexer2, oracle, assetHolder] = - await graph.getTestAccounts() + [delegator, curator1, curator2, indexer1, indexer2, oracle, assetHolder] + = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) grt = contracts.GraphToken as GraphToken curation = contracts.Curation as Curation - epochManager = contracts.EpochManager as EpochManager + epochManager = contracts.EpochManager staking = contracts.Staking as IStaking - rewardsManager = contracts.RewardsManager as RewardsManager + rewardsManager = contracts.RewardsManager // 200 GRT per block await rewardsManager.connect(governor).setIssuancePerBlock(ISSUANCE_PER_BLOCK) @@ -231,7 +231,7 @@ describe('Rewards', () => { }) }) - context('issuing rewards', async function () { + context('issuing rewards', function () { beforeEach(async function () { // 5% minute rate (4 blocks) await rewardsManager.connect(governor).setIssuancePerBlock(ISSUANCE_PER_BLOCK) @@ -327,8 +327,8 @@ describe('Rewards', () => { await tracker2.snapshot() // Calculate rewards - const rewardsPerSignal1 = await tracker1.accumulated - const rewardsPerSignal2 = await tracker2.accumulated + const rewardsPerSignal1 = tracker1.accumulated + const rewardsPerSignal2 = tracker2.accumulated const expectedRewardsSG1 = rewardsPerSignal1.mul(signalled1).div(WeiPerEther) const expectedRewardsSG2 = rewardsPerSignal2.mul(signalled2).div(WeiPerEther) @@ -994,7 +994,7 @@ describe('Rewards', () => { it('collect query fees with two subgraphs and one allocation', async function () { async function getRewardsAccrual(subgraphs) { const [sg1, sg2] = await Promise.all( - subgraphs.map((sg) => rewardsManager.getAccRewardsForSubgraph(sg)), + subgraphs.map(sg => rewardsManager.getAccRewardsForSubgraph(sg)), ) return { sg1, @@ -1016,14 +1016,14 @@ describe('Rewards', () => { } // snapshot block before any accrual (we substract 1 because accrual starts after the first mint happens) - const b1 = await epochManager.blockNum().then((x) => x.toNumber() - 1) + const b1 = await epochManager.blockNum().then(x => x.toNumber() - 1) // allocate const tokensToAllocate = toGRT('12500') await staking .connect(indexer1) .multicall([ - await staking.populateTransaction.stake(tokensToAllocate).then((tx) => tx.data), + await staking.populateTransaction.stake(tokensToAllocate).then(tx => tx.data), await staking.populateTransaction .allocateFrom( indexer1.address, @@ -1033,7 +1033,7 @@ describe('Rewards', () => { metadata, await channelKey1.generateProof(indexer1.address), ) - .then((tx) => tx.data), + .then(tx => tx.data), ]) // move time fwd @@ -1047,7 +1047,7 @@ describe('Rewards', () => { await helpers.mine() const accrual = await getRewardsAccrual(subgraphs) - const b2 = await epochManager.blockNum().then((x) => x.toNumber()) + const b2 = await epochManager.blockNum().then(x => x.toNumber()) // round comparison because there is a small precision error due to dividing and accrual per signal expect(toRound(accrual.all)).eq(toRound(ISSUANCE_PER_BLOCK.mul(b2 - b1))) diff --git a/packages/contracts/test/unit/serviceRegisty.test.ts b/packages/contracts/test/unit/serviceRegisty.test.ts index 3438762e0..d84b4aa88 100644 --- a/packages/contracts/test/unit/serviceRegisty.test.ts +++ b/packages/contracts/test/unit/serviceRegisty.test.ts @@ -34,11 +34,11 @@ describe('ServiceRegistry', () => { } before(async function () { - ;[governor, indexer, operator] = await graph.getTestAccounts() + [governor, indexer, operator] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) - serviceRegistry = contracts.ServiceRegistry as ServiceRegistry + serviceRegistry = contracts.ServiceRegistry staking = contracts.Staking as IStaking }) diff --git a/packages/contracts/test/unit/staking/allocation.test.ts b/packages/contracts/test/unit/staking/allocation.test.ts index bb9860fbc..92afedca4 100644 --- a/packages/contracts/test/unit/staking/allocation.test.ts +++ b/packages/contracts/test/unit/staking/allocation.test.ts @@ -1,6 +1,6 @@ import hre from 'hardhat' import { expect } from 'chai' -import { constants, BigNumber, PopulatedTransaction, Contract } from 'ethers' +import { BigNumber, constants, Contract, PopulatedTransaction } from 'ethers' import { Curation } from '../../../build/types/Curation' import { EpochManager } from '../../../build/types/EpochManager' @@ -10,8 +10,8 @@ import { LibExponential } from '../../../build/types/LibExponential' import { NetworkFixture } from '../lib/fixtures' import { - GraphNetworkContracts, deriveChannelKey, + GraphNetworkContracts, helpers, isGraphL1ChainId, randomHexBytes, @@ -84,7 +84,6 @@ describe('Staking:Allocation', () => { let governor: SignerWithAddress let indexer: SignerWithAddress let delegator: SignerWithAddress - let slasher: SignerWithAddress let assetHolder: SignerWithAddress let fixture: NetworkFixture @@ -171,7 +170,7 @@ describe('Staking:Allocation', () => { allocationID?: string expectEvent?: boolean } = {}, - ): Promise<{ queryRebates: BigNumber; queryFeesBurnt: BigNumber }> => { + ): Promise<{ queryRebates: BigNumber, queryFeesBurnt: BigNumber }> => { const expectEvent = options.expectEvent ?? true const alloID = options.allocationID ?? allocationID const alloStateBefore = await staking.getAllocationState(alloID) @@ -201,8 +200,8 @@ describe('Staking:Allocation', () => { const queryFees = tokensToCollect.sub(protocolFees).sub(curationFees) - const [alphaNumerator, alphaDenominator, lambdaNumerator, lambdaDenominator] = - await Promise.all([ + const [alphaNumerator, alphaDenominator, lambdaNumerator, lambdaDenominator] + = await Promise.all([ staking.alphaNumerator(), staking.alphaDenominator(), staking.lambdaNumerator(), @@ -367,13 +366,13 @@ describe('Staking:Allocation', () => { // -- Tests -- before(async function () { - ;[me, indexer, delegator, slasher, assetHolder] = await graph.getTestAccounts() + [me, indexer, delegator, assetHolder] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) curation = contracts.Curation as Curation - epochManager = contracts.EpochManager as EpochManager + epochManager = contracts.EpochManager grt = contracts.GraphToken as GraphToken staking = contracts.Staking as IStaking @@ -624,7 +623,7 @@ describe('Staking:Allocation', () => { `> with ${toPercentage(params.curationPercentage)}% curationFees, ${toPercentage( params.protocolPercentage, )}% protocolTax and ${toPercentage(params.queryFeeCut)}% queryFeeCut`, - async function () { + function () { beforeEach(async function () { // Set a protocol fee percentage await staking.connect(governor).setProtocolPercentage(params.protocolPercentage) @@ -860,7 +859,7 @@ describe('Staking:Allocation', () => { }) for (const tokensToAllocate of [toBN(100), toBN(0)]) { - context(`> with ${tokensToAllocate} allocated tokens`, async function () { + context(`> with ${tokensToAllocate.toString()} allocated tokens`, function () { beforeEach(async function () { // Advance to next epoch to avoid creating the allocation // right at the epoch boundary, which would mess up the tests. @@ -994,7 +993,7 @@ describe('Staking:Allocation', () => { ].map(({ allocationID, poi }) => staking.connect(indexer).populateTransaction.closeAllocation(allocationID, poi), ), - ).then((e) => e.map((e: PopulatedTransaction) => e.data)) + ).then(e => e.map((e: PopulatedTransaction) => e.data)) await staking.connect(indexer).multicall(requests) }) }) @@ -1029,7 +1028,7 @@ describe('Staking:Allocation', () => { metadata, await newChannelKey.generateProof(indexer.address), ), - ]).then((e) => e.map((e: PopulatedTransaction) => e.data)) + ]).then(e => e.map((e: PopulatedTransaction) => e.data)) await staking.connect(indexer).multicall(requests) }) }) diff --git a/packages/contracts/test/unit/staking/configuration.test.ts b/packages/contracts/test/unit/staking/configuration.test.ts index e95f65b0e..44f9d5bd0 100644 --- a/packages/contracts/test/unit/staking/configuration.test.ts +++ b/packages/contracts/test/unit/staking/configuration.test.ts @@ -7,7 +7,7 @@ import { IStaking } from '../../../build/types/IStaking' import { NetworkFixture } from '../lib/fixtures' import { GraphProxyAdmin } from '../../../build/types/GraphProxyAdmin' -import { DeployType, GraphNetworkContracts, deploy, toBN, toGRT } from '@graphprotocol/sdk' +import { deploy, DeployType, GraphNetworkContracts, toBN, toGRT } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' const { AddressZero } = constants @@ -16,12 +16,10 @@ const MAX_PPM = toBN('1000000') describe('Staking:Config', () => { const graph = hre.graph() - const defaults = graph.graphConfig.defaults let me: SignerWithAddress let other: SignerWithAddress let governor: SignerWithAddress - let slasher: SignerWithAddress let fixture: NetworkFixture @@ -30,13 +28,13 @@ describe('Staking:Config', () => { let proxyAdmin: GraphProxyAdmin before(async function () { - ;[me, other, slasher] = await graph.getTestAccounts() + [me, other] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) staking = contracts.Staking as IStaking - proxyAdmin = contracts.GraphProxyAdmin as GraphProxyAdmin + proxyAdmin = contracts.GraphProxyAdmin }) beforeEach(async function () { diff --git a/packages/contracts/test/unit/staking/delegation.test.ts b/packages/contracts/test/unit/staking/delegation.test.ts index 50cf0cbb0..f866be9c6 100644 --- a/packages/contracts/test/unit/staking/delegation.test.ts +++ b/packages/contracts/test/unit/staking/delegation.test.ts @@ -1,6 +1,6 @@ import hre from 'hardhat' import { expect } from 'chai' -import { constants, BigNumber } from 'ethers' +import { BigNumber, constants } from 'ethers' import { EpochManager } from '../../../build/types/EpochManager' import { GraphToken } from '../../../build/types/GraphToken' @@ -8,8 +8,8 @@ import { IStaking } from '../../../build/types/IStaking' import { NetworkFixture } from '../lib/fixtures' import { - GraphNetworkContracts, deriveChannelKey, + GraphNetworkContracts, helpers, randomHexBytes, toBN, @@ -183,13 +183,13 @@ describe('Staking::Delegation', () => { } before(async function () { - ;[me, delegator, delegator2, governor, indexer, indexer2, assetHolder] = - await graph.getTestAccounts() + [me, delegator, delegator2, governor, indexer, indexer2, assetHolder] + = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) - epochManager = contracts.EpochManager as EpochManager + epochManager = contracts.EpochManager grt = contracts.GraphToken as GraphToken staking = contracts.Staking as IStaking diff --git a/packages/contracts/test/unit/staking/l2Transfer.test.ts b/packages/contracts/test/unit/staking/l2Transfer.test.ts index b304aa55f..31be6c044 100644 --- a/packages/contracts/test/unit/staking/l2Transfer.test.ts +++ b/packages/contracts/test/unit/staking/l2Transfer.test.ts @@ -1,6 +1,6 @@ import hre from 'hardhat' import { expect } from 'chai' -import { constants, BigNumber } from 'ethers' +import { BigNumber, constants } from 'ethers' import { defaultAbiCoder, parseEther } from 'ethers/lib/utils' import { GraphToken } from '../../../build/types/GraphToken' @@ -13,10 +13,10 @@ import { L1GraphTokenLockTransferToolBadMock } from '../../../build/types/L1Grap import { NetworkFixture } from '../lib/fixtures' import { - DeployType, - GraphNetworkContracts, deploy, + DeployType, deriveChannelKey, + GraphNetworkContracts, helpers, randomHexBytes, toBN, @@ -79,7 +79,7 @@ describe('L1Staking:L2Transfer', () => { } before(async function () { - ;[indexer, delegator, l2Indexer, l2Delegator] = await graph.getTestAccounts() + [indexer, delegator, l2Indexer, l2Delegator] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) @@ -88,7 +88,7 @@ describe('L1Staking:L2Transfer', () => { fixtureContracts = await fixture.load(governor) grt = fixtureContracts.GraphToken as GraphToken staking = fixtureContracts.L1Staking as unknown as IL1Staking - l1GraphTokenGateway = fixtureContracts.L1GraphTokenGateway as L1GraphTokenGateway + l1GraphTokenGateway = fixtureContracts.L1GraphTokenGateway controller = fixtureContracts.Controller as IController // Deploy L1 arbitrum bridge @@ -96,8 +96,8 @@ describe('L1Staking:L2Transfer', () => { // Deploy L2 mock l2MockContracts = await fixture.loadMock(true) - l2StakingMock = l2MockContracts.L2Staking as L2Staking - l2GRTGatewayMock = l2MockContracts.L2GraphTokenGateway as L2GraphTokenGateway + l2StakingMock = l2MockContracts.L2Staking + l2GRTGatewayMock = l2MockContracts.L2GraphTokenGateway // Configure graph bridge await fixture.configureL1Bridge(governor, fixtureContracts, l2MockContracts) diff --git a/packages/contracts/test/unit/staking/rebate.test.ts b/packages/contracts/test/unit/staking/rebate.test.ts index e05ad9a7c..7eb989fdc 100644 --- a/packages/contracts/test/unit/staking/rebate.test.ts +++ b/packages/contracts/test/unit/staking/rebate.test.ts @@ -4,7 +4,7 @@ import { BigNumber, Contract } from 'ethers' import { LibExponential } from '../../../build/types/LibExponential' -import { formatGRT, helpers, isGraphL1ChainId, toGRT } from '@graphprotocol/sdk' +import { formatGRT, isGraphL1ChainId, toGRT } from '@graphprotocol/sdk' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' import { NetworkFixture } from '../lib/fixtures' @@ -94,6 +94,7 @@ export function exponentialRebates( } const exponent = (lambda * stake) / fees + // eslint-disable-next-line no-secrets/no-secrets // LibExponential.MAX_EXPONENT = 15 if (exponent > 15) { return fees @@ -163,7 +164,7 @@ describe('Staking:rebates', () => { } } - async function testRebateParameters(fn, testCases) { + function testRebateParameters(fn, testCases) { // *** Exponential rebates *** // Typical alpha and lambda it('alpha 1 - lambda 0.6', async function () { @@ -209,7 +210,7 @@ describe('Staking:rebates', () => { } before(async function () { - ;({ governor } = await graph.getNamedAccounts()) + ({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) await fixture.load(governor) diff --git a/packages/contracts/test/unit/staking/staking.test.ts b/packages/contracts/test/unit/staking/staking.test.ts index 04775a272..6fe5fdcb0 100644 --- a/packages/contracts/test/unit/staking/staking.test.ts +++ b/packages/contracts/test/unit/staking/staking.test.ts @@ -1,6 +1,6 @@ import hre from 'hardhat' import { expect } from 'chai' -import { constants, BigNumber, Event } from 'ethers' +import { BigNumber, constants, Event } from 'ethers' import { GraphToken } from '../../../build/types/GraphToken' import { IStaking } from '../../../build/types/IStaking' @@ -8,8 +8,8 @@ import { IStaking } from '../../../build/types/IStaking' import { NetworkFixture } from '../lib/fixtures' import { - GraphNetworkContracts, deriveChannelKey, + GraphNetworkContracts, helpers, randomHexBytes, toBN, @@ -84,7 +84,7 @@ describe('Staking:Stakes', () => { } before(async function () { - ;[me, indexer, slasher, fisherman] = await graph.getTestAccounts() + [me, indexer, slasher, fisherman] = await graph.getTestAccounts() ;({ governor } = await graph.getNamedAccounts()) fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) @@ -242,7 +242,6 @@ describe('Staking:Stakes', () => { it('should always increase the thawing period on subsequent unstakes', async function () { const tokensToUnstake = toGRT('10') const tokensToUnstakeSecondTime = toGRT('0.000001') - const thawingPeriod = toBN(await staking.thawingPeriod()) // Unstake (1) const tx1 = await staking.connect(indexer).unstake(tokensToUnstake) @@ -253,9 +252,6 @@ describe('Staking:Stakes', () => { // Move forward before the tokens are unlocked for withdrawal await helpers.mineUpTo(tokensLockedUntil1.sub(5)) - // Calculate locking time for tokens taking into account the previous unstake request - const currentBlock = await helpers.latestBlock() - // Ensure at least 1 block is added (i.e. the weighted average rounds up) const expectedLockedUntil = tokensLockedUntil1.add(1) diff --git a/packages/contracts/test/unit/upgrade/admin.test.ts b/packages/contracts/test/unit/upgrade/admin.test.ts index 65b353970..f18cfa0fa 100644 --- a/packages/contracts/test/unit/upgrade/admin.test.ts +++ b/packages/contracts/test/unit/upgrade/admin.test.ts @@ -10,7 +10,7 @@ import { IStaking } from '../../../build/types/IStaking' import { NetworkFixture } from '../lib/fixtures' import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers' -import { DeployType, GraphNetworkContracts, deploy, loadContractAt } from '@graphprotocol/sdk' +import { deploy, DeployType, GraphNetworkContracts, loadContractAt } from '@graphprotocol/sdk' const { ethers } = hre const { AddressZero } = ethers.constants @@ -29,12 +29,12 @@ describe('Upgrades', () => { let stakingProxy: GraphProxy before(async function () { - ;[me, governor] = await graph.getTestAccounts() + [me, governor] = await graph.getTestAccounts() fixture = new NetworkFixture(graph.provider) contracts = await fixture.load(governor) staking = contracts.Staking as IStaking - proxyAdmin = contracts.GraphProxyAdmin as GraphProxyAdmin + proxyAdmin = contracts.GraphProxyAdmin curation = contracts.Curation as Curation stakingProxy = loadContractAt('GraphProxy', staking.address, undefined, governor) as GraphProxy @@ -59,7 +59,7 @@ describe('Upgrades', () => { it('reject get admin from other than the ProxyAdmin', async function () { await expect(stakingProxy.connect(governor).admin()).revertedWith( - "function selector was not recognized and there's no fallback function", + 'function selector was not recognized and there\'s no fallback function', ) }) }) @@ -72,7 +72,7 @@ describe('Upgrades', () => { it('reject get implementation from other than the ProxyAdmin', async function () { await expect(stakingProxy.implementation()).revertedWith( - "function selector was not recognized and there's no fallback function", + 'function selector was not recognized and there\'s no fallback function', ) }) }) @@ -87,7 +87,7 @@ describe('Upgrades', () => { it('reject get pending implementation from other than the ProxyAdmin', async function () { await expect(stakingProxy.connect(governor).pendingImplementation()).revertedWith( - "function selector was not recognized and there's no fallback function", + 'function selector was not recognized and there\'s no fallback function', ) }) }) @@ -134,7 +134,7 @@ describe('Upgrades', () => { // Due to the transparent proxy we should not be able to upgrade from other than the proxy admin const tx = stakingProxy.connect(governor).upgradeTo(newImplementationAddress) await expect(tx).revertedWith( - "function selector was not recognized and there's no fallback function", + 'function selector was not recognized and there\'s no fallback function', ) }) }) @@ -144,7 +144,7 @@ describe('Upgrades', () => { // Due to the transparent proxy we should not be able to accept upgrades from other than the proxy admin const tx = stakingProxy.connect(governor).acceptUpgrade() await expect(tx).revertedWith( - "function selector was not recognized and there's no fallback function", + 'function selector was not recognized and there\'s no fallback function', ) }) }) @@ -185,7 +185,7 @@ describe('Upgrades', () => { .connect(governor) .changeProxyAdmin(staking.address, otherProxyAdmin.address) await expect(tx).revertedWith( - "function selector was not recognized and there's no fallback function", + 'function selector was not recognized and there\'s no fallback function', ) }) @@ -202,7 +202,7 @@ describe('Upgrades', () => { // Due to the transparent proxy we should not be able to set admin from other than the proxy admin const tx = stakingProxy.connect(governor).setAdmin(me.address) await expect(tx).revertedWith( - "function selector was not recognized and there's no fallback function", + 'function selector was not recognized and there\'s no fallback function', ) }) }) diff --git a/packages/contracts/tsconfig.json b/packages/contracts/tsconfig.json index 791b4375e..60037c936 100644 --- a/packages/contracts/tsconfig.json +++ b/packages/contracts/tsconfig.json @@ -8,5 +8,14 @@ "resolveJsonModule": true, "esModuleInterop": true }, - "include": ["hardhat.config.ts", "index.d.ts", "scripts/**/*.ts", "test/**/*.ts", "tasks/**/*.ts"] + "include": [ + ".solcover.js", + "truffle.js", + "eslint.config.js", + "hardhat.config.ts", + "index.d.ts", + "scripts/**/*.ts", + "test/**/*.ts", + "tasks/**/*.ts" + ] } diff --git a/yarn.lock b/yarn.lock index bbf7d9297..cdb16edb9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -140,15 +140,6 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:7.12.11": - version: 7.12.11 - resolution: "@babel/code-frame@npm:7.12.11" - dependencies: - "@babel/highlight": "npm:^7.10.4" - checksum: 836ffd155506768e991d6dd8c51db37cad5958ed1c8e0a2329ccd9527165d5c752e943d66a5c3c92ffd45f343419f0742e7636629a529f4fbd5303e3637746b9 - languageName: node - linkType: hard - "@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.23.5": version: 7.23.5 resolution: "@babel/code-frame@npm:7.23.5" @@ -389,7 +380,7 @@ __metadata: languageName: node linkType: hard -"@babel/highlight@npm:^7.10.4, @babel/highlight@npm:^7.23.4": +"@babel/highlight@npm:^7.23.4": version: 7.23.4 resolution: "@babel/highlight@npm:7.23.4" dependencies: @@ -1396,23 +1387,6 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^0.4.3": - version: 0.4.3 - resolution: "@eslint/eslintrc@npm:0.4.3" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.1.1" - espree: "npm:^7.3.0" - globals: "npm:^13.9.0" - ignore: "npm:^4.0.6" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^3.13.1" - minimatch: "npm:^3.0.4" - strip-json-comments: "npm:^3.1.1" - checksum: 0eed93369f72ef044686d07824742121f9b95153ff34f4614e4e69d64332ee68c84eb70da851a9005bb76b3d1d64ad76c2e6293a808edc0f7dfb883689ca136d - languageName: node - linkType: hard - "@eslint/eslintrc@npm:^2.1.4": version: 2.1.4 resolution: "@eslint/eslintrc@npm:2.1.4" @@ -1437,6 +1411,13 @@ __metadata: languageName: node linkType: hard +"@eslint/js@npm:8.57.0": + version: 8.57.0 + resolution: "@eslint/js@npm:8.57.0" + checksum: 9a518bb8625ba3350613903a6d8c622352ab0c6557a59fe6ff6178bf882bf57123f9d92aa826ee8ac3ee74b9c6203fe630e9ee00efb03d753962dcf65ee4bd94 + languageName: node + linkType: hard + "@ethereum-waffle/chai@npm:^3.4.4": version: 3.4.4 resolution: "@ethereum-waffle/chai@npm:3.4.4" @@ -2666,8 +2647,6 @@ __metadata: "@types/sinon-chai": "npm:^3.2.12" "@types/winston": "npm:^2.4.4" "@types/yargs": "npm:^16.0.0" - "@typescript-eslint/eslint-plugin": "npm:^4.0.0" - "@typescript-eslint/parser": "npm:^4.0.0" "@urql/core": "npm:^2.1.3" arbos-precompiles: "npm:^1.0.2" bignumber.js: "npm:^9.0.0" @@ -2676,10 +2655,8 @@ __metadata: cli-table: "npm:^0.3.6" console-table-printer: "npm:^2.11.1" dotenv: "npm:^9.0.0" - eslint: "npm:^7.24.0" - eslint-config-prettier: "npm:^8.3.0" - eslint-plugin-no-only-tests: "npm:^2.4.0" - eslint-plugin-prettier: "npm:^3.4.0" + eslint: "npm:^8.57.0" + eslint-graph-config: "workspace:^0.0.1" ethereum-waffle: "npm:^3.2.0" ethers: "npm:^5.7.2" form-data: "npm:^4.0.0" @@ -2697,10 +2674,7 @@ __metadata: isomorphic-fetch: "npm:^3.0.0" lint-staged: "npm:^10.5.4" p-queue: "npm:^6.6.1" - prettier: "npm:^2.2.1" - prettier-plugin-solidity: "npm:1.0.0-beta.19" solhint: "npm:^3.3.6" - solhint-plugin-prettier: "npm:^0.0.5" solidity-coverage: "npm:^0.7.16" ts-node: "npm:^10.9.1" typechain: "npm:^5.0.0" @@ -3673,7 +3647,7 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.11.13": +"@humanwhocodes/config-array@npm:^0.11.13, @humanwhocodes/config-array@npm:^0.11.14": version: 0.11.14 resolution: "@humanwhocodes/config-array@npm:0.11.14" dependencies: @@ -3684,17 +3658,6 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/config-array@npm:^0.5.0": - version: 0.5.0 - resolution: "@humanwhocodes/config-array@npm:0.5.0" - dependencies: - "@humanwhocodes/object-schema": "npm:^1.2.0" - debug: "npm:^4.1.1" - minimatch: "npm:^3.0.4" - checksum: 217fac9e03492361825a2bf761d4bb7ec6d10002a10f7314142245eb13ac9d123523d24d5619c3c4159af215c7b3e583ed386108e227014bef4efbf9caca8ccc - languageName: node - linkType: hard - "@humanwhocodes/module-importer@npm:^1.0.1": version: 1.0.1 resolution: "@humanwhocodes/module-importer@npm:1.0.1" @@ -3702,13 +3665,6 @@ __metadata: languageName: node linkType: hard -"@humanwhocodes/object-schema@npm:^1.2.0": - version: 1.2.1 - resolution: "@humanwhocodes/object-schema@npm:1.2.1" - checksum: c3c35fdb70c04a569278351c75553e293ae339684ed75895edc79facc7276e351115786946658d78133130c0cca80e57e2203bc07f8fa7fe7980300e8deef7db - languageName: node - linkType: hard - "@humanwhocodes/object-schema@npm:^2.0.2": version: 2.0.2 resolution: "@humanwhocodes/object-schema@npm:2.0.2" @@ -5375,7 +5331,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.7, @types/json-schema@npm:^7.0.9": +"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.9": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db @@ -5702,28 +5658,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:^4.0.0": - version: 4.33.0 - resolution: "@typescript-eslint/eslint-plugin@npm:4.33.0" - dependencies: - "@typescript-eslint/experimental-utils": "npm:4.33.0" - "@typescript-eslint/scope-manager": "npm:4.33.0" - debug: "npm:^4.3.1" - functional-red-black-tree: "npm:^1.0.1" - ignore: "npm:^5.1.8" - regexpp: "npm:^3.1.0" - semver: "npm:^7.3.5" - tsutils: "npm:^3.21.0" - peerDependencies: - "@typescript-eslint/parser": ^4.0.0 - eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: c1e1e424e257fa6e5e8b18d7ff77e8a983a761f4acc0cd58ebd31de8ec56c8c472689989cff0290eee41457662a1e664b555cf74bfc1b37bdf8c87ccac2a4663 - languageName: node - linkType: hard - "@typescript-eslint/eslint-plugin@npm:^6.8.0": version: 6.21.0 resolution: "@typescript-eslint/eslint-plugin@npm:6.21.0" @@ -5749,22 +5683,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/experimental-utils@npm:4.33.0": - version: 4.33.0 - resolution: "@typescript-eslint/experimental-utils@npm:4.33.0" - dependencies: - "@types/json-schema": "npm:^7.0.7" - "@typescript-eslint/scope-manager": "npm:4.33.0" - "@typescript-eslint/types": "npm:4.33.0" - "@typescript-eslint/typescript-estree": "npm:4.33.0" - eslint-scope: "npm:^5.1.1" - eslint-utils: "npm:^3.0.0" - peerDependencies: - eslint: "*" - checksum: bb2a48c9df21ef06ccbcd083753b8c51b30a46cde67ab56d278b30ad7868d2e07641e51b6f7fb54437dcb7aff134fac44708e730e2b8f6e43027fefe8629bcb9 - languageName: node - linkType: hard - "@typescript-eslint/parser@npm:7.0.2": version: 7.0.2 resolution: "@typescript-eslint/parser@npm:7.0.2" @@ -5783,23 +5701,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/parser@npm:^4.0.0": - version: 4.33.0 - resolution: "@typescript-eslint/parser@npm:4.33.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:4.33.0" - "@typescript-eslint/types": "npm:4.33.0" - "@typescript-eslint/typescript-estree": "npm:4.33.0" - debug: "npm:^4.3.1" - peerDependencies: - eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 - peerDependenciesMeta: - typescript: - optional: true - checksum: d6f91479b2c0d0ff20ac2dbc7540b28c175fd834a220a4f227209f6c74c55401ac6bd41b2bb4cf40b3ba7761075ccded2019bfc6096c2e4f273bd4ae86c44172 - languageName: node - linkType: hard - "@typescript-eslint/parser@npm:^6.8.0": version: 6.21.0 resolution: "@typescript-eslint/parser@npm:6.21.0" @@ -5818,16 +5719,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:4.33.0": - version: 4.33.0 - resolution: "@typescript-eslint/scope-manager@npm:4.33.0" - dependencies: - "@typescript-eslint/types": "npm:4.33.0" - "@typescript-eslint/visitor-keys": "npm:4.33.0" - checksum: 1dfe65777eeb430c1ef778bdad35e6065d4b3075ddb2639d0747d8db93c02eebf6832ba82388a7f80662e0e9f61f1922fe939b53a20889e11fb9f80c4029c6b7 - languageName: node - linkType: hard - "@typescript-eslint/scope-manager@npm:6.21.0": version: 6.21.0 resolution: "@typescript-eslint/scope-manager@npm:6.21.0" @@ -5882,13 +5773,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:4.33.0": - version: 4.33.0 - resolution: "@typescript-eslint/types@npm:4.33.0" - checksum: 6c94780a589eca7a75ae2b014f320bc412b50794c39ab04889918bb39a40e72584b65c8c0b035330cb0599579afaa3adccee40701f63cf39c0e89299de199d4b - languageName: node - linkType: hard - "@typescript-eslint/types@npm:6.21.0": version: 6.21.0 resolution: "@typescript-eslint/types@npm:6.21.0" @@ -5903,24 +5787,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:4.33.0": - version: 4.33.0 - resolution: "@typescript-eslint/typescript-estree@npm:4.33.0" - dependencies: - "@typescript-eslint/types": "npm:4.33.0" - "@typescript-eslint/visitor-keys": "npm:4.33.0" - debug: "npm:^4.3.1" - globby: "npm:^11.0.3" - is-glob: "npm:^4.0.1" - semver: "npm:^7.3.5" - tsutils: "npm:^3.21.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 67609a7bdd680136765d103dec4b8afb38a17436e8a5cd830da84f62c6153c3acba561da3b9e2140137b1a0bcbbfc19d4256c692f7072acfebcff88db079e22b - languageName: node - linkType: hard - "@typescript-eslint/typescript-estree@npm:6.21.0": version: 6.21.0 resolution: "@typescript-eslint/typescript-estree@npm:6.21.0" @@ -5993,16 +5859,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:4.33.0": - version: 4.33.0 - resolution: "@typescript-eslint/visitor-keys@npm:4.33.0" - dependencies: - "@typescript-eslint/types": "npm:4.33.0" - eslint-visitor-keys: "npm:^2.0.0" - checksum: 95b3904db6113ef365892567d47365e6af3708e6fa905743426036f99e1b7fd4a275facec5d939afecb618369f9d615e379d39f96b8936f469e75507c41c249c - languageName: node - linkType: hard - "@typescript-eslint/visitor-keys@npm:6.21.0": version: 6.21.0 resolution: "@typescript-eslint/visitor-keys@npm:6.21.0" @@ -6260,7 +6116,7 @@ __metadata: languageName: node linkType: hard -"acorn-jsx@npm:^5.3.1, acorn-jsx@npm:^5.3.2": +"acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" peerDependencies: @@ -6276,15 +6132,6 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^7.4.0": - version: 7.4.1 - resolution: "acorn@npm:7.4.1" - bin: - acorn: bin/acorn - checksum: bd0b2c2b0f334bbee48828ff897c12bd2eb5898d03bf556dcc8942022cec795ac5bb5b6b585e2de687db6231faf07e096b59a361231dd8c9344d5df5f7f0e526 - languageName: node - linkType: hard - "acorn@npm:^8.11.3, acorn@npm:^8.4.1, acorn@npm:^8.9.0": version: 8.11.3 resolution: "acorn@npm:8.11.3" @@ -6364,7 +6211,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.10.0, ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.6": +"ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.6": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -9574,7 +9421,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.2.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": +"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.2.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -10083,13 +9930,6 @@ __metadata: languageName: node linkType: hard -"emoji-regex@npm:^10.0.0": - version: 10.3.0 - resolution: "emoji-regex@npm:10.3.0" - checksum: b4838e8dcdceb44cf47f59abe352c25ff4fe7857acaf5fb51097c427f6f75b44d052eb907a7a3b86f86bc4eae3a93f5c2b7460abe79c407307e6212d65c91163 - languageName: node - linkType: hard - "emoji-regex@npm:^8.0.0": version: 8.0.0 resolution: "emoji-regex@npm:8.0.0" @@ -10156,7 +9996,7 @@ __metadata: languageName: node linkType: hard -"enquirer@npm:^2.3.0, enquirer@npm:^2.3.5, enquirer@npm:^2.3.6": +"enquirer@npm:^2.3.0, enquirer@npm:^2.3.6": version: 2.4.1 resolution: "enquirer@npm:2.4.1" dependencies: @@ -10397,17 +10237,6 @@ __metadata: languageName: node linkType: hard -"eslint-config-prettier@npm:^8.3.0": - version: 8.10.0 - resolution: "eslint-config-prettier@npm:8.10.0" - peerDependencies: - eslint: ">=7.0.0" - bin: - eslint-config-prettier: bin/cli.js - checksum: 19f8c497d9bdc111a17a61b25ded97217be3755bbc4714477dfe535ed539dddcaf42ef5cf8bb97908b058260cf89a3d7c565cb0be31096cbcd39f4c2fa5fe43c - languageName: node - linkType: hard - "eslint-config-prettier@npm:^9.0.0": version: 9.1.0 resolution: "eslint-config-prettier@npm:9.1.0" @@ -10419,7 +10248,7 @@ __metadata: languageName: node linkType: hard -"eslint-graph-config@workspace:^, eslint-graph-config@workspace:packages/eslint-graph-config": +"eslint-graph-config@workspace:^, eslint-graph-config@workspace:^0.0.1, eslint-graph-config@workspace:packages/eslint-graph-config": version: 0.0.0-use.local resolution: "eslint-graph-config@workspace:packages/eslint-graph-config" dependencies: @@ -10436,13 +10265,6 @@ __metadata: languageName: unknown linkType: soft -"eslint-plugin-no-only-tests@npm:^2.4.0": - version: 2.6.0 - resolution: "eslint-plugin-no-only-tests@npm:2.6.0" - checksum: 23e0a65f7483fac71073535a12567dab1a32fa2fb1e993cac60bbb93409f669ee98a2a296c3a4f862aefa76850a1576c17511cb21e6e2470a58a8c6f9b6f3043 - languageName: node - linkType: hard - "eslint-plugin-no-only-tests@npm:^3.1.0": version: 3.1.0 resolution: "eslint-plugin-no-only-tests@npm:3.1.0" @@ -10459,21 +10281,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-prettier@npm:^3.4.0": - version: 3.4.1 - resolution: "eslint-plugin-prettier@npm:3.4.1" - dependencies: - prettier-linter-helpers: "npm:^1.0.0" - peerDependencies: - eslint: ">=5.0.0" - prettier: ">=1.13.0" - peerDependenciesMeta: - eslint-config-prettier: - optional: true - checksum: b2599dd22b5b0d2e3baffc94ba55a33ed525d642125d657fbc8511a2458146bdcc2bc810418713bb0049e37765def92b51213a4467984f4c758807bea224d0c5 - languageName: node - linkType: hard - "eslint-plugin-prettier@npm:^5.0.1": version: 5.1.3 resolution: "eslint-plugin-prettier@npm:5.1.3" @@ -10494,16 +10301,6 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:^5.1.1": - version: 5.1.1 - resolution: "eslint-scope@npm:5.1.1" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^4.1.1" - checksum: d30ef9dc1c1cbdece34db1539a4933fe3f9b14e1ffb27ecc85987902ee663ad7c9473bbd49a9a03195a373741e62e2f807c4938992e019b511993d163450e70a - languageName: node - linkType: hard - "eslint-scope@npm:^7.2.2": version: 7.2.2 resolution: "eslint-scope@npm:7.2.2" @@ -10514,40 +10311,6 @@ __metadata: languageName: node linkType: hard -"eslint-utils@npm:^2.1.0": - version: 2.1.0 - resolution: "eslint-utils@npm:2.1.0" - dependencies: - eslint-visitor-keys: "npm:^1.1.0" - checksum: 69521c5d6569384b24093125d037ba238d3d6e54367f7143af9928f5286369e912c26cad5016d730c0ffb9797ac9e83831059d7f1d863f7dc84330eb02414611 - languageName: node - linkType: hard - -"eslint-utils@npm:^3.0.0": - version: 3.0.0 - resolution: "eslint-utils@npm:3.0.0" - dependencies: - eslint-visitor-keys: "npm:^2.0.0" - peerDependencies: - eslint: ">=5" - checksum: 45aa2b63667a8d9b474c98c28af908d0a592bed1a4568f3145cd49fb5d9510f545327ec95561625290313fe126e6d7bdfe3fdbdb6f432689fab6b9497d3bfb52 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^1.1.0, eslint-visitor-keys@npm:^1.3.0": - version: 1.3.0 - resolution: "eslint-visitor-keys@npm:1.3.0" - checksum: 10c91fdbbe36810dd4308e57f9a8bc7177188b2a70247e54e3af1fa05ebc66414ae6fd4ce3c6c6821591f43a556e9037bc6b071122e099b5f8b7d2f76df553e3 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^2.0.0": - version: 2.1.0 - resolution: "eslint-visitor-keys@npm:2.1.0" - checksum: 9f0e3a2db751d84067d15977ac4b4472efd6b303e369e6ff241a99feac04da758f46d5add022c33d06b53596038dbae4b4aceb27c7e68b8dfc1055b35e495787 - languageName: node - linkType: hard - "eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.1, eslint-visitor-keys@npm:^3.4.3": version: 3.4.3 resolution: "eslint-visitor-keys@npm:3.4.3" @@ -10555,65 +10318,63 @@ __metadata: languageName: node linkType: hard -"eslint@npm:^7.24.0": - version: 7.32.0 - resolution: "eslint@npm:7.32.0" +"eslint@npm:^8.52.0, eslint@npm:^8.56.0": + version: 8.56.0 + resolution: "eslint@npm:8.56.0" dependencies: - "@babel/code-frame": "npm:7.12.11" - "@eslint/eslintrc": "npm:^0.4.3" - "@humanwhocodes/config-array": "npm:^0.5.0" - ajv: "npm:^6.10.0" + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.6.1" + "@eslint/eslintrc": "npm:^2.1.4" + "@eslint/js": "npm:8.56.0" + "@humanwhocodes/config-array": "npm:^0.11.13" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@nodelib/fs.walk": "npm:^1.2.8" + "@ungap/structured-clone": "npm:^1.2.0" + ajv: "npm:^6.12.4" chalk: "npm:^4.0.0" cross-spawn: "npm:^7.0.2" - debug: "npm:^4.0.1" + debug: "npm:^4.3.2" doctrine: "npm:^3.0.0" - enquirer: "npm:^2.3.5" escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^5.1.1" - eslint-utils: "npm:^2.1.0" - eslint-visitor-keys: "npm:^2.0.0" - espree: "npm:^7.3.1" - esquery: "npm:^1.4.0" + eslint-scope: "npm:^7.2.2" + eslint-visitor-keys: "npm:^3.4.3" + espree: "npm:^9.6.1" + esquery: "npm:^1.4.2" esutils: "npm:^2.0.2" fast-deep-equal: "npm:^3.1.3" file-entry-cache: "npm:^6.0.1" - functional-red-black-tree: "npm:^1.0.1" - glob-parent: "npm:^5.1.2" - globals: "npm:^13.6.0" - ignore: "npm:^4.0.6" - import-fresh: "npm:^3.0.0" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + globals: "npm:^13.19.0" + graphemer: "npm:^1.4.0" + ignore: "npm:^5.2.0" imurmurhash: "npm:^0.1.4" is-glob: "npm:^4.0.0" - js-yaml: "npm:^3.13.1" + is-path-inside: "npm:^3.0.3" + js-yaml: "npm:^4.1.0" json-stable-stringify-without-jsonify: "npm:^1.0.1" levn: "npm:^0.4.1" lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.0.4" + minimatch: "npm:^3.1.2" natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.1" - progress: "npm:^2.0.0" - regexpp: "npm:^3.1.0" - semver: "npm:^7.2.1" - strip-ansi: "npm:^6.0.0" - strip-json-comments: "npm:^3.1.0" - table: "npm:^6.0.9" + optionator: "npm:^0.9.3" + strip-ansi: "npm:^6.0.1" text-table: "npm:^0.2.0" - v8-compile-cache: "npm:^2.0.3" bin: eslint: bin/eslint.js - checksum: 84409f7767556179cb11529f1215f335c7dfccf90419df6147f949f14c347a960c7b569e80ed84011a0b6d10da1ef5046edbbb9b11c3e59aa6696d5217092e93 + checksum: 2be598f7da1339d045ad933ffd3d4742bee610515cd2b0d9a2b8b729395a01d4e913552fff555b559fccaefd89d7b37632825789d1b06470608737ae69ab43fb languageName: node linkType: hard -"eslint@npm:^8.52.0, eslint@npm:^8.56.0": - version: 8.56.0 - resolution: "eslint@npm:8.56.0" +"eslint@npm:^8.57.0": + version: 8.57.0 + resolution: "eslint@npm:8.57.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.2.0" "@eslint-community/regexpp": "npm:^4.6.1" "@eslint/eslintrc": "npm:^2.1.4" - "@eslint/js": "npm:8.56.0" - "@humanwhocodes/config-array": "npm:^0.11.13" + "@eslint/js": "npm:8.57.0" + "@humanwhocodes/config-array": "npm:^0.11.14" "@humanwhocodes/module-importer": "npm:^1.0.1" "@nodelib/fs.walk": "npm:^1.2.8" "@ungap/structured-clone": "npm:^1.2.0" @@ -10649,7 +10410,7 @@ __metadata: text-table: "npm:^0.2.0" bin: eslint: bin/eslint.js - checksum: 2be598f7da1339d045ad933ffd3d4742bee610515cd2b0d9a2b8b729395a01d4e913552fff555b559fccaefd89d7b37632825789d1b06470608737ae69ab43fb + checksum: 00bb96fd2471039a312435a6776fe1fd557c056755eaa2b96093ef3a8508c92c8775d5f754768be6b1dddd09fdd3379ddb231eeb9b6c579ee17ea7d68000a529 languageName: node linkType: hard @@ -10665,17 +10426,6 @@ __metadata: languageName: node linkType: hard -"espree@npm:^7.3.0, espree@npm:^7.3.1": - version: 7.3.1 - resolution: "espree@npm:7.3.1" - dependencies: - acorn: "npm:^7.4.0" - acorn-jsx: "npm:^5.3.1" - eslint-visitor-keys: "npm:^1.3.0" - checksum: f4e81b903f03eaf0e6925cea20571632da427deb6e14ca37e481f72c11f36d7bb4945fe8a2ff15ab22d078d3cd93ee65355fa94de9c27485c356481775f25d85 - languageName: node - linkType: hard - "espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" @@ -10707,7 +10457,7 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.4.0, esquery@npm:^1.4.2": +"esquery@npm:^1.4.2": version: 1.5.0 resolution: "esquery@npm:1.5.0" dependencies: @@ -10732,13 +10482,6 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^4.1.1": - version: 4.3.0 - resolution: "estraverse@npm:4.3.0" - checksum: 9cb46463ef8a8a4905d3708a652d60122a0c20bb58dec7e0e12ab0e7235123d74214fc0141d743c381813e1b992767e2708194f6f6e0f9fd00c1b4e0887b8b6d - languageName: node - linkType: hard - "estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": version: 5.3.0 resolution: "estraverse@npm:5.3.0" @@ -12668,7 +12411,7 @@ __metadata: languageName: node linkType: hard -"globals@npm:^13.19.0, globals@npm:^13.6.0, globals@npm:^13.9.0": +"globals@npm:^13.19.0": version: 13.24.0 resolution: "globals@npm:13.24.0" dependencies: @@ -13628,14 +13371,7 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^4.0.6": - version: 4.0.6 - resolution: "ignore@npm:4.0.6" - checksum: 836ee7dc7fd9436096e2dba429359dbb9fa0e33d309e2b2d81692f375f6ca82024fc00567f798613d50c6b989e9cd2ad2b065acf116325cde177f02c86b7d4e0 - languageName: node - linkType: hard - -"ignore@npm:^5.1.1, ignore@npm:^5.1.8, ignore@npm:^5.2.0, ignore@npm:^5.2.4": +"ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.2.4": version: 5.3.1 resolution: "ignore@npm:5.3.1" checksum: 703f7f45ffb2a27fb2c5a8db0c32e7dee66b33a225d28e8db4e1be6474795f606686a6e3bcc50e1aa12f2042db4c9d4a7d60af3250511de74620fbed052ea4cd @@ -17302,7 +17038,7 @@ __metadata: languageName: node linkType: hard -"optionator@npm:^0.9.1, optionator@npm:^0.9.3": +"optionator@npm:^0.9.3": version: 0.9.3 resolution: "optionator@npm:0.9.3" dependencies: @@ -18190,22 +17926,6 @@ __metadata: languageName: node linkType: hard -"prettier-plugin-solidity@npm:1.0.0-beta.19": - version: 1.0.0-beta.19 - resolution: "prettier-plugin-solidity@npm:1.0.0-beta.19" - dependencies: - "@solidity-parser/parser": "npm:^0.14.0" - emoji-regex: "npm:^10.0.0" - escape-string-regexp: "npm:^4.0.0" - semver: "npm:^7.3.5" - solidity-comments-extractor: "npm:^0.0.7" - string-width: "npm:^4.2.3" - peerDependencies: - prettier: ^2.3.0 - checksum: f0fcfb61afeb3c9cda4bc0d49ddb81a730faa4398dd06459d39d1a93b345a2ab9eeb227b4f68c6278b19f053e4b4ac4ab239889691ac7924f620407ef698a426 - languageName: node - linkType: hard - "prettier-plugin-solidity@npm:^1.3.1": version: 1.3.1 resolution: "prettier-plugin-solidity@npm:1.3.1" @@ -18219,7 +17939,7 @@ __metadata: languageName: node linkType: hard -"prettier@npm:^2.1.2, prettier@npm:^2.2.1, prettier@npm:^2.7.1, prettier@npm:^2.8.3": +"prettier@npm:^2.1.2, prettier@npm:^2.7.1, prettier@npm:^2.8.3": version: 2.8.8 resolution: "prettier@npm:2.8.8" bin: @@ -18272,13 +17992,6 @@ __metadata: languageName: node linkType: hard -"progress@npm:^2.0.0": - version: 2.0.3 - resolution: "progress@npm:2.0.3" - checksum: 1697e07cb1068055dbe9fe858d242368ff5d2073639e652b75a7eb1f2a1a8d4afd404d719de23c7b48481a6aa0040686310e2dac2f53d776daa2176d3f96369c - languageName: node - linkType: hard - "prom-client@npm:14.0.1": version: 14.0.1 resolution: "prom-client@npm:14.0.1" @@ -18934,13 +18647,6 @@ __metadata: languageName: node linkType: hard -"regexpp@npm:^3.1.0": - version: 3.2.0 - resolution: "regexpp@npm:3.2.0" - checksum: d1da82385c8754a1681416b90b9cca0e21b4a2babef159099b88f640637d789c69011d0bc94705dacab85b81133e929d027d85210e8b8b03f8035164dbc14710 - languageName: node - linkType: hard - "regexpu-core@npm:^2.0.0": version: 2.0.0 resolution: "regexpu-core@npm:2.0.0" @@ -19567,7 +19273,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.6.0, semver@npm:^7.2.1, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:7.6.0, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4": version: 7.6.0 resolution: "semver@npm:7.6.0" dependencies: @@ -20228,18 +19934,6 @@ __metadata: languageName: unknown linkType: soft -"solhint-plugin-prettier@npm:^0.0.5": - version: 0.0.5 - resolution: "solhint-plugin-prettier@npm:0.0.5" - dependencies: - prettier-linter-helpers: "npm:^1.0.0" - peerDependencies: - prettier: ^1.15.0 || ^2.0.0 - prettier-plugin-solidity: ^1.0.0-alpha.14 - checksum: 3dd40c9e7d7c0cf9a36816cb185f75ea12b51b976e13568ab3d4e914c3160d75b6b8fe5b18bf33c06e4a17f7dcc9d25a22dfe1f3fb9a27c4911e6d41234ef5e2 - languageName: node - linkType: hard - "solhint-plugin-prettier@npm:^0.1.0": version: 0.1.0 resolution: "solhint-plugin-prettier@npm:0.1.0" @@ -20293,13 +19987,6 @@ __metadata: languageName: node linkType: hard -"solidity-comments-extractor@npm:^0.0.7": - version: 0.0.7 - resolution: "solidity-comments-extractor@npm:0.0.7" - checksum: 57fb166ff71812404288ae1a386bb9bbb6330662aedc3b45d89f6f0ce51ee0e36c9f4b9d4fd363c2b37fbf607e42df088e734c532fb93e2f345601b429813d9e - languageName: node - linkType: hard - "solidity-comments-extractor@npm:^0.0.8": version: 0.0.8 resolution: "solidity-comments-extractor@npm:0.0.8" @@ -20839,7 +20526,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd @@ -20954,7 +20641,7 @@ __metadata: languageName: node linkType: hard -"table@npm:^6.0.9, table@npm:^6.8.0, table@npm:^6.8.1": +"table@npm:^6.8.0, table@npm:^6.8.1": version: 6.8.1 resolution: "table@npm:6.8.1" dependencies: @@ -21412,7 +21099,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^1.11.1, tslib@npm:^1.8.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": +"tslib@npm:^1.11.1, tslib@npm:^1.9.0, tslib@npm:^1.9.3": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: 69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2 @@ -21447,17 +21134,6 @@ __metadata: languageName: node linkType: hard -"tsutils@npm:^3.21.0": - version: 3.21.0 - resolution: "tsutils@npm:3.21.0" - dependencies: - tslib: "npm:^1.8.1" - peerDependencies: - typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - checksum: 02f19e458ec78ead8fffbf711f834ad8ecd2cc6ade4ec0320790713dccc0a412b99e7fd907c4cda2a1dc602c75db6f12e0108e87a5afad4b2f9e90a24cabd5a2 - languageName: node - linkType: hard - "tty-table@npm:^4.1.5": version: 4.2.3 resolution: "tty-table@npm:4.2.3" @@ -22176,13 +21852,6 @@ __metadata: languageName: node linkType: hard -"v8-compile-cache@npm:^2.0.3": - version: 2.4.0 - resolution: "v8-compile-cache@npm:2.4.0" - checksum: 387851192545e7f4d691ba674de90890bba76c0f08ee4909ab862377f556221e75b3a361466490e201203401d64d7795f889882bdabc98b6f3c0bf1038a535be - languageName: node - linkType: hard - "validate-npm-package-license@npm:^3.0.1": version: 3.0.4 resolution: "validate-npm-package-license@npm:3.0.4"