evm-selectors
evm-signatures is a Rust library for working with known Ethereum Virtual Machine (EVM) function, error, event, and other selectors, with support for downloading the selector database from the OpenChain API.
Usage
Downloading the database
use EvmSelectors;
use Path;
// Download and return as string
let data = download.await?;
// Download and write to tempfile.txt
download_to_file.await?;
Loading the database
use EvmSelectors;
use Path;
// From a string
let data = "...".to_string;
let db = new_from_raw?;
// From a file
let db = new_from_file?;
Querying selectors
use EvmSelectors;
use Path;
// Query a single selector
let db = new_from_file?;
let functions = db.get;
// Get all available selectors
let all = db.items;
Requirements
If the download feature is active (it is by default), a SSL/TLS library must be present. See the reqwest documentation for further details.
Acknowledgements
OpenChain for providing a reliable selector database.