| Crates.io | eql_core |
| lib.rs | eql_core |
| version | 0.1.20 |
| created_at | 2024-07-11 18:01:40.565281+00 |
| updated_at | 2024-11-13 21:40:48.785402+00 |
| description | EVM Query Language core components |
| homepage | |
| repository | https://github.com/iankressin/eql |
| max_upload_size | |
| id | 1299859 |
| size | 188,009 |
EVM Query Language core components.
[dependencies]
eql_core = "0.1"
EQL queries can be excuted using the eql funtion:
use eql_core::interpreter::eql;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut result = eql("GET balance FROM account vitalik.eth ON eth").await?;
println!("{:?}", result);
Ok(())
}
Or by using EQLBuilder:
use eql_core::common::EQLBuilder;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let result = EQLBuilder::new()
.get(vec![Field::Account(super::types::AccountField::Balance)])
.from(
Entity::Account,
EntityId::Account(NameOrAddress::Name("vitalik.eth".to_string())),
)
.on(Chain::Ethereum)
.run()
.await?;
println!("{:?}", result);
}