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

HookModule.read() always derives when given a Hook Config #5449

Open
ltyu opened this issue Feb 12, 2025 · 0 comments
Open

HookModule.read() always derives when given a Hook Config #5449

ltyu opened this issue Feb 12, 2025 · 0 comments
Assignees
Milestone

Comments

@ltyu
Copy link
Contributor

ltyu commented Feb 12, 2025

Problem

Currently when running warp apply, the function eventually calls EvmERC20WarpModule.updateExistingHook(), which initializes the EvmHookModule with the actualConfig.hook.

const hookModule = new EvmHookModule(
this.multiProvider,
{
chain: this.args.chain,
config: actualConfig.hook,
addresses: {

When hookModule.update(expectedConfig.hook!) is called, await this.read() is also called, which derives the hookConfig again.

Since the hookConfig was previously derived by the WarpModule, this is extra work. This is problematic with large hook configs such as the Mailbox's default hook, which adds significant time to warp apply and potentially other future updates (core apply).

Solution

  • Consider updating the HookModule to store the actualConfig and assume that this is derived previously and return this in the read()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Sprint
Development

No branches or pull requests

3 participants