Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: evm multi chain signer #7

Open
wants to merge 62 commits into
base: main
Choose a base branch
from
Open

Conversation

ljankovic-txfusion
Copy link
Collaborator

No description provided.

Copy link

@ltyu ltyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first pass. i like the progress!

@@ -69,6 +71,7 @@ try {
.command(submitCommand)
.command(validatorCommand)
.command(warpCommand)
.command(strategyCommand)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we alphabetize this?

description:
'Type of submitter (jsonRpc, impersonatedAccount, gnosisSafe, gnosisSafeTxBuilder)',
},
safeAddress: {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it looks like we prompt these based on the type, do we need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right!

false,
'The path to output a Strategy Config JSON or YAML file.',
),
type: {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this? users are prompted to select a set, but in this case we also allow users to enter their own type (i believe this will fail for unsupported submitter types)?

i suggest we just stick to 1: prompt users to select

},
};

function isValidPrivateKey(privateKey: string): boolean {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be useful in other places. consider moving to utils

);
submitter.chain = chain;

if (type === TxSubmitterType.GNOSIS_TX_BUILDER) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this? already inside of case TxSubmitterType.GNOSIS_TX_BUILDER

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On lines 139 & 140 we handle gnosis safe and tx builder(uses 1.0 as the default version):

      case TxSubmitterType.GNOSIS_SAFE:
      case TxSubmitterType.GNOSIS_TX_BUILDER:

@@ -17,13 +17,16 @@ import {
import { isHttpsUrl, isNullish, rootLogger } from '@hyperlane-xyz/utils';

import { isSignCommand } from '../commands/signCommands.js';
import { readDefaultStrategyConfig } from '../config/strategy.js';
// import { readDefaultStrategyConfig } from '../config/strategy.js';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

'warp',
);
} else {
console.log(`Using warp route deployment config at ${configPath}`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use the logger here instead?

}

const warpRouteConfig = readYamlOrJson(configPath);
assert(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to assert because if the file doesn't exists, readYamlOrJson will throw

filePath: string,
): Promise<ChainSubmissionStrategy> {
const config = readYamlOrJson(filePath);
assert(config, `No default strategy config found at ${filePath}`);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to assert, readYamlOrJson will throw


return (
submitter?.privateKey ??
(await password({
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@@ -155,7 +157,7 @@ export async function runWarpRouteDeploy({

await writeDeploymentArtifacts(warpCoreConfig, context);

await completeDeploy(context, 'warp', initialBalances, userAddress, chains);
await completeDeploy(context, 'warp', initialBalances, null, chains!);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User address will be determined by the signer associated to one of the chains in the prepareDeploy and completeDeploy functions

'Select the destination chain',
);
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is outsourced to signerMiddleware

'Select the destination chain',
);
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is outsourced to signerMiddleware -> user is prompted to select origin & destination (if not provided in CLI) before reaching sendTestMessage function call

@ljankovic-txfusion ljankovic-txfusion changed the title Feat/strategy command feat: evm multi chain signer Nov 15, 2024
ljankovic-txfusion and others added 30 commits November 25, 2024 17:53
…ane-xyz#4942)

### Description

- Retrieve gas payment by origin, interchain_gas_paymaster and sequence
- Add Sealevel to Scraper in E2E Ethereum and Sealevel tests

### Related issues

- Contributes into
hyperlane-xyz#4271

### Backward compatibility

Yes (after backfill of origin, destination, interchain_gas_paymaster)

### Testing

E2E Ethereum and Sealevel tests (including scraping Sealevel)

---------

Co-authored-by: Danil Nemirovsky <[email protected]>
### Description

Upgrade Scraper

### Related issues

- Contributes into
hyperlane-xyz#4271

### Backward compatibility

Yes

### Testing

E2E Ethereum and Sealevel test

Co-authored-by: Danil Nemirovsky <[email protected]>
### Description

Add index to cursor table so than Scraper starts quickly

### Backward compatibility

Yes

### Testing

Manual

Co-authored-by: Danil Nemirovsky <[email protected]>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @hyperlane-xyz/[email protected]

### Minor Changes

- aa1ea9a: updates the warp deployment config schema to be closer to
the ica routing schema
-   323f0f1: Add ICAs management in core apply command

### Patch Changes

- 455a897: Fix a bug where it would try to relay the incorrect message
from a transaction that dispatches multiple messages.
-   Updated dependencies [2054f4f]
-   Updated dependencies [a96448f]
-   Updated dependencies [170a0fc]
-   Updated dependencies [9a09afc]
-   Updated dependencies [24784af]
-   Updated dependencies [3e8dd70]
-   Updated dependencies [aa1ea9a]
-   Updated dependencies [665a7b8]
-   Updated dependencies [f0b98fd]
-   Updated dependencies [ff9e8a7]
-   Updated dependencies [97c1f80]
-   Updated dependencies [323f0f1]
-   Updated dependencies [6115709]
    -   @hyperlane-xyz/[email protected]
    -   @hyperlane-xyz/[email protected]

## @hyperlane-xyz/[email protected]

### Minor Changes

- 2054f4f: Require Sealevel native transfers to cover the rent of the
recipient
-   a96448f: Add logic into SDK to enable warp route unenrollment
- 170a0fc: Add `createHookUpdateTxs()` to `WarpModule.update()` such
that it 1) deploys a hook for a warp route _without_ an existing hook,
or 2) update an existing hook.
-   9a09afc: Deploy to appchain, treasure, zklink.
- 24784af: Introduce GcpValidator for retrieving announcements,
checkpoints and metadata for a Validator posting to a GCP bucket. Uses
GcpStorageWrapper for bucket operations.
- 3e8dd70: Update validators for boba, duckchain, unichain, vana,
bsquared, superseed. Update oort's own validator. Update blockpi's
viction validator. Adad luganodes/dsrv to flame validator set.
- aa1ea9a: updates the warp deployment config schema to be closer to
the ica routing schema
- f0b98fd: Updated the derivation logic to enable ICA ISM metdata
building from on chain data to enable self relaying of ICA messages
- ff9e8a7: Added a getter to derive ATA payer accounts on Sealevel
warp routes
-   97c1f80: Implement Sealevel IGP quoting
-   323f0f1: Add ICAs management in core apply command
- 6115709: Deploy to swell & lumiaprism. Parallelise router enrollment
in HyperlaneRouterDeployer.

### Patch Changes

-   665a7b8: Added decimal consistency checks to the Token checker
    -   @hyperlane-xyz/[email protected]
    -   @hyperlane-xyz/[email protected]

## @hyperlane-xyz/[email protected]

### Patch Changes

-   @hyperlane-xyz/[email protected]

## @hyperlane-xyz/[email protected]

### Patch Changes

-   Updated dependencies [2054f4f]
-   Updated dependencies [a96448f]
-   Updated dependencies [170a0fc]
-   Updated dependencies [9a09afc]
-   Updated dependencies [24784af]
-   Updated dependencies [3e8dd70]
-   Updated dependencies [aa1ea9a]
-   Updated dependencies [665a7b8]
-   Updated dependencies [f0b98fd]
-   Updated dependencies [ff9e8a7]
-   Updated dependencies [97c1f80]
-   Updated dependencies [323f0f1]
-   Updated dependencies [6115709]
    -   @hyperlane-xyz/[email protected]
    -   @hyperlane-xyz/[email protected]

## @hyperlane-xyz/[email protected]

### Patch Changes

-   Updated dependencies [2054f4f]
-   Updated dependencies [a96448f]
-   Updated dependencies [170a0fc]
-   Updated dependencies [9a09afc]
-   Updated dependencies [24784af]
-   Updated dependencies [3e8dd70]
-   Updated dependencies [aa1ea9a]
-   Updated dependencies [665a7b8]
-   Updated dependencies [f0b98fd]
-   Updated dependencies [ff9e8a7]
-   Updated dependencies [97c1f80]
-   Updated dependencies [323f0f1]
-   Updated dependencies [6115709]
    -   @hyperlane-xyz/[email protected]
    -   @hyperlane-xyz/[email protected]

## @hyperlane-xyz/[email protected]



## @hyperlane-xyz/[email protected]

### Minor Changes

- 1ca8574: add USDC, USDT, cbBTC and ETH zeronetwork warp routes
support in infra
-   323f0f1: Add ICAs management in core apply command

### Patch Changes

-   Updated dependencies [2054f4f]
-   Updated dependencies [a96448f]
-   Updated dependencies [170a0fc]
-   Updated dependencies [9a09afc]
-   Updated dependencies [24784af]
-   Updated dependencies [3e8dd70]
-   Updated dependencies [aa1ea9a]
-   Updated dependencies [665a7b8]
-   Updated dependencies [f0b98fd]
-   Updated dependencies [ff9e8a7]
-   Updated dependencies [97c1f80]
-   Updated dependencies [323f0f1]
-   Updated dependencies [6115709]
    -   @hyperlane-xyz/[email protected]
    -   @hyperlane-xyz/[email protected]
    -   @hyperlane-xyz/[email protected]

## @hyperlane-xyz/[email protected]



## @hyperlane-xyz/[email protected]

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
### Description

Mostly mentions the new Rust workspace split

### Drive-by changes

None

### Related issues

None

### Backward compatibility

Yes

### Testing

None
### Description

- extend `GovernTransactionReader` to parse warp route txs

### Drive-by changes

- use latest reg version in packages

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->

---------

Signed-off-by: pbio <[email protected]>
### Description

- Combine remaining schema and types files
- Rename TokenConfig related types and utilities for clarity. E.g.
`CollateralConfig` to `CollateralTokenConfig`.
- De-dupe some Ownable types
- Export more schemas from SDK

### Backward compatibility

No
### Description

Remove redundant words in comment

Signed-off-by: avoidaway <[email protected]>
### Description

* Add Sealevel testnets to domain table

### Drive-by changes

* Sort domain alphabetically

### Related issues

- Contributes into
hyperlane-xyz#4271

### Backward compatibility

Yes

### Testing

Local run of init db

---------

Co-authored-by: Danil Nemirovsky <[email protected]>
### Description
This PR adds hook deployment within a warp config

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

Yes

### Testing
Manual/Unit Tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants