-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 multichain scripts resume functionality #6447
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is reasonable
wdyt @mds1
crates/forge/bin/cmd/script/multi.rs
Outdated
impl From<&mut MultiChainSequence> for SensitiveMultiChainSequence { | ||
fn from(sequence: &mut MultiChainSequence) -> Self { | ||
SensitiveMultiChainSequence { | ||
deployments: sequence.deployments.iter_mut().map(|sequence| sequence.into()).collect(), | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to have this as a function instead, from impls are harder to navigate/refactor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean something like this?
fn to_sensitive(sequence: &mut MultiChainSequence) -> SensitiveMultiChainSequence {
SensitiveMultiChainSequence {
deployments: sequence.deployments.iter_mut().map(|sequence| sequence.into()).collect(),
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah exactly!
Haven't reviewed code carefully but agree we should fix this so multichain resume works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, was offline a few days.
last pending nit re function, otherwise lgtm
733cd17
to
f2a5268
Compare
hey @mattsse rebased and changed impl to function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Motivation
#4892 removed RPCs from general broadcast data and moved them to ./cache. However, for multichain sequences, RPC endpoints weren't saved anywhere which made resuming multichain scripts impossible
Solution
Save RPC endpoints used by multichain sequences to ./cache.
Ref #5047