From a424371e89307487704eb7cedd1fcaab2f4cae03 Mon Sep 17 00:00:00 2001 From: Yorke Rhodes Date: Mon, 2 May 2022 17:19:53 -0700 Subject: [PATCH] Use global prettier config and sort imports (#372) * Use global prettier config * Use workspaces in CI * Check for git changes in prettier CI job --- .github/workflows/node.yml | 4 +- solidity/core/.prettierrc => .prettierrc | 5 +- build.sh | 12 - lint-prettier.sh | 12 - package.json | 17 +- solidity/app/.prettierrc | 18 - .../app/test/abacusConnectionClient.test.ts | 7 +- solidity/app/test/router.test.ts | 7 +- solidity/apps/.prettierrc | 18 - .../test/governance/governanceRouter.test.ts | 7 +- .../test/governance/lib/GovernanceDeploy.ts | 5 +- solidity/apps/test/governance/lib/utils.ts | 3 +- .../core/test/abacusConnectionManager.test.ts | 12 +- solidity/core/test/badrecipient.test.ts | 4 +- solidity/core/test/common.test.ts | 4 +- solidity/core/test/inbox.test.ts | 6 +- .../core/test/interchainGasPaymaster.test.ts | 4 +- solidity/core/test/lib/upgrade.ts | 6 +- solidity/core/test/merkle.test.ts | 3 +- solidity/core/test/message.test.ts | 4 +- solidity/core/test/outbox.test.ts | 5 +- solidity/core/test/upgrade.test.ts | 9 +- .../inboxValidatorManager.test.ts | 8 +- .../multisigValidatorManager.test.ts | 4 +- .../outboxValidatorManager.test.ts | 8 +- solidity/core/test/validator-manager/utils.ts | 2 +- typescript/contract-metrics/.prettierrc | 5 - typescript/contract-metrics/src/config.ts | 4 +- typescript/contract-metrics/src/gas.ts | 2 +- typescript/contract-metrics/src/metrics.ts | 4 +- .../contract-metrics/src/monitor/core.ts | 6 +- .../src/monitor/governance.ts | 3 +- typescript/contract-metrics/src/print.ts | 8 +- .../contract-metrics/src/registerContext.ts | 1 + typescript/contract-metrics/src/trace.ts | 3 +- typescript/deploy/.prettierrc | 5 - typescript/deploy/src/check.ts | 1 + typescript/deploy/src/config.ts | 3 +- typescript/deploy/src/deploy.ts | 11 +- typescript/deploy/src/proxy.ts | 3 +- typescript/deploy/src/router/check.ts | 4 +- typescript/deploy/src/router/deploy.ts | 6 +- typescript/deploy/src/router/types.ts | 2 +- .../deploy/src/verify/ContractVerifier.ts | 3 +- typescript/hardhat/src/TestAbacusDeploy.ts | 34 +- typescript/hardhat/src/TestDeploy.ts | 2 +- typescript/hardhat/src/TestRouterDeploy.ts | 11 +- .../hardhat/test/testAbacusDeploy.test.ts | 33 +- typescript/infra/.prettierrc | 5 - .../infra/config/environments/dev/agent.ts | 1 + .../infra/config/environments/dev/domains.ts | 3 +- .../config/environments/dev/validators.ts | 6 +- .../infra/config/environments/test/agent.ts | 5 +- .../infra/config/environments/test/domains.ts | 6 +- .../config/environments/test/validators.ts | 6 +- typescript/infra/config/networks/mainnets.ts | 3 +- typescript/infra/config/networks/testnets.ts | 3 +- typescript/infra/hardhat.config.ts | 17 +- typescript/infra/scripts/check-deploy.ts | 8 +- typescript/infra/scripts/core.ts | 5 +- typescript/infra/scripts/create-keys.ts | 3 +- typescript/infra/scripts/delete-keys.ts | 3 +- typescript/infra/scripts/deploy-agents.ts | 3 +- .../infra/scripts/deploy-contract-metrics.ts | 1 + .../scripts/deploy-infra-external-secrets.ts | 5 +- .../infra/scripts/deploy-infra-monitoring.ts | 3 +- typescript/infra/scripts/deploy-keymaster.ts | 1 + typescript/infra/scripts/governance.ts | 6 +- .../infra/scripts/output-agent-env-vars.ts | 7 +- typescript/infra/scripts/rotate-key.ts | 2 +- typescript/infra/scripts/set-validator.ts | 4 +- .../infra/scripts/update-agents-diff.ts | 3 +- typescript/infra/scripts/update-key.ts | 2 +- typescript/infra/scripts/utils.ts | 6 +- typescript/infra/src/agents/aws/key.ts | 10 +- typescript/infra/src/agents/aws/user.ts | 7 +- .../infra/src/agents/aws/validator-user.ts | 7 +- typescript/infra/src/agents/gcp.ts | 6 +- typescript/infra/src/agents/index.ts | 9 +- typescript/infra/src/config/agent.ts | 8 +- typescript/infra/src/config/chain.ts | 6 +- typescript/infra/src/contract-metrics.ts | 1 + typescript/infra/src/core/check.ts | 9 +- typescript/infra/src/core/deploy.ts | 33 +- typescript/infra/src/core/govern.ts | 7 +- typescript/infra/src/core/types.ts | 2 +- typescript/infra/src/governance/check.ts | 7 +- typescript/infra/src/governance/deploy.ts | 6 +- typescript/infra/src/governance/types.ts | 4 +- .../external-secrets/external-secrets.ts | 2 +- .../infrastructure/monitoring/prometheus.ts | 2 +- typescript/infra/src/utils/gcloud.ts | 2 + typescript/infra/src/utils/helm.ts | 1 + typescript/infra/src/utils/utils.ts | 6 +- typescript/infra/src/verify.ts | 1 + typescript/infra/test/core.test.ts | 8 +- typescript/infra/test/governance.test.ts | 16 +- typescript/sdk/.prettierrc | 5 - typescript/sdk/src/app.ts | 3 +- typescript/sdk/src/core/contracts.ts | 14 +- typescript/sdk/src/core/environments/index.ts | 6 +- typescript/sdk/src/core/events.ts | 1 + typescript/sdk/src/core/message.ts | 4 +- typescript/sdk/src/events.ts | 5 +- typescript/sdk/src/gas/calculator.ts | 7 +- typescript/sdk/src/gas/token-prices.ts | 1 + typescript/sdk/src/governance/app.ts | 4 +- typescript/sdk/src/governance/contracts.ts | 8 +- .../sdk/src/governance/environments/index.ts | 4 +- typescript/sdk/src/governance/utils.ts | 2 + typescript/sdk/src/provider.ts | 4 +- typescript/sdk/src/types.ts | 1 + typescript/sdk/src/utils.ts | 2 +- typescript/utils/.prettierrc | 5 - typescript/utils/src/utils.ts | 1 + typescript/utils/src/validator.ts | 3 +- yarn.lock | 378 +++++++++++++++++- 117 files changed, 741 insertions(+), 342 deletions(-) rename solidity/core/.prettierrc => .prettierrc (69%) delete mode 100755 build.sh delete mode 100755 lint-prettier.sh delete mode 100644 solidity/app/.prettierrc delete mode 100644 solidity/apps/.prettierrc delete mode 100644 typescript/contract-metrics/.prettierrc delete mode 100644 typescript/deploy/.prettierrc delete mode 100644 typescript/infra/.prettierrc delete mode 100644 typescript/sdk/.prettierrc delete mode 100644 typescript/utils/.prettierrc diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 8fe16daec..f2e73a47f 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -52,7 +52,7 @@ jobs: key: ${{ github.sha }} - name: build - run: ./build.sh + run: yarn build lint-prettier: runs-on: ubuntu-latest @@ -66,7 +66,7 @@ jobs: - name: prettier run: | - ./lint-prettier.sh + yarn prettier CHANGES=$(git status -s) if [[ ! -z $CHANGES ]]; then echo "Changes found: $CHANGES" diff --git a/solidity/core/.prettierrc b/.prettierrc similarity index 69% rename from solidity/core/.prettierrc rename to .prettierrc index bf810e7b0..8b4ac47ca 100644 --- a/solidity/core/.prettierrc +++ b/.prettierrc @@ -14,5 +14,8 @@ "explicitTypes": "always" } } - ] + ], + "importOrder": ["^@abacus-network/(.*)$", "^../(.*)$", "^./(.*)$"], + "importOrderSeparation": true, + "importOrderSortSpecifiers": true } diff --git a/build.sh b/build.sh deleted file mode 100755 index b2a3b9473..000000000 --- a/build.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -yarn workspace @abacus-network/utils run build -yarn workspace @abacus-network/core run build -yarn workspace @abacus-network/hardhat run build -yarn workspace @abacus-network/app run build -yarn workspace @abacus-network/apps run build -yarn workspace @abacus-network/sdk run build -yarn workspace @abacus-network/contract-metrics run build -yarn workspace @abacus-network/deploy run build -yarn workspace @abacus-network/infra run build diff --git a/lint-prettier.sh b/lint-prettier.sh deleted file mode 100755 index ee23cc378..000000000 --- a/lint-prettier.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -yarn workspace @abacus-network/utils run prettier -yarn workspace @abacus-network/core run prettier -yarn workspace @abacus-network/hardhat run prettier -yarn workspace @abacus-network/app run prettier -yarn workspace @abacus-network/apps run prettier -yarn workspace @abacus-network/sdk run prettier -yarn workspace @abacus-network/contract-metrics run prettier -yarn workspace @abacus-network/deploy run prettier -yarn workspace @abacus-network/infra run prettier diff --git a/package.json b/package.json index cdfc718bc..a0813d16d 100644 --- a/package.json +++ b/package.json @@ -1,24 +1,19 @@ { "name": "@abacus-network/monorepo", "scripts": { - "build": "./build.sh", - "prettier": "./lint-prettier.sh" + "build": "yarn workspaces foreach --parallel --topological run build", + "prettier": "yarn workspaces foreach --parallel run prettier" }, "workspaces": [ - "typescript/utils", - "solidity/core", - "typescript/hardhat", - "solidity/app", - "solidity/apps", - "typescript/sdk", - "typescript/contract-metrics", - "typescript/deploy", - "typescript/infra" + "solidity/*", + "typescript/*" ], "private": true, "version": "0.0.0", "packageManager": "yarn@3.2.0", "devDependencies": { + "@trivago/prettier-plugin-sort-imports": "^3.2.0", + "prettier": "^2.2.1", "typescript": "^4.3.5" } } diff --git a/solidity/app/.prettierrc b/solidity/app/.prettierrc deleted file mode 100644 index bf810e7b0..000000000 --- a/solidity/app/.prettierrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "all", - "overrides": [ - { - "files": "*.sol", - "options": { - "printWidth": 80, - "tabWidth": 4, - "useTabs": false, - "singleQuote": false, - "bracketSpacing": false, - "explicitTypes": "always" - } - } - ] -} diff --git a/solidity/app/test/abacusConnectionClient.test.ts b/solidity/app/test/abacusConnectionClient.test.ts index 80c187684..3a1802d92 100644 --- a/solidity/app/test/abacusConnectionClient.test.ts +++ b/solidity/app/test/abacusConnectionClient.test.ts @@ -1,10 +1,11 @@ -import { ethers } from 'hardhat'; -import { expect } from 'chai'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { expect } from 'chai'; +import { ethers } from 'hardhat'; + import { - Outbox__factory, AbacusConnectionManager, AbacusConnectionManager__factory, + Outbox__factory, } from '@abacus-network/core'; import { diff --git a/solidity/app/test/router.test.ts b/solidity/app/test/router.test.ts index 2f9956fdf..6e29222fc 100644 --- a/solidity/app/test/router.test.ts +++ b/solidity/app/test/router.test.ts @@ -1,10 +1,11 @@ -import { ethers } from 'hardhat'; -import { expect } from 'chai'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { expect } from 'chai'; +import { ethers } from 'hardhat'; + import { - Outbox__factory, AbacusConnectionManager, AbacusConnectionManager__factory, + Outbox__factory, } from '@abacus-network/core'; import { utils } from '@abacus-network/utils'; diff --git a/solidity/apps/.prettierrc b/solidity/apps/.prettierrc deleted file mode 100644 index bf810e7b0..000000000 --- a/solidity/apps/.prettierrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "all", - "overrides": [ - { - "files": "*.sol", - "options": { - "printWidth": 80, - "tabWidth": 4, - "useTabs": false, - "singleQuote": false, - "bracketSpacing": false, - "explicitTypes": "always" - } - } - ] -} diff --git a/solidity/apps/test/governance/governanceRouter.test.ts b/solidity/apps/test/governance/governanceRouter.test.ts index f4a5dfda3..b76bf769d 100644 --- a/solidity/apps/test/governance/governanceRouter.test.ts +++ b/solidity/apps/test/governance/governanceRouter.test.ts @@ -1,9 +1,12 @@ -import { InterchainGasPaymaster, Outbox } from '@abacus-network/core'; -import { utils } from '@abacus-network/utils'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; import { abacus, ethers } from 'hardhat'; + +import { InterchainGasPaymaster, Outbox } from '@abacus-network/core'; +import { utils } from '@abacus-network/utils'; + import { GovernanceRouter, TestSet, TestSet__factory } from '../../types'; + import { GovernanceConfig, GovernanceDeploy } from './lib/GovernanceDeploy'; import { formatCall, increaseTimestampBy } from './lib/utils'; diff --git a/solidity/apps/test/governance/lib/GovernanceDeploy.ts b/solidity/apps/test/governance/lib/GovernanceDeploy.ts index c55f5005c..0b0f40252 100644 --- a/solidity/apps/test/governance/lib/GovernanceDeploy.ts +++ b/solidity/apps/test/governance/lib/GovernanceDeploy.ts @@ -1,8 +1,9 @@ import { ethers } from 'ethers'; -import { types } from '@abacus-network/utils'; + import { TestAbacusDeploy, TestRouterDeploy } from '@abacus-network/hardhat'; +import { types } from '@abacus-network/utils'; -import { GovernanceRouter__factory, GovernanceRouter } from '../../../types'; +import { GovernanceRouter, GovernanceRouter__factory } from '../../../types'; export type Governor = { domain: types.Domain; diff --git a/solidity/apps/test/governance/lib/utils.ts b/solidity/apps/test/governance/lib/utils.ts index fe314e2b3..cc6aac45a 100644 --- a/solidity/apps/test/governance/lib/utils.ts +++ b/solidity/apps/test/governance/lib/utils.ts @@ -1,6 +1,7 @@ -import { types, utils } from '@abacus-network/utils'; import { ethers } from 'ethers'; +import { types, utils } from '@abacus-network/utils'; + export enum GovernanceMessage { CALL = 1, SETGOVERNOR = 2, diff --git a/solidity/core/test/abacusConnectionManager.test.ts b/solidity/core/test/abacusConnectionManager.test.ts index 17039a43c..bcd4a7f6e 100644 --- a/solidity/core/test/abacusConnectionManager.test.ts +++ b/solidity/core/test/abacusConnectionManager.test.ts @@ -1,17 +1,17 @@ -import { ethers } from 'hardhat'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; import { ContractTransaction } from 'ethers'; -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers } from 'hardhat'; import { + AbacusConnectionManager, + AbacusConnectionManager__factory, InterchainGasPaymaster, InterchainGasPaymaster__factory, - TestOutbox, - TestOutbox__factory, TestInbox, TestInbox__factory, - AbacusConnectionManager, - AbacusConnectionManager__factory, + TestOutbox, + TestOutbox__factory, } from '../types'; const ONLY_OWNER_REVERT_MSG = 'Ownable: caller is not the owner'; diff --git a/solidity/core/test/badrecipient.test.ts b/solidity/core/test/badrecipient.test.ts index ea2cb6d46..c9171a774 100644 --- a/solidity/core/test/badrecipient.test.ts +++ b/solidity/core/test/badrecipient.test.ts @@ -1,6 +1,8 @@ -import { utils } from '@abacus-network/utils'; import { expect } from 'chai'; import { ethers } from 'hardhat'; + +import { utils } from '@abacus-network/utils'; + import { BadRandomRecipient__factory } from '../types'; describe('BadRecipient', () => { diff --git a/solidity/core/test/common.test.ts b/solidity/core/test/common.test.ts index 6fce58681..8bf8e0881 100644 --- a/solidity/core/test/common.test.ts +++ b/solidity/core/test/common.test.ts @@ -1,8 +1,8 @@ import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; -import { ethers } from 'hardhat'; import { expect } from 'chai'; +import { ethers } from 'hardhat'; -import { TestCommon__factory, TestCommon } from '../types'; +import { TestCommon, TestCommon__factory } from '../types'; const localDomain = 1000; const ONLY_OWNER_REVERT_MSG = 'Ownable: caller is not the owner'; diff --git a/solidity/core/test/inbox.test.ts b/solidity/core/test/inbox.test.ts index c5f609e2a..5d6bc6c2d 100644 --- a/solidity/core/test/inbox.test.ts +++ b/solidity/core/test/inbox.test.ts @@ -1,7 +1,10 @@ import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; -import { ethers } from 'hardhat'; import { expect } from 'chai'; +import { ethers } from 'hardhat'; + import { types, utils } from '@abacus-network/utils'; +import { MessageStatus } from '@abacus-network/utils/dist/src/types'; + import { BadRecipient1__factory, BadRecipient3__factory, @@ -14,7 +17,6 @@ import { TestValidatorManager, TestValidatorManager__factory, } from '../types'; -import { MessageStatus } from '@abacus-network/utils/dist/src/types'; const proveAndProcessTestCases = require('../../../vectors/proveAndProcess.json'); const messageWithProof = require('../../../vectors/messageWithProof.json'); diff --git a/solidity/core/test/interchainGasPaymaster.test.ts b/solidity/core/test/interchainGasPaymaster.test.ts index 21231261e..5507def9f 100644 --- a/solidity/core/test/interchainGasPaymaster.test.ts +++ b/solidity/core/test/interchainGasPaymaster.test.ts @@ -1,6 +1,6 @@ -import { ethers } from 'hardhat'; -import { expect } from 'chai'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { expect } from 'chai'; +import { ethers } from 'hardhat'; import { InterchainGasPaymaster, diff --git a/solidity/core/test/lib/upgrade.ts b/solidity/core/test/lib/upgrade.ts index c816ad52b..d34d13e9e 100644 --- a/solidity/core/test/lib/upgrade.ts +++ b/solidity/core/test/lib/upgrade.ts @@ -3,12 +3,12 @@ import { expect } from 'chai'; import { MysteryMathV1, - MysteryMathV2, MysteryMathV1__factory, - UpgradeBeaconController, + MysteryMathV2, UpgradeBeacon, - UpgradeBeacon__factory, + UpgradeBeaconController, UpgradeBeaconProxy__factory, + UpgradeBeacon__factory, } from '../../types'; export type MysteryMathUpgrade = { diff --git a/solidity/core/test/merkle.test.ts b/solidity/core/test/merkle.test.ts index b8092406c..54fb1330e 100644 --- a/solidity/core/test/merkle.test.ts +++ b/solidity/core/test/merkle.test.ts @@ -1,5 +1,6 @@ -import { ethers } from 'hardhat'; import { expect } from 'chai'; +import { ethers } from 'hardhat'; + import { types } from '@abacus-network/utils'; import { TestMerkle, TestMerkle__factory } from '../types'; diff --git a/solidity/core/test/message.test.ts b/solidity/core/test/message.test.ts index 9329f45f1..05bdc6b41 100644 --- a/solidity/core/test/message.test.ts +++ b/solidity/core/test/message.test.ts @@ -1,6 +1,8 @@ -import { ethers } from 'hardhat'; import { expect } from 'chai'; +import { ethers } from 'hardhat'; + import { utils } from '@abacus-network/utils'; + import { TestMessage, TestMessage__factory } from '../types'; const testCases = require('../../../vectors/message.json'); diff --git a/solidity/core/test/outbox.test.ts b/solidity/core/test/outbox.test.ts index cb5e9d4bd..40fc0b1bd 100644 --- a/solidity/core/test/outbox.test.ts +++ b/solidity/core/test/outbox.test.ts @@ -1,7 +1,8 @@ -import { ethers } from 'hardhat'; +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; +import { ethers } from 'hardhat'; + import { types, utils } from '@abacus-network/utils'; -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { TestOutbox, TestOutbox__factory } from '../types'; diff --git a/solidity/core/test/upgrade.test.ts b/solidity/core/test/upgrade.test.ts index 19db251d3..955627446 100644 --- a/solidity/core/test/upgrade.test.ts +++ b/solidity/core/test/upgrade.test.ts @@ -1,13 +1,14 @@ -import { ethers } from 'hardhat'; import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { ethers } from 'hardhat'; -import { UpgradeTestHelpers, MysteryMathUpgrade } from './lib/upgrade'; import { - UpgradeBeaconController__factory, - UpgradeBeaconController, MysteryMathV2__factory, + UpgradeBeaconController, + UpgradeBeaconController__factory, } from '../types'; +import { MysteryMathUpgrade, UpgradeTestHelpers } from './lib/upgrade'; + describe('Upgrade', async () => { const utils = new UpgradeTestHelpers(); let signer: SignerWithAddress, diff --git a/solidity/core/test/validator-manager/inboxValidatorManager.test.ts b/solidity/core/test/validator-manager/inboxValidatorManager.test.ts index 64005bf34..b7f9815d6 100644 --- a/solidity/core/test/validator-manager/inboxValidatorManager.test.ts +++ b/solidity/core/test/validator-manager/inboxValidatorManager.test.ts @@ -1,15 +1,17 @@ +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; +import { expect } from 'chai'; import { ethers } from 'hardhat'; + import { Validator } from '@abacus-network/utils'; -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { Inbox, - Inbox__factory, InboxValidatorManager, InboxValidatorManager__factory, + Inbox__factory, } from '../../types'; + import { signCheckpoint } from './utils'; -import { expect } from 'chai'; const OUTBOX_DOMAIN = 1234; const INBOX_DOMAIN = 4321; diff --git a/solidity/core/test/validator-manager/multisigValidatorManager.test.ts b/solidity/core/test/validator-manager/multisigValidatorManager.test.ts index 8bf789076..109c4062a 100644 --- a/solidity/core/test/validator-manager/multisigValidatorManager.test.ts +++ b/solidity/core/test/validator-manager/multisigValidatorManager.test.ts @@ -1,12 +1,14 @@ +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; import { ethers } from 'hardhat'; -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; + import { Validator } from '@abacus-network/utils'; import { TestMultisigValidatorManager, TestMultisigValidatorManager__factory, } from '../../types'; + import { signCheckpoint } from './utils'; const OUTBOX_DOMAIN = 1234; diff --git a/solidity/core/test/validator-manager/outboxValidatorManager.test.ts b/solidity/core/test/validator-manager/outboxValidatorManager.test.ts index 2cd03644f..a8a1c1a65 100644 --- a/solidity/core/test/validator-manager/outboxValidatorManager.test.ts +++ b/solidity/core/test/validator-manager/outboxValidatorManager.test.ts @@ -1,14 +1,16 @@ +import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; import { expect } from 'chai'; import { ethers } from 'hardhat'; -import { types, utils, Validator } from '@abacus-network/utils'; -import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'; + +import { Validator, types, utils } from '@abacus-network/utils'; import { Outbox, - Outbox__factory, OutboxValidatorManager, OutboxValidatorManager__factory, + Outbox__factory, } from '../../types'; + import { signCheckpoint } from './utils'; const OUTBOX_DOMAIN = 1234; diff --git a/solidity/core/test/validator-manager/utils.ts b/solidity/core/test/validator-manager/utils.ts index a41fcd049..eebe24aad 100644 --- a/solidity/core/test/validator-manager/utils.ts +++ b/solidity/core/test/validator-manager/utils.ts @@ -1,4 +1,4 @@ -import { types, Validator } from '@abacus-network/utils'; +import { Validator, types } from '@abacus-network/utils'; // Signs a checkpoint with the provided validators and returns // the signatures sorted by validator addresses in ascending order diff --git a/typescript/contract-metrics/.prettierrc b/typescript/contract-metrics/.prettierrc deleted file mode 100644 index 8d6ce6a7e..000000000 --- a/typescript/contract-metrics/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "all" -} diff --git a/typescript/contract-metrics/src/config.ts b/typescript/contract-metrics/src/config.ts index 7923369fc..2b13a6b3d 100644 --- a/typescript/contract-metrics/src/config.ts +++ b/typescript/contract-metrics/src/config.ts @@ -1,6 +1,8 @@ -import * as dotenv from 'dotenv'; import Logger from 'bunyan'; +import * as dotenv from 'dotenv'; + import { ChainName } from '@abacus-network/sdk'; + import { MetricCollector } from './metrics'; dotenv.config({ path: process.env.CONFIG_PATH ?? '.env' }); diff --git a/typescript/contract-metrics/src/gas.ts b/typescript/contract-metrics/src/gas.ts index 7e83af380..1a66efaec 100644 --- a/typescript/contract-metrics/src/gas.ts +++ b/typescript/contract-metrics/src/gas.ts @@ -3,7 +3,7 @@ //import { ethereum } from '@abacus-network/sdk/dist/abacus/domains/mainnet'; import { BigNumber, ethers } from 'ethers'; import moment from 'moment'; -import { plot, Plot } from 'nodeplotlib'; +import { Plot, plot } from 'nodeplotlib'; type AnyMap = { [key: string]: any }; type TxMap = { [key: string]: ethers.providers.TransactionResponse[] }; diff --git a/typescript/contract-metrics/src/metrics.ts b/typescript/contract-metrics/src/metrics.ts index 43fd1a401..76719bc88 100644 --- a/typescript/contract-metrics/src/metrics.ts +++ b/typescript/contract-metrics/src/metrics.ts @@ -1,6 +1,6 @@ -import { collectDefaultMetrics, Gauge, register } from 'prom-client'; -import express, { Response } from 'express'; import Logger from 'bunyan'; +import express, { Response } from 'express'; +import { Gauge, collectDefaultMetrics, register } from 'prom-client'; export class MetricCollector { private numDispatchedGauge: Gauge; diff --git a/typescript/contract-metrics/src/monitor/core.ts b/typescript/contract-metrics/src/monitor/core.ts index b8fa31160..0f3d373a7 100644 --- a/typescript/contract-metrics/src/monitor/core.ts +++ b/typescript/contract-metrics/src/monitor/core.ts @@ -1,7 +1,9 @@ -import { AbacusCore, ChainName, getEvents } from '@abacus-network/sdk'; import Logger from 'bunyan'; -import { logMonitorMetrics, writeUnprocessedMessages } from '../print'; + +import { AbacusCore, ChainName, getEvents } from '@abacus-network/sdk'; + import config from '../config'; +import { logMonitorMetrics, writeUnprocessedMessages } from '../print'; export async function monitorCore( core: AbacusCore, diff --git a/typescript/contract-metrics/src/monitor/governance.ts b/typescript/contract-metrics/src/monitor/governance.ts index 2feeee022..459dab94b 100644 --- a/typescript/contract-metrics/src/monitor/governance.ts +++ b/typescript/contract-metrics/src/monitor/governance.ts @@ -1,5 +1,6 @@ -import { AbacusGovernance, ChainName } from '@abacus-network/sdk'; import { GovernanceRouter } from '@abacus-network/apps'; +import { AbacusGovernance, ChainName } from '@abacus-network/sdk'; + import config from '../config'; export async function monitorGovernance( diff --git a/typescript/contract-metrics/src/print.ts b/typescript/contract-metrics/src/print.ts index 1a25c966b..6bb84de19 100644 --- a/typescript/contract-metrics/src/print.ts +++ b/typescript/contract-metrics/src/print.ts @@ -1,11 +1,13 @@ +import Logger from 'bunyan'; +import fs from 'fs'; + import { - AnnotatedLifecycleEvent, AbacusStatus, + AnnotatedLifecycleEvent, MessageStatus, MultiProvider, } from '@abacus-network/sdk'; -import Logger from 'bunyan'; -import fs from 'fs'; + import config from './config'; export function blockExplorerURL( diff --git a/typescript/contract-metrics/src/registerContext.ts b/typescript/contract-metrics/src/registerContext.ts index 94c3900fd..b42f2cd61 100644 --- a/typescript/contract-metrics/src/registerContext.ts +++ b/typescript/contract-metrics/src/registerContext.ts @@ -5,6 +5,7 @@ import { coreAddresses, governanceAddresses, } from '@abacus-network/sdk'; + import config from './config'; // register local diff --git a/typescript/contract-metrics/src/trace.ts b/typescript/contract-metrics/src/trace.ts index 05dc9ce45..7e3ca00eb 100644 --- a/typescript/contract-metrics/src/trace.ts +++ b/typescript/contract-metrics/src/trace.ts @@ -1,6 +1,7 @@ import { AbacusCore, AbacusMessage, ChainName } from '@abacus-network/sdk'; -import { core } from './registerContext'; + import { printStatus } from './print'; +import { core } from './registerContext'; const input: TraceInput[] = [ { diff --git a/typescript/deploy/.prettierrc b/typescript/deploy/.prettierrc deleted file mode 100644 index 6f53ad164..000000000 --- a/typescript/deploy/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "all" -} diff --git a/typescript/deploy/src/check.ts b/typescript/deploy/src/check.ts index f71aa0398..5c4708558 100644 --- a/typescript/deploy/src/check.ts +++ b/typescript/deploy/src/check.ts @@ -1,4 +1,5 @@ import { expect } from 'chai'; + import { AbacusApp, ProxiedAddress } from '@abacus-network/sdk'; import { types } from '@abacus-network/utils'; diff --git a/typescript/deploy/src/config.ts b/typescript/deploy/src/config.ts index 1ec1f75fc..206f2995b 100644 --- a/typescript/deploy/src/config.ts +++ b/typescript/deploy/src/config.ts @@ -1,5 +1,6 @@ import { ethers } from 'ethers'; -import { ChainName, domains, MultiProvider } from '@abacus-network/sdk'; + +import { ChainName, MultiProvider, domains } from '@abacus-network/sdk'; export interface CheckerViolation { domain: number; diff --git a/typescript/deploy/src/deploy.ts b/typescript/deploy/src/deploy.ts index 994c2c167..e62dd230c 100644 --- a/typescript/deploy/src/deploy.ts +++ b/typescript/deploy/src/deploy.ts @@ -1,14 +1,15 @@ -import path from 'path'; -import fs from 'fs'; import { ethers } from 'ethers'; -import { types } from '@abacus-network/utils'; -import { ChainName, NameOrDomain, MultiProvider } from '@abacus-network/sdk'; +import fs from 'fs'; +import path from 'path'; + import { UpgradeBeacon, - UpgradeBeacon__factory, UpgradeBeaconProxy, UpgradeBeaconProxy__factory, + UpgradeBeacon__factory, } from '@abacus-network/core'; +import { ChainName, MultiProvider, NameOrDomain } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; import { ProxiedContract } from './proxy'; import { VerificationInput, getContractVerificationInput } from './verify'; diff --git a/typescript/deploy/src/proxy.ts b/typescript/deploy/src/proxy.ts index 99462785a..6280563da 100644 --- a/typescript/deploy/src/proxy.ts +++ b/typescript/deploy/src/proxy.ts @@ -1,6 +1,7 @@ import { ethers } from 'ethers'; -import { types } from '@abacus-network/utils'; + import { ProxiedAddress } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; import { CheckerViolation } from './config'; diff --git a/typescript/deploy/src/router/check.ts b/typescript/deploy/src/router/check.ts index d9224a033..211fd590c 100644 --- a/typescript/deploy/src/router/check.ts +++ b/typescript/deploy/src/router/check.ts @@ -1,6 +1,8 @@ import { expect } from 'chai'; -import { utils, types } from '@abacus-network/utils'; + import { AbacusApp } from '@abacus-network/sdk'; +import { types, utils } from '@abacus-network/utils'; + import { AbacusAppChecker } from '../check'; import { Router, RouterConfig } from './types'; diff --git a/typescript/deploy/src/router/deploy.ts b/typescript/deploy/src/router/deploy.ts index b90257630..756547adb 100644 --- a/typescript/deploy/src/router/deploy.ts +++ b/typescript/deploy/src/router/deploy.ts @@ -1,10 +1,12 @@ -import { types, utils } from '@abacus-network/utils'; -import { AbacusCore } from '@abacus-network/sdk'; import { AbacusConnectionManager, AbacusConnectionManager__factory, } from '@abacus-network/core'; +import { AbacusCore } from '@abacus-network/sdk'; +import { types, utils } from '@abacus-network/utils'; + import { AbacusAppDeployer } from '../deploy'; + import { Router, RouterConfig } from './types'; export abstract class AbacusRouterDeployer< diff --git a/typescript/deploy/src/router/types.ts b/typescript/deploy/src/router/types.ts index e4a03ecbd..4eb216eb2 100644 --- a/typescript/deploy/src/router/types.ts +++ b/typescript/deploy/src/router/types.ts @@ -1,5 +1,5 @@ -import { types } from '@abacus-network/utils'; import { ChainName } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; export interface Router { address: types.Address; diff --git a/typescript/deploy/src/verify/ContractVerifier.ts b/typescript/deploy/src/verify/ContractVerifier.ts index eb3e643d8..b70497d40 100644 --- a/typescript/deploy/src/verify/ContractVerifier.ts +++ b/typescript/deploy/src/verify/ContractVerifier.ts @@ -1,6 +1,7 @@ import axios from 'axios'; -import { types } from '@abacus-network/utils'; + import { ChainName } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; import { ContractVerificationInput, VerificationInput } from './types'; diff --git a/typescript/hardhat/src/TestAbacusDeploy.ts b/typescript/hardhat/src/TestAbacusDeploy.ts index b0ab5aa43..a9ca0ff93 100644 --- a/typescript/hardhat/src/TestAbacusDeploy.ts +++ b/typescript/hardhat/src/TestAbacusDeploy.ts @@ -1,6 +1,8 @@ -import { ethers } from "ethers"; -import { types } from "@abacus-network/utils"; +import { ethers } from 'ethers'; + import { + AbacusConnectionManager, + AbacusConnectionManager__factory, InterchainGasPaymaster, InterchainGasPaymaster__factory, Outbox, @@ -9,11 +11,11 @@ import { TestInbox__factory, UpgradeBeaconController, UpgradeBeaconController__factory, - AbacusConnectionManager, - AbacusConnectionManager__factory, -} from "@abacus-network/core"; -import { TestDeploy } from "./TestDeploy"; -import { addressToBytes32 } from "@abacus-network/utils/dist/src/utils"; +} from '@abacus-network/core'; +import { types } from '@abacus-network/utils'; +import { addressToBytes32 } from '@abacus-network/utils/dist/src/utils'; + +import { TestDeploy } from './TestDeploy'; export type TestAbacusConfig = { signer: Record; @@ -50,7 +52,7 @@ export class TestAbacusDeploy extends TestDeploy< const signer = this.config.signer[domain]; const upgradeBeaconControllerFactory = new UpgradeBeaconController__factory( - signer + signer, ); const upgradeBeaconController = await upgradeBeaconControllerFactory.deploy(); @@ -64,18 +66,18 @@ export class TestAbacusDeploy extends TestDeploy< await outbox.initialize(upgradeBeaconController.address); const abacusConnectionManagerFactory = new AbacusConnectionManager__factory( - signer + signer, ); const abacusConnectionManager = await abacusConnectionManagerFactory.deploy(); await abacusConnectionManager.setOutbox(outbox.address); const interchainGasPaymasterFactory = new InterchainGasPaymaster__factory( - signer + signer, ); const interchainGasPaymaster = await interchainGasPaymasterFactory.deploy(); await abacusConnectionManager.setInterchainGasPaymaster( - interchainGasPaymaster.address + interchainGasPaymaster.address, ); const inboxFactory = new TestInbox__factory(signer); @@ -93,7 +95,7 @@ export class TestAbacusDeploy extends TestDeploy< remote, upgradeBeaconController.address, ethers.constants.HashZero, - 0 + 0, ); await abacusConnectionManager.enrollInbox(remote, inbox.address); inboxes[remote] = inbox; @@ -104,7 +106,7 @@ export class TestAbacusDeploy extends TestDeploy< await outbox.dispatch( remotes.find((_) => _ !== domain)!, addressToBytes32(ethers.constants.AddressZero), - "0x" + '0x', ); return { outbox, @@ -164,7 +166,7 @@ export class TestAbacusDeploy extends TestDeploy< } async processOutboundMessages( - origin: types.Domain + origin: types.Domain, ): Promise> { const responses: Map = new Map(); @@ -193,7 +195,7 @@ export class TestAbacusDeploy extends TestDeploy< for (const dispatch of dispatches) { const destination = dispatch.args.destination; if (destination === origin) - throw new Error("Dispatched message to local domain"); + throw new Error('Dispatched message to local domain'); const inbox = this.inbox(origin, destination); const status = await inbox.messages(dispatch.args.messageHash); if (status !== types.MessageStatus.PROCESSED) { @@ -203,7 +205,7 @@ export class TestAbacusDeploy extends TestDeploy< } const response = await inbox.testProcess( dispatch.args.message, - dispatch.args.leafIndex.toNumber() + dispatch.args.leafIndex.toNumber(), ); let destinationResponses = responses.get(destination) || []; destinationResponses.push(response); diff --git a/typescript/hardhat/src/TestDeploy.ts b/typescript/hardhat/src/TestDeploy.ts index 89fba2c1f..b62c02761 100644 --- a/typescript/hardhat/src/TestDeploy.ts +++ b/typescript/hardhat/src/TestDeploy.ts @@ -1,4 +1,4 @@ -import { types } from "@abacus-network/utils"; +import { types } from '@abacus-network/utils'; export class TestDeploy { public readonly config: V; diff --git a/typescript/hardhat/src/TestRouterDeploy.ts b/typescript/hardhat/src/TestRouterDeploy.ts index 86fb9de78..3805948b2 100644 --- a/typescript/hardhat/src/TestRouterDeploy.ts +++ b/typescript/hardhat/src/TestRouterDeploy.ts @@ -1,6 +1,7 @@ -import { types, utils } from "@abacus-network/utils"; -import { TestDeploy } from "./TestDeploy"; -import { TestAbacusDeploy } from "./TestAbacusDeploy"; +import { types, utils } from '@abacus-network/utils'; + +import { TestAbacusDeploy } from './TestAbacusDeploy'; +import { TestDeploy } from './TestDeploy'; export interface Router { address: types.Address; @@ -16,7 +17,7 @@ export abstract class TestRouterDeploy extends TestDeploy { for (const remote of this.remotes(local)) { await this.router(local).enrollRemoteRouter( remote, - utils.addressToBytes32(this.router(remote).address) + utils.addressToBytes32(this.router(remote).address), ); } } @@ -24,7 +25,7 @@ export abstract class TestRouterDeploy extends TestDeploy { abstract deployInstance( domain: types.Domain, - abacus: TestAbacusDeploy + abacus: TestAbacusDeploy, ): Promise; abstract router(domain: types.Domain): Router; } diff --git a/typescript/hardhat/test/testAbacusDeploy.test.ts b/typescript/hardhat/test/testAbacusDeploy.test.ts index 4ba413927..d8c2a46be 100644 --- a/typescript/hardhat/test/testAbacusDeploy.test.ts +++ b/typescript/hardhat/test/testAbacusDeploy.test.ts @@ -1,17 +1,16 @@ -import { ethers } from "hardhat"; -import { expect } from "chai"; +import { TestAbacusDeploy } from '..'; +import { expect } from 'chai'; +import { ethers } from 'hardhat'; -import { TestRecipient__factory } from "@abacus-network/core"; -import { utils } from "@abacus-network/utils"; - -import { TestAbacusDeploy } from ".."; +import { TestRecipient__factory } from '@abacus-network/core'; +import { utils } from '@abacus-network/utils'; const localDomain = 1000; const remoteDomain = 2000; const domains = [localDomain, remoteDomain]; -const message = "0xdeadbeef"; +const message = '0xdeadbeef'; -describe("TestAbacusDeploy", async () => { +describe('TestAbacusDeploy', async () => { let abacus: TestAbacusDeploy; beforeEach(async () => { @@ -25,27 +24,27 @@ describe("TestAbacusDeploy", async () => { localOutbox.dispatch( remoteDomain, utils.addressToBytes32(recipient.address), - message - ) - ).to.emit(localOutbox, "Dispatch"); + message, + ), + ).to.emit(localOutbox, 'Dispatch'); const remoteOutbox = abacus.outbox(remoteDomain); await expect( remoteOutbox.dispatch( localDomain, utils.addressToBytes32(recipient.address), - message - ) - ).to.emit(remoteOutbox, "Dispatch"); + message, + ), + ).to.emit(remoteOutbox, 'Dispatch'); }); - it("processes outbound messages for a single domain", async () => { + it('processes outbound messages for a single domain', async () => { const responses = await abacus.processOutboundMessages(localDomain); expect(responses.get(remoteDomain)!.length).to.equal(1); const [_, index] = await abacus.outbox(localDomain).latestCheckpoint(); expect(index).to.equal(1); }); - it("processes outbound messages for two domains", async () => { + it('processes outbound messages for two domains', async () => { const localResponses = await abacus.processOutboundMessages(localDomain); expect(localResponses.get(remoteDomain)!.length).to.equal(1); const [, localIndex] = await abacus.outbox(localDomain).latestCheckpoint(); @@ -58,7 +57,7 @@ describe("TestAbacusDeploy", async () => { expect(remoteIndex).to.equal(1); }); - it("processes all messages", async () => { + it('processes all messages', async () => { const responses = await abacus.processMessages(); expect(responses.get(localDomain)!.get(remoteDomain)!.length).to.equal(1); expect(responses.get(remoteDomain)!.get(localDomain)!.length).to.equal(1); diff --git a/typescript/infra/.prettierrc b/typescript/infra/.prettierrc deleted file mode 100644 index 6f53ad164..000000000 --- a/typescript/infra/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "all" -} diff --git a/typescript/infra/config/environments/dev/agent.ts b/typescript/infra/config/environments/dev/agent.ts index 74ce78a6f..014814480 100644 --- a/typescript/infra/config/environments/dev/agent.ts +++ b/typescript/infra/config/environments/dev/agent.ts @@ -1,5 +1,6 @@ import { AgentConfig } from '../../../src/config'; import { ENVIRONMENTS_ENUM } from '../../../src/config/environment'; + import { DevNetworks, domainNames } from './domains'; import { validators } from './validators'; diff --git a/typescript/infra/config/environments/dev/domains.ts b/typescript/infra/config/environments/dev/domains.ts index dfa39efa4..4beef7d29 100644 --- a/typescript/infra/config/environments/dev/domains.ts +++ b/typescript/infra/config/environments/dev/domains.ts @@ -1,5 +1,6 @@ -import { MultiProvider } from '@abacus-network/sdk'; import { registerDomains } from '@abacus-network/deploy'; +import { MultiProvider } from '@abacus-network/sdk'; + import { fetchSigner } from '../../../src/config/chain'; import { ENVIRONMENTS_ENUM } from '../../../src/config/environment'; import { configs } from '../../networks/testnets'; diff --git a/typescript/infra/config/environments/dev/validators.ts b/typescript/infra/config/environments/dev/validators.ts index 3f8753388..a59bfcc96 100644 --- a/typescript/infra/config/environments/dev/validators.ts +++ b/typescript/infra/config/environments/dev/validators.ts @@ -1,10 +1,12 @@ import { ChainName } from '@abacus-network/sdk'; -import { DevNetworks } from './domains'; + import { - CheckpointSyncerType, ChainValidatorSets, + CheckpointSyncerType, } from '../../../src/config/agent'; +import { DevNetworks } from './domains'; + const s3BucketRegion = 'us-east-1'; const s3BucketName = (chainName: ChainName, index: number) => diff --git a/typescript/infra/config/environments/test/agent.ts b/typescript/infra/config/environments/test/agent.ts index a9619921f..632bf4109 100644 --- a/typescript/infra/config/environments/test/agent.ts +++ b/typescript/infra/config/environments/test/agent.ts @@ -1,8 +1,9 @@ -import { domainNames, TestNetworks } from './domains'; -import { validators } from './validators'; import { AgentConfig } from '../../../src/config'; import { ENVIRONMENTS_ENUM } from '../../../src/config/environment'; +import { TestNetworks, domainNames } from './domains'; +import { validators } from './validators'; + export const agent: AgentConfig = { environment: ENVIRONMENTS_ENUM.Test, namespace: ENVIRONMENTS_ENUM.Test, diff --git a/typescript/infra/config/environments/test/domains.ts b/typescript/infra/config/environments/test/domains.ts index 4c75c937b..28e6acaad 100644 --- a/typescript/infra/config/environments/test/domains.ts +++ b/typescript/infra/config/environments/test/domains.ts @@ -1,7 +1,9 @@ -import { ethers } from 'ethers'; import { NonceManager } from '@ethersproject/experimental'; -import { MultiProvider } from '@abacus-network/sdk'; +import { ethers } from 'ethers'; + import { registerDomains } from '@abacus-network/deploy'; +import { MultiProvider } from '@abacus-network/sdk'; + import { configs } from '../../networks/testnets'; export type TestNetworks = 'alfajores' | 'kovan' | 'mumbai' | 'fuji'; diff --git a/typescript/infra/config/environments/test/validators.ts b/typescript/infra/config/environments/test/validators.ts index a494d44b6..a6a57ed63 100644 --- a/typescript/infra/config/environments/test/validators.ts +++ b/typescript/infra/config/environments/test/validators.ts @@ -1,10 +1,12 @@ import { ChainName } from '@abacus-network/sdk'; -import { TestNetworks } from './domains'; + import { - CheckpointSyncerType, ChainValidatorSets, + CheckpointSyncerType, } from '../../../src/config/agent'; +import { TestNetworks } from './domains'; + const localStoragePath = (chainName: ChainName) => `/tmp/abacus-test-${chainName}-validator`; diff --git a/typescript/infra/config/networks/mainnets.ts b/typescript/infra/config/networks/mainnets.ts index 3cd619c20..6a10e5589 100644 --- a/typescript/infra/config/networks/mainnets.ts +++ b/typescript/infra/config/networks/mainnets.ts @@ -1,6 +1,7 @@ import { BigNumber } from 'ethers'; -import { ChainName } from '@abacus-network/sdk'; + import { TransactionConfig } from '@abacus-network/deploy'; +import { ChainName } from '@abacus-network/sdk'; export const celo: TransactionConfig = { overrides: {}, diff --git a/typescript/infra/config/networks/testnets.ts b/typescript/infra/config/networks/testnets.ts index 4260a51ff..fa2eb7507 100644 --- a/typescript/infra/config/networks/testnets.ts +++ b/typescript/infra/config/networks/testnets.ts @@ -1,6 +1,7 @@ import { BigNumber } from 'ethers'; -import { ChainName } from '@abacus-network/sdk'; + import { TransactionConfig } from '@abacus-network/deploy'; +import { ChainName } from '@abacus-network/sdk'; export const alfajores: TransactionConfig = { confirmations: 1, diff --git a/typescript/infra/hardhat.config.ts b/typescript/infra/hardhat.config.ts index 38f1fc6c0..5326f362b 100644 --- a/typescript/infra/hardhat.config.ts +++ b/typescript/infra/hardhat.config.ts @@ -1,21 +1,22 @@ -import '@nomiclabs/hardhat-waffle'; import '@nomiclabs/hardhat-etherscan'; +import '@nomiclabs/hardhat-waffle'; import { task } from 'hardhat/config'; import { HardhatRuntimeEnvironment } from 'hardhat/types'; + import { BadRandomRecipient__factory } from '@abacus-network/core'; -import { coreAddresses, AbacusCore } from '@abacus-network/sdk'; -import { utils, types } from '@abacus-network/utils'; +import { AbacusCore, coreAddresses } from '@abacus-network/sdk'; +import { types, utils } from '@abacus-network/utils'; -import { AbacusCoreDeployer } from './src/core'; -import { AbacusContractVerifier } from './src/verify'; -import { sleep } from './src/utils/utils'; import { - getCoreVerificationDirectory, + getCoreConfig, getCoreContractsSdkFilepath, getCoreRustDirectory, + getCoreVerificationDirectory, registerMultiProvider, - getCoreConfig, } from './scripts/utils'; +import { AbacusCoreDeployer } from './src/core'; +import { sleep } from './src/utils/utils'; +import { AbacusContractVerifier } from './src/verify'; const domainSummary = async (core: AbacusCore, domain: types.Domain) => { const contracts = core.mustGetContracts(domain); diff --git a/typescript/infra/scripts/check-deploy.ts b/typescript/infra/scripts/check-deploy.ts index 258d14a78..404661e5b 100644 --- a/typescript/infra/scripts/check-deploy.ts +++ b/typescript/infra/scripts/check-deploy.ts @@ -1,11 +1,15 @@ import { ethers } from 'ethers'; -import { types } from '@abacus-network/utils'; + import { AbacusCore, AbacusGovernance, coreAddresses, governanceAddresses, } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; + +import { AbacusCoreChecker } from '../src/core'; +import { AbacusGovernanceChecker } from '../src/governance'; import { getCoreConfig, @@ -13,8 +17,6 @@ import { getGovernanceConfig, registerMultiProvider, } from './utils'; -import { AbacusCoreChecker } from '../src/core'; -import { AbacusGovernanceChecker } from '../src/governance'; async function check() { const environment = await getEnvironment(); diff --git a/typescript/infra/scripts/core.ts b/typescript/infra/scripts/core.ts index 4d854399c..25db5103b 100644 --- a/typescript/infra/scripts/core.ts +++ b/typescript/infra/scripts/core.ts @@ -1,12 +1,13 @@ +import { AbacusCoreDeployer } from '../src/core'; + import { - getEnvironment, getCoreConfig, getCoreContractsSdkFilepath, getCoreRustDirectory, getCoreVerificationDirectory, + getEnvironment, registerMultiProvider, } from './utils'; -import { AbacusCoreDeployer } from '../src/core'; async function main() { const environment = await getEnvironment(); diff --git a/typescript/infra/scripts/create-keys.ts b/typescript/infra/scripts/create-keys.ts index b31671426..eca2bbbbe 100644 --- a/typescript/infra/scripts/create-keys.ts +++ b/typescript/infra/scripts/create-keys.ts @@ -1,5 +1,6 @@ import { createAgentGCPKeys } from '../src/agents/gcp'; -import { getArgs, getEnvironment, getDomainNames } from './utils'; + +import { getArgs, getDomainNames, getEnvironment } from './utils'; async function main() { const environment = await getEnvironment(); diff --git a/typescript/infra/scripts/delete-keys.ts b/typescript/infra/scripts/delete-keys.ts index dd1ff70c6..d8d3fd0f7 100644 --- a/typescript/infra/scripts/delete-keys.ts +++ b/typescript/infra/scripts/delete-keys.ts @@ -1,5 +1,6 @@ import { deleteAgentGCPKeys } from '../src/agents/gcp'; -import { getEnvironment, getDomainNames } from './utils'; + +import { getDomainNames, getEnvironment } from './utils'; async function main() { const environment = await getEnvironment(); diff --git a/typescript/infra/scripts/deploy-agents.ts b/typescript/infra/scripts/deploy-agents.ts index 0db01dd52..569a4d0dd 100644 --- a/typescript/infra/scripts/deploy-agents.ts +++ b/typescript/infra/scripts/deploy-agents.ts @@ -1,7 +1,8 @@ -import { getAgentConfig, getDomainNames, getEnvironment } from './utils'; import { runAgentHelmCommand } from '../src/agents'; import { HelmCommand } from '../src/utils/helm'; +import { getAgentConfig, getDomainNames, getEnvironment } from './utils'; + async function deploy() { const environment = await getEnvironment(); const agentConfig = await getAgentConfig(environment); diff --git a/typescript/infra/scripts/deploy-contract-metrics.ts b/typescript/infra/scripts/deploy-contract-metrics.ts index 4ecf7a52a..416727a5d 100644 --- a/typescript/infra/scripts/deploy-contract-metrics.ts +++ b/typescript/infra/scripts/deploy-contract-metrics.ts @@ -1,5 +1,6 @@ import { runContractMetricsHelmCommand } from '../src/contract-metrics'; import { HelmCommand } from '../src/utils/helm'; + import { getContractMetricsConfig, getDomainNames, diff --git a/typescript/infra/scripts/deploy-infra-external-secrets.ts b/typescript/infra/scripts/deploy-infra-external-secrets.ts index a1acbdff9..0260772c2 100644 --- a/typescript/infra/scripts/deploy-infra-external-secrets.ts +++ b/typescript/infra/scripts/deploy-infra-external-secrets.ts @@ -1,6 +1,7 @@ -import { getInfrastructureConfig, getEnvironment } from './utils'; -import { HelmCommand } from '../src/utils/helm'; import { runExternalSecretsHelmCommand } from '../src/infrastructure/external-secrets/external-secrets'; +import { HelmCommand } from '../src/utils/helm'; + +import { getEnvironment, getInfrastructureConfig } from './utils'; async function main() { const environment = await getEnvironment(); diff --git a/typescript/infra/scripts/deploy-infra-monitoring.ts b/typescript/infra/scripts/deploy-infra-monitoring.ts index 4a6469eaa..89b3fe21f 100644 --- a/typescript/infra/scripts/deploy-infra-monitoring.ts +++ b/typescript/infra/scripts/deploy-infra-monitoring.ts @@ -1,7 +1,8 @@ -import { getInfrastructureConfig, getEnvironment } from './utils'; import { runPrometheusHelmCommand } from '../src/infrastructure/monitoring/prometheus'; import { HelmCommand } from '../src/utils/helm'; +import { getEnvironment, getInfrastructureConfig } from './utils'; + async function main() { const environment = await getEnvironment(); const infraConfig = await getInfrastructureConfig(environment); diff --git a/typescript/infra/scripts/deploy-keymaster.ts b/typescript/infra/scripts/deploy-keymaster.ts index 1a061ae96..6765ebddd 100644 --- a/typescript/infra/scripts/deploy-keymaster.ts +++ b/typescript/infra/scripts/deploy-keymaster.ts @@ -1,5 +1,6 @@ import { runKeymasterHelmCommand } from '../src/agents'; import { HelmCommand } from '../src/utils/helm'; + import { getAgentConfig, getDomainNames, getEnvironment } from './utils'; async function main() { diff --git a/typescript/infra/scripts/governance.ts b/typescript/infra/scripts/governance.ts index b7139be95..9fff79aee 100644 --- a/typescript/infra/scripts/governance.ts +++ b/typescript/infra/scripts/governance.ts @@ -1,4 +1,8 @@ import { AbacusCore, coreAddresses } from '@abacus-network/sdk'; + +import { AbacusCoreDeployer } from '../src/core'; +import { AbacusGovernanceDeployer } from '../src/governance'; + import { getEnvironment, getGovernanceConfig, @@ -6,8 +10,6 @@ import { getGovernanceVerificationDirectory, registerMultiProvider, } from './utils'; -import { AbacusCoreDeployer } from '../src/core'; -import { AbacusGovernanceDeployer } from '../src/governance'; async function main() { const environment = await getEnvironment(); diff --git a/typescript/infra/scripts/output-agent-env-vars.ts b/typescript/infra/scripts/output-agent-env-vars.ts index 8d476b6fe..b65ec16c0 100644 --- a/typescript/infra/scripts/output-agent-env-vars.ts +++ b/typescript/infra/scripts/output-agent-env-vars.ts @@ -1,10 +1,11 @@ -import { writeFile } from 'fs/promises'; import { getAgentEnvVars } from '../src/agents'; +import { writeFile } from 'fs/promises'; + import { - getKeyRoleAndChainArgs, getAgentConfig, - getEnvironment, getDomainNames, + getEnvironment, + getKeyRoleAndChainArgs, } from './utils'; async function main() { diff --git a/typescript/infra/scripts/rotate-key.ts b/typescript/infra/scripts/rotate-key.ts index bf9a324b0..8ef56568b 100644 --- a/typescript/infra/scripts/rotate-key.ts +++ b/typescript/infra/scripts/rotate-key.ts @@ -1,7 +1,7 @@ import { - getKeyRoleAndChainArgs, getAgentConfig, getEnvironment, + getKeyRoleAndChainArgs, } from './utils'; async function rotateKey() { diff --git a/typescript/infra/scripts/set-validator.ts b/typescript/infra/scripts/set-validator.ts index 66b077944..e941faae5 100644 --- a/typescript/infra/scripts/set-validator.ts +++ b/typescript/infra/scripts/set-validator.ts @@ -4,9 +4,11 @@ import { coreAddresses, governanceAddresses, } from '@abacus-network/sdk'; -import { getCoreConfig, getEnvironment, registerMultiProvider } from './utils'; + import { AbacusCoreGovernor, CoreViolationType } from '../src/core'; +import { getCoreConfig, getEnvironment, registerMultiProvider } from './utils'; + async function main() { const environment = await getEnvironment(); const core = new AbacusCore(coreAddresses[environment]); diff --git a/typescript/infra/scripts/update-agents-diff.ts b/typescript/infra/scripts/update-agents-diff.ts index dd642c0c1..ffe0820d3 100644 --- a/typescript/infra/scripts/update-agents-diff.ts +++ b/typescript/infra/scripts/update-agents-diff.ts @@ -1,6 +1,7 @@ import { runAgentHelmCommand } from '../src/agents'; import { HelmCommand } from '../src/utils/helm'; -import { getAgentConfig, getEnvironment, getDomainNames } from './utils'; + +import { getAgentConfig, getDomainNames, getEnvironment } from './utils'; async function deploy() { const environment = await getEnvironment(); diff --git a/typescript/infra/scripts/update-key.ts b/typescript/infra/scripts/update-key.ts index f0219463f..eef1382ee 100644 --- a/typescript/infra/scripts/update-key.ts +++ b/typescript/infra/scripts/update-key.ts @@ -1,7 +1,7 @@ import { - getKeyRoleAndChainArgs, getAgentConfig, getEnvironment, + getKeyRoleAndChainArgs, } from './utils'; async function rotateKey() { diff --git a/typescript/infra/scripts/utils.ts b/typescript/infra/scripts/utils.ts index 0acf39930..e7c59e48f 100644 --- a/typescript/infra/scripts/utils.ts +++ b/typescript/infra/scripts/utils.ts @@ -1,5 +1,7 @@ import path from 'path'; import yargs from 'yargs'; + +import { RouterConfig } from '@abacus-network/deploy'; import { ALL_CHAIN_NAMES, AbacusCore, @@ -7,14 +9,14 @@ import { MultiProvider, } from '@abacus-network/sdk'; import { types } from '@abacus-network/utils'; -import { RouterConfig } from '@abacus-network/deploy'; + import { KEY_ROLE_ENUM } from '../src/agents'; import { ALL_ENVIRONMENTS, AgentConfig, + ContractMetricsConfig, DeployEnvironment, InfrastructureConfig, - ContractMetricsConfig, } from '../src/config'; import { CoreConfig } from '../src/core'; import { GovernanceConfig } from '../src/governance'; diff --git a/typescript/infra/src/agents/aws/key.ts b/typescript/infra/src/agents/aws/key.ts index f841841f8..e00bdfb34 100644 --- a/typescript/infra/src/agents/aws/key.ts +++ b/typescript/infra/src/agents/aws/key.ts @@ -1,21 +1,23 @@ -import { ChainName } from '@abacus-network/sdk'; import { KEY_ROLE_ENUM } from '..'; -import { AgentConfig, AwsKeyConfig, KeyType } from '../../config/agent'; import { CreateAliasCommand, CreateKeyCommand, DeleteAliasCommand, GetPublicKeyCommand, + KMSClient, KeySpec, KeyUsageType, - KMSClient, ListAliasesCommand, OriginType, PutKeyPolicyCommand, UpdateAliasCommand, } from '@aws-sdk/client-kms'; -import { identifier } from '../agent'; + +import { ChainName } from '@abacus-network/sdk'; + +import { AgentConfig, AwsKeyConfig, KeyType } from '../../config/agent'; import { getEthereumAddress, sleep } from '../../utils/utils'; +import { identifier } from '../agent'; import { AgentKey } from '../agent'; interface UnfetchedKey { diff --git a/typescript/infra/src/agents/aws/user.ts b/typescript/infra/src/agents/aws/user.ts index a8dae8431..ff1014f77 100644 --- a/typescript/infra/src/agents/aws/user.ts +++ b/typescript/infra/src/agents/aws/user.ts @@ -1,10 +1,12 @@ -import { ChainName } from '@abacus-network/sdk'; import { - IAMClient, CreateAccessKeyCommand, CreateUserCommand, + IAMClient, ListUsersCommand, } from '@aws-sdk/client-iam'; + +import { ChainName } from '@abacus-network/sdk'; + import { KEY_ROLE_ENUM } from '../../agents'; import { AgentConfig } from '../../config'; import { @@ -12,6 +14,7 @@ import { gcpSecretExists, setGCPSecret, } from '../../utils/gcloud'; + import { AgentAwsKey } from './key'; export class AgentAwsUser { diff --git a/typescript/infra/src/agents/aws/validator-user.ts b/typescript/infra/src/agents/aws/validator-user.ts index 9647fc34d..6997d511b 100644 --- a/typescript/infra/src/agents/aws/validator-user.ts +++ b/typescript/infra/src/agents/aws/validator-user.ts @@ -1,12 +1,15 @@ -import { ChainName } from '@abacus-network/sdk'; import { - S3Client, CreateBucketCommand, ListBucketsCommand, PutBucketPolicyCommand, + S3Client, } from '@aws-sdk/client-s3'; + +import { ChainName } from '@abacus-network/sdk'; + import { KEY_ROLE_ENUM } from '../../agents'; import { AgentConfig } from '../../config'; + import { AgentAwsKey } from './key'; import { AgentAwsUser } from './user'; diff --git a/typescript/infra/src/agents/gcp.ts b/typescript/infra/src/agents/gcp.ts index ea0634ae7..8685ef1fc 100644 --- a/typescript/infra/src/agents/gcp.ts +++ b/typescript/infra/src/agents/gcp.ts @@ -1,8 +1,10 @@ import { Wallet } from 'ethers'; + import { KEY_ROLES, KEY_ROLE_ENUM } from '../agents'; -import { execCmd, include } from '../utils/utils'; -import { AgentKey, isValidatorKey, identifier } from './agent'; import { fetchGCPSecret, setGCPSecret } from '../utils/gcloud'; +import { execCmd, include } from '../utils/utils'; + +import { AgentKey, identifier, isValidatorKey } from './agent'; // This is the type for how the keys are persisted in GCP export interface SecretManagerPersistedKeys { diff --git a/typescript/infra/src/agents/index.ts b/typescript/infra/src/agents/index.ts index fa1ee9979..e6325895c 100644 --- a/typescript/infra/src/agents/index.ts +++ b/typescript/infra/src/agents/index.ts @@ -1,14 +1,15 @@ -import { rm, writeFile } from 'fs/promises'; import { ChainName } from '@abacus-network/sdk'; import { AgentConfig } from '../config'; +import { ChainAgentConfig, CheckpointSyncerType } from '../config/agent'; import { fetchGCPSecret } from '../utils/gcloud'; import { HelmCommand, helmifyValues } from '../utils/helm'; import { ensure0x, execCmd, strip0x } from '../utils/utils'; -import { AgentGCPKey, fetchAgentGCPKeys, memoryKeyIdentifier } from './gcp'; -import { AgentAwsKey } from './aws/key'; -import { ChainAgentConfig, CheckpointSyncerType } from '../config/agent'; +import { rm, writeFile } from 'fs/promises'; + import { AgentAwsUser, ValidatorAgentAwsUser } from './aws'; +import { AgentAwsKey } from './aws/key'; +import { AgentGCPKey, fetchAgentGCPKeys, memoryKeyIdentifier } from './gcp'; export enum KEY_ROLE_ENUM { Validator = 'validator', diff --git a/typescript/infra/src/config/agent.ts b/typescript/infra/src/config/agent.ts index 284d4c062..8d3b5dea9 100644 --- a/typescript/infra/src/config/agent.ts +++ b/typescript/infra/src/config/agent.ts @@ -1,12 +1,14 @@ -import { types } from '@abacus-network/utils'; import { ChainName, ChainSubsetMap } from '@abacus-network/sdk'; -import { DeployEnvironment } from './environment'; +import { types } from '@abacus-network/utils'; + +import { KEY_ROLE_ENUM } from '../agents'; import { AgentAwsKey, AgentAwsUser, ValidatorAgentAwsUser, } from '../agents/aws'; -import { KEY_ROLE_ENUM } from '../agents'; + +import { DeployEnvironment } from './environment'; // Allows a "default" config to be specified and any per-network overrides. interface ChainOverridableConfig { diff --git a/typescript/infra/src/config/chain.ts b/typescript/infra/src/config/chain.ts index c79a0840a..f3dd418f8 100644 --- a/typescript/infra/src/config/chain.ts +++ b/typescript/infra/src/config/chain.ts @@ -1,7 +1,9 @@ -import { ethers } from 'ethers'; import { NonceManager } from '@ethersproject/experimental'; -import { ChainName } from '@abacus-network/sdk'; import { StaticCeloJsonRpcProvider } from 'celo-ethers-provider'; +import { ethers } from 'ethers'; + +import { ChainName } from '@abacus-network/sdk'; + import { getSecretDeployerKey, getSecretRpcEndpoint } from '../agents'; export async function fetchSigner( diff --git a/typescript/infra/src/contract-metrics.ts b/typescript/infra/src/contract-metrics.ts index 7cb371512..be2b0677c 100644 --- a/typescript/infra/src/contract-metrics.ts +++ b/typescript/infra/src/contract-metrics.ts @@ -1,4 +1,5 @@ import { ChainName } from '@abacus-network/sdk'; + import { ContractMetricsConfig } from './config'; import { HelmCommand, helmifyValues } from './utils/helm'; import { execCmd } from './utils/utils'; diff --git a/typescript/infra/src/core/check.ts b/typescript/infra/src/core/check.ts index d29a8b8c8..92b696f7e 100644 --- a/typescript/infra/src/core/check.ts +++ b/typescript/infra/src/core/check.ts @@ -1,11 +1,14 @@ import { expect } from 'chai'; + import { MultisigValidatorManager } from '@abacus-network/core'; -import { types } from '@abacus-network/utils'; -import { AbacusCore } from '@abacus-network/sdk'; import { AbacusAppChecker, CheckerViolation } from '@abacus-network/deploy'; -import { CoreConfig } from './types'; +import { AbacusCore } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; + import { setDifference } from '../utils/utils'; +import { CoreConfig } from './types'; + export enum CoreViolationType { ValidatorManager = 'ValidatorManager', Validator = 'Validator', diff --git a/typescript/infra/src/core/deploy.ts b/typescript/infra/src/core/deploy.ts index af4fd4bcd..ce92d456c 100644 --- a/typescript/infra/src/core/deploy.ts +++ b/typescript/infra/src/core/deploy.ts @@ -1,28 +1,31 @@ -import path from 'path'; import { ethers } from 'ethers'; -import { types } from '@abacus-network/utils'; -import { - AbacusCore, - ChainName, - CoreContractAddresses, - ProxiedAddress, -} from '@abacus-network/sdk'; -import { AbacusAppDeployer, ProxiedContract } from '@abacus-network/deploy'; +import path from 'path'; + import { - UpgradeBeaconController, AbacusConnectionManager, + AbacusConnectionManager__factory, + Inbox, InboxValidatorManager, InboxValidatorManager__factory, + Inbox__factory, + InterchainGasPaymaster__factory, OutboxValidatorManager, OutboxValidatorManager__factory, - Inbox, - UpgradeBeaconController__factory, - AbacusConnectionManager__factory, Outbox__factory, - Inbox__factory, - InterchainGasPaymaster__factory, + UpgradeBeaconController, + UpgradeBeaconController__factory, } from '@abacus-network/core'; +import { AbacusAppDeployer, ProxiedContract } from '@abacus-network/deploy'; +import { + AbacusCore, + ChainName, + CoreContractAddresses, + ProxiedAddress, +} from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; + import { DeployEnvironment, RustConfig } from '../config'; + import { CoreConfig, ValidatorManagerConfig } from './types'; export class AbacusCoreDeployer extends AbacusAppDeployer< diff --git a/typescript/infra/src/core/govern.ts b/typescript/infra/src/core/govern.ts index 26220a366..4e606ba3c 100644 --- a/typescript/infra/src/core/govern.ts +++ b/typescript/infra/src/core/govern.ts @@ -1,10 +1,13 @@ import { expect } from 'chai'; -import { Call, AbacusCore, AbacusGovernance } from '@abacus-network/sdk'; +import { PopulatedTransaction } from 'ethers'; + +import { MultisigValidatorManager__factory } from '@abacus-network/core'; import { CheckerViolation, ProxyViolationType, UpgradeBeaconViolation, } from '@abacus-network/deploy'; +import { AbacusCore, AbacusGovernance, Call } from '@abacus-network/sdk'; import { AbacusCoreChecker, @@ -13,8 +16,6 @@ import { ValidatorViolationType, } from './check'; import { CoreConfig } from './types'; -import { MultisigValidatorManager__factory } from '@abacus-network/core'; -import { PopulatedTransaction } from 'ethers'; interface DomainedCall { domain: number; diff --git a/typescript/infra/src/core/types.ts b/typescript/infra/src/core/types.ts index ed2dd83fa..c5600cb0c 100644 --- a/typescript/infra/src/core/types.ts +++ b/typescript/infra/src/core/types.ts @@ -1,5 +1,5 @@ -import { types } from '@abacus-network/utils'; import { ChainName } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; export type ValidatorManagerConfig = { validators: Array; diff --git a/typescript/infra/src/governance/check.ts b/typescript/infra/src/governance/check.ts index 55a43a4b8..a5a77b599 100644 --- a/typescript/infra/src/governance/check.ts +++ b/typescript/infra/src/governance/check.ts @@ -1,9 +1,10 @@ -import { ethers } from 'ethers'; import { expect } from 'chai'; +import { ethers } from 'ethers'; + import { GovernanceRouter } from '@abacus-network/apps'; -import { types } from '@abacus-network/utils'; -import { AbacusGovernance } from '@abacus-network/sdk'; import { AbacusRouterChecker } from '@abacus-network/deploy'; +import { AbacusGovernance } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; import { GovernanceConfig } from './types'; diff --git a/typescript/infra/src/governance/deploy.ts b/typescript/infra/src/governance/deploy.ts index e5e6040e9..2d20d3bb5 100644 --- a/typescript/infra/src/governance/deploy.ts +++ b/typescript/infra/src/governance/deploy.ts @@ -1,12 +1,14 @@ import { ethers } from 'ethers'; -import { types } from '@abacus-network/utils'; + import { GovernanceRouter, GovernanceRouter__factory, } from '@abacus-network/apps'; import { UpgradeBeaconController__factory } from '@abacus-network/core'; -import { GovernanceContractAddresses } from '@abacus-network/sdk'; import { AbacusRouterDeployer } from '@abacus-network/deploy'; +import { GovernanceContractAddresses } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; + import { GovernanceConfig } from './types'; export class AbacusGovernanceDeployer extends AbacusRouterDeployer< diff --git a/typescript/infra/src/governance/types.ts b/typescript/infra/src/governance/types.ts index 26ad3226b..fc4f75f70 100644 --- a/typescript/infra/src/governance/types.ts +++ b/typescript/infra/src/governance/types.ts @@ -1,6 +1,6 @@ -import { types } from '@abacus-network/utils'; -import { ChainName } from '@abacus-network/sdk'; import { RouterConfig } from '@abacus-network/deploy'; +import { ChainName } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; export type GovernanceConfigAddresses = { recoveryManager: types.Address; diff --git a/typescript/infra/src/infrastructure/external-secrets/external-secrets.ts b/typescript/infra/src/infrastructure/external-secrets/external-secrets.ts index 0e47a6543..a510b32da 100644 --- a/typescript/infra/src/infrastructure/external-secrets/external-secrets.ts +++ b/typescript/infra/src/infrastructure/external-secrets/external-secrets.ts @@ -7,9 +7,9 @@ import { grantServiceAccountRoleIfNotExists, } from '../../utils/gcloud'; import { + HelmCommand, addHelmRepoIfRequired, getDeployableHelmChartName, - HelmCommand, helmifyValues, } from '../../utils/helm'; import { execCmd } from '../../utils/utils'; diff --git a/typescript/infra/src/infrastructure/monitoring/prometheus.ts b/typescript/infra/src/infrastructure/monitoring/prometheus.ts index 7c913187c..452ce8c69 100644 --- a/typescript/infra/src/infrastructure/monitoring/prometheus.ts +++ b/typescript/infra/src/infrastructure/monitoring/prometheus.ts @@ -1,9 +1,9 @@ import { InfrastructureConfig } from '../../config/infrastructure'; import { fetchGCPSecret } from '../../utils/gcloud'; import { + HelmCommand, addHelmRepoIfRequired, getDeployableHelmChartName, - HelmCommand, helmifyValues, } from '../../utils/helm'; import { execCmd } from '../../utils/utils'; diff --git a/typescript/infra/src/utils/gcloud.ts b/typescript/infra/src/utils/gcloud.ts index a8cede90d..297ed94e9 100644 --- a/typescript/infra/src/utils/gcloud.ts +++ b/typescript/infra/src/utils/gcloud.ts @@ -1,5 +1,7 @@ import fs from 'fs'; + import { rm, writeFile } from 'fs/promises'; + import { execCmd, execCmdAndParseJson } from './utils'; interface IamCondition { diff --git a/typescript/infra/src/utils/helm.ts b/typescript/infra/src/utils/helm.ts index 287ba49dc..d20ea11ec 100644 --- a/typescript/infra/src/utils/helm.ts +++ b/typescript/infra/src/utils/helm.ts @@ -2,6 +2,7 @@ import { HelmChartConfig, HelmChartRepositoryConfig, } from '../config/infrastructure'; + import { execCmd } from './utils'; export enum HelmCommand { diff --git a/typescript/infra/src/utils/utils.ts b/typescript/infra/src/utils/utils.ts index 894191c40..183d64fbc 100644 --- a/typescript/infra/src/utils/utils.ts +++ b/typescript/infra/src/utils/utils.ts @@ -1,9 +1,9 @@ -import { exec } from 'child_process'; -import fs from 'fs'; -import path from 'path'; // @ts-ignore import * as asn1 from 'asn1.js'; +import { exec } from 'child_process'; import { ethers } from 'ethers'; +import fs from 'fs'; +import path from 'path'; export function sleep(ms: number) { return new Promise((resolve) => setTimeout(resolve, ms)); diff --git a/typescript/infra/src/verify.ts b/typescript/infra/src/verify.ts index 4488df2d1..508e6b2a7 100644 --- a/typescript/infra/src/verify.ts +++ b/typescript/infra/src/verify.ts @@ -1,5 +1,6 @@ import fs from 'fs'; import path from 'path'; + import { ContractVerifier, VerificationInput } from '@abacus-network/deploy'; import { ChainName } from '@abacus-network/sdk'; diff --git a/typescript/infra/test/core.test.ts b/typescript/infra/test/core.test.ts index 28badc8bf..de2af6a2d 100644 --- a/typescript/infra/test/core.test.ts +++ b/typescript/infra/test/core.test.ts @@ -1,14 +1,16 @@ -import path from 'path'; import '@nomiclabs/hardhat-waffle'; import { ethers } from 'hardhat'; -import { types } from '@abacus-network/utils'; +import path from 'path'; + import { AbacusCore } from '@abacus-network/sdk'; -import { AbacusCoreDeployer, AbacusCoreChecker } from '../src/core'; +import { types } from '@abacus-network/utils'; + import { core as coreConfig, registerMultiProviderTest, } from '../config/environments/test'; import { ENVIRONMENTS_ENUM } from '../src/config/environment'; +import { AbacusCoreChecker, AbacusCoreDeployer } from '../src/core'; describe('core', async () => { const deployer = new AbacusCoreDeployer(); diff --git a/typescript/infra/test/governance.test.ts b/typescript/infra/test/governance.test.ts index 67f586225..88df97f84 100644 --- a/typescript/infra/test/governance.test.ts +++ b/typescript/infra/test/governance.test.ts @@ -1,16 +1,18 @@ -import path from 'path'; import '@nomiclabs/hardhat-waffle'; import { ethers } from 'hardhat'; -import { types } from '@abacus-network/utils'; +import path from 'path'; + import { AbacusGovernance } from '@abacus-network/sdk'; +import { types } from '@abacus-network/utils'; + import { - AbacusGovernanceDeployer, - AbacusGovernanceChecker, -} from '../src/governance'; -import { - registerMultiProviderTest, governance as governanceConfig, + registerMultiProviderTest, } from '../config/environments/test'; +import { + AbacusGovernanceChecker, + AbacusGovernanceDeployer, +} from '../src/governance'; describe('governance', async () => { const deployer = new AbacusGovernanceDeployer(); diff --git a/typescript/sdk/.prettierrc b/typescript/sdk/.prettierrc deleted file mode 100644 index 6f53ad164..000000000 --- a/typescript/sdk/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "all" -} diff --git a/typescript/sdk/src/app.ts b/typescript/sdk/src/app.ts index 37a18e957..c162caa92 100644 --- a/typescript/sdk/src/app.ts +++ b/typescript/sdk/src/app.ts @@ -1,6 +1,7 @@ import { ethers } from 'ethers'; -import { MultiProvider } from './provider'; + import { AbacusAppContracts } from './contracts'; +import { MultiProvider } from './provider'; import { NameOrDomain } from './types'; /** diff --git a/typescript/sdk/src/core/contracts.ts b/typescript/sdk/src/core/contracts.ts index 522b12144..d66f5e5a4 100644 --- a/typescript/sdk/src/core/contracts.ts +++ b/typescript/sdk/src/core/contracts.ts @@ -1,18 +1,18 @@ import { AbacusConnectionManager, AbacusConnectionManager__factory, - UpgradeBeaconController, - UpgradeBeaconController__factory, - OutboxValidatorManager, - OutboxValidatorManager__factory, + Inbox, InboxValidatorManager, InboxValidatorManager__factory, - Outbox, - Outbox__factory, - Inbox, Inbox__factory, InterchainGasPaymaster, InterchainGasPaymaster__factory, + Outbox, + OutboxValidatorManager, + OutboxValidatorManager__factory, + Outbox__factory, + UpgradeBeaconController, + UpgradeBeaconController__factory, } from '@abacus-network/core'; import { types } from '@abacus-network/utils'; diff --git a/typescript/sdk/src/core/environments/index.ts b/typescript/sdk/src/core/environments/index.ts index 471866f5a..9eb2e419f 100644 --- a/typescript/sdk/src/core/environments/index.ts +++ b/typescript/sdk/src/core/environments/index.ts @@ -1,6 +1,8 @@ -import { addresses as test } from './test'; -import { ChainName } from '../../'; import { CoreContractAddresses } from '../'; +import { ChainName } from '../../'; + +import { addresses as test } from './test'; + export const addresses: Record< any, Partial> diff --git a/typescript/sdk/src/core/events.ts b/typescript/sdk/src/core/events.ts index 1ba15fe54..704c29fa9 100644 --- a/typescript/sdk/src/core/events.ts +++ b/typescript/sdk/src/core/events.ts @@ -1,6 +1,7 @@ import { BigNumber } from '@ethersproject/bignumber'; import { TypedEvent } from '@abacus-network/core/dist/commons'; + import { Annotated } from '../events'; // copied from the Outbox.d.ts diff --git a/typescript/sdk/src/core/message.ts b/typescript/sdk/src/core/message.ts index 51c4a7063..c9e34ca21 100644 --- a/typescript/sdk/src/core/message.ts +++ b/typescript/sdk/src/core/message.ts @@ -1,6 +1,7 @@ +import { AbacusCore } from '.'; +import { TransactionReceipt } from '@ethersproject/abstract-provider'; import { BigNumber } from '@ethersproject/bignumber'; import { arrayify, hexlify } from '@ethersproject/bytes'; -import { TransactionReceipt } from '@ethersproject/abstract-provider'; import { keccak256 } from 'ethers/lib/utils'; import { Inbox, Outbox, Outbox__factory } from '@abacus-network/core'; @@ -9,7 +10,6 @@ import { Annotated, findAnnotatedSingleEvent } from '../events'; import { NameOrDomain } from '../types'; import { delay } from '../utils'; -import { AbacusCore } from '.'; import { AnnotatedCheckpoint, AnnotatedDispatch, diff --git a/typescript/sdk/src/events.ts b/typescript/sdk/src/events.ts index 9980b6421..63a81ab09 100644 --- a/typescript/sdk/src/events.ts +++ b/typescript/sdk/src/events.ts @@ -1,12 +1,13 @@ -import { TransactionReceipt } from '@ethersproject/abstract-provider'; import { Result } from '@ethersproject/abi'; +import { TransactionReceipt } from '@ethersproject/abstract-provider'; + import { TypedEvent, TypedEventFilter, } from '@abacus-network/core/dist/commons'; -import { NameOrDomain, Domain } from './types'; import { MultiProvider } from './provider'; +import { Domain, NameOrDomain } from './types'; export class Annotated> { readonly domain: number; diff --git a/typescript/sdk/src/gas/calculator.ts b/typescript/sdk/src/gas/calculator.ts index d05d44c08..6bc2f4383 100644 --- a/typescript/sdk/src/gas/calculator.ts +++ b/typescript/sdk/src/gas/calculator.ts @@ -1,9 +1,10 @@ -import { BigNumber, ethers, FixedNumber } from 'ethers'; +import { AbacusCore, ParsedMessage } from '..'; +import { BigNumber, FixedNumber, ethers } from 'ethers'; + import { utils } from '@abacus-network/utils'; -import { AbacusCore, ParsedMessage } from '..'; -import { convertDecimalValue, mulBigAndFixed } from './utils'; import { DefaultTokenPriceGetter, TokenPriceGetter } from './token-prices'; +import { convertDecimalValue, mulBigAndFixed } from './utils'; /** * A note on arithmetic: diff --git a/typescript/sdk/src/gas/token-prices.ts b/typescript/sdk/src/gas/token-prices.ts index cdf110337..fb4864c8e 100644 --- a/typescript/sdk/src/gas/token-prices.ts +++ b/typescript/sdk/src/gas/token-prices.ts @@ -1,4 +1,5 @@ import { FixedNumber } from 'ethers'; + import { NameOrDomain } from '../types'; export interface TokenPriceGetter { diff --git a/typescript/sdk/src/governance/app.ts b/typescript/sdk/src/governance/app.ts index 4e2441304..6a84709ca 100644 --- a/typescript/sdk/src/governance/app.ts +++ b/typescript/sdk/src/governance/app.ts @@ -4,8 +4,8 @@ import { AbacusApp } from '../app'; import { domains } from '../domains'; import { ChainName } from '../types'; -import { GovernanceContracts, GovernanceContractAddresses } from './contracts'; -import { Call, normalizeCall, associateCalls } from './utils'; +import { GovernanceContractAddresses, GovernanceContracts } from './contracts'; +import { Call, associateCalls, normalizeCall } from './utils'; export type Governor = { domain: number; diff --git a/typescript/sdk/src/governance/contracts.ts b/typescript/sdk/src/governance/contracts.ts index 7333d2193..3afa422fc 100644 --- a/typescript/sdk/src/governance/contracts.ts +++ b/typescript/sdk/src/governance/contracts.ts @@ -1,13 +1,13 @@ +import { + GovernanceRouter, + GovernanceRouter__factory, +} from '@abacus-network/apps'; import { AbacusConnectionManager, AbacusConnectionManager__factory, UpgradeBeaconController, UpgradeBeaconController__factory, } from '@abacus-network/core'; -import { - GovernanceRouter, - GovernanceRouter__factory, -} from '@abacus-network/apps'; import { types } from '@abacus-network/utils'; import { AbacusAppContracts } from '../contracts'; diff --git a/typescript/sdk/src/governance/environments/index.ts b/typescript/sdk/src/governance/environments/index.ts index 9ac4be7bb..7d70f51e4 100644 --- a/typescript/sdk/src/governance/environments/index.ts +++ b/typescript/sdk/src/governance/environments/index.ts @@ -1,5 +1,7 @@ -import { addresses as test } from './test'; import { ChainName, GovernanceContractAddresses } from '../../'; + +import { addresses as test } from './test'; + export const addresses: Record< any, Partial> diff --git a/typescript/sdk/src/governance/utils.ts b/typescript/sdk/src/governance/utils.ts index 69eb217fc..24c02e0a3 100644 --- a/typescript/sdk/src/governance/utils.ts +++ b/typescript/sdk/src/governance/utils.ts @@ -1,5 +1,7 @@ import { ethers } from 'ethers'; + import { types } from '@abacus-network/utils'; + import { canonizeId } from '../utils'; export interface Call { diff --git a/typescript/sdk/src/provider.ts b/typescript/sdk/src/provider.ts index bde5e819f..5f4618f0b 100644 --- a/typescript/sdk/src/provider.ts +++ b/typescript/sdk/src/provider.ts @@ -1,7 +1,7 @@ -import { ethers } from 'ethers'; import { StaticCeloJsonRpcProvider } from 'celo-ethers-provider'; +import { ethers } from 'ethers'; -import { ChainName, NameOrDomain, Domain } from './types'; +import { ChainName, Domain, NameOrDomain } from './types'; type Provider = ethers.providers.Provider; diff --git a/typescript/sdk/src/types.ts b/typescript/sdk/src/types.ts index f229e07d5..fbd150778 100644 --- a/typescript/sdk/src/types.ts +++ b/typescript/sdk/src/types.ts @@ -1,4 +1,5 @@ import { ethers } from 'ethers'; + import { types } from '@abacus-network/utils'; /** diff --git a/typescript/sdk/src/utils.ts b/typescript/sdk/src/utils.ts index c1b29b24f..9fb1ff92f 100644 --- a/typescript/sdk/src/utils.ts +++ b/typescript/sdk/src/utils.ts @@ -1,4 +1,4 @@ -import { arrayify, BytesLike, hexlify } from '@ethersproject/bytes'; +import { BytesLike, arrayify, hexlify } from '@ethersproject/bytes'; import { ethers } from 'ethers'; export type Address = string; diff --git a/typescript/utils/.prettierrc b/typescript/utils/.prettierrc deleted file mode 100644 index 6f53ad164..000000000 --- a/typescript/utils/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "tabWidth": 2, - "singleQuote": true, - "trailingComma": "all" -} diff --git a/typescript/utils/src/utils.ts b/typescript/utils/src/utils.ts index d6ccacdcd..856e16b65 100644 --- a/typescript/utils/src/utils.ts +++ b/typescript/utils/src/utils.ts @@ -1,5 +1,6 @@ import { assert } from 'chai'; import { ethers } from 'ethers'; + import { Address, Domain, HexString } from './types'; /* diff --git a/typescript/utils/src/validator.ts b/typescript/utils/src/validator.ts index d4d5d5e85..cdbcb3bc2 100644 --- a/typescript/utils/src/validator.ts +++ b/typescript/utils/src/validator.ts @@ -1,5 +1,6 @@ import { ethers } from 'ethers'; -import { utils, types } from '@abacus-network/utils'; + +import { types, utils } from '@abacus-network/utils'; export class Validator { localDomain: types.Domain; diff --git a/yarn.lock b/yarn.lock index a89b96100..2881e2213 100644 --- a/yarn.lock +++ b/yarn.lock @@ -202,6 +202,8 @@ __metadata: version: 0.0.0-use.local resolution: "@abacus-network/monorepo@workspace:." dependencies: + "@trivago/prettier-plugin-sort-imports": ^3.2.0 + prettier: ^2.2.1 typescript: ^4.3.5 languageName: unknown linkType: soft @@ -2017,7 +2019,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0": +"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.7": version: 7.16.7 resolution: "@babel/code-frame@npm:7.16.7" dependencies: @@ -2026,13 +2028,169 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.16.7": +"@babel/compat-data@npm:^7.17.10": + version: 7.17.10 + resolution: "@babel/compat-data@npm:7.17.10" + checksum: e85051087cd4690de5061909a2dd2d7f8b6434a3c2e30be6c119758db2027ae1845bcd75a81127423dd568b706ac6994a1a3d7d701069a23bf5cfe900728290b + languageName: node + linkType: hard + +"@babel/core@npm:7.13.10": + version: 7.13.10 + resolution: "@babel/core@npm:7.13.10" + dependencies: + "@babel/code-frame": ^7.12.13 + "@babel/generator": ^7.13.9 + "@babel/helper-compilation-targets": ^7.13.10 + "@babel/helper-module-transforms": ^7.13.0 + "@babel/helpers": ^7.13.10 + "@babel/parser": ^7.13.10 + "@babel/template": ^7.12.13 + "@babel/traverse": ^7.13.0 + "@babel/types": ^7.13.0 + convert-source-map: ^1.7.0 + debug: ^4.1.0 + gensync: ^1.0.0-beta.2 + json5: ^2.1.2 + lodash: ^4.17.19 + semver: ^6.3.0 + source-map: ^0.5.0 + checksum: 9b3362fd02e6a4f3ad642893312ec3d22713c4eeb2571c994d49c31f38d24893a6a18f4b49abb8d56b510e116278608eaddde2ca72ccb39ab29350efa5af39de + languageName: node + linkType: hard + +"@babel/generator@npm:7.13.9": + version: 7.13.9 + resolution: "@babel/generator@npm:7.13.9" + dependencies: + "@babel/types": ^7.13.0 + jsesc: ^2.5.1 + source-map: ^0.5.0 + checksum: 1b0e9fa1b5ea6656f0abeeedc99ff7bffa455d7bf118f4d17a75d80c439206b4ba3e1071c104b486b7447689512969286cbde505e6169ab38cf437e13ca54225 + languageName: node + linkType: hard + +"@babel/generator@npm:^7.13.0, @babel/generator@npm:^7.13.9, @babel/generator@npm:^7.17.10": + version: 7.17.10 + resolution: "@babel/generator@npm:7.17.10" + dependencies: + "@babel/types": ^7.17.10 + "@jridgewell/gen-mapping": ^0.1.0 + jsesc: ^2.5.1 + checksum: 9ec596a6ffec7bec239133a4ba79d4f834e6c894019accb1c70a7a5affbec9d0912d3baef200edd9d48e553d4ef72abcbffbc73cfb7d75f327c24186e887f79c + languageName: node + linkType: hard + +"@babel/helper-compilation-targets@npm:^7.13.10": + version: 7.17.10 + resolution: "@babel/helper-compilation-targets@npm:7.17.10" + dependencies: + "@babel/compat-data": ^7.17.10 + "@babel/helper-validator-option": ^7.16.7 + browserslist: ^4.20.2 + semver: ^6.3.0 + peerDependencies: + "@babel/core": ^7.0.0 + checksum: 5f547c7ebd372e90fa72c2aaea867e7193166e9f469dec5acde4f0e18a78b80bdca8e02a0f641f3e998be984fb5b802c729a9034faaee8b1a9ef6670cb76f120 + languageName: node + linkType: hard + +"@babel/helper-environment-visitor@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-environment-visitor@npm:7.16.7" + dependencies: + "@babel/types": ^7.16.7 + checksum: c03a10105d9ebd1fe632a77356b2e6e2f3c44edba9a93b0dc3591b6a66bd7a2e323dd9502f9ce96fc6401234abff1907aa877b6674f7826b61c953f7c8204bbe + languageName: node + linkType: hard + +"@babel/helper-function-name@npm:^7.12.13, @babel/helper-function-name@npm:^7.17.9": + version: 7.17.9 + resolution: "@babel/helper-function-name@npm:7.17.9" + dependencies: + "@babel/template": ^7.16.7 + "@babel/types": ^7.17.0 + checksum: a59b2e5af56d8f43b9b0019939a43774754beb7cb01a211809ca8031c71890999d07739e955343135ec566c4d8ff725435f1f60fb0af3bb546837c1f9f84f496 + languageName: node + linkType: hard + +"@babel/helper-hoist-variables@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-hoist-variables@npm:7.16.7" + dependencies: + "@babel/types": ^7.16.7 + checksum: 6ae1641f4a751cd9045346e3f61c3d9ec1312fd779ab6d6fecfe2a96e59a481ad5d7e40d2a840894c13b3fd6114345b157f9e3062fc5f1580f284636e722de60 + languageName: node + linkType: hard + +"@babel/helper-module-imports@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-module-imports@npm:7.16.7" + dependencies: + "@babel/types": ^7.16.7 + checksum: ddd2c4a600a2e9a4fee192ab92bf35a627c5461dbab4af31b903d9ba4d6b6e59e0ff3499fde4e2e9a0eebe24906f00b636f8b4d9bd72ff24d50e6618215c3212 + languageName: node + linkType: hard + +"@babel/helper-module-transforms@npm:^7.13.0": + version: 7.17.7 + resolution: "@babel/helper-module-transforms@npm:7.17.7" + dependencies: + "@babel/helper-environment-visitor": ^7.16.7 + "@babel/helper-module-imports": ^7.16.7 + "@babel/helper-simple-access": ^7.17.7 + "@babel/helper-split-export-declaration": ^7.16.7 + "@babel/helper-validator-identifier": ^7.16.7 + "@babel/template": ^7.16.7 + "@babel/traverse": ^7.17.3 + "@babel/types": ^7.17.0 + checksum: 0b8f023aa7ff82dc4864349d54c4557865ad8ba54d78f6d78a86b05ca40f65c2d60acb4a54c5c309e7a4356beb9a89b876e54af4b3c4801ad25f62ec3721f0ae + languageName: node + linkType: hard + +"@babel/helper-simple-access@npm:^7.17.7": + version: 7.17.7 + resolution: "@babel/helper-simple-access@npm:7.17.7" + dependencies: + "@babel/types": ^7.17.0 + checksum: 58a9bfd054720024f6ff47fbb113c96061dc2bd31a5e5285756bd3c2e83918c6926900e00150d0fb175d899494fe7d69bf2a8b278c32ef6f6bea8d032e6a3831 + languageName: node + linkType: hard + +"@babel/helper-split-export-declaration@npm:^7.12.13, @babel/helper-split-export-declaration@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-split-export-declaration@npm:7.16.7" + dependencies: + "@babel/types": ^7.16.7 + checksum: e10aaf135465c55114627951b79115f24bc7af72ecbb58d541d66daf1edaee5dde7cae3ec8c3639afaf74526c03ae3ce723444e3b5b3dc77140c456cd84bcaa1 + languageName: node + linkType: hard + +"@babel/helper-validator-identifier@npm:^7.12.11, @babel/helper-validator-identifier@npm:^7.16.7": version: 7.16.7 resolution: "@babel/helper-validator-identifier@npm:7.16.7" checksum: dbb3db9d184343152520a209b5684f5e0ed416109cde82b428ca9c759c29b10c7450657785a8b5c5256aa74acc6da491c1f0cf6b784939f7931ef82982051b69 languageName: node linkType: hard +"@babel/helper-validator-option@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/helper-validator-option@npm:7.16.7" + checksum: c5ccc451911883cc9f12125d47be69434f28094475c1b9d2ada7c3452e6ac98a1ee8ddd364ca9e3f9855fcdee96cdeafa32543ebd9d17fee7a1062c202e80570 + languageName: node + linkType: hard + +"@babel/helpers@npm:^7.13.10": + version: 7.17.9 + resolution: "@babel/helpers@npm:7.17.9" + dependencies: + "@babel/template": ^7.16.7 + "@babel/traverse": ^7.17.9 + "@babel/types": ^7.17.0 + checksum: 3c6db861e4c82fff2de3efb4ad12e32658c50c29920597cd0979390659b202e5849acd9542e0e2453167a52ccc30156ee4455d64d0e330f020d991d7551566f8 + languageName: node + linkType: hard + "@babel/highlight@npm:^7.10.4, @babel/highlight@npm:^7.16.7": version: 7.17.9 resolution: "@babel/highlight@npm:7.17.9" @@ -2044,6 +2202,91 @@ __metadata: languageName: node linkType: hard +"@babel/parser@npm:7.14.6": + version: 7.14.6 + resolution: "@babel/parser@npm:7.14.6" + bin: + parser: ./bin/babel-parser.js + checksum: 104482e07971a78a3d68a0c329b1303981a272f55a510d39c93dac3c293f207ec863329046abc5d8bb86db58c49670cc607654793470a87ccd386544c2ccf298 + languageName: node + linkType: hard + +"@babel/parser@npm:^7.13.0, @babel/parser@npm:^7.13.10, @babel/parser@npm:^7.16.7, @babel/parser@npm:^7.17.10": + version: 7.17.10 + resolution: "@babel/parser@npm:7.17.10" + bin: + parser: ./bin/babel-parser.js + checksum: a9493d9fb8625e0904a178703866c8ee4d3a6003f0954b08df9f772b54dae109c69376812b74732e0c3e1a7f1d5b30915577a1db12e5e16b0abee083539df574 + languageName: node + linkType: hard + +"@babel/template@npm:^7.12.13, @babel/template@npm:^7.16.7": + version: 7.16.7 + resolution: "@babel/template@npm:7.16.7" + dependencies: + "@babel/code-frame": ^7.16.7 + "@babel/parser": ^7.16.7 + "@babel/types": ^7.16.7 + checksum: 10cd112e89276e00f8b11b55a51c8b2f1262c318283a980f4d6cdb0286dc05734b9aaeeb9f3ad3311900b09bc913e02343fcaa9d4a4f413964aaab04eb84ac4a + languageName: node + linkType: hard + +"@babel/traverse@npm:7.13.0": + version: 7.13.0 + resolution: "@babel/traverse@npm:7.13.0" + dependencies: + "@babel/code-frame": ^7.12.13 + "@babel/generator": ^7.13.0 + "@babel/helper-function-name": ^7.12.13 + "@babel/helper-split-export-declaration": ^7.12.13 + "@babel/parser": ^7.13.0 + "@babel/types": ^7.13.0 + debug: ^4.1.0 + globals: ^11.1.0 + lodash: ^4.17.19 + checksum: 7d584b5541396b02f6973ba8ec8a067f2a6c2fd2e894c663dfae36e86e65a004a6865fbffbfc89ca040c894f9c12134bb971d31f09e7ec32c28e9b18bf737f2a + languageName: node + linkType: hard + +"@babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.17.3, @babel/traverse@npm:^7.17.9": + version: 7.17.10 + resolution: "@babel/traverse@npm:7.17.10" + dependencies: + "@babel/code-frame": ^7.16.7 + "@babel/generator": ^7.17.10 + "@babel/helper-environment-visitor": ^7.16.7 + "@babel/helper-function-name": ^7.17.9 + "@babel/helper-hoist-variables": ^7.16.7 + "@babel/helper-split-export-declaration": ^7.16.7 + "@babel/parser": ^7.17.10 + "@babel/types": ^7.17.10 + debug: ^4.1.0 + globals: ^11.1.0 + checksum: 44ec0a59aa274b59464d52b1796eb6e54c67ae0f946de0d608068e28b1ab7065bdf53c0169d9102854cb00aa01944c83e722f08aeab96d9cc6bf56f8aede70fd + languageName: node + linkType: hard + +"@babel/types@npm:7.13.0": + version: 7.13.0 + resolution: "@babel/types@npm:7.13.0" + dependencies: + "@babel/helper-validator-identifier": ^7.12.11 + lodash: ^4.17.19 + to-fast-properties: ^2.0.0 + checksum: 3dbb08add345325a49e1deebefa8d3774a8ab055c4be675c339a389358f4b3443652ded4bfdb230b342c6af12593a6fd3fb95156564e7ec84081018815896821 + languageName: node + linkType: hard + +"@babel/types@npm:^7.13.0, @babel/types@npm:^7.16.7, @babel/types@npm:^7.17.0, @babel/types@npm:^7.17.10, @babel/types@npm:^7.8.3": + version: 7.17.10 + resolution: "@babel/types@npm:7.17.10" + dependencies: + "@babel/helper-validator-identifier": ^7.16.7 + to-fast-properties: ^2.0.0 + checksum: 40cfc3f43a3ab7374df8ee6844793f804c65e7bea0fd1b090886b425106ba26e16e8fa698ae4b2caf2746083fe3e62f03f12997a5982e0d131700f17cbdcfca1 + languageName: node + linkType: hard + "@choojs/findup@npm:^0.2.0": version: 0.2.1 resolution: "@choojs/findup@npm:0.2.1" @@ -2722,6 +2965,30 @@ __metadata: languageName: node linkType: hard +"@jridgewell/gen-mapping@npm:^0.1.0": + version: 0.1.1 + resolution: "@jridgewell/gen-mapping@npm:0.1.1" + dependencies: + "@jridgewell/set-array": ^1.0.0 + "@jridgewell/sourcemap-codec": ^1.4.10 + checksum: 3bcc21fe786de6ffbf35c399a174faab05eb23ce6a03e8769569de28abbf4facc2db36a9ddb0150545ae23a8d35a7cf7237b2aa9e9356a7c626fb4698287d5cc + languageName: node + linkType: hard + +"@jridgewell/set-array@npm:^1.0.0": + version: 1.1.0 + resolution: "@jridgewell/set-array@npm:1.1.0" + checksum: 86ddd72ce7d2f7756dfb69804b35d0e760a85dcef30ed72e8610bf2c5e843f8878d977a0c77c4fdfa6a0e3d5b18e5bde4a1f1dd73fd2db06b200c998e9b5a6c5 + languageName: node + linkType: hard + +"@jridgewell/sourcemap-codec@npm:^1.4.10": + version: 1.4.12 + resolution: "@jridgewell/sourcemap-codec@npm:1.4.12" + checksum: a179bd442e74e5e3880d5a603bb63292ba3d55b3adf64ab9f1ea8c466bb32808e8fff032362dccb1157268574db99999bf4c3e6919d69a41f1951f1a534f2f77 + languageName: node + linkType: hard + "@mapbox/geojson-rewind@npm:^0.5.0": version: 0.5.1 resolution: "@mapbox/geojson-rewind@npm:0.5.1" @@ -3189,6 +3456,23 @@ __metadata: languageName: node linkType: hard +"@trivago/prettier-plugin-sort-imports@npm:^3.2.0": + version: 3.2.0 + resolution: "@trivago/prettier-plugin-sort-imports@npm:3.2.0" + dependencies: + "@babel/core": 7.13.10 + "@babel/generator": 7.13.9 + "@babel/parser": 7.14.6 + "@babel/traverse": 7.13.0 + "@babel/types": 7.13.0 + javascript-natural-sort: 0.7.1 + lodash: 4.17.21 + peerDependencies: + prettier: 2.x + checksum: 22461433fa0dc82621713cdfb88f8f527c6c41729e9859bb7f0106ef23c35b0da591ee7fed63516be7e8df5604dc8055f0c7e200fed1ef97f44000c9fe25a890 + languageName: node + linkType: hard + "@truffle/error@npm:^0.1.0": version: 0.1.0 resolution: "@truffle/error@npm:0.1.0" @@ -5502,6 +5786,21 @@ __metadata: languageName: node linkType: hard +"browserslist@npm:^4.20.2": + version: 4.20.3 + resolution: "browserslist@npm:4.20.3" + dependencies: + caniuse-lite: ^1.0.30001332 + electron-to-chromium: ^1.4.118 + escalade: ^3.1.1 + node-releases: ^2.0.3 + picocolors: ^1.0.0 + bin: + browserslist: cli.js + checksum: 1e4b719ac2ca0fe235218a606e8b8ef16b8809e0973b924158c39fbc435a0b0fe43437ea52dd6ef5ad2efcb83fcb07431244e472270177814217f7c563651f7d + languageName: node + linkType: hard + "bs58@npm:^4.0.0": version: 4.0.1 resolution: "bs58@npm:4.0.1" @@ -5788,6 +6087,13 @@ __metadata: languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001332": + version: 1.0.30001335 + resolution: "caniuse-lite@npm:1.0.30001335" + checksum: fe08b49ec6cb76cc69958ff001cf89d0a8ef9f35e0c8028b65981585046384f76e007d64dea372a34ca56d91caa83cc614c00779fe2b4d378aa0e68696374f67 + languageName: node + linkType: hard + "canvas-fit@npm:^1.5.0": version: 1.5.0 resolution: "canvas-fit@npm:1.5.0" @@ -6414,7 +6720,7 @@ __metadata: languageName: node linkType: hard -"convert-source-map@npm:^1.5.1": +"convert-source-map@npm:^1.5.1, convert-source-map@npm:^1.7.0": version: 1.8.0 resolution: "convert-source-map@npm:1.8.0" dependencies: @@ -7306,6 +7612,13 @@ __metadata: languageName: node linkType: hard +"electron-to-chromium@npm:^1.4.118": + version: 1.4.130 + resolution: "electron-to-chromium@npm:1.4.130" + checksum: b3912b8073b66eef01ac1096bf5e6be492fff2be3af9e87f01e9c046d31443fd9192e1230113f26bbe77b8671e1196d4e5aa9f58d3191e2760bebf7cd3ea413b + languageName: node + linkType: hard + "element-size@npm:^1.1.1": version: 1.1.1 resolution: "element-size@npm:1.1.1" @@ -9291,6 +9604,13 @@ __metadata: languageName: node linkType: hard +"gensync@npm:^1.0.0-beta.2": + version: 1.0.0-beta.2 + resolution: "gensync@npm:1.0.0-beta.2" + checksum: a7437e58c6be12aa6c90f7730eac7fa9833dc78872b4ad2963d2031b00a3367a93f98aec75f9aaac7220848e4026d67a8655e870b24f20a543d103c0d65952ec + languageName: node + linkType: hard + "geojson-vt@npm:^3.2.1": version: 3.2.1 resolution: "geojson-vt@npm:3.2.1" @@ -9575,7 +9895,7 @@ __metadata: languageName: node linkType: hard -"globals@npm:^11.7.0": +"globals@npm:^11.1.0, globals@npm:^11.7.0": version: 11.12.0 resolution: "globals@npm:11.12.0" checksum: 67051a45eca3db904aee189dfc7cd53c20c7d881679c93f6146ddd4c9f4ab2268e68a919df740d39c71f4445d2b38ee360fc234428baea1dbdfe68bbcb46979e @@ -11164,6 +11484,13 @@ __metadata: languageName: node linkType: hard +"javascript-natural-sort@npm:0.7.1": + version: 0.7.1 + resolution: "javascript-natural-sort@npm:0.7.1" + checksum: 161e2c512cc7884bc055a582c6645d9032cab88497a76123d73cb23bfb03d97a04cf7772ecdb8bd3366fc07192c2f996366f479f725c23ef073fffe03d6a586a + languageName: node + linkType: hard + "js-sha3@npm:0.5.7, js-sha3@npm:^0.5.7": version: 0.5.7 resolution: "js-sha3@npm:0.5.7" @@ -11243,6 +11570,15 @@ __metadata: languageName: node linkType: hard +"jsesc@npm:^2.5.1": + version: 2.5.2 + resolution: "jsesc@npm:2.5.2" + bin: + jsesc: bin/jsesc + checksum: 4dc190771129e12023f729ce20e1e0bfceac84d73a85bc3119f7f938843fe25a4aeccb54b6494dce26fcf263d815f5f31acdefac7cc9329efb8422a4f4d9fa9d + languageName: node + linkType: hard + "jsesc@npm:~0.5.0": version: 0.5.0 resolution: "jsesc@npm:0.5.0" @@ -11365,6 +11701,15 @@ __metadata: languageName: node linkType: hard +"json5@npm:^2.1.2": + version: 2.2.1 + resolution: "json5@npm:2.2.1" + bin: + json5: lib/cli.js + checksum: 74b8a23b102a6f2bf2d224797ae553a75488b5adbaee9c9b6e5ab8b510a2fc6e38f876d4c77dea672d4014a44b2399e15f2051ac2b37b87f74c0c7602003543b + languageName: node + linkType: hard + "jsonfile@npm:^2.1.0": version: 2.4.0 resolution: "jsonfile@npm:2.4.0" @@ -11893,7 +12238,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:^4.17.11, lodash@npm:^4.17.12, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4": +"lodash@npm:4.17.21, lodash@npm:^4.17.11, lodash@npm:^4.17.12, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21, lodash@npm:^4.17.4": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -12994,6 +13339,13 @@ __metadata: languageName: node linkType: hard +"node-releases@npm:^2.0.3": + version: 2.0.4 + resolution: "node-releases@npm:2.0.4" + checksum: b32d6c2032c7b169ae3938b416fc50f123f5bd577d54a79b2ae201febf27b22846b01c803dd35ac8689afe840f8ba4e5f7154723db629b80f359836b6707b92f + languageName: node + linkType: hard + "nodeplotlib@npm:^0.7.6": version: 0.7.7 resolution: "nodeplotlib@npm:0.7.7" @@ -13744,6 +14096,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.0.0": + version: 1.0.0 + resolution: "picocolors@npm:1.0.0" + checksum: a2e8092dd86c8396bdba9f2b5481032848525b3dc295ce9b57896f931e63fc16f79805144321f72976383fc249584672a75cc18d6777c6b757603f372f745981 + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -15666,7 +16025,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.5.6, source-map@npm:^0.5.7": +"source-map@npm:^0.5.0, source-map@npm:^0.5.6, source-map@npm:^0.5.7": version: 0.5.7 resolution: "source-map@npm:0.5.7" checksum: 5dc2043b93d2f194142c7f38f74a24670cd7a0063acdaf4bf01d2964b402257ae843c2a8fa822ad5b71013b5fcafa55af7421383da919752f22ff488bc553f4d @@ -16405,6 +16764,13 @@ __metadata: languageName: node linkType: hard +"to-fast-properties@npm:^2.0.0": + version: 2.0.0 + resolution: "to-fast-properties@npm:2.0.0" + checksum: be2de62fe58ead94e3e592680052683b1ec986c72d589e7b21e5697f8744cdbf48c266fa72f6c15932894c10187b5f54573a3bcf7da0bfd964d5caf23d436168 + languageName: node + linkType: hard + "to-float32@npm:^1.1.0": version: 1.1.0 resolution: "to-float32@npm:1.1.0"