Skip to content

Conversation

@carloskiron
Copy link
Contributor

Changes Made

  • Updated all IDN Manager events to use Key::Substrate(SubstrateKey::SubscriptionId(u32))
  • Proper H256 to u32 conversion: u32::from_le_bytes([sub_id[0], sub_id[1], sub_id[2], sub_id[3]])
  • Handles 8 subscription events: SubscriptionCreated, SubscriptionTerminated, SubscriptionPaused, SubscriptionUpdated, SubscriptionReactivated, RandomnessDistributed, FeesCollected, SubscriptionDistributed
  • SubQuoted event returns 0 (no indexable fields)
  • Removed RandomnessBeacon events (no indexable fields)
  • Simplified ChainTrees to only basic substrate trees
  • Simplified ChainKey enum to only AccountId, BlockHash, ExtrinsicHash
  • Cleaned up comments and dead code

✅ Testing

  • 4 new unit tests for IDN subscription indexing

…anager events to use Key::Substrate(SubstrateKey::SubscriptionId()) - Removed RandomnessBeacon events as they have no indexable fields - Simplified ChainTrees and ChainKey to only handle basic substrate types - Added comprehensive unit tests for IDN subscription event indexing - Tests cover H256 to u32 conversion, multi-block ordering, and subscription isolation - All tests passing (7/7) including 4 new IDN-specific tests
… function print_runtime_info() from main.rs - Deleted pallets.rs containing Polkadot-specific macros not needed for IDN - Removed debug println from production code in ideal.rs - Cleaned up unused dependencies: serde_json, tracing, hex-literal - All tests still pass (7/7) after cleanup
… component add clippy for nightly toolchain - Resolves GitHub Actions error: cargo-clippy not installed for nightly - CI should now pass clippy checks successfully
Copy link

@juangirini juangirini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I left some minor comments

@carloskiron carloskiron merged commit 20002ea into main Jun 18, 2025
1 check passed
@carloskiron carloskiron deleted the cm/idn-events-updated branch June 18, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants