-
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
Anvil tests alloy migration #7619
Anvil tests alloy migration #7619
Conversation
…ce_transaction`, `can_reject_too_high_gas_limits`, `can_reject_underpriced_replacement`
pub fn http_provider(http_endpoint: &str) -> AlloyRetryProvider { | ||
get_http_provider(http_endpoint) | ||
} | ||
|
||
pub fn http_provider_with_signer( | ||
http_endpoint: &str, | ||
signer: EthereumSigner, | ||
) -> RetryProviderWithSigner { | ||
AlloyProviderBuilder::new(http_endpoint) | ||
.build_with_signer(signer) | ||
.expect("failed to build Alloy HTTP provider with signer") | ||
} | ||
|
||
pub fn ws_provider(ws_endpoint: &str) -> AlloyRetryProvider { | ||
AlloyProviderBuilder::new(ws_endpoint).build().expect("failed to build Alloy WS provider") | ||
} | ||
|
||
pub fn ws_provider_with_signer( | ||
ws_endpoint: &str, | ||
signer: EthereumSigner, | ||
) -> RetryProviderWithSigner { | ||
AlloyProviderBuilder::new(ws_endpoint) | ||
.build_with_signer(signer) | ||
.expect("failed to build Alloy WS provider with signer") | ||
} | ||
|
||
pub async fn ipc_provider(ipc_endpoint: &str) -> AlloyRetryProvider { | ||
AlloyProviderBuilder::new(ipc_endpoint).build().expect("failed to build Alloy IPC provider") | ||
} | ||
|
||
pub async fn ipc_provider_with_signer( | ||
ipc_endpoint: &str, | ||
signer: EthereumSigner, | ||
) -> RetryProviderWithSigner { | ||
AlloyProviderBuilder::new(ipc_endpoint) | ||
.build_with_signer(signer) | ||
.expect("failed to build Alloy IPC provider with signer") | ||
} | ||
|
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 probably will want to include the recommended layers in try_get_http_provider
at some point
…_manually` tx tests migrated to alloy
…toric` tx tests to alloy
…e_nonce & can_handle_multiple_concurrent_transactions_with_same_nonce tx tests
@mattsse Facing an issue with error: ErrorPayload { code: -32602, message: "invalid type: boolean `true`, expected
// unit", data: None } I'll take |
## Motivation Alloy deps need to be bumped in foundry-rs/foundry#7619. This creates a conflicting deps version between `evm-inspectors` and `foundry` for `alloy-rpc-types` and `alloy-rpc-types-trace` ## Solution Bump to latest alloy commit
@@ -202,11 +202,11 @@ where | |||
fn get_account_req(&self, address: Address) -> ProviderRequest<eyre::Report> { | |||
trace!(target: "backendhandler", "preparing account request, address={:?}", address); | |||
let provider = self.provider.clone(); | |||
let block_id = self.block_id; | |||
let block_id = self.block_id.unwrap_or(BlockId::latest()); |
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 you could use unwrap_or_default()
here as it will use BlockId::latest()
by default, same goes for the other instances
Superceded by #7701 to collaborate easier |
Motivation
Remove the last bit of
ethers
dependency.Solution
WIP
Replace with
alloy
.