helios/src/main.rs

25 lines
571 B
Rust
Raw Normal View History

use eyre::Result;
2022-08-16 22:59:07 +00:00
2022-08-19 22:43:58 +00:00
use consensus::*;
pub mod consensus;
pub mod consensus_rpc;
2022-08-16 22:59:07 +00:00
pub mod utils;
2022-08-19 00:33:44 +00:00
pub mod proof;
#[tokio::main]
async fn main() -> Result<()> {
2022-08-19 22:43:58 +00:00
let rpc = "http://testing.prater.beacon-api.nimbus.team";
let checkpoint = "0x172128eadf1da46467f4d6a822206698e2d3f957af117dd650954780d680dc99";
let mut client = ConsensusClient::new(rpc, checkpoint).await?;
client.sync().await?;
2022-08-19 00:33:44 +00:00
2022-08-19 22:43:58 +00:00
let payload = client.get_execution_payload().await?;
println!("verified execution block hash: {}", hex::encode(payload.block_hash));
Ok(())
}