diff --git a/protocol-testing/src/config.rs b/protocol-testing/src/config.rs index 1661c8b..ff4e52d 100644 --- a/protocol-testing/src/config.rs +++ b/protocol-testing/src/config.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::{HashMap, HashSet}; use colored::Colorize; use serde::{Deserialize, Serialize}; @@ -34,8 +34,10 @@ impl ProtocolComponentExpectation { diffs.push(format!("Field 'id' mismatch for {}:\n{}", self.id, diff)); } - // Compare tokens - if self.tokens != other.tokens { + // Compare tokens (order-independent) + let self_tokens_set: HashSet<_> = self.tokens.iter().collect(); + let other_tokens_set: HashSet<_> = other.tokens.iter().collect(); + if self_tokens_set != other_tokens_set { let self_tokens = format!("{:?}", self.tokens); let other_tokens = format!("{:?}", other.tokens); let diff = self.format_diff("tokens", &self_tokens, &other_tokens, colorize_output); diff --git a/substreams/ethereum-curve/integration_test.tycho.yaml b/substreams/ethereum-curve/integration_test.tycho.yaml index 8c7faf9..ae169ce 100644 --- a/substreams/ethereum-curve/integration_test.tycho.yaml +++ b/substreams/ethereum-curve/integration_test.tycho.yaml @@ -1,4 +1,5 @@ substreams_yaml_path: ./substreams.yaml +protocol_system: "vm:curve" protocol_type_names: - "curve_pool" adapter_contract: "CurveAdapter"