Use global prettier config and sort imports (#372)

* Use global prettier config

* Use workspaces in CI

* Check for git changes in prettier CI job
pull/376/head
Yorke Rhodes 3 years ago committed by GitHub
parent 30888396c3
commit a424371e89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      .github/workflows/node.yml
  2. 5
      .prettierrc
  3. 12
      build.sh
  4. 12
      lint-prettier.sh
  5. 17
      package.json
  6. 18
      solidity/app/.prettierrc
  7. 7
      solidity/app/test/abacusConnectionClient.test.ts
  8. 7
      solidity/app/test/router.test.ts
  9. 18
      solidity/apps/.prettierrc
  10. 7
      solidity/apps/test/governance/governanceRouter.test.ts
  11. 5
      solidity/apps/test/governance/lib/GovernanceDeploy.ts
  12. 3
      solidity/apps/test/governance/lib/utils.ts
  13. 12
      solidity/core/test/abacusConnectionManager.test.ts
  14. 4
      solidity/core/test/badrecipient.test.ts
  15. 4
      solidity/core/test/common.test.ts
  16. 6
      solidity/core/test/inbox.test.ts
  17. 4
      solidity/core/test/interchainGasPaymaster.test.ts
  18. 6
      solidity/core/test/lib/upgrade.ts
  19. 3
      solidity/core/test/merkle.test.ts
  20. 4
      solidity/core/test/message.test.ts
  21. 5
      solidity/core/test/outbox.test.ts
  22. 9
      solidity/core/test/upgrade.test.ts
  23. 8
      solidity/core/test/validator-manager/inboxValidatorManager.test.ts
  24. 4
      solidity/core/test/validator-manager/multisigValidatorManager.test.ts
  25. 8
      solidity/core/test/validator-manager/outboxValidatorManager.test.ts
  26. 2
      solidity/core/test/validator-manager/utils.ts
  27. 5
      typescript/contract-metrics/.prettierrc
  28. 4
      typescript/contract-metrics/src/config.ts
  29. 2
      typescript/contract-metrics/src/gas.ts
  30. 4
      typescript/contract-metrics/src/metrics.ts
  31. 6
      typescript/contract-metrics/src/monitor/core.ts
  32. 3
      typescript/contract-metrics/src/monitor/governance.ts
  33. 8
      typescript/contract-metrics/src/print.ts
  34. 1
      typescript/contract-metrics/src/registerContext.ts
  35. 3
      typescript/contract-metrics/src/trace.ts
  36. 5
      typescript/deploy/.prettierrc
  37. 1
      typescript/deploy/src/check.ts
  38. 3
      typescript/deploy/src/config.ts
  39. 11
      typescript/deploy/src/deploy.ts
  40. 3
      typescript/deploy/src/proxy.ts
  41. 4
      typescript/deploy/src/router/check.ts
  42. 6
      typescript/deploy/src/router/deploy.ts
  43. 2
      typescript/deploy/src/router/types.ts
  44. 3
      typescript/deploy/src/verify/ContractVerifier.ts
  45. 34
      typescript/hardhat/src/TestAbacusDeploy.ts
  46. 2
      typescript/hardhat/src/TestDeploy.ts
  47. 11
      typescript/hardhat/src/TestRouterDeploy.ts
  48. 33
      typescript/hardhat/test/testAbacusDeploy.test.ts
  49. 5
      typescript/infra/.prettierrc
  50. 1
      typescript/infra/config/environments/dev/agent.ts
  51. 3
      typescript/infra/config/environments/dev/domains.ts
  52. 6
      typescript/infra/config/environments/dev/validators.ts
  53. 5
      typescript/infra/config/environments/test/agent.ts
  54. 6
      typescript/infra/config/environments/test/domains.ts
  55. 6
      typescript/infra/config/environments/test/validators.ts
  56. 3
      typescript/infra/config/networks/mainnets.ts
  57. 3
      typescript/infra/config/networks/testnets.ts
  58. 17
      typescript/infra/hardhat.config.ts
  59. 8
      typescript/infra/scripts/check-deploy.ts
  60. 5
      typescript/infra/scripts/core.ts
  61. 3
      typescript/infra/scripts/create-keys.ts
  62. 3
      typescript/infra/scripts/delete-keys.ts
  63. 3
      typescript/infra/scripts/deploy-agents.ts
  64. 1
      typescript/infra/scripts/deploy-contract-metrics.ts
  65. 5
      typescript/infra/scripts/deploy-infra-external-secrets.ts
  66. 3
      typescript/infra/scripts/deploy-infra-monitoring.ts
  67. 1
      typescript/infra/scripts/deploy-keymaster.ts
  68. 6
      typescript/infra/scripts/governance.ts
  69. 7
      typescript/infra/scripts/output-agent-env-vars.ts
  70. 2
      typescript/infra/scripts/rotate-key.ts
  71. 4
      typescript/infra/scripts/set-validator.ts
  72. 3
      typescript/infra/scripts/update-agents-diff.ts
  73. 2
      typescript/infra/scripts/update-key.ts
  74. 6
      typescript/infra/scripts/utils.ts
  75. 10
      typescript/infra/src/agents/aws/key.ts
  76. 7
      typescript/infra/src/agents/aws/user.ts
  77. 7
      typescript/infra/src/agents/aws/validator-user.ts
  78. 6
      typescript/infra/src/agents/gcp.ts
  79. 9
      typescript/infra/src/agents/index.ts
  80. 8
      typescript/infra/src/config/agent.ts
  81. 6
      typescript/infra/src/config/chain.ts
  82. 1
      typescript/infra/src/contract-metrics.ts
  83. 9
      typescript/infra/src/core/check.ts
  84. 33
      typescript/infra/src/core/deploy.ts
  85. 7
      typescript/infra/src/core/govern.ts
  86. 2
      typescript/infra/src/core/types.ts
  87. 7
      typescript/infra/src/governance/check.ts
  88. 6
      typescript/infra/src/governance/deploy.ts
  89. 4
      typescript/infra/src/governance/types.ts
  90. 2
      typescript/infra/src/infrastructure/external-secrets/external-secrets.ts
  91. 2
      typescript/infra/src/infrastructure/monitoring/prometheus.ts
  92. 2
      typescript/infra/src/utils/gcloud.ts
  93. 1
      typescript/infra/src/utils/helm.ts
  94. 6
      typescript/infra/src/utils/utils.ts
  95. 1
      typescript/infra/src/verify.ts
  96. 8
      typescript/infra/test/core.test.ts
  97. 16
      typescript/infra/test/governance.test.ts
  98. 5
      typescript/sdk/.prettierrc
  99. 3
      typescript/sdk/src/app.ts
  100. 14
      typescript/sdk/src/core/contracts.ts
  101. Some files were not shown because too many files have changed in this diff Show More

@ -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"

@ -14,5 +14,8 @@
"explicitTypes": "always"
}
}
]
],
"importOrder": ["^@abacus-network/(.*)$", "^../(.*)$", "^./(.*)$"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}

@ -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

@ -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

@ -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"
}
}

@ -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"
}
}
]
}

@ -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 {

@ -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';

@ -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"
}
}
]
}

@ -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';

@ -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;

@ -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,

@ -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';

@ -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', () => {

@ -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';

@ -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');

@ -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,

@ -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 = {

@ -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';

@ -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');

@ -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';

@ -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,

@ -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;

@ -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;

@ -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;

@ -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

@ -1,5 +0,0 @@
{
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all"
}

@ -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' });

@ -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[] };

@ -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<string>;

@ -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,

@ -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(

@ -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(

@ -5,6 +5,7 @@ import {
coreAddresses,
governanceAddresses,
} from '@abacus-network/sdk';
import config from './config';
// register local

@ -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[] = [
{

@ -1,5 +0,0 @@
{
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all"
}

@ -1,4 +1,5 @@
import { expect } from 'chai';
import { AbacusApp, ProxiedAddress } from '@abacus-network/sdk';
import { types } from '@abacus-network/utils';

@ -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;

@ -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';

@ -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';

@ -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';

@ -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<

@ -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;

@ -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';

@ -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<types.Domain, ethers.Signer>;
@ -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<Map<types.Domain, ethers.providers.TransactionResponse[]>> {
const responses: Map<types.Domain, ethers.providers.TransactionResponse[]> =
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);

@ -1,4 +1,4 @@
import { types } from "@abacus-network/utils";
import { types } from '@abacus-network/utils';
export class TestDeploy<T, V> {
public readonly config: V;

@ -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<T, V> extends TestDeploy<T, V> {
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<T, V> extends TestDeploy<T, V> {
abstract deployInstance(
domain: types.Domain,
abacus: TestAbacusDeploy
abacus: TestAbacusDeploy,
): Promise<T>;
abstract router(domain: types.Domain): Router;
}

@ -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);

@ -1,5 +0,0 @@
{
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all"
}

@ -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';

@ -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';

@ -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) =>

@ -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<TestNetworks> = {
environment: ENVIRONMENTS_ENUM.Test,
namespace: ENVIRONMENTS_ENUM.Test,

@ -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';

@ -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`;

@ -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: {},

@ -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,

@ -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);

@ -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();

@ -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();

@ -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();

@ -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();

@ -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);

@ -1,5 +1,6 @@
import { runContractMetricsHelmCommand } from '../src/contract-metrics';
import { HelmCommand } from '../src/utils/helm';
import {
getContractMetricsConfig,
getDomainNames,

@ -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();

@ -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);

@ -1,5 +1,6 @@
import { runKeymasterHelmCommand } from '../src/agents';
import { HelmCommand } from '../src/utils/helm';
import { getAgentConfig, getDomainNames, getEnvironment } from './utils';
async function main() {

@ -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();

@ -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() {

@ -1,7 +1,7 @@
import {
getKeyRoleAndChainArgs,
getAgentConfig,
getEnvironment,
getKeyRoleAndChainArgs,
} from './utils';
async function rotateKey() {

@ -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]);

@ -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();

@ -1,7 +1,7 @@
import {
getKeyRoleAndChainArgs,
getAgentConfig,
getEnvironment,
getKeyRoleAndChainArgs,
} from './utils';
async function rotateKey() {

@ -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';

@ -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 {

@ -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<Networks extends ChainName> {

@ -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';

@ -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 {

@ -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',

@ -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<Networks extends ChainName, T> {

@ -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(

@ -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';

@ -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',

@ -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<

@ -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;

@ -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<types.Address>;

@ -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';

@ -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<

@ -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;

@ -7,9 +7,9 @@ import {
grantServiceAccountRoleIfNotExists,
} from '../../utils/gcloud';
import {
HelmCommand,
addHelmRepoIfRequired,
getDeployableHelmChartName,
HelmCommand,
helmifyValues,
} from '../../utils/helm';
import { execCmd } from '../../utils/utils';

@ -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';

@ -1,5 +1,7 @@
import fs from 'fs';
import { rm, writeFile } from 'fs/promises';
import { execCmd, execCmdAndParseJson } from './utils';
interface IamCondition {

@ -2,6 +2,7 @@ import {
HelmChartConfig,
HelmChartRepositoryConfig,
} from '../config/infrastructure';
import { execCmd } from './utils';
export enum HelmCommand {

@ -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));

@ -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';

@ -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();

@ -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();

@ -1,5 +0,0 @@
{
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all"
}

@ -1,6 +1,7 @@
import { ethers } from 'ethers';
import { MultiProvider } from './provider';
import { AbacusAppContracts } from './contracts';
import { MultiProvider } from './provider';
import { NameOrDomain } from './types';
/**

@ -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';

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save