From 55c9750cd92bd3813bc1a31855e5e2b265baec94 Mon Sep 17 00:00:00 2001 From: Nam Chu Hoai Date: Tue, 14 Jun 2022 07:43:29 -0500 Subject: [PATCH] SDK 0.2.1 (#537) * Alpha7 * Checker * Move AbacusCoreChecker to deploy --- package.json | 1 + .../app/contracts/AbacusConnectionClient.sol | 2 +- solidity/app/contracts/Router.sol | 12 +- solidity/app/contracts/test/TestRouter.sol | 11 +- solidity/app/hardhat.config.ts | 1 - solidity/app/package.json | 7 +- solidity/app/test/router.test.ts | 260 ++++++++++-------- solidity/app/tsconfig.json | 2 +- solidity/core/contracts/Inbox.sol | 6 +- solidity/core/contracts/MerkleTreeManager.sol | 2 +- solidity/core/contracts/Outbox.sol | 6 +- solidity/core/{ => contracts}/libs/Merkle.sol | 0 .../core/{ => contracts}/libs/Message.sol | 0 .../core/{ => contracts}/libs/TypeCasts.sol | 0 solidity/core/contracts/test/TestMessage.sol | 2 +- solidity/core/contracts/test/TestOutbox.sol | 2 +- .../core/contracts/test/TestSendReceiver.sol | 2 +- .../OutboxValidatorManager.sol | 2 +- solidity/core/hardhat.config.ts | 18 +- solidity/core/package.json | 7 +- solidity/core/tsconfig.json | 2 +- typescript/deploy/package.json | 9 +- typescript/deploy/src/check.ts | 2 +- .../{infra => deploy}/src/core/check.ts | 23 +- typescript/deploy/src/core/deploy.ts | 7 +- typescript/deploy/src/deploy.ts | 6 +- typescript/deploy/src/index.ts | 1 + typescript/deploy/src/router/check.ts | 24 +- typescript/deploy/src/router/deploy.ts | 39 ++- typescript/deploy/src/router/types.ts | 1 - typescript/deploy/src/utils.ts | 10 + typescript/hardhat/package.json | 10 +- typescript/infra/package.json | 8 +- typescript/infra/scripts/check-deploy.ts | 3 +- typescript/infra/src/core/index.ts | 1 - typescript/infra/src/utils/utils.ts | 10 - typescript/infra/test/core.test.ts | 7 +- typescript/sdk/package.json | 6 +- typescript/sdk/src/app.ts | 4 +- typescript/sdk/src/core/app.ts | 13 +- typescript/sdk/src/core/contracts.ts | 26 +- typescript/sdk/src/core/events.ts | 4 +- typescript/sdk/src/index.ts | 4 +- typescript/sdk/src/router.ts | 26 +- typescript/sdk/src/utils.ts | 1 + typescript/utils/package.json | 2 +- yarn.lock | 41 +-- 47 files changed, 367 insertions(+), 266 deletions(-) rename solidity/core/{ => contracts}/libs/Merkle.sol (100%) rename solidity/core/{ => contracts}/libs/Message.sol (100%) rename solidity/core/{ => contracts}/libs/TypeCasts.sol (100%) rename typescript/{infra => deploy}/src/core/check.ts (91%) delete mode 100644 typescript/infra/src/core/index.ts diff --git a/package.json b/package.json index 8162daae2c..6830347ea6 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "private": true, "scripts": { "build": "yarn workspaces foreach --verbose --parallel --topological run build", + "publish": "yarn workspaces foreach --no-private --verbose --topological npm publish --access public", "postinstall": "husky install", "prettier": "yarn workspaces foreach --verbose --parallel run prettier", "lint-ts": "eslint . --ext .ts", diff --git a/solidity/app/contracts/AbacusConnectionClient.sol b/solidity/app/contracts/AbacusConnectionClient.sol index 58dcfcc2ef..36e1e3f191 100644 --- a/solidity/app/contracts/AbacusConnectionClient.sol +++ b/solidity/app/contracts/AbacusConnectionClient.sol @@ -48,7 +48,7 @@ abstract contract AbacusConnectionClient is OwnableUpgradeable { function __AbacusConnectionClient_initialize( address _abacusConnectionManager - ) internal { + ) internal onlyInitializing { _setAbacusConnectionManager(_abacusConnectionManager); __Ownable_init(); } diff --git a/solidity/app/contracts/Router.sol b/solidity/app/contracts/Router.sol index ebe130a648..1075b9e0ac 100644 --- a/solidity/app/contracts/Router.sol +++ b/solidity/app/contracts/Router.sol @@ -35,8 +35,18 @@ abstract contract Router is AbacusConnectionClient, IMessageRecipient { } // ======== Initializer ========= + function initialize(address _abacusConnectionManager) + external + virtual + initializer + { + __Router_initialize(_abacusConnectionManager); + } - function __Router_initialize(address _abacusConnectionManager) internal { + function __Router_initialize(address _abacusConnectionManager) + internal + onlyInitializing + { __AbacusConnectionClient_initialize(_abacusConnectionManager); } diff --git a/solidity/app/contracts/test/TestRouter.sol b/solidity/app/contracts/test/TestRouter.sol index b20d5f05ea..f22e8d5136 100644 --- a/solidity/app/contracts/test/TestRouter.sol +++ b/solidity/app/contracts/test/TestRouter.sol @@ -4,8 +4,15 @@ pragma solidity >=0.6.11; import "../Router.sol"; contract TestRouter is Router { - function initialize(address _abacusConnectionManager) external initializer { - __Router_initialize(_abacusConnectionManager); + event InitializeOverload(); + + function initialize(address abacusConnectionManager) + external + override + initializer + { + __Router_initialize(abacusConnectionManager); + emit InitializeOverload(); } function _handle( diff --git a/solidity/app/hardhat.config.ts b/solidity/app/hardhat.config.ts index ab1f2039dd..15c073ea80 100644 --- a/solidity/app/hardhat.config.ts +++ b/solidity/app/hardhat.config.ts @@ -29,6 +29,5 @@ module.exports = { typechain: { outDir: './types', target: 'ethers-v5', - alwaysGenerateOverloads: false, // should overloads with full signatures like deposit(uint256) be generated always, even if there are no overloads? }, }; diff --git a/solidity/app/package.json b/solidity/app/package.json index bbe5c832f8..53a314ebc2 100644 --- a/solidity/app/package.json +++ b/solidity/app/package.json @@ -1,10 +1,10 @@ { "name": "@abacus-network/app", "description": "Solidity contracts for Abacus apps", - "version": "0.2.1-alpha3", + "version": "0.2.1", "dependencies": { - "@abacus-network/core": "^0.2.1-alpha3", - "@abacus-network/utils": "^0.2.1-alpha3", + "@abacus-network/core": "^0.2.1", + "@abacus-network/utils": "^0.2.1", "@openzeppelin/contracts-upgradeable": "^4.5.0" }, "devDependencies": { @@ -45,6 +45,7 @@ "repository": "https://github.com/abacus-network/abacus-monorepo", "scripts": { "build": "hardhat compile && tsc", + "clean": "hardhat clean", "coverage": "hardhat coverage", "prettier": "prettier --write ./contracts ./test", "test": "hardhat test" diff --git a/solidity/app/test/router.test.ts b/solidity/app/test/router.test.ts index c7eb9e65bd..fd266afae8 100644 --- a/solidity/app/test/router.test.ts +++ b/solidity/app/test/router.test.ts @@ -49,138 +49,172 @@ describe('Router', async () => { ); await connectionManager.setOutbox(outbox.address); - const routerFactory = new TestRouter__factory(signer); - router = await routerFactory.deploy(); - await router.initialize(connectionManager.address); + router = await new TestRouter__factory(signer).deploy(); }); - it('Cannot be initialized twice', async () => { - await expect( - router.initialize(ethers.constants.AddressZero), - ).to.be.revertedWith('Initializable: contract is already initialized'); - }); + describe('#initialize', () => { + it('should set the abacus connection manager', async () => { + await router.initialize(connectionManager.address); + expect(await router.abacusConnectionManager()).to.equal( + connectionManager.address, + ); + }); - it('accepts message from enrolled inbox and router', async () => { - await connectionManager.enrollInbox(origin, signer.address); - const remote = utils.addressToBytes32(nonOwner.address); - await router.enrollRemoteRouter(origin, remote); - // Does not revert. - await router.handle(origin, remote, message); - }); + it('should transfer owner to deployer', async () => { + await router.initialize(connectionManager.address); + expect(await router.owner()).to.equal(signer.address); + }); - it('rejects message from unenrolled inbox', async () => { - await expect( - router.handle(origin, utils.addressToBytes32(nonOwner.address), message), - ).to.be.revertedWith('!inbox'); - }); + it('should use overloaded initialize', async () => { + await expect(router.initialize(connectionManager.address)).to.emit( + router, + 'InitializeOverload', + ); + }); - it('rejects message from unenrolled router', async () => { - await connectionManager.enrollInbox(origin, signer.address); - await expect( - router.handle(origin, utils.addressToBytes32(nonOwner.address), message), - ).to.be.revertedWith('!router'); + it('cannot be initialized twice', async () => { + await router.initialize(ethers.constants.AddressZero); + await expect( + router.initialize(ethers.constants.AddressZero), + ).to.be.revertedWith('Initializable: contract is already initialized'); + }); }); - it('owner can enroll remote router', async () => { - const remote = nonOwner.address; - const remoteBytes = utils.addressToBytes32(nonOwner.address); - expect(await router.isRemoteRouter(origin, remoteBytes)).to.equal(false); - await expect(router.mustHaveRemoteRouter(origin)).to.be.revertedWith( - '!router', - ); - await expect( - router.enrollRemoteRouter(origin, utils.addressToBytes32(remote)), - ).to.emit(router, 'RemoteRouterEnrolled'); - expect(await router.isRemoteRouter(origin, remoteBytes)).to.equal(true); - expect(await router.mustHaveRemoteRouter(origin)).to.equal(remoteBytes); - }); + describe('when initialized', () => { + beforeEach(async () => { + await router.initialize(connectionManager.address); + }); - it('non-owner cannot enroll remote router', async () => { - await expect( - router - .connect(nonOwner) - .enrollRemoteRouter(origin, utils.addressToBytes32(nonOwner.address)), - ).to.be.revertedWith(ONLY_OWNER_REVERT_MSG); - }); + it('accepts message from enrolled inbox and router', async () => { + await connectionManager.enrollInbox(origin, signer.address); + const remote = utils.addressToBytes32(nonOwner.address); + await router.enrollRemoteRouter(origin, remote); + // Does not revert. + await router.handle(origin, remote, message); + }); - describe('dispatch functions', () => { - let interchainGasPaymaster: InterchainGasPaymaster; - beforeEach(async () => { - const interchainGasPaymasterFactory = new InterchainGasPaymaster__factory( - signer, - ); - interchainGasPaymaster = await interchainGasPaymasterFactory.deploy(); - await router.setInterchainGasPaymaster(interchainGasPaymaster.address); - - // Enroll a remote router on the destination domain. - // The address is arbitrary because no messages will actually be processed. - await router.enrollRemoteRouter( - destination, - utils.addressToBytes32(nonOwner.address), + it('rejects message from unenrolled inbox', async () => { + await expect( + router.handle( + origin, + utils.addressToBytes32(nonOwner.address), + message, + ), + ).to.be.revertedWith('!inbox'); + }); + + it('rejects message from unenrolled router', async () => { + await connectionManager.enrollInbox(origin, signer.address); + await expect( + router.handle( + origin, + utils.addressToBytes32(nonOwner.address), + message, + ), + ).to.be.revertedWith('!router'); + }); + + it('owner can enroll remote router', async () => { + const remote = nonOwner.address; + const remoteBytes = utils.addressToBytes32(nonOwner.address); + expect(await router.isRemoteRouter(origin, remoteBytes)).to.equal(false); + await expect(router.mustHaveRemoteRouter(origin)).to.be.revertedWith( + '!router', ); + await router.enrollRemoteRouter(origin, utils.addressToBytes32(remote)); + expect(await router.isRemoteRouter(origin, remoteBytes)).to.equal(true); + expect(await router.mustHaveRemoteRouter(origin)).to.equal(remoteBytes); }); - // Helper for testing different variations of dispatch functions - const runDispatchFunctionTests = async ( - dispatchFunction: ( - destinationDomain: number, - interchainGasPayment?: number, - ) => Promise, - expectGasPayment: boolean, - ) => { - // Allows a Chai Assertion to be programmatically negated - const expectAssertion = ( - assertion: Chai.Assertion, - expected: boolean, - ) => { - return expected ? assertion : assertion.not; - }; + it('non-owner cannot enroll remote router', async () => { + await expect( + router + .connect(nonOwner) + .enrollRemoteRouter(origin, utils.addressToBytes32(nonOwner.address)), + ).to.be.revertedWith(ONLY_OWNER_REVERT_MSG); + }); - it('dispatches a message', async () => { - await expect(dispatchFunction(destination)).to.emit(outbox, 'Dispatch'); + describe('dispatch functions', () => { + let interchainGasPaymaster: InterchainGasPaymaster; + beforeEach(async () => { + const interchainGasPaymasterFactory = + new InterchainGasPaymaster__factory(signer); + interchainGasPaymaster = await interchainGasPaymasterFactory.deploy(); + await router.setInterchainGasPaymaster(interchainGasPaymaster.address); + + // Enroll a remote router on the destination domain. + // The address is arbitrary because no messages will actually be processed. + await router.enrollRemoteRouter( + destination, + utils.addressToBytes32(nonOwner.address), + ); }); - it(`${ - expectGasPayment ? 'pays' : 'does not pay' - } interchain gas`, async () => { - const testInterchainGasPayment = 1234; - const leafIndex = await outbox.count(); - const assertion = expectAssertion( - expect(dispatchFunction(destination, testInterchainGasPayment)).to, - expectGasPayment, + // Helper for testing different variations of dispatch functions + const runDispatchFunctionTests = async ( + dispatchFunction: ( + destinationDomain: number, + interchainGasPayment?: number, + ) => Promise, + expectGasPayment: boolean, + ) => { + // Allows a Chai Assertion to be programmatically negated + const expectAssertion = ( + assertion: Chai.Assertion, + expected: boolean, + ) => { + return expected ? assertion : assertion.not; + }; + + it('dispatches a message', async () => { + await expect(dispatchFunction(destination)).to.emit( + outbox, + 'Dispatch', + ); + }); + + it(`${ + expectGasPayment ? 'pays' : 'does not pay' + } interchain gas`, async () => { + const testInterchainGasPayment = 1234; + const leafIndex = await outbox.count(); + const assertion = expectAssertion( + expect(dispatchFunction(destination, testInterchainGasPayment)).to, + expectGasPayment, + ); + await assertion + .emit(interchainGasPaymaster, 'GasPayment') + .withArgs(outbox.address, leafIndex, testInterchainGasPayment); + }); + + it('reverts when dispatching a message to an unenrolled remote router', async () => { + await expect( + dispatchFunction(destinationWithoutRouter), + ).to.be.revertedWith('!router'); + }); + }; + + describe('#dispatch', () => { + runDispatchFunctionTests( + (destinationDomain) => router.dispatch(destinationDomain, '0x'), + false, ); - await assertion - .emit(interchainGasPaymaster, 'GasPayment') - .withArgs(outbox.address, leafIndex, testInterchainGasPayment); }); - it('reverts when dispatching a message to an unenrolled remote router', async () => { - await expect( - dispatchFunction(destinationWithoutRouter), - ).to.be.revertedWith('!router'); + describe('#dispatchWithGas', () => { + runDispatchFunctionTests( + (destinationDomain, interchainGasPayment = 0) => + router.dispatchWithGas( + destinationDomain, + '0x', + interchainGasPayment, + { + value: interchainGasPayment, + }, + ), + true, + ); }); - }; - - describe('#dispatch', () => { - runDispatchFunctionTests( - (destinationDomain) => router.dispatch(destinationDomain, '0x'), - false, - ); - }); - - describe('#dispatchWithGas', () => { - runDispatchFunctionTests( - (destinationDomain, interchainGasPayment = 0) => - router.dispatchWithGas( - destinationDomain, - '0x', - interchainGasPayment, - { - value: interchainGasPayment, - }, - ), - true, - ); }); }); }); diff --git a/solidity/app/tsconfig.json b/solidity/app/tsconfig.json index 907c014990..85da2e13b2 100644 --- a/solidity/app/tsconfig.json +++ b/solidity/app/tsconfig.json @@ -5,5 +5,5 @@ }, "exclude": ["./node_modules/", "./dist/", "./types/hardhat.d.ts"], "extends": "../../tsconfig.json", - "include": ["./types/*.ts", "./types/factories/*.ts"] + "include": ["./types/**/*.ts"] } diff --git a/solidity/core/contracts/Inbox.sol b/solidity/core/contracts/Inbox.sol index d46c840ac7..ae555e3b05 100644 --- a/solidity/core/contracts/Inbox.sol +++ b/solidity/core/contracts/Inbox.sol @@ -4,9 +4,9 @@ pragma solidity >=0.8.0; // ============ Internal Imports ============ import {Version0} from "./Version0.sol"; import {Mailbox} from "./Mailbox.sol"; -import {MerkleLib} from "../libs/Merkle.sol"; -import {Message} from "../libs/Message.sol"; -import {TypeCasts} from "../libs/TypeCasts.sol"; +import {MerkleLib} from "./libs/Merkle.sol"; +import {Message} from "./libs/Message.sol"; +import {TypeCasts} from "./libs/TypeCasts.sol"; import {IMessageRecipient} from "../interfaces/IMessageRecipient.sol"; import {IInbox} from "../interfaces/IInbox.sol"; diff --git a/solidity/core/contracts/MerkleTreeManager.sol b/solidity/core/contracts/MerkleTreeManager.sol index f0a31f4209..1d096981e2 100644 --- a/solidity/core/contracts/MerkleTreeManager.sol +++ b/solidity/core/contracts/MerkleTreeManager.sol @@ -2,7 +2,7 @@ pragma solidity >=0.8.0; // ============ Internal Imports ============ -import {MerkleLib} from "../libs/Merkle.sol"; +import {MerkleLib} from "./libs/Merkle.sol"; /** * @title MerkleTreeManager diff --git a/solidity/core/contracts/Outbox.sol b/solidity/core/contracts/Outbox.sol index eea78f515d..2b506bdf7a 100644 --- a/solidity/core/contracts/Outbox.sol +++ b/solidity/core/contracts/Outbox.sol @@ -4,9 +4,9 @@ pragma solidity >=0.8.0; // ============ Internal Imports ============ import {Version0} from "./Version0.sol"; import {Mailbox} from "./Mailbox.sol"; -import {MerkleLib} from "../libs/Merkle.sol"; -import {Message} from "../libs/Message.sol"; -import {TypeCasts} from "../libs/TypeCasts.sol"; +import {MerkleLib} from "./libs/Merkle.sol"; +import {Message} from "./libs/Message.sol"; +import {TypeCasts} from "./libs/TypeCasts.sol"; import {MerkleTreeManager} from "./MerkleTreeManager.sol"; import {IOutbox} from "../interfaces/IOutbox.sol"; diff --git a/solidity/core/libs/Merkle.sol b/solidity/core/contracts/libs/Merkle.sol similarity index 100% rename from solidity/core/libs/Merkle.sol rename to solidity/core/contracts/libs/Merkle.sol diff --git a/solidity/core/libs/Message.sol b/solidity/core/contracts/libs/Message.sol similarity index 100% rename from solidity/core/libs/Message.sol rename to solidity/core/contracts/libs/Message.sol diff --git a/solidity/core/libs/TypeCasts.sol b/solidity/core/contracts/libs/TypeCasts.sol similarity index 100% rename from solidity/core/libs/TypeCasts.sol rename to solidity/core/contracts/libs/TypeCasts.sol diff --git a/solidity/core/contracts/test/TestMessage.sol b/solidity/core/contracts/test/TestMessage.sol index 6298cfbd23..b01bdc66b4 100644 --- a/solidity/core/contracts/test/TestMessage.sol +++ b/solidity/core/contracts/test/TestMessage.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity >=0.6.11; -import {Message} from "../../libs/Message.sol"; +import {Message} from "../libs/Message.sol"; contract TestMessage { using Message for bytes; diff --git a/solidity/core/contracts/test/TestOutbox.sol b/solidity/core/contracts/test/TestOutbox.sol index 457321b5d3..385ce80d12 100644 --- a/solidity/core/contracts/test/TestOutbox.sol +++ b/solidity/core/contracts/test/TestOutbox.sol @@ -3,7 +3,7 @@ pragma solidity >=0.8.0; // ============ Internal Imports ============ import "../Outbox.sol"; -import {MerkleLib} from "../../libs/Merkle.sol"; +import {MerkleLib} from "../libs/Merkle.sol"; contract TestOutbox is Outbox { constructor(uint32 _localDomain) Outbox(_localDomain) {} // solhint-disable-line no-empty-blocks diff --git a/solidity/core/contracts/test/TestSendReceiver.sol b/solidity/core/contracts/test/TestSendReceiver.sol index b6f16d3316..4fc929ff06 100644 --- a/solidity/core/contracts/test/TestSendReceiver.sol +++ b/solidity/core/contracts/test/TestSendReceiver.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity >=0.8.0; -import {TypeCasts} from "../../libs/TypeCasts.sol"; +import {TypeCasts} from "../libs/TypeCasts.sol"; import {IInterchainGasPaymaster} from "../../interfaces/IInterchainGasPaymaster.sol"; import {IMessageRecipient} from "../../interfaces/IMessageRecipient.sol"; diff --git a/solidity/core/contracts/validator-manager/OutboxValidatorManager.sol b/solidity/core/contracts/validator-manager/OutboxValidatorManager.sol index 12db8166e3..60f5da0691 100644 --- a/solidity/core/contracts/validator-manager/OutboxValidatorManager.sol +++ b/solidity/core/contracts/validator-manager/OutboxValidatorManager.sol @@ -4,7 +4,7 @@ pragma abicoder v2; // ============ Internal Imports ============ import {IOutbox} from "../../interfaces/IOutbox.sol"; -import {MerkleLib} from "../../libs/Merkle.sol"; +import {MerkleLib} from "../libs/Merkle.sol"; import {MultisigValidatorManager} from "./MultisigValidatorManager.sol"; /** diff --git a/solidity/core/hardhat.config.ts b/solidity/core/hardhat.config.ts index 95882a4c78..36b510df20 100644 --- a/solidity/core/hardhat.config.ts +++ b/solidity/core/hardhat.config.ts @@ -1,8 +1,8 @@ -import "solidity-coverage"; -import "@typechain/hardhat"; -import "@nomiclabs/hardhat-ethers"; -import "@nomiclabs/hardhat-waffle"; -import "hardhat-gas-reporter"; +import '@nomiclabs/hardhat-ethers'; +import '@nomiclabs/hardhat-waffle'; +import '@typechain/hardhat'; +import 'hardhat-gas-reporter'; +import 'solidity-coverage'; /** * @type import('hardhat/config').HardhatUserConfig @@ -18,12 +18,12 @@ module.exports = { }, }, gasReporter: { - currency: "USD", + currency: 'USD', }, typechain: { - outDir: "./types", - target: "ethers-v5", - alwaysGenerateOverloads: false, // should overloads with full signatures like deposit(uint256) be generated always, even if there are no overloads? + outDir: './types', + target: 'ethers-v5', + alwaysGenerateOverloads: true, }, mocha: { bail: true, diff --git a/solidity/core/package.json b/solidity/core/package.json index efc212e4a4..119ba10b4c 100644 --- a/solidity/core/package.json +++ b/solidity/core/package.json @@ -1,9 +1,9 @@ { "name": "@abacus-network/core", "description": "Core solidity contracts for Abacus", - "version": "0.2.1-alpha3", + "version": "0.2.1", "dependencies": { - "@abacus-network/utils": "^0.2.1-alpha3", + "@abacus-network/utils": "^0.2.1", "@openzeppelin/contracts": "^4.6.0", "@openzeppelin/contracts-upgradeable": "^4.6.0", "@summa-tx/memview-sol": "^2.0.0" @@ -45,8 +45,9 @@ "repository": "https://github.com/abacus-network/abacus-monorepo", "scripts": { "build": "hardhat compile && tsc", + "clean": "hardhat clean", "coverage": "hardhat coverage", - "prettier": "prettier --write ./contracts ./libs ./test", + "prettier": "prettier --write ./contracts ./interfaces ./test", "test": "hardhat test" }, "types": "dist/index.d.ts" diff --git a/solidity/core/tsconfig.json b/solidity/core/tsconfig.json index 088d146fc6..df1187ac01 100644 --- a/solidity/core/tsconfig.json +++ b/solidity/core/tsconfig.json @@ -6,5 +6,5 @@ }, "exclude": ["./node_modules/", "./dist/", "./types/hardhat.d.ts"], "extends": "../../tsconfig.json", - "include": ["./types/*.ts", "./types/factories/*.ts"] + "include": ["./types/**/*.ts"] } diff --git a/typescript/deploy/package.json b/typescript/deploy/package.json index 32401649f7..c021dcfd92 100644 --- a/typescript/deploy/package.json +++ b/typescript/deploy/package.json @@ -1,11 +1,12 @@ { "name": "@abacus-network/deploy", "description": "Deploy tools for the Abacus network", - "version": "0.2.1-alpha3", + "version": "0.2.1", "dependencies": { - "@abacus-network/core": "^0.2.1-alpha3", - "@abacus-network/sdk": "^0.2.1-alpha3", - "@abacus-network/utils": "^0.2.1-alpha3", + "@abacus-network/app": "^0.2.1", + "@abacus-network/core": "^0.2.1", + "@abacus-network/sdk": "^0.2.1", + "@abacus-network/utils": "^0.2.1", "@types/debug": "^4.1.7", "@types/yargs": "^17.0.10", "axios": "^0.21.3", diff --git a/typescript/deploy/src/check.ts b/typescript/deploy/src/check.ts index 92cfa04af4..2c9d32dc0d 100644 --- a/typescript/deploy/src/check.ts +++ b/typescript/deploy/src/check.ts @@ -58,7 +58,7 @@ export abstract class AbacusAppChecker< ) { const dc = this.multiProvider.getChainConnection(chain); const implementation = await upgradeBeaconImplementation( - dc.provider!, + dc.provider, proxiedAddress.beacon, ); if (implementation !== proxiedAddress.implementation) { diff --git a/typescript/infra/src/core/check.ts b/typescript/deploy/src/core/check.ts similarity index 91% rename from typescript/infra/src/core/check.ts rename to typescript/deploy/src/core/check.ts index 23e3ed7e76..395a2cc6ef 100644 --- a/typescript/infra/src/core/check.ts +++ b/typescript/deploy/src/core/check.ts @@ -1,21 +1,21 @@ import { expect } from 'chai'; import { MultisigValidatorManager } from '@abacus-network/core'; -import { - AbacusAppChecker, - CheckerViolation, - CoreConfig, -} from '@abacus-network/deploy'; import { AbacusCore, BeaconProxyAddresses, ChainName, + ChainNameToDomainId, chainMetadata, objMap, promiseObjAll, } from '@abacus-network/sdk'; -import { setDifference } from '../utils/utils'; +import { AbacusAppChecker } from '../check'; +import { CheckerViolation } from '../config'; +import { setDifference } from '../utils'; + +import { CoreConfig } from './deploy'; export enum CoreViolationType { ValidatorManager = 'ValidatorManager', @@ -182,6 +182,17 @@ export class AbacusCoreChecker< }), ); + await promiseObjAll( + objMap(coreContracts.inboxes, async (remoteChain, inbox) => { + // check that the inbox has the right local domain + const actualLocalDomain = await inbox.inbox.contract.localDomain(); + expect(actualLocalDomain).to.equal(ChainNameToDomainId[chain]); + + const actualRemoteDomain = await inbox.inbox.contract.remoteDomain(); + expect(actualRemoteDomain).to.equal(ChainNameToDomainId[remoteChain]); + }), + ); + // Check that all inboxes on this chain share the same implementation and // UpgradeBeacon. const coreAddresses = this.app.getAddresses(chain); diff --git a/typescript/deploy/src/core/deploy.ts b/typescript/deploy/src/core/deploy.ts index 5851992ce2..d3163a6e8b 100644 --- a/typescript/deploy/src/core/deploy.ts +++ b/typescript/deploy/src/core/deploy.ts @@ -24,6 +24,8 @@ import { types } from '@abacus-network/utils'; import { AbacusDeployer } from '../deploy'; +import debug = require('debug'); + export type ValidatorManagerConfig = { validators: Array; threshold: number; @@ -46,10 +48,13 @@ export class AbacusCoreDeployer extends AbacusDeployer< configMap: ChainMap, factoriesOverride = coreFactories, ) { - super(multiProvider, configMap, factoriesOverride); + super(multiProvider, configMap, factoriesOverride, { + logger: debug('abacus:CoreDeployer'), + }); this.startingBlockNumbers = objMap(configMap, () => undefined); } + // override return type for inboxes shape derived from chain async deploy(): Promise> { return super.deploy() as Promise>; } diff --git a/typescript/deploy/src/deploy.ts b/typescript/deploy/src/deploy.ts index 18fe763611..e1f2f464a0 100644 --- a/typescript/deploy/src/deploy.ts +++ b/typescript/deploy/src/deploy.ts @@ -96,13 +96,14 @@ export abstract class AbacusDeployer< ubcAddress: types.Address, initArgs: Parameters, ): Promise> { - const chainConnection = this.multiProvider.getChainConnection(chain); - const signer = chainConnection.signer; const implementation = await this.deployContract( chain, contractName, deployArgs, ); + this.logger(`Proxy ${contractName.toString()} on ${chain}`); + const chainConnection = this.multiProvider.getChainConnection(chain); + const signer = chainConnection.signer; const beacon = await new UpgradeBeacon__factory(signer).deploy( implementation.address, ubcAddress, @@ -138,6 +139,7 @@ export abstract class AbacusDeployer< proxy: ProxiedContract, initArgs: Parameters, ): Promise> { + this.logger(`Duplicate Proxy on ${chain}`); const signer = this.multiProvider.getChainConnection(chain).signer!; const initData = proxy.contract.interface.encodeFunctionData( 'initialize', diff --git a/typescript/deploy/src/index.ts b/typescript/deploy/src/index.ts index 1c36427196..269d7c0051 100644 --- a/typescript/deploy/src/index.ts +++ b/typescript/deploy/src/index.ts @@ -5,6 +5,7 @@ export { CoreConfig, ValidatorManagerConfig, } from './core/deploy'; +export { AbacusCoreChecker } from './core/check'; export { AbacusDeployer } from './deploy'; export { UpgradeBeaconViolation } from './proxy'; export { diff --git a/typescript/deploy/src/router/check.ts b/typescript/deploy/src/router/check.ts index 0eb2131261..c180ae9f99 100644 --- a/typescript/deploy/src/router/check.ts +++ b/typescript/deploy/src/router/check.ts @@ -14,7 +14,8 @@ import { RouterConfig } from './types'; export class AbacusRouterChecker< Chain extends ChainName, - App extends AbacusApp, + Contracts extends RouterContracts, + App extends AbacusApp, Config extends RouterConfig, > extends AbacusAppChecker { checkOwnership(chain: Chain) { @@ -26,7 +27,6 @@ export class AbacusRouterChecker< async checkChain(chain: Chain): Promise { await this.checkEnrolledRouters(chain); await this.checkOwnership(chain); - await this.checkAbacusConnectionManager(chain); } async checkEnrolledRouters(chain: Chain): Promise { @@ -44,24 +44,6 @@ export class AbacusRouterChecker< } ownables(chain: Chain): Ownable[] { - const contracts = this.app.getContracts(chain); - const ownables: Ownable[] = [contracts.router]; - const config = this.configMap[chain]; - // If the config specifies that an abacusConnectionManager should have been deployed, - // it should be owned by the owner. - if (config.abacusConnectionManager && contracts.abacusConnectionManager) { - ownables.push(contracts.abacusConnectionManager); - } - return ownables; - } - - async checkAbacusConnectionManager(chain: Chain): Promise { - const config = this.configMap[chain]; - const contracts = this.app.getContracts(chain); - if (!config.abacusConnectionManager || !contracts.abacusConnectionManager) { - return; - } - const actual = contracts.abacusConnectionManager.address; - expect(actual).to.equal(config.abacusConnectionManager); + return [this.app.getContracts(chain).router]; } } diff --git a/typescript/deploy/src/router/deploy.ts b/typescript/deploy/src/router/deploy.ts index 8c528b9745..b749f8fe41 100644 --- a/typescript/deploy/src/router/deploy.ts +++ b/typescript/deploy/src/router/deploy.ts @@ -4,6 +4,7 @@ import { ChainMap, ChainName, MultiProvider, + Router, RouterContracts, RouterFactories, chainMetadata, @@ -18,9 +19,9 @@ import { RouterConfig } from './types'; export abstract class AbacusRouterDeployer< Chain extends ChainName, - Config extends RouterConfig, - Factories extends RouterFactories, Contracts extends RouterContracts, + Factories extends RouterFactories, + Config extends RouterConfig, > extends AbacusDeployer { constructor( multiProvider: MultiProvider, @@ -32,9 +33,20 @@ export abstract class AbacusRouterDeployer< super(multiProvider, configMap, factories, { ...options, logger }); } - async deploy() { - const contractsMap = await super.deploy(); + // for use in implementations of deployContracts + async deployRouter( + chain: Chain, + deployParams: Parameters, + initParams: Parameters, + ): Promise { + const router = await this.deployContract(chain, 'router', deployParams); + this.logger(`Initializing ${chain}'s router with ${initParams}`); + // @ts-ignore spread operator + await router.initialize(...initParams); + return router; + } + async enrollRemoteRouters(contractsMap: ChainMap) { this.logger(`Enrolling deployed routers with each other...`); // Make all routers aware of eachother. await promiseObjAll( @@ -48,6 +60,25 @@ export abstract class AbacusRouterDeployer< } }), ); + } + + async transferOwnership(contractsMap: ChainMap) { + // TODO: check for initialization before transferring ownership + this.logger(`Transferring ownership of routers...`); + await promiseObjAll( + objMap(contractsMap, async (chain, contracts) => { + const owner = this.configMap[chain].owner; + this.logger(`Transfer ownership of ${chain}'s router to ${owner}`); + await contracts.router.transferOwnership(owner); + }), + ); + } + + async deploy() { + const contractsMap = await super.deploy(); + + await this.enrollRemoteRouters(contractsMap); + await this.transferOwnership(contractsMap); return contractsMap; } diff --git a/typescript/deploy/src/router/types.ts b/typescript/deploy/src/router/types.ts index 3998c0fd15..7e8a254a88 100644 --- a/typescript/deploy/src/router/types.ts +++ b/typescript/deploy/src/router/types.ts @@ -1,6 +1,5 @@ import { types } from '@abacus-network/utils'; export type RouterConfig = { - abacusConnectionManager: types.Address; owner: types.Address; }; diff --git a/typescript/deploy/src/utils.ts b/typescript/deploy/src/utils.ts index 20681557bc..5f0e0c64f7 100644 --- a/typescript/deploy/src/utils.ts +++ b/typescript/deploy/src/utils.ts @@ -29,3 +29,13 @@ export const getMultiProviderFromConfigAndSigner = ( })); return new MultiProvider(chainProviders); }; + +// Returns a \ b +// Taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#implementing_basic_set_operations +export function setDifference(a: Set, b: Set) { + const diff = new Set(a); + for (const element of b) { + diff.delete(element); + } + return diff; +} diff --git a/typescript/hardhat/package.json b/typescript/hardhat/package.json index 7cebcc8a78..a1d9d8734a 100644 --- a/typescript/hardhat/package.json +++ b/typescript/hardhat/package.json @@ -1,12 +1,12 @@ { "name": "@abacus-network/hardhat", "description": "Hardhat related tools for the Abacus network", - "version": "0.2.1-alpha3", + "version": "0.2.1", "dependencies": { - "@abacus-network/core": "^0.2.1-alpha3", - "@abacus-network/deploy": "^0.2.1-alpha3", - "@abacus-network/sdk": "^0.2.1-alpha3", - "@abacus-network/utils": "^0.2.1-alpha3", + "@abacus-network/core": "^0.2.1", + "@abacus-network/deploy": "^0.2.1", + "@abacus-network/sdk": "^0.2.1", + "@abacus-network/utils": "^0.2.1", "@nomiclabs/hardhat-ethers": "^2.0.5", "@nomiclabs/hardhat-waffle": "^2.0.2", "ethereum-waffle": "^3.2.2", diff --git a/typescript/infra/package.json b/typescript/infra/package.json index 420cfdef30..dbdeb0ab7a 100644 --- a/typescript/infra/package.json +++ b/typescript/infra/package.json @@ -1,11 +1,11 @@ { "name": "@abacus-network/infra", "description": "Infrastructure utilities for the Abacus Network", - "version": "0.2.1-alpha3", + "version": "0.2.1", "dependencies": { - "@abacus-network/core": "^0.2.1-alpha3", - "@abacus-network/deploy": "^0.2.1-alpha3", - "@abacus-network/sdk": "^0.2.1-alpha3", + "@abacus-network/core": "^0.2.1", + "@abacus-network/deploy": "^0.2.1", + "@abacus-network/sdk": "^0.2.1", "@aws-sdk/client-iam": "^3.74.0", "@aws-sdk/client-kms": "3.48.0", "@aws-sdk/client-s3": "^3.74.0", diff --git a/typescript/infra/scripts/check-deploy.ts b/typescript/infra/scripts/check-deploy.ts index ed8b4fddc5..7fb5eca1e2 100644 --- a/typescript/infra/scripts/check-deploy.ts +++ b/typescript/infra/scripts/check-deploy.ts @@ -1,7 +1,6 @@ +import { AbacusCoreChecker } from '@abacus-network/deploy'; import { AbacusCore } from '@abacus-network/sdk'; -import { AbacusCoreChecker } from '../src/core'; - import { getCoreEnvironmentConfig, getEnvironment } from './utils'; async function check() { diff --git a/typescript/infra/src/core/index.ts b/typescript/infra/src/core/index.ts deleted file mode 100644 index e41f613dd6..0000000000 --- a/typescript/infra/src/core/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { AbacusCoreChecker, CoreViolationType } from './check'; diff --git a/typescript/infra/src/utils/utils.ts b/typescript/infra/src/utils/utils.ts index f0ec8fad84..caead43592 100644 --- a/typescript/infra/src/utils/utils.ts +++ b/typescript/infra/src/utils/utils.ts @@ -160,13 +160,3 @@ export function writeJSON(directory: string, filename: string, obj: any) { JSON.stringify(obj, null, 2), ); } - -// Returns a \ b -// Taken from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set#implementing_basic_set_operations -export function setDifference(a: Set, b: Set) { - const diff = new Set(a); - for (const element of b) { - diff.delete(element); - } - return diff; -} diff --git a/typescript/infra/test/core.test.ts b/typescript/infra/test/core.test.ts index 8be9dc3d0a..28e163c5fa 100644 --- a/typescript/infra/test/core.test.ts +++ b/typescript/infra/test/core.test.ts @@ -2,7 +2,11 @@ import '@nomiclabs/hardhat-waffle'; import { ethers } from 'hardhat'; import path from 'path'; -import { AbacusCoreDeployer, CoreConfig } from '@abacus-network/deploy'; +import { + AbacusCoreChecker, + AbacusCoreDeployer, + CoreConfig, +} from '@abacus-network/deploy'; import { getMultiProviderFromConfigAndSigner } from '@abacus-network/deploy/dist/src/utils'; import { AbacusCore, @@ -15,7 +19,6 @@ import { import { environment as testConfig } from '../config/environments/test'; import { TestChains } from '../config/environments/test/chains'; -import { AbacusCoreChecker } from '../src/core'; import { AbacusCoreInfraDeployer } from '../src/core/deploy'; import { writeJSON } from '../src/utils/utils'; diff --git a/typescript/sdk/package.json b/typescript/sdk/package.json index 01408b0236..e56736a9ce 100644 --- a/typescript/sdk/package.json +++ b/typescript/sdk/package.json @@ -1,10 +1,10 @@ { "name": "@abacus-network/sdk", "description": "The official SDK for the Abacus Network", - "version": "0.2.1-alpha3", + "version": "0.2.1", "dependencies": { - "@abacus-network/core": "^0.2.1-alpha3", - "@abacus-network/utils": "^0.2.1-alpha3", + "@abacus-network/core": "^0.2.1", + "@abacus-network/utils": "^0.2.1", "@ethersproject/bignumber": "^5.5.0", "@ethersproject/bytes": "^5.5.0", "celo-ethers-provider": "^0.0.0", diff --git a/typescript/sdk/src/app.ts b/typescript/sdk/src/app.ts index b321188614..82ab7be7bc 100644 --- a/typescript/sdk/src/app.ts +++ b/typescript/sdk/src/app.ts @@ -13,8 +13,8 @@ export class AbacusApp< Chain extends ChainName = ChainName, > extends MultiGeneric { constructor( - public contractsMap: ChainMap, - multiProvider: MultiProvider, + public readonly contractsMap: ChainMap, + public readonly multiProvider: MultiProvider, ) { const connectedContractsMap = objMap(contractsMap, (chain, contracts) => connectContracts( diff --git a/typescript/sdk/src/core/app.ts b/typescript/sdk/src/core/app.ts index eee9114da5..ace683659f 100644 --- a/typescript/sdk/src/core/app.ts +++ b/typescript/sdk/src/core/app.ts @@ -3,7 +3,8 @@ import { Inbox, Outbox } from '@abacus-network/core'; import { AbacusApp } from '../app'; import { buildContracts } from '../contracts'; import { MultiProvider } from '../provider'; -import { ChainName, Remotes } from '../types'; +import { ChainMap, ChainName, Remotes } from '../types'; +import { objMap } from '../utils'; import { CoreContracts, coreFactories } from './contracts'; import { environments } from './environments'; @@ -45,6 +46,16 @@ export class AbacusCore extends AbacusApp< return super.getContracts(chain) as CoreContracts; } + extendWithConnectionManagers( + config: ChainMap, + ): ChainMap { + return objMap(config, (chain, config) => ({ + ...config, + abacusConnectionManager: + this.getContracts(chain).abacusConnectionManager.address, + })); + } + getMailboxPair( origin: Remotes, destination: Local, diff --git a/typescript/sdk/src/core/contracts.ts b/typescript/sdk/src/core/contracts.ts index 1c60d2cae2..0390796452 100644 --- a/typescript/sdk/src/core/contracts.ts +++ b/typescript/sdk/src/core/contracts.ts @@ -21,29 +21,29 @@ export type InboxContracts = { inboxValidatorManager: InboxValidatorManager; }; -const inboxFactories = { - inbox: new Inbox__factory(), - inboxValidatorManager: new InboxValidatorManager__factory(), -}; - export type OutboxContracts = { outbox: ProxiedContract; outboxValidatorManager: OutboxValidatorManager; }; -const outboxFactories = { - outbox: new Outbox__factory(), - outboxValidatorManager: new OutboxValidatorManager__factory(), -}; - export type CoreContracts< Networks extends ChainName, Local extends Networks, -> = { +> = OutboxContracts & { + inboxes: RemoteChainMap; abacusConnectionManager: AbacusConnectionManager; upgradeBeaconController: UpgradeBeaconController; - inboxes: RemoteChainMap; -} & OutboxContracts; +}; + +const inboxFactories = { + inbox: new Inbox__factory(), + inboxValidatorManager: new InboxValidatorManager__factory(), +}; + +const outboxFactories = { + outbox: new Outbox__factory(), + outboxValidatorManager: new OutboxValidatorManager__factory(), +}; export const coreFactories = { abacusConnectionManager: new AbacusConnectionManager__factory(), diff --git a/typescript/sdk/src/core/events.ts b/typescript/sdk/src/core/events.ts index bc98547325..5a0ef25ca6 100644 --- a/typescript/sdk/src/core/events.ts +++ b/typescript/sdk/src/core/events.ts @@ -1,5 +1,5 @@ -import type { ProcessEvent } from '@abacus-network/core/types/contracts/Inbox'; -import type { DispatchEvent } from '@abacus-network/core/types/contracts/Outbox'; +import type { ProcessEvent } from '@abacus-network/core/dist/contracts/Inbox'; +import type { DispatchEvent } from '@abacus-network/core/dist/contracts/Outbox'; import { Annotated } from '../events'; diff --git a/typescript/sdk/src/index.ts b/typescript/sdk/src/index.ts index 562ea6ea8e..b845fa322e 100644 --- a/typescript/sdk/src/index.ts +++ b/typescript/sdk/src/index.ts @@ -27,6 +27,7 @@ export { resolveId, resolveNetworks, } from './core'; +export { RetryJsonRpcProvider, RetryProvider } from './ethers'; export { Annotated, getEvents, @@ -40,7 +41,7 @@ export { } from './gas'; export { ChainConnection, IChainConnection, MultiProvider } from './provider'; export { BeaconProxyAddresses, ProxiedContract, ProxyAddresses } from './proxy'; -export { RouterContracts, RouterFactories } from './router'; +export { Router, RouterContracts, RouterFactories } from './router'; export { AllChains, ChainMap, @@ -56,4 +57,3 @@ export { TestChainNames, } from './types'; export { objMap, objMapEntries, promiseObjAll, utils } from './utils'; -export { RetryProvider, RetryJsonRpcProvider } from './ethers'; diff --git a/typescript/sdk/src/router.ts b/typescript/sdk/src/router.ts index 9e1c391896..14175299a5 100644 --- a/typescript/sdk/src/router.ts +++ b/typescript/sdk/src/router.ts @@ -1,20 +1,22 @@ -import { Router, Router__factory } from '@abacus-network/app'; -import { - AbacusConnectionManager, - AbacusConnectionManager__factory, -} from '@abacus-network/core'; +import { ethers } from 'ethers'; + +import { Router } from '@abacus-network/app'; import { AbacusContracts, AbacusFactories } from './contracts'; export type RouterContracts = AbacusContracts & { router: RouterContract; - abacusConnectionManager: AbacusConnectionManager; }; -export type RouterFactories< - RouterFactory extends Router__factory = Router__factory, -> = AbacusFactories & { - router: RouterFactory; - abacusConnectionManager: AbacusConnectionManager__factory; -}; +type RouterFactory = + ethers.ContractFactory & { + deploy: (...args: any[]) => Promise; + }; + +export type RouterFactories = + AbacusFactories & { + router: RouterFactory; + }; + +export { Router } from '@abacus-network/app'; diff --git a/typescript/sdk/src/utils.ts b/typescript/sdk/src/utils.ts index 085c6f8da8..3c431d2a9f 100644 --- a/typescript/sdk/src/utils.ts +++ b/typescript/sdk/src/utils.ts @@ -112,6 +112,7 @@ export function objMapEntries( return Object.entries(obj).map(([k, v]) => [k as K, func(k as K, v)]); } +// Map over the values of the object export function objMap( obj: Record, func: (k: K, _: I) => O, diff --git a/typescript/utils/package.json b/typescript/utils/package.json index 91f803cf9b..67756c829b 100644 --- a/typescript/utils/package.json +++ b/typescript/utils/package.json @@ -1,7 +1,7 @@ { "name": "@abacus-network/utils", "description": "General utilities for the Abacus network", - "version": "0.2.1-alpha3", + "version": "0.2.1", "dependencies": { "chai": "^4.3.0", "ethers": "^5.4.7" diff --git a/yarn.lock b/yarn.lock index 16a5771e45..7073c45039 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5,12 +5,12 @@ __metadata: version: 6 cacheKey: 8 -"@abacus-network/app@workspace:solidity/app": +"@abacus-network/app@^0.2.1, @abacus-network/app@workspace:solidity/app": version: 0.0.0-use.local resolution: "@abacus-network/app@workspace:solidity/app" dependencies: - "@abacus-network/core": ^0.2.1-alpha3 - "@abacus-network/utils": ^0.2.1-alpha3 + "@abacus-network/core": ^0.2.1 + "@abacus-network/utils": ^0.2.1 "@nomiclabs/hardhat-ethers": ^2.0.1 "@nomiclabs/hardhat-waffle": ^2.0.1 "@openzeppelin/contracts-upgradeable": ^4.5.0 @@ -33,11 +33,11 @@ __metadata: languageName: unknown linkType: soft -"@abacus-network/core@^0.2.1-alpha3, @abacus-network/core@workspace:solidity/core": +"@abacus-network/core@^0.2.1, @abacus-network/core@workspace:solidity/core": version: 0.0.0-use.local resolution: "@abacus-network/core@workspace:solidity/core" dependencies: - "@abacus-network/utils": ^0.2.1-alpha3 + "@abacus-network/utils": ^0.2.1 "@nomiclabs/hardhat-ethers": ^2.0.1 "@nomiclabs/hardhat-waffle": ^2.0.1 "@openzeppelin/contracts": ^4.6.0 @@ -61,13 +61,14 @@ __metadata: languageName: unknown linkType: soft -"@abacus-network/deploy@^0.2.1-alpha3, @abacus-network/deploy@workspace:typescript/deploy": +"@abacus-network/deploy@^0.2.1, @abacus-network/deploy@workspace:typescript/deploy": version: 0.0.0-use.local resolution: "@abacus-network/deploy@workspace:typescript/deploy" dependencies: - "@abacus-network/core": ^0.2.1-alpha3 - "@abacus-network/sdk": ^0.2.1-alpha3 - "@abacus-network/utils": ^0.2.1-alpha3 + "@abacus-network/app": ^0.2.1 + "@abacus-network/core": ^0.2.1 + "@abacus-network/sdk": ^0.2.1 + "@abacus-network/utils": ^0.2.1 "@types/debug": ^4.1.7 "@types/node": ^16.9.1 "@types/yargs": ^17.0.10 @@ -85,10 +86,10 @@ __metadata: version: 0.0.0-use.local resolution: "@abacus-network/hardhat@workspace:typescript/hardhat" dependencies: - "@abacus-network/core": ^0.2.1-alpha3 - "@abacus-network/deploy": ^0.2.1-alpha3 - "@abacus-network/sdk": ^0.2.1-alpha3 - "@abacus-network/utils": ^0.2.1-alpha3 + "@abacus-network/core": ^0.2.1 + "@abacus-network/deploy": ^0.2.1 + "@abacus-network/sdk": ^0.2.1 + "@abacus-network/utils": ^0.2.1 "@nomiclabs/hardhat-ethers": ^2.0.5 "@nomiclabs/hardhat-waffle": ^2.0.2 ethereum-waffle: ^3.2.2 @@ -104,9 +105,9 @@ __metadata: version: 0.0.0-use.local resolution: "@abacus-network/infra@workspace:typescript/infra" dependencies: - "@abacus-network/core": ^0.2.1-alpha3 - "@abacus-network/deploy": ^0.2.1-alpha3 - "@abacus-network/sdk": ^0.2.1-alpha3 + "@abacus-network/core": ^0.2.1 + "@abacus-network/deploy": ^0.2.1 + "@abacus-network/sdk": ^0.2.1 "@aws-sdk/client-iam": ^3.74.0 "@aws-sdk/client-kms": 3.48.0 "@aws-sdk/client-s3": ^3.74.0 @@ -147,12 +148,12 @@ __metadata: languageName: unknown linkType: soft -"@abacus-network/sdk@^0.2.1-alpha3, @abacus-network/sdk@workspace:typescript/sdk": +"@abacus-network/sdk@^0.2.1, @abacus-network/sdk@workspace:typescript/sdk": version: 0.0.0-use.local resolution: "@abacus-network/sdk@workspace:typescript/sdk" dependencies: - "@abacus-network/core": ^0.2.1-alpha3 - "@abacus-network/utils": ^0.2.1-alpha3 + "@abacus-network/core": ^0.2.1 + "@abacus-network/utils": ^0.2.1 "@ethersproject/bignumber": ^5.5.0 "@ethersproject/bytes": ^5.5.0 "@types/node": ^16.9.1 @@ -168,7 +169,7 @@ __metadata: languageName: unknown linkType: soft -"@abacus-network/utils@^0.2.1-alpha3, @abacus-network/utils@workspace:typescript/utils": +"@abacus-network/utils@^0.2.1, @abacus-network/utils@workspace:typescript/utils": version: 0.0.0-use.local resolution: "@abacus-network/utils@workspace:typescript/utils" dependencies: