Sync with monorepo (#27)

* Sync with monorepo

* Update prettier config for rebranded package names
pull/2435/head
J M Rossy 2 years ago committed by GitHub
parent 728c030599
commit e092ec7931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .prettierrc
  2. 6
      README.md
  3. 2
      contracts/HelloWorld.sol
  4. 2
      hardhat.config.ts
  5. 16
      package.json
  6. 14
      src/app/app.ts
  7. 2
      src/app/contracts.ts
  8. 4
      src/deploy/check.ts
  9. 2
      src/deploy/config.ts
  10. 12
      src/deploy/deploy.ts
  11. 6
      src/scripts/check.ts
  12. 6
      src/scripts/deploy.ts
  13. 2
      src/test/deploy.test.ts
  14. 4
      src/test/helloworld.test.ts
  15. 182
      yarn.lock

@ -15,7 +15,7 @@
}
}
],
"importOrder": ["^@abacus-network/(.*)$", "^../(.*)$", "^./(.*)$"],
"importOrder": ["^@hyperlane-xyz/(.*)$", "^../(.*)$", "^./(.*)$"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}

@ -1,6 +1,6 @@
# Abacus 'Hello World' App Template
# Hyperlane 'Hello World' App Template
A basic Abacus application with a router contract that can dispatch messages.
A basic Hyperlane application with a router contract that can dispatch messages.
## Setup
@ -24,4 +24,4 @@ yarn lint
## Learn more
For more information, see the [Abacus documentation](https://docs.useabacus.network/abacus-docs/developers/getting-started).
For more information, see the [Hyperlane documentation](https://docs.hyperlane.xyz/hyperlane-docs/developers/getting-started).

@ -2,7 +2,7 @@
pragma solidity ^0.8.13;
// ============ External Imports ============
import {Router} from "@abacus-network/app/contracts/Router.sol";
import {Router} from "@hyperlane-xyz/app/contracts/Router.sol";
/*
* @title The Hello World App

@ -11,7 +11,7 @@ module.exports = {
solidity: {
compilers: [
{
version: '0.8.13',
version: '0.8.16',
},
],
},

@ -1,10 +1,10 @@
{
"name": "@abacus-network/helloworld",
"description": "A basic skeleton of an Abacus app",
"version": "0.5.0",
"name": "@hyperlane-xyz/helloworld",
"description": "A basic skeleton of an Hyperlane app",
"version": "0.5.0-beta0",
"dependencies": {
"@abacus-network/sdk": "^0.4.1",
"@abacus-network/utils": "^0.4.1",
"@hyperlane-xyz/sdk": "^0.5.0-beta0",
"@hyperlane-xyz/utils": "^0.5.0-beta0",
"@openzeppelin/contracts-upgradeable": "^4.6.0",
"ethers": "^5.6.8"
},
@ -36,9 +36,9 @@
"/dist",
"/contracts"
],
"homepage": "https://www.useabacus.network",
"homepage": "https://www.hyperlane.xyz",
"keywords": [
"Abacus",
"Hyperlane",
"HelloWorld",
"Solidity",
"Typescript"
@ -48,7 +48,7 @@
"packageManager": "yarn@3.2.0",
"repository": {
"type": "git",
"url": "https://github.com/abacus-network/abacus-app-template"
"url": "https://github.com/hyperlane-xyz/hyperlane-app-template"
},
"scripts": {
"build": "hardhat compile && tsc",

@ -1,15 +1,15 @@
import { BigNumber, ethers } from 'ethers';
import {
AbacusApp,
AbacusCore,
ChainMap,
ChainName,
ChainNameToDomainId,
HyperlaneApp,
HyperlaneCore,
MultiProvider,
Remotes,
} from '@abacus-network/sdk';
import { debug } from '@abacus-network/utils';
} from '@hyperlane-xyz/sdk';
import { debug } from '@hyperlane-xyz/utils';
import { HelloWorldContracts } from './contracts';
@ -20,9 +20,9 @@ type Counts = {
export class HelloWorldApp<
Chain extends ChainName = ChainName,
> extends AbacusApp<HelloWorldContracts, Chain> {
> extends HyperlaneApp<HelloWorldContracts, Chain> {
constructor(
public readonly core: AbacusCore<Chain>,
public readonly core: HyperlaneCore<Chain>,
contractsMap: ChainMap<Chain, HelloWorldContracts>,
multiProvider: MultiProvider<Chain>,
) {
@ -39,7 +39,7 @@ export class HelloWorldApp<
const toDomain = ChainNameToDomainId[to];
const chainConnection = this.multiProvider.getChainConnection(from);
// apply gas buffer due to https://github.com/abacus-network/abacus-monorepo/issues/634
// apply gas buffer due to https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/634
const estimated = await sender.estimateGas.sendHelloWorld(
toDomain,
message,

@ -1,4 +1,4 @@
import { RouterContracts, RouterFactories } from '@abacus-network/sdk';
import { RouterContracts, RouterFactories } from '@hyperlane-xyz/sdk';
import { HelloWorld, HelloWorld__factory } from '../types';

@ -1,4 +1,4 @@
import { AbacusRouterChecker, ChainName } from '@abacus-network/sdk';
import { ChainName, HyperlaneRouterChecker } from '@hyperlane-xyz/sdk';
import { HelloWorldApp } from '../app/app';
import { HelloWorldContracts } from '../app/contracts';
@ -7,7 +7,7 @@ import { HelloWorldConfig } from './config';
export class HelloWorldChecker<
Chain extends ChainName,
> extends AbacusRouterChecker<
> extends HyperlaneRouterChecker<
Chain,
HelloWorldApp<Chain>,
HelloWorldConfig,

@ -1,4 +1,4 @@
import { RouterConfig, chainConnectionConfigs } from '@abacus-network/sdk';
import { RouterConfig, chainConnectionConfigs } from '@hyperlane-xyz/sdk';
export type HelloWorldConfig = RouterConfig;

@ -1,10 +1,10 @@
import {
AbacusCore,
AbacusRouterDeployer,
ChainMap,
ChainName,
HyperlaneCore,
HyperlaneRouterDeployer,
MultiProvider,
} from '@abacus-network/sdk';
} from '@hyperlane-xyz/sdk';
import {
HelloWorldContracts,
@ -16,7 +16,7 @@ import { HelloWorldConfig } from './config';
export class HelloWorldDeployer<
Chain extends ChainName,
> extends AbacusRouterDeployer<
> extends HyperlaneRouterDeployer<
Chain,
HelloWorldConfig,
HelloWorldContracts,
@ -25,7 +25,7 @@ export class HelloWorldDeployer<
constructor(
multiProvider: MultiProvider<Chain>,
configMap: ChainMap<Chain, HelloWorldConfig>,
protected core: AbacusCore<Chain>,
protected core: HyperlaneCore<Chain>,
) {
super(multiProvider, configMap, helloWorldFactories, {});
}
@ -34,7 +34,7 @@ export class HelloWorldDeployer<
// If no custom logic is needed, call deployContract for the router
async deployContracts(chain: Chain, config: HelloWorldConfig) {
const router = await this.deployContract(chain, 'router', [
config.abacusConnectionManager,
config.connectionManager,
config.interchainGasPaymaster,
]);
return {

@ -1,12 +1,12 @@
import {
AbacusCore,
ChainMap,
ChainName,
HyperlaneCore,
MultiProvider,
buildContracts,
getChainToOwnerMap,
objMap,
} from '@abacus-network/sdk';
} from '@hyperlane-xyz/sdk';
import { HelloWorldApp } from '../app/app';
import { HelloWorldContracts, helloWorldFactories } from '../app/contracts';
@ -33,7 +33,7 @@ async function check() {
helloWorldFactories,
) as ChainMap<ChainName, HelloWorldContracts>;
const core = AbacusCore.fromEnvironment('testnet2', multiProvider);
const core = HyperlaneCore.fromEnvironment('testnet2', multiProvider);
const app = new HelloWorldApp(core, contractsMap, multiProvider);
const config = core.extendWithConnectionClientConfig(
getChainToOwnerMap(prodConfigs, ownerAddress),

@ -1,12 +1,12 @@
import { Wallet } from 'ethers';
import {
AbacusCore,
HyperlaneCore,
MultiProvider,
getChainToOwnerMap,
objMap,
serializeContracts,
} from '@abacus-network/sdk';
} from '@hyperlane-xyz/sdk';
import { prodConfigs } from '../deploy/config';
import { HelloWorldDeployer } from '../deploy/deploy';
@ -23,7 +23,7 @@ async function main() {
}));
const multiProvider = new MultiProvider(chainProviders);
const core = AbacusCore.fromEnvironment('testnet2', multiProvider);
const core = HyperlaneCore.fromEnvironment('testnet2', multiProvider);
const config = core.extendWithConnectionClientConfig(
getChainToOwnerMap(prodConfigs, signer.address),
);

@ -10,7 +10,7 @@ import {
getChainToOwnerMap,
getTestMultiProvider,
testChainConnectionConfigs,
} from '@abacus-network/sdk';
} from '@hyperlane-xyz/sdk';
import { HelloWorldApp } from '../app/app';
import { HelloWorldContracts } from '../app/contracts';

@ -12,7 +12,7 @@ import {
getChainToOwnerMap,
getTestMultiProvider,
testChainConnectionConfigs,
} from '@abacus-network/sdk';
} from '@hyperlane-xyz/sdk';
import { HelloWorldConfig } from '../deploy/config';
import { HelloWorldDeployer } from '../deploy/deploy';
@ -72,7 +72,7 @@ describe('HelloWorld', async () => {
it('handles a message', async () => {
await local.sendHelloWorld(remoteDomain, 'World');
// Mock processing of the message by Abacus
// Mock processing of the message by Hyperlane
await coreApp.processOutboundMessages(localChain);
// The initial message has been dispatched.
expect(await local.sent()).to.equal(1);

@ -5,97 +5,6 @@ __metadata:
version: 6
cacheKey: 8
"@abacus-network/app@npm:0.4.1":
version: 0.4.1
resolution: "@abacus-network/app@npm:0.4.1"
dependencies:
"@abacus-network/core": 0.4.1
"@abacus-network/utils": 0.4.1
"@openzeppelin/contracts-upgradeable": ^4.5.0
checksum: bf1dc46b769bfef8ef2f1b568b5ea23f5c4148e68e3771d95510adb919b1ea030cff9080f9fc8a05889f973b1ff718b783414d8e5e86749e78f56799c38fe4df
languageName: node
linkType: hard
"@abacus-network/celo-ethers-provider@npm:^0.1.0":
version: 0.1.0
resolution: "@abacus-network/celo-ethers-provider@npm:0.1.0"
peerDependencies:
ethers: ^5
checksum: 06f440366bbd9ddf9962aa46c471be1fb587909c4da71a0d816497a5c0c8597e9b315d70fe9ae728ed51fc936097da50da2cd18f750861f3d602660b8ea1ecfd
languageName: node
linkType: hard
"@abacus-network/core@npm:0.4.1":
version: 0.4.1
resolution: "@abacus-network/core@npm:0.4.1"
dependencies:
"@abacus-network/utils": 0.4.1
"@openzeppelin/contracts": ^4.6.0
"@openzeppelin/contracts-upgradeable": ^4.6.0
"@summa-tx/memview-sol": ^2.0.0
checksum: 5fdeb32eb33ad6a470b4b7f801ed419da2065cb6c6f155d651576cd66379663e3d1b35f9b9016d581b1ffd7aa038d7cdab8f8574bc259d801bc317753de41e1d
languageName: node
linkType: hard
"@abacus-network/helloworld@workspace:.":
version: 0.0.0-use.local
resolution: "@abacus-network/helloworld@workspace:."
dependencies:
"@abacus-network/sdk": ^0.4.1
"@abacus-network/utils": ^0.4.1
"@nomiclabs/hardhat-ethers": ^2.0.5
"@nomiclabs/hardhat-waffle": ^2.0.2
"@openzeppelin/contracts-upgradeable": ^4.6.0
"@trivago/prettier-plugin-sort-imports": ^3.2.0
"@typechain/ethers-v5": 10.0.0
"@typechain/hardhat": ^6.0.0
"@types/mocha": ^9.1.0
"@typescript-eslint/eslint-plugin": ^5.27.0
"@typescript-eslint/parser": ^5.27.0
chai: ^4.3.0
eslint: ^8.16.0
eslint-config-prettier: ^8.5.0
ethereum-waffle: ^3.4.4
ethers: ^5.6.8
hardhat: ^2.8.4
hardhat-gas-reporter: ^1.0.7
prettier: ^2.4.1
prettier-plugin-solidity: ^1.0.0-beta.5
solhint: ^3.3.2
solhint-plugin-prettier: ^0.0.5
solidity-coverage: ^0.7.14
ts-node: ^10.8.0
typechain: 8.0.0
typescript: ^4.7.2
languageName: unknown
linkType: soft
"@abacus-network/sdk@npm:^0.4.1":
version: 0.4.1
resolution: "@abacus-network/sdk@npm:0.4.1"
dependencies:
"@abacus-network/app": 0.4.1
"@abacus-network/celo-ethers-provider": ^0.1.0
"@abacus-network/core": 0.4.1
"@abacus-network/utils": 0.4.1
"@types/debug": ^4.1.7
coingecko-api: ^1.0.10
cross-fetch: ^3.1.5
debug: ^4.3.4
ethers: ^5.6.8
checksum: d6f43d26666b07711ab82688b4b5d5b3de718019223b048b753dbf04ca38eed79bc3f634c9de66592babb86b1cfcf3250dc7065e3ae8bb3386a98ca7aed7258c
languageName: node
linkType: hard
"@abacus-network/utils@npm:0.4.1, @abacus-network/utils@npm:^0.4.1":
version: 0.4.1
resolution: "@abacus-network/utils@npm:0.4.1"
dependencies:
ethers: ^5.6.8
checksum: dd69c911619412b138e12a1bfa1c52a57e56b40cdd416122cb98a4c04032295978b45cfecc47b8038af72d01eab9811245cfb6e3d50cd21ec11b263f426e6b1a
languageName: node
linkType: hard
"@babel/code-frame@npm:^7.0.0":
version: 7.16.7
resolution: "@babel/code-frame@npm:7.16.7"
@ -1039,6 +948,97 @@ __metadata:
languageName: node
linkType: hard
"@hyperlane-xyz/app@npm:0.5.0-beta0":
version: 0.5.0-beta0
resolution: "@hyperlane-xyz/app@npm:0.5.0-beta0"
dependencies:
"@hyperlane-xyz/core": 0.5.0-beta0
"@hyperlane-xyz/utils": 0.5.0-beta0
"@openzeppelin/contracts-upgradeable": ^4.5.0
checksum: 14dac843eb418bd9807116bb0dd56aca08bd4a8645cd635f534dc75bb8fbfd1b5a12c1d1b2e9343d12592798e827f191c48725d0e6d943e2e9d7fe3bd3fddf47
languageName: node
linkType: hard
"@hyperlane-xyz/celo-ethers-provider@npm:^0.1.1":
version: 0.1.1
resolution: "@hyperlane-xyz/celo-ethers-provider@npm:0.1.1"
peerDependencies:
ethers: ^5
checksum: 5ea495505b3e4338ec6c419f69b66af2d35b86e7cdab9bc7ee65ba4a233729b2143b0a72cc637f8e8795ecacc18eeda5ac803e8b3de9a63e7ceb5dc14014b3d4
languageName: node
linkType: hard
"@hyperlane-xyz/core@npm:0.5.0-beta0":
version: 0.5.0-beta0
resolution: "@hyperlane-xyz/core@npm:0.5.0-beta0"
dependencies:
"@hyperlane-xyz/utils": 0.5.0-beta0
"@openzeppelin/contracts": ^4.6.0
"@openzeppelin/contracts-upgradeable": ^4.6.0
"@summa-tx/memview-sol": ^2.0.0
checksum: 7c3f88d4140d63b50013feddd1a13275e28eeb1ff1e7cd119480aee904a11c6ff0b50535159e90058b6a80cf28176a7ef0bdd13a20e99f82ef722a34b807a193
languageName: node
linkType: hard
"@hyperlane-xyz/helloworld@workspace:.":
version: 0.0.0-use.local
resolution: "@hyperlane-xyz/helloworld@workspace:."
dependencies:
"@hyperlane-xyz/sdk": ^0.5.0-beta0
"@hyperlane-xyz/utils": ^0.5.0-beta0
"@nomiclabs/hardhat-ethers": ^2.0.5
"@nomiclabs/hardhat-waffle": ^2.0.2
"@openzeppelin/contracts-upgradeable": ^4.6.0
"@trivago/prettier-plugin-sort-imports": ^3.2.0
"@typechain/ethers-v5": 10.0.0
"@typechain/hardhat": ^6.0.0
"@types/mocha": ^9.1.0
"@typescript-eslint/eslint-plugin": ^5.27.0
"@typescript-eslint/parser": ^5.27.0
chai: ^4.3.0
eslint: ^8.16.0
eslint-config-prettier: ^8.5.0
ethereum-waffle: ^3.4.4
ethers: ^5.6.8
hardhat: ^2.8.4
hardhat-gas-reporter: ^1.0.7
prettier: ^2.4.1
prettier-plugin-solidity: ^1.0.0-beta.5
solhint: ^3.3.2
solhint-plugin-prettier: ^0.0.5
solidity-coverage: ^0.7.14
ts-node: ^10.8.0
typechain: 8.0.0
typescript: ^4.7.2
languageName: unknown
linkType: soft
"@hyperlane-xyz/sdk@npm:^0.5.0-beta0":
version: 0.5.0-beta0
resolution: "@hyperlane-xyz/sdk@npm:0.5.0-beta0"
dependencies:
"@hyperlane-xyz/app": 0.5.0-beta0
"@hyperlane-xyz/celo-ethers-provider": ^0.1.1
"@hyperlane-xyz/core": 0.5.0-beta0
"@hyperlane-xyz/utils": 0.5.0-beta0
"@types/debug": ^4.1.7
coingecko-api: ^1.0.10
cross-fetch: ^3.1.5
debug: ^4.3.4
ethers: ^5.6.8
checksum: 85ef5c70ad290f1ff67297fdd76419d8b4290b22c3a1eb9ed5c1ac4876c7fef5c11471a063190aa8940156bc622e6527950d24aac9e58897cd301da33c41c1c7
languageName: node
linkType: hard
"@hyperlane-xyz/utils@npm:0.5.0-beta0, @hyperlane-xyz/utils@npm:^0.5.0-beta0":
version: 0.5.0-beta0
resolution: "@hyperlane-xyz/utils@npm:0.5.0-beta0"
dependencies:
ethers: ^5.6.8
checksum: 7628b0624a1b7bbab77b04ada38d0842dee8076273f58c0cd608877b430e46f2d965de0293d53b6bdcfe66b4fb36840ded0ee2a9e30894394415be38817e223f
languageName: node
linkType: hard
"@jridgewell/gen-mapping@npm:^0.3.2":
version: 0.3.2
resolution: "@jridgewell/gen-mapping@npm:0.3.2"

Loading…
Cancel
Save