Skip to content

Commit

Permalink
Merge branch 'main' into kunal/value-router
Browse files Browse the repository at this point in the history
  • Loading branch information
aroralanuk committed Dec 10, 2024
2 parents bee6d22 + bb44f9b commit bab9928
Show file tree
Hide file tree
Showing 341 changed files with 13,791 additions and 5,918 deletions.
8 changes: 8 additions & 0 deletions .changeset/big-squids-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@hyperlane-xyz/helloworld': patch
'@hyperlane-xyz/widgets': patch
'@hyperlane-xyz/cli': patch
'@hyperlane-xyz/sdk': patch
---

Bump registry version to v6.3.0.
5 changes: 5 additions & 0 deletions .changeset/empty-lemons-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@hyperlane-xyz/cli': minor
---

Add support for deploying Hooks using a HookConfig within a WarpConfig
6 changes: 6 additions & 0 deletions .changeset/fresh-fishes-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@hyperlane-xyz/sdk': major
---

Rename TokenConfig related types and utilities for clarity. E.g. `CollateralConfig` to `CollateralTokenConfig`.
Export more config types and zod schemas
6 changes: 0 additions & 6 deletions .changeset/metal-clocks-count.md

This file was deleted.

1 change: 1 addition & 0 deletions .codespell/ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ receivedFrom
ser
readded
re-use
superseed
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

65 changes: 0 additions & 65 deletions .eslintrc

This file was deleted.

14 changes: 13 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
exit 1
fi
# Check for mismatched dep versions across the monorepo
- name: syncpack
run: yarn syncpack list-mismatches

lint-prettier:
runs-on: ubuntu-latest
needs: [yarn-install]
Expand All @@ -73,6 +77,12 @@ jobs:
key: ${{ runner.os }}-yarn-4.5.1-cache-${{ hashFiles('./yarn.lock') }}
fail-on-cache-miss: true

# Build required before linting or the intra-monorepo package cycle checking won't work
- name: yarn-build
uses: ./.github/actions/yarn-build-with-cache
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: lint
run: yarn lint

Expand Down Expand Up @@ -116,7 +126,9 @@ jobs:
fail-fast: false
matrix:
test:
- core
- core-apply
- core-deploy
- core-read
- relay
- warp-read
- warp-apply
Expand Down
2 changes: 1 addition & 1 deletion .registryrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
82013508db45dcd55b44d2721414d26817686c8f
c7891cdf0fc6a1541c41e19251611c9152ee8bf9
3 changes: 3 additions & 0 deletions .syncpackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dependencyTypes": ["prod", "dev"]
}
115 changes: 115 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import importPlugin from 'eslint-plugin-import';
import jest from 'eslint-plugin-jest';
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: [
'**/node_modules',
'**/dist',
'**/coverage',
'**/*.cjs',
'**/*.cts',
'**/*.mjs',
'jest.config.js',
],
},
...compat.extends(
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
'prettier',
),
{
plugins: {
import: importPlugin,
'@typescript-eslint': typescriptEslint,
jest,
},

languageOptions: {
globals: {
...globals.node,
...globals.browser,
},

parser: tsParser,
ecmaVersion: 12,
sourceType: 'module',

parserOptions: {
project: './tsconfig.json',
},
},

settings: {
'import/resolver': {
typescript: true,
node: true,
},
},

rules: {
'guard-for-in': ['error'],
'import/no-cycle': ['error'],
'import/no-self-import': ['error'],
'import/no-named-as-default-member': ['off'],
'no-console': ['error'],
'no-eval': ['error'],
'no-extra-boolean-cast': ['error'],
'no-ex-assign': ['error'],
'no-constant-condition': ['off'],
'no-return-await': ['error'],

'no-restricted-imports': [
'error',
{
name: 'console',
message: 'Please use a logger and/or the utils package assert',
},
{
name: 'fs',
message: 'Avoid use of node-specific libraries',
},
],

'@typescript-eslint/ban-ts-comment': ['off'],
'@typescript-eslint/explicit-module-boundary-types': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-floating-promises': ['error'],
'@typescript-eslint/no-non-null-assertion': ['off'],
'@typescript-eslint/no-require-imports': ['warn'],
'@typescript-eslint/no-unused-expressions': ['off'],
'@typescript-eslint/no-empty-object-type': ['off'],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],

'jest/no-disabled-tests': 'warn',
'jest/no-focused-tests': 'error',
'jest/no-identical-title': 'error',
'jest/prefer-to-have-length': 'warn',
'jest/valid-expect': 'error',
},
},
];
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@
"description": "A yarn workspace of core Hyperlane packages",
"version": "0.0.0",
"devDependencies": {
"@eslint/js": "^9.15.0",
"@trivago/prettier-plugin-sort-imports": "^4.2.1",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"eslint": "^8.57.0",
"@typescript-eslint/eslint-plugin": "^8.1.6",
"@typescript-eslint/parser": "^8.1.6",
"eslint": "^9.15.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.2.0",
"husky": "^8.0.0",
"lint-staged": "^12.4.3",
"prettier": "^2.8.8",
"tsx": "^4.7.1"
"syncpack": "^13.0.0",
"tsx": "^4.19.1"
},
"dependencies": {
"@changesets/cli": "^2.26.2"
Expand Down Expand Up @@ -41,6 +45,7 @@
"async": "^2.6.4",
"fetch-ponyfill": "^7.1",
"flat": "^5.0.2",
"globals": "^14.0.0",
"lodash": "^4.17.21",
"recursive-readdir": "^2.2.3",
"underscore": "^1.13",
Expand Down
23 changes: 16 additions & 7 deletions rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ info: This is the version for the rustup toolchain manager, not the rustc compil
info: The currently active `rustc` version is `rustc 1.72.1 (d5c2e9c34 2023-09-13)`
```

### Overview of Rust Workspaces

There are two Rust workspaces in this directory:

- [main](https://github.com/hyperlane-xyz/hyperlane-monorepo/tree/main/rust/main): The offchain agents workspace, most notably comprised of the relayer, validator, scraper and the Rust end-to-end tests (in `utils/run-locally`)
- [sealevel](https://github.com/hyperlane-xyz/hyperlane-monorepo/tree/main/rust/sealevel): Hyperlane smart contracts and tooling for the SVM, implemented in native Rust.

You can only run `cargo build` after `cd`-ing into one of these workspaces.

#### Apple Silicon

If your device has an Apple Silicon processor, you may need to install Rosetta 2:
Expand All @@ -23,7 +32,9 @@ If your device has an Apple Silicon processor, you may need to install Rosetta 2
softwareupdate --install-rosetta --agree-to-license
```

### Running Locally
### Running Agents Locally

Make sure you're in the `main` workspace.

To run the validator, run:

Expand Down Expand Up @@ -174,7 +185,7 @@ For Ethereum and Celo connections we use
We use the tokio async runtime environment. Please see the docs
[here](https://docs.rs/tokio/1.1.0/tokio/).

### Repo layout
### `main` workspace layout

- `hyperlane-base`
- lowest dependency hyperlane utilities
Expand All @@ -190,11 +201,9 @@ We use the tokio async runtime environment. Please see the docs
- traits (interfaces) for the on-chain contracts
- model implementations of the contracts in rust
- merkle tree implementations (for provers)
- `chains/hyperlane-ethereum`
- `chains/hyperlane-*`
- VM-specific integration of the agents
- depends on hyperlane-core (and transitively hyperlane-base)
- interfaces to the ethereum contracts
- `chains/hyperlane-fuel`
- depends on hyperlane-core
- interfaces to the fuel contracts
- interfaces with the contracts of that VM (e.g `ethereum`, `sealevel`, `cosmos`, `fuel`, etc)
- `agents`
- each of the off-chain agents implemented thus far
Loading

0 comments on commit bab9928

Please sign in to comment.