Skip to content

Commit a37db70

Browse files
committed
chore: use updated api
1 parent e57c921 commit a37db70

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

vocs/docs/snippets/node-bindings/examples/anvil_fork_provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ async fn main() -> Result<()> {
88
// Spin up a forked Anvil node.
99
// Ensure `anvil` is available in $PATH.
1010
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
11-
let provider = ProviderBuilder::new().on_anvil_with_config(|anvil| anvil.fork(rpc_url));
11+
let provider = ProviderBuilder::new().connect_anvil_with_config(|anvil| anvil.fork(rpc_url));
1212

1313
// Get node info using the Anvil API.
1414
let info = provider.anvil_node_info().await?;

vocs/docs/snippets/node-bindings/examples/anvil_local_provider.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ async fn main() -> Result<()> {
88
// Spin up a local Anvil node.
99
// Ensure `anvil` is available in $PATH.
1010
let provider =
11-
ProviderBuilder::new().on_anvil_with_config(|anvil| anvil.block_time(1).chain_id(1337));
11+
ProviderBuilder::new().connect_anvil_with_config(|anvil| anvil.block_time(1).chain_id(1337));
1212

1313
// Get node info using the Anvil API.
1414
let info = provider.anvil_node_info().await?;

vocs/docs/snippets/node-bindings/examples/anvil_set_storage_at.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async fn main() -> Result<()> {
2323
// Spin up a forked Anvil node.
2424
// Ensure `anvil` is available in $PATH.
2525
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
26-
let provider = ProviderBuilder::new().on_anvil_with_config(|anvil| anvil.fork(rpc_url));
26+
let provider = ProviderBuilder::new().connect_anvil_with_config(|anvil| anvil.fork(rpc_url));
2727

2828
// Create an instance of the WETH contract.
2929
let iweth = IERC20::new(WETH_ADDR, provider.clone());

vocs/docs/snippets/transactions/examples/gas_price_usd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async fn main() -> Result<()> {
2727
// Spin up a forked Anvil node.
2828
// Ensure `anvil` is available in $PATH.
2929
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
30-
let provider = ProviderBuilder::new().on_anvil_with_config(|anvil| anvil.fork(rpc_url));
30+
let provider = ProviderBuilder::new().connect_anvil_with_config(|anvil| anvil.fork(rpc_url));
3131

3232
// Create a call to get the latest answer from the Chainlink ETH/USD feed.
3333
let call = latestAnswerCall {}.abi_encode();

vocs/docs/snippets/transactions/examples/trace_transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async fn main() -> Result<()> {
1515
// Spin up a forked Anvil node.
1616
// Ensure `anvil` is available in $PATH.
1717
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
18-
let provider = ProviderBuilder::new().on_anvil_with_config(|anvil| anvil.fork(rpc_url));
18+
let provider = ProviderBuilder::new().connect_anvil_with_config(|anvil| anvil.fork(rpc_url));
1919

2020
// Hash of the tx we want to trace.
2121
let hash = b256!("97a02abf405d36939e5b232a5d4ef5206980c5a6661845436058f30600c52df7");

vocs/docs/snippets/wallets/examples/keystore_signer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ async fn main() -> Result<()> {
2424

2525
// Create a provider with the wallet.
2626
let provider =
27-
ProviderBuilder::new().wallet(signer).on_anvil_with_config(|anvil| anvil.block_time(1));
27+
ProviderBuilder::new().wallet(signer).connect_anvil_with_config(|anvil| anvil.block_time(1));
2828

2929
// Build a transaction to send 100 wei from Alice to Vitalik.
3030
// The `from` field is automatically filled to the first signer's address (Alice).

0 commit comments

Comments
 (0)