https://github.com/ethereumdegen/vibegraph-rs
A blockchain event scraping utility that stores event logs to supabase (PSQL)
https://github.com/ethereumdegen/vibegraph-rs
Last synced: 5 months ago
JSON representation
A blockchain event scraping utility that stores event logs to supabase (PSQL)
- Host: GitHub
- URL: https://github.com/ethereumdegen/vibegraph-rs
- Owner: ethereumdegen
- Created: 2023-09-28T16:20:02.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-02-05T18:39:39.000Z (5 months ago)
- Last Synced: 2025-02-05T19:51:44.881Z (5 months ago)
- Language: Rust
- Size: 471 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Vibegraph-rs
A microservice application that reads ethereum contract events from a lightweight RPC and caches them to a database (Postgres).```
cargo add vibegraph
```
___
### Quickstart
```
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)____