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:
TAMARA LIPOWSKI
2025-09-19 01:46:22 -04:00
committed by Tamara
parent 12e6e48a78
commit 1c5cf42d00

View File

@@ -0,0 +1,19 @@
substreams_yaml_path: ./ethereum-uniswap-v2.yaml
protocol_system: "uniswap_v2"
protocol_type_names:
- "uniswap_v2_pool"
skip_balance_check: true
initialized_accounts:
tests:
- name: test_spx_weth_pool
start_block: 17924533
stop_block: 17924534
expected_components:
- id: "0x52c77b0CB827aFbAD022E6d6CAF2C44452eDbc39"
tokens:
- "0xe0f63a424a4439cbe457d80e4f4b51ad25b2c56c"
- "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
static_attributes:
fee: "0x1e"
creation_tx: "0xf09ac8ad7e21d15ded627a176ec718903baae5e5a9ce671a611bd852691b24f9"
skip_simulation: false