-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
refactor(cheatcode): use rate limit args in create fork cheatcode #6193
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.
we need to add the retry option to the cli args otherwise this will never be set.
This changes the defaults slightly, from 8,800ms to what the default provider is using. I guess we can update the provider defaults instead, 800ms seems more reasonable anyway
and actually, it turns out the no-rate-limit argument was already respected via:
foundry/crates/evm/core/src/opts.rs
Line 169 in c76d372
if self.no_rpc_rate_limit { |
@@ -24,6 +24,9 @@ pub struct EvmOpts { | |||
/// pins the block number for the state fork | |||
pub fork_block_number: Option<u64>, | |||
|
|||
/// The number of retries | |||
pub fork_retries: Option<u32>, |
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.
we don't have a correspond cli arg for this like
foundry/crates/common/src/evm.rs
Lines 58 to 63 in c76d372
/// Initial retry backoff on encountering errors. | |
/// | |
/// See --fork-url. | |
#[clap(long, requires = "fork_url", value_name = "BACKOFF")] | |
#[serde(skip_serializing_if = "Option::is_none")] | |
pub fork_retry_backoff: Option<u64>, |
so this will also be None
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
Rebases #6085 to use the new file structure and refactor—couldn't rebase online on github and it was going to be a pain. Thanks @gr4yha7!