feat: Add test for UniswapV2
- Used a random post-Shanghai-created USV2 pool state with enough liquidity for the test Necessary fixes: - Don't hardcode to EVMPoolState - Don't expect adapter to always be set. - UniswapV2 names its module differently for some reason... this seems like a special case so instead of updating all integration test yamls, I'm just hardcoding it in test_runner.rs. Perhaps not the best decision? - Log the static attributes if not found. - Get the substreams yaml path from config instead of hardcoding it.
This commit is contained in:
@@ -66,8 +66,8 @@ impl ProtocolComponentExpectation {
|
||||
}
|
||||
None => {
|
||||
diffs.push(format!(
|
||||
"Field 'static_attributes' mismatch for {}: Key '{}' not found",
|
||||
self.id, key
|
||||
"Field 'static_attributes' mismatch for {}: Key '{}' not found. Available attributes: {:?}",
|
||||
self.id, key, other.static_attributes,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -136,7 +136,7 @@ pub struct IntegrationTest {
|
||||
#[derive(Debug, Clone, Deserialize, Serialize)]
|
||||
pub struct IntegrationTestsConfig {
|
||||
pub substreams_yaml_path: String,
|
||||
pub adapter_contract: String,
|
||||
pub adapter_contract: Option<String>,
|
||||
pub adapter_build_signature: Option<String>,
|
||||
pub adapter_build_args: Option<String>,
|
||||
pub initialized_accounts: Option<Vec<String>>,
|
||||
|
||||
Reference in New Issue
Block a user