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: ica router management in core apply #4820

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

Conversation

xeno097
Copy link
Contributor

@xeno097 xeno097 commented Nov 5, 2024

Description

This PR adds the required logic to enroll/unenroll ICAs between them when running core apply

Drive-by changes

  • Implements the EvmIcaReader
  • Updates the EvmCoreModule to read the current chain ICA config
  • Adds tests for the EvmIcaRouterReader

Related issues

Backward compatibility

  • Yes

Testing

  • Manual
  • E2E

Note

xeno097 and others added 30 commits October 21, 2024 16:22
…min field to allow deploy overrides and checks
…e an already existing proxy admi ncontract for deployments
…ents and admin proxy ownership transfer in warp apply
…nfig defines owners fro the mailbox proxy admin adn ica router and use those values intead of the signer
…to xeno/core-deploy-apply-admin-proxy-ownership-fixes
…yperlane-xyz/hyperlane-monorepo into xeno/core-deploy-apply-admin-proxy-ownership-fixes
…to xeno/core-deploy-apply-admin-proxy-ownership-fixes
…yperlane-xyz/hyperlane-monorepo into xeno/core-deploy-apply-admin-proxy-ownership-fixes
Copy link

changeset-bot bot commented Nov 5, 2024

🦋 Changeset detected

Latest commit: a072e66

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@hyperlane-xyz/infra Minor
@hyperlane-xyz/cli Minor
@hyperlane-xyz/sdk Minor
@hyperlane-xyz/helloworld Minor
@hyperlane-xyz/widgets Minor
@hyperlane-xyz/ccip-server Minor
@hyperlane-xyz/github-proxy Minor
@hyperlane-xyz/utils Minor
@hyperlane-xyz/core Patch

Not sure what this means? Click here to learn what changesets are.

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

@xeno097 xeno097 changed the title xeno/ica router management in core apply feat: ica router management in core apply Nov 5, 2024
…to xeno/core-deploy-apply-admin-proxy-ownership-fixes
…github.com:hyperlane-xyz/hyperlane-monorepo into xeno/ica-router-management-update
Base automatically changed from xeno/core-deploy-apply-admin-proxy-ownership-fixes to main November 8, 2024 00:26
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.60%. Comparing base (4f8245a) to head (a072e66).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4820   +/-   ##
=======================================
  Coverage   74.60%   74.60%           
=======================================
  Files         103      103           
  Lines        1516     1516           
  Branches      195      195           
=======================================
  Hits         1131     1131           
  Misses        364      364           
  Partials       21       21           
Components Coverage Δ
core 84.61% <ø> (ø)
hooks 77.77% <ø> (ø)
isms 79.02% <ø> (ø)
token 89.07% <ø> (ø)
middlewares 77.58% <ø> (ø)

const transactions: AnnotatedEV5Transaction[] = [];

const routesToUnenroll = Array.from(
difference(
Copy link
Contributor

Choose a reason for hiding this comment

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

i like this! didn't realize we polyfilled this

const remoteTransactions: AnnotatedEV5Transaction[] = domainsToEnroll.map(
(domainId) => ({
annotation: `Enrolling InterchainAccountRouter on domain ${this.domainId} on InterchainAccountRouter at ${expectedConfig[domainId].address} on domain ${domainId}`,
chainId: Number(this.multiProvider.getChainId(domainId)),
Copy link
Contributor

@ltyu ltyu Nov 13, 2024

Choose a reason for hiding this comment

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

think this is no longer true due to #4798

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Should probably use the new getEvmChainId method here

const remoteTransactions: AnnotatedEV5Transaction[] = routesToUnenroll.map(
(domainId) => ({
annotation: `Removing InterchainAccountRouter on domain ${this.domainId} from InterchainAccountRouter at ${actualConfig[domainId].address} on domain ${domainId}`,
chainId: Number(this.multiProvider.getChainId(domainId)),
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

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.

(CLI migration) ICA enrollment/unenrollment in core apply
2 participants