Skip to content

Commit

Permalink
chore(inspect): add inspect example
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-Becker committed Dec 11, 2023
1 parent bc1bf16 commit 0a15da0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/inspect/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "heimdall-rs-inspect-example"
version = "0.6.5"
edition = "2021"
description = "Heimdall is an advanced Ethereum smart contract toolkit for forensic and heuristic analysis."
keywords = ["ethereum", "web3", "decompiler", "evm", "crypto"]
license = "MIT"

[dependencies]
heimdall-core = { git = "https://github.com/Jon-Becker/heimdall-rs.git", branch = "main" }
tokio = {version = "1", features = ["full"]}
16 changes: 16 additions & 0 deletions examples/inspect/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use heimdall_core::inspect::InspectArgsBuilder;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let result = heimdall_core::inspect::inspect(
InspectArgsBuilder::new()
.target("0xa5f676d0ee4c23cc1ccb0b802be5aaead5827a3337c06e9da8b0a85dfa3e7dd5".to_string())
.rpc_url("https://eth.llamarpc.com".to_string())
.build()?,
)
.await?;

println!("InspectResult: {:#?}", result);

Ok(())
}

0 comments on commit 0a15da0

Please sign in to comment.