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

fix: reuse SDK transaction types in submitters #4598

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paulbalaji
Copy link
Contributor

@paulbalaji paulbalaji commented Oct 1, 2024

Description

Updating the types in the submitters because they were using their own types instead of the existing ones for some reason. Also adding chain as an argument to the Annotated type, so that we can take advantage of this in #4599 and defend ourselves against futures where chainid/domainid are not the same for EVM

This also fixes the issue currently where there's a small type mismatch between submitters and modules

Drive-by changes

  • move createTransferOwnershipTx from the abstract hyperlane module to the evm module deployer, as it's EVM specific

Related issues

useful for #4599, but also something that needs to be fixed itself

Backward compatibility

Yes

Testing

ci

Copy link

changeset-bot bot commented Oct 1, 2024

⚠️ No Changeset found

Latest commit: fb6ef80

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.89%. Comparing base (bd68ae0) to head (fb6ef80).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4598   +/-   ##
=======================================
  Coverage   73.89%   73.89%           
=======================================
  Files         100      100           
  Lines        1421     1421           
  Branches      180      180           
=======================================
  Hits         1050     1050           
  Misses        350      350           
  Partials       21       21           
Components Coverage Δ
core 84.61% <ø> (ø)
hooks 75.71% <ø> (ø)
isms 79.20% <ø> (ø)
token 88.23% <ø> (ø)
middlewares 77.39% <ø> (ø)

@paulbalaji paulbalaji marked this pull request as ready for review October 1, 2024 18:00
@paulbalaji paulbalaji marked this pull request as draft October 1, 2024 18:03
@paulbalaji paulbalaji marked this pull request as ready for review October 1, 2024 18:10
@@ -113,5 +113,6 @@ export type ParsedLegacyMultisigIsmMetadata = {
};

export type Annotated<T> = T & {
chain: string; // TODO: Change to ChainName after moving to SDK from Utils
Copy link
Collaborator

Choose a reason for hiding this comment

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

bit confused by this as the transactions chain ID should always map 1:1 to a chain name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but if we have two chains with the same chainid, we no longer know which one we're submitting to from the chainId alone

Copy link
Contributor Author

Choose a reason for hiding this comment

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

here's an example in the duplicate-chainids pr where having the chain directly is helpful https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4599/files#diff-d572648c3e0dd7a6d4eff6670862ae1bcb5f1c1f3feb8c0d70fb60a765ae7d48

Copy link
Collaborator

@yorhodes yorhodes Oct 1, 2024

Choose a reason for hiding this comment

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

oh I see, I misunderstood

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

3 participants