Sitelet https://github.com/alloy-rs/examples/pull/210/files
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/contracts/examples/interact_with_abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sol!(
async fn main() -> Result<()> {
// Spin up a forked Anvil node.
// Ensure `anvil` is available in $PATH.
let rpc_url = "https://eth.merkle.io";
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
let provider =
ProviderBuilder::new().on_anvil_with_wallet_and_config(|anvil| anvil.fork(rpc_url))?;

Expand Down
2 changes: 1 addition & 1 deletion examples/layers/examples/fallback_layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async fn main() -> Result<()> {

// Define your list of transports to use
let transports = vec![
Http::new(Url::parse("https://eth.merkle.io")?),
Http::new(Url::parse("https://reth-ethereum.ithaca.xyz/rpc")?),
Http::new(Url::parse("https://eth.llamarpc.com")?),
Http::new(Url::parse("https://ethereum-rpc.publicnode.com")?),
];
Expand Down
2 changes: 1 addition & 1 deletion examples/node-bindings/examples/anvil_fork_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use eyre::Result;
async fn main() -> Result<()> {
// Spin up a forked Anvil node.
// Ensure `anvil` is available in $PATH.
let rpc_url = "https://eth.merkle.io";
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
let anvil = Anvil::new().fork(rpc_url).try_spawn()?;
let provider = ProviderBuilder::new().on_http(anvil.endpoint_url());

Expand Down
2 changes: 1 addition & 1 deletion examples/node-bindings/examples/anvil_fork_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use eyre::Result;
async fn main() -> Result<()> {
// Spin up a forked Anvil node.
// Ensure `anvil` is available in $PATH.
let rpc_url = "https://eth.merkle.io";
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
let provider = ProviderBuilder::new().on_anvil_with_config(|anvil| anvil.fork(rpc_url));

// Get node info using the Anvil API.
Expand Down
2 changes: 1 addition & 1 deletion examples/node-bindings/examples/anvil_set_storage_at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static WETH_ADDR: Address = address!("C02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2")
async fn main() -> Result<()> {
// Spin up a forked Anvil node.
// Ensure `anvil` is available in $PATH.
let rpc_url = "https://eth.merkle.io";
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
let provider = ProviderBuilder::new().on_anvil_with_config(|anvil| anvil.fork(rpc_url));

// Create an instance of the WETH contract.
Expand Down
2 changes: 1 addition & 1 deletion examples/providers/examples/batch_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async fn main() -> Result<()> {
// Ensure `anvil` is available in $PATH.
let anvil = Anvil::new().spawn();

// Swap this out with a RPC_URL provider that supports JSON-RPC batch requests. e.g. https://eth.merkle.io
// Swap this out with a RPC_URL provider that supports JSON-RPC batch requests. e.g. https://reth-ethereum.ithaca.xyz/rpc
let rpc_url = anvil.endpoint_url();

// Create a HTTP transport.
Expand Down
2 changes: 1 addition & 1 deletion examples/providers/examples/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use eyre::Result;
#[tokio::main]
async fn main() -> Result<()> {
// Create a provider with the HTTP transport using the `reqwest` crate.
let rpc_url = "https://eth.merkle.io".parse()?;
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc".parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Get latest block number.
Expand Down
2 changes: 1 addition & 1 deletion examples/providers/examples/http_with_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async fn main() -> Result<()> {
let client_with_auth = Client::builder().default_headers(headers).build()?;

// Create the HTTP transport.
let rpc_url = "https://eth.merkle.io".parse()?;
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc".parse()?;
let http = Http::with_client(client_with_auth, rpc_url);
let rpc_client = RpcClient::new(http, false);

Expand Down
2 changes: 1 addition & 1 deletion examples/providers/examples/multicall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ sol!(
async fn main() -> eyre::Result<()> {
// Create a new provider
let provider = ProviderBuilder::new()
.on_anvil_with_wallet_and_config(|a| a.fork("https://eth.merkle.io"))?;
.on_anvil_with_wallet_and_config(|a| a.fork("https://reth-ethereum.ithaca.xyz/rpc"))?;
// Create a new instance of the IWETH9 contract.
let weth =
IWETH9Instance::new(address!("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"), &provider);
Expand Down
2 changes: 1 addition & 1 deletion examples/providers/examples/multicall_batching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async fn main() -> Result<()> {
.layer(CallBatchLayer::new().wait(Duration::from_secs(10)))
// Can also use the shorthand `with_call_batching` on the build which set the delay to 1ms.
// .with_call_batching()
.on_anvil_with_wallet_and_config(|a| a.fork("https://eth.merkle.io"))?;
.on_anvil_with_wallet_and_config(|a| a.fork("https://reth-ethereum.ithaca.xyz/rpc"))?;

// Create a new instance of the IWETH9 contract.
let weth =
Expand Down
2 changes: 1 addition & 1 deletion examples/queries/examples/query_contract_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use eyre::Result;
#[tokio::main]
async fn main() -> Result<()> {
// Create a provider.
let rpc_url = "https://eth.merkle.io".parse()?;
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc".parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Get storage slot 0 from the Uniswap V3 USDC-ETH pool on Ethereum mainnet.
Expand Down
2 changes: 1 addition & 1 deletion examples/queries/examples/query_deployed_bytecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use eyre::Result;
#[tokio::main]
async fn main() -> Result<()> {
// Create a provider.
let rpc_url = "https://eth.merkle.io".parse()?;
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc".parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Get the bytecode of the Uniswap V3 USDC-ETH pool on Ethereum mainnet.
Expand Down
2 changes: 1 addition & 1 deletion examples/queries/examples/query_logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use eyre::Result;
#[tokio::main]
async fn main() -> Result<()> {
// Create a provider.
let rpc_url = "https://eth.merkle.io".parse()?;
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc".parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Get logs from the latest block
Expand Down
2 changes: 1 addition & 1 deletion examples/transactions/examples/gas_price_usd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sol!(
async fn main() -> Result<()> {
// Spin up a forked Anvil node.
// Ensure `anvil` is available in $PATH.
let rpc_url = "https://eth.merkle.io";
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
let provider = ProviderBuilder::new().on_anvil_with_config(|anvil| anvil.fork(rpc_url));

// Create a call to get the latest answer from the Chainlink ETH/USD feed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl From<PermitTransferFrom> for ISignatureTransfer::PermitTransferFrom {
async fn main() -> Result<()> {
// Spin up a local Anvil node.
// Ensure `anvil` is available in $PATH.
let rpc_url = "https://eth.merkle.io";
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
let anvil = Anvil::new().fork(rpc_url).try_spawn()?;

// Set up signers from the first two default Anvil accounts (Alice, Bob).
Expand Down
2 changes: 1 addition & 1 deletion examples/transactions/examples/trace_call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use eyre::Result;
#[tokio::main]
async fn main() -> Result<()> {
// Create a provider.
let rpc_url = "https://eth.merkle.io".parse()?;
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc".parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Build a transaction to send 100 wei from Alice to Vitalik.
Expand Down
2 changes: 1 addition & 1 deletion examples/transactions/examples/trace_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use eyre::Result;
async fn main() -> Result<()> {
// Spin up a forked Anvil node.
// Ensure `anvil` is available in $PATH.
let rpc_url = "https://eth.merkle.io";
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
let provider = ProviderBuilder::new().on_anvil_with_config(|anvil| anvil.fork(rpc_url));

// Hash of the tx we want to trace.
Expand Down
2 changes: 1 addition & 1 deletion examples/transactions/examples/transfer_erc20.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sol!(
async fn main() -> Result<()> {
// Spin up a forked Anvil node.
// Ensure `anvil` is available in $PATH.
let rpc_url = "https://eth.merkle.io";
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc";
let provider =
ProviderBuilder::new().on_anvil_with_wallet_and_config(|anvil| anvil.fork(rpc_url))?;

Expand Down
2 changes: 1 addition & 1 deletion examples/wallets/examples/ledger_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() -> Result<()> {
let signer = LedgerSigner::new(HDPath::LedgerLive(0), Some(1)).await?;

// Create a provider with the wallet.
let rpc_url = "https://eth.merkle.io".parse()?;
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc".parse()?;
let provider = ProviderBuilder::new().wallet(signer).on_http(rpc_url);

// Build a transaction to send 100 wei from Alice to Vitalik.
Expand Down
2 changes: 1 addition & 1 deletion examples/wallets/examples/trezor_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() -> Result<()> {
let signer = TrezorSigner::new(HDPath::TrezorLive(0), Some(1)).await?;

// Create a provider with the wallet.
let rpc_url = "https://eth.merkle.io".parse()?;
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc".parse()?;
let provider = ProviderBuilder::new().wallet(signer).on_http(rpc_url);

// Build a transaction to send 100 wei from Alice to Vitalik.
Expand Down
2 changes: 1 addition & 1 deletion examples/wallets/examples/yubi_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async fn main() -> Result<()> {
let signer = YubiSigner::connect(connector, Credentials::default(), 0);

// Create a provider with the wallet.
let rpc_url = "https://eth.merkle.io".parse()?;
let rpc_url = "https://reth-ethereum.ithaca.xyz/rpc".parse()?;
let provider = ProviderBuilder::new().wallet(signer).on_http(rpc_url);

// Build a transaction to send 100 wei from Alice to Vitalik.
Expand Down