Crates.io | vibegraph |
lib.rs | vibegraph |
version | |
source | src |
created_at | 2023-09-29 01:29:55.980911 |
updated_at | 2025-02-13 19:54:14.085162 |
description | Reads ethereum contract events from a lightweight RPC and caches them to a database |
homepage | |
repository | |
max_upload_size | |
id | 986938 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A microservice application that reads ethereum contract events from a lightweight RPC and caches them to a database (Postgres).
cargo add vibegraph
RUST_LOG=info cargo run config/xbtc_config.json
Example config:
let app_config = AppConfig {
indexing_config,
contract_config
};
Vibegraph::init( &app_config ).await;
Example output:
[2023-09-28T19:42:47Z INFO vibegraph] index starting at 4286418
[2023-09-28T19:42:52Z INFO vibegraph] index starting at 4288418
[2023-09-28T19:42:57Z INFO vibegraph] index starting at 4290418
[2023-09-28T19:43:02Z INFO vibegraph] index starting at 4292418
[2023-09-28T19:43:02Z INFO vibegraph] decoded event log ContractEvent { name: "Transfer", signature: 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef, args: [LogParam { name: "from", value: Address(0xf637ce9928a9e6632920338b98f2543ea0b5526f) }, LogParam { name: "to", value: Address(0x5a5b978142c8f08dd013901b50892bac49f3b700) }, LogParam { name: "tokenId", value: Uint(0) }], address: 0x4590383ae832ebdfb262d750ee81361e690cfc9c, data: [], transaction_hash: Some(0x5c9e7eb1aa7fe6564eeeaef6e251c44c80bd4c0e059818f548edc744f9bae999), block_number: Some(4294096), block_hash: Some(0x384e1d61b85d7e5a41a8a2e490b7e019a707301809f18508a004768ced29b94b), log_index: Some(57), transaction_index: Some(39) }
Event logs stored to Supabase (PSQL)