Skip to content

Commit

Permalink
chore(general): update to bbef8de (#68)
Browse files Browse the repository at this point in the history
* fix examples, on_http(rpc_url)? -> on_http(rpc_url)

* fix missing docs
  • Loading branch information
zerosnacks authored Apr 26, 2024
1 parent 31f21b2 commit bcd59f7
Show file tree
Hide file tree
Showing 26 changed files with 30 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ unnecessary_struct_initialization = "allow"
use_self = "allow"

[workspace.dependencies]
alloy = { git = "https://github.com/alloy-rs/alloy", rev = "9aea693", features = [
alloy = { git = "https://github.com/alloy-rs/alloy", rev = "bbef8de", features = [
"contract",
"network",
"node-bindings",
Expand Down
2 changes: 1 addition & 1 deletion examples/anvil/examples/deploy_contract_anvil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async fn main() -> Result<()> {
let provider = ProviderBuilder::new()
.with_recommended_fillers()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

println!("Anvil running at `{}`", anvil.endpoint());

Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/examples/deploy_from_artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async fn main() -> Result<()> {
let provider = ProviderBuilder::new()
.with_recommended_fillers()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

println!("Anvil running at `{}`", anvil.endpoint());

Expand Down
2 changes: 1 addition & 1 deletion examples/contracts/examples/deploy_from_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn main() -> Result<()> {
let provider = ProviderBuilder::new()
.with_recommended_fillers()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

println!("Anvil running at `{}`", anvil.endpoint());

Expand Down
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 @@ -19,7 +19,7 @@ async fn main() -> Result<()> {

// Create a provider.
let rpc_url = anvil.endpoint().parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Create a contract instance.
let contract = IERC20::new("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2".parse()?, provider);
Expand Down
2 changes: 1 addition & 1 deletion examples/fillers/examples/gas_filler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async fn main() -> Result<()> {
// includes the `GasFiller`.
.with_gas_estimation()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

// Create an EIP-1559 type transaction.
let tx = TransactionRequest::default()
Expand Down
2 changes: 1 addition & 1 deletion examples/fillers/examples/nonce_filler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn main() -> Result<()> {
// includes the `NonceFiller`.
.with_nonce_management()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

// Create an EIP-1559 type transaction.
let tx = TransactionRequest::default()
Expand Down
2 changes: 1 addition & 1 deletion examples/fillers/examples/recommended_fillers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async fn main() -> Result<()> {
// Adds the `ChainIdFiller`, `GasFiller` and the `NonceFiller` layers.
.with_recommended_fillers()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

// Build a EIP-1559 type transaction.
// Notice that the `nonce` field is set by the `NonceFiller`.
Expand Down
2 changes: 1 addition & 1 deletion examples/fillers/examples/signer_filler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async fn main() -> Result<()> {
let provider = ProviderBuilder::new()
// Add the `SignerFiller` to the provider
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

// Build a legacy type transaction to send 100 wei to Vitalik.
let tx = TransactionRequest::default()
Expand Down
2 changes: 1 addition & 1 deletion examples/providers/examples/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async fn main() -> Result<()> {
let provider = ProviderBuilder::new()
.with_recommended_fillers()
.signer(EthereumSigner::from(wallet))
.on_http(rpc_url)?;
.on_http(rpc_url);

// Create a transaction.
let tx =
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 @@ -9,7 +9,7 @@ async fn main() -> Result<()> {
let rpc_url = "https://eth.merkle.io".parse()?;

// Create a provider with the HTTP transport using the `reqwest` crate.
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Get latest block number.
let latest_block = provider.get_block_number().await?;
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 @@ -11,7 +11,7 @@ use eyre::Result;
async fn main() -> Result<()> {
// Create a provider.
let rpc_url = "https://eth.merkle.io".parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Get storage slot 0 from the Uniswap V3 USDC-ETH pool on Ethereum mainnet.
let pool_address = address!("88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640");
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 @@ -11,7 +11,7 @@ use eyre::Result;
async fn main() -> Result<()> {
// Create a provider.
let rpc_url = "https://eth.merkle.io".parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Get the bytecode of the Uniswap V3 USDC-ETH pool on Ethereum mainnet.
let pool_address = address!("88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640");
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 @@ -11,7 +11,7 @@ use eyre::Result;
async fn main() -> Result<()> {
// Create a provider.
let rpc_url = "https://eth.merkle.io".parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Get logs from the latest block
let latest_block = provider.get_block_number().await?;
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 @@ -31,7 +31,7 @@ async fn main() -> Result<()> {

// Create a provider.
let rpc_url = anvil.endpoint().parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Create a call to get the latest answer from the Chainlink ETH/USD feed.
let call = latestAnswerCall {}.abi_encode();
Expand Down
2 changes: 1 addition & 1 deletion examples/transactions/examples/sign_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async fn main() -> Result<()> {

// Create a provider.
let rpc_url = anvil.endpoint().parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Create a signer from the first default Anvil account (Alice).
let wallet: LocalWallet = anvil.keys()[0].clone().into();
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 @@ -15,7 +15,7 @@ use eyre::Result;
async fn main() -> Result<()> {
// Create a provider.
let rpc_url = "https://eth.merkle.io".parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Create two users, Alice and Bob.
let alice = address!("d8dA6BF26964aF9D7eEd9e03E53415D37aA96045");
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 @@ -19,7 +19,7 @@ async fn main() -> Result<()> {

// Create a provider.
let rpc_url = anvil.endpoint().parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Hash of the tx we want to trace
let hash = b256!("97a02abf405d36939e5b232a5d4ef5206980c5a6661845436058f30600c52df7");
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 @@ async fn main() -> Result<()> {

// Create a provider.
let rpc_url = anvil.endpoint().parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Create two users, Alice and Bob.
let alice = anvil.addresses()[0];
Expand Down
2 changes: 1 addition & 1 deletion examples/transactions/examples/transfer_eth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn main() -> Result<()> {

// Create a provider.
let rpc_url = anvil.endpoint().parse()?;
let provider = ProviderBuilder::new().on_http(rpc_url)?;
let provider = ProviderBuilder::new().on_http(rpc_url);

// Create two users, Alice and Bob.
let alice = anvil.addresses()[0];
Expand Down
2 changes: 1 addition & 1 deletion examples/transactions/examples/with_access_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sol!(

#[tokio::main]
async fn main() -> Result<()> {
// Spin up a forked Anvil node.
// Spin up a local Anvil node.
// Ensure `anvil` is available in $PATH.
let anvil = Anvil::new().try_spawn()?;

Expand Down
5 changes: 3 additions & 2 deletions examples/wallets/examples/keystore_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ use std::{env, path::PathBuf};

#[tokio::main]
async fn main() -> Result<()> {
// Spin up an Anvil node.
// Spin up a local Anvil node.
// Ensure `anvil` is available in $PATH.
let anvil = Anvil::new().block_time(1).try_spawn()?;

// Password to decrypt the keystore file with.
Expand All @@ -31,7 +32,7 @@ async fn main() -> Result<()> {
let provider = ProviderBuilder::new()
.with_recommended_fillers()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

// Build a transaction to send 100 wei to Vitalik from Alice.
let tx = TransactionRequest::default()
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 @@ -23,7 +23,7 @@ async fn main() -> Result<()> {
let provider = ProviderBuilder::new()
.with_recommended_fillers()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

// Build a transaction to send 100 wei to Vitalik.
let tx = TransactionRequest::default()
Expand Down
5 changes: 3 additions & 2 deletions examples/wallets/examples/private_key_signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ use eyre::Result;

#[tokio::main]
async fn main() -> Result<()> {
// Spin up an Anvil node.
// Spin up a local Anvil node.
// Ensure `anvil` is available in $PATH.
let anvil = Anvil::new().block_time(1).try_spawn()?;

// Set up signer from the first default Anvil account (Alice).
Expand All @@ -24,7 +25,7 @@ async fn main() -> Result<()> {
let provider = ProviderBuilder::new()
.with_recommended_fillers()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

// Build a transaction to send 100 wei to Vitalik.
let tx = TransactionRequest::default()
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 @@ -23,7 +23,7 @@ async fn main() -> Result<()> {
let provider = ProviderBuilder::new()
.with_recommended_fillers()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

// Build a transaction to send 100 wei to Vitalik.
let tx = TransactionRequest::default()
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 @@ -29,7 +29,7 @@ async fn main() -> Result<()> {
let provider = ProviderBuilder::new()
.with_recommended_fillers()
.signer(EthereumSigner::from(signer))
.on_http(rpc_url)?;
.on_http(rpc_url);

// Build a transaction to send 100 wei to Vitalik.
let tx = TransactionRequest::default()
Expand Down

0 comments on commit bcd59f7

Please sign in to comment.