Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
- name: Install rustfmt for nightly
run: rustup component add --toolchain nightly rustfmt

- name: Install clippy for nightly
run: rustup component add --toolchain nightly clippy

- name: Install llvm-tools-preview for stable
run: rustup component add llvm-tools-preview --toolchain stable-x86_64-unknown-linux-gnu

Expand Down
Binary file modified ideal-metadata/ideal.scale
Binary file not shown.
5 changes: 1 addition & 4 deletions indexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@ edition = "2021"

[dependencies]
ideal-metadata = { path = "../ideal-metadata" }
acuity-index-substrate = { git = "https://github.com/ideal-lab5/idn-acuity-index-substrate", version = "=0.6.2" }
acuity-index-substrate = { git = "https://github.com/ideal-lab5/idn-acuity-index-substrate" }
byte-unit = "4.0.19"
clap = { version = "4.5.1", features = ["derive"] }
clap-verbosity-flag = "2.2.0"
serde = { version = "1.0.130", features = ["derive"] }
serde_json = "1.0.68"
sled = "0.34.7"
subxt = "0.35.3"
tokio = { version = "1.35.1", features = ["full"] }
tracing = "0.1.40"
tracing-log = "0.2.0"
zerocopy = "0.7.32"
hex = "0.4.3"
hex-literal = "0.4.1"
lazy_static = "1.4.0"
10 changes: 7 additions & 3 deletions indexer/src/ideal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ use ideal_metadata::ideal_metadata::{
runtime_types::{
frame_system::pallet::Event as SystemEvent,
pallet_balances::pallet::Event as BalancesEvent,
// Add other relevant event imports for your ideal network
// IDN-specific pallet events
pallet_idn_manager::pallet::Event as IdnManagerEvent,
},
Event,
};
Expand All @@ -16,7 +17,7 @@ use acuity_index_substrate::*;
pub struct IdealIndexer;

impl acuity_index_substrate::shared::RuntimeIndexer for IdealIndexer {
type RuntimeConfig = subxt::PolkadotConfig; // You might need to adjust this based on your chain's configuration
type RuntimeConfig = subxt::PolkadotConfig;
type ChainKey = ChainKey;

fn get_name() -> &'static str {
Expand Down Expand Up @@ -48,7 +49,10 @@ impl acuity_index_substrate::shared::RuntimeIndexer for IdealIndexer {
Event::Balances(event) => {
index_balances_event![BalancesEvent, event, indexer, block_number, event_index]
},
// Add other event handlers as needed
// IDN-specific event handlers using upstream macros
Event::IdnManager(event) => {
index_idn_manager_event![IdnManagerEvent, event, indexer, block_number, event_index]
},
_ => 0,
})
}
Expand Down
7 changes: 3 additions & 4 deletions indexer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ mod tests;

mod config;
mod ideal;
mod pallets;

use ideal::IdealIndexer;

Expand Down Expand Up @@ -64,9 +63,9 @@ impl IndexTrees for ChainTrees {
#[derive(Serialize, Deserialize, Clone, Debug, Eq, PartialEq, Hash)]
#[serde(tag = "type", content = "value")]
pub enum ChainKey {
AccountId(Bytes32), // For balance events
BlockHash(Bytes32), // For system events
ExtrinsicHash(Bytes32), // For transaction events
AccountId(Bytes32),
BlockHash(Bytes32),
ExtrinsicHash(Bytes32),
}

impl IndexKey for ChainKey {
Expand Down
Loading
Loading