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:
@@ -39,6 +39,12 @@ impl TychoRunner {
|
||||
|
||||
let all_accounts = self.initialized_accounts.clone();
|
||||
|
||||
// Determine the correct module name based on protocol system
|
||||
let module_name = match protocol_system {
|
||||
"uniswap_v2" => "map_pool_events",
|
||||
_ => "map_protocol_changes",
|
||||
};
|
||||
|
||||
cmd.args([
|
||||
"--database-url",
|
||||
self.db_url.as_str(),
|
||||
@@ -46,7 +52,7 @@ impl TychoRunner {
|
||||
"--spkg",
|
||||
spkg_path,
|
||||
"--module",
|
||||
"map_protocol_changes",
|
||||
module_name,
|
||||
"--protocol-type-names",
|
||||
&protocol_type_names.join(","),
|
||||
"--protocol-system",
|
||||
|
||||
Reference in New Issue
Block a user