Skip to content

Commit

Permalink
pass ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ncitron committed Aug 20, 2024
1 parent a685266 commit ed3f80b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 11 additions & 5 deletions examples/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use std::path::PathBuf;

use alloy::primitives::{Address, Bytes};
use alloy::rpc::types::TransactionRequest;
use dotenv::dotenv;
use tracing::info;
use tracing_subscriber::filter::{EnvFilter, LevelFilter};
Expand All @@ -11,7 +12,7 @@ use tracing_subscriber::FmtSubscriber;
use helios::{
client::{Client, ClientBuilder, FileDB},
config::networks::Network,
types::{BlockTag, CallOpts},
types::BlockTag,
};

#[tokio::main]
Expand Down Expand Up @@ -53,16 +54,21 @@ async fn main() -> eyre::Result<()> {
client.wait_synced().await;

// Call on helios client
let call_opts = CallOpts {
let tx = TransactionRequest {
from: None,
to: Some("0x6B175474E89094C44Da98b954EedeAC495271d0F".parse::<Address>()?),
to: Some(
"0x6B175474E89094C44Da98b954EedeAC495271d0F"
.parse::<Address>()?
.into(),
),
gas: None,
gas_price: None,
value: None,
data: Some("0x18160ddd".parse::<Bytes>()?),
input: "0x18160ddd".parse::<Bytes>()?.into(),
..Default::default()
};

let result = client.call(&call_opts, BlockTag::Latest).await?;
let result = client.call(&tx, BlockTag::Latest).await?;
info!("[HELIOS] DAI total supply: {:?}", result);

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion execution/src/rpc/http_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl ExecutionRpc for HttpRpc {

let list = self
.provider
.create_access_list(&tx)
.create_access_list(tx)
.block_id(block)
.await
.map_err(|e| RpcError::new("create_access_list", e))?;
Expand Down

0 comments on commit ed3f80b

Please sign in to comment.