From 8ad709b07ae16321580db1cc7a021996e5957be4 Mon Sep 17 00:00:00 2001 From: TAMARA LIPOWSKI Date: Wed, 17 Sep 2025 18:42:55 -0400 Subject: [PATCH] fix: Maverick V2 SDK tests - substreams.yaml was missing. - verified both integration tests now pass in Rust and Python test suites --- .../integration_test.tycho.yaml | 3 +- .../ethereum-maverick-v2/substreams.yaml | 65 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 substreams/ethereum-maverick-v2/substreams.yaml diff --git a/substreams/ethereum-maverick-v2/integration_test.tycho.yaml b/substreams/ethereum-maverick-v2/integration_test.tycho.yaml index 47cd2ae..5be9aad 100644 --- a/substreams/ethereum-maverick-v2/integration_test.tycho.yaml +++ b/substreams/ethereum-maverick-v2/integration_test.tycho.yaml @@ -1,4 +1,5 @@ substreams_yaml_path: ./ethereum-maverick-v2.yaml +protocol_system: "vm:maverick_v2" adapter_contract: "MaverickV2SwapAdapter" adapter_build_signature: "constructor(address,address)" adapter_build_args: "0x0A7e848Aca42d879EF06507Fca0E7b33A0a63c1e,0xb40AfdB85a07f37aE217E7D6462e609900dD8D7A" @@ -15,8 +16,8 @@ tests: expected_components: - id: "0xEB1da432D5C1a9FDF52aA5D37698f34706F91397" tokens: - - "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" # WETH - "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" # USDC + - "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" # WETH static_attributes: fee_a_in: "0x5af3107a4000" fee_b_in: "0x5af3107a4000" diff --git a/substreams/ethereum-maverick-v2/substreams.yaml b/substreams/ethereum-maverick-v2/substreams.yaml new file mode 100644 index 0000000..6456126 --- /dev/null +++ b/substreams/ethereum-maverick-v2/substreams.yaml @@ -0,0 +1,65 @@ +specVersion: v0.1.0 +package: + name: "ethereum_maverick_v2" + version: v0.4.0 + url: "https://github.com/propeller-heads/tycho-protocol-sdk/tree/main/substreams/ethereum-maverick-v2" + +protobuf: + files: + - tycho/evm/v1/vm.proto + - tycho/evm/v1/common.proto + - tycho/evm/v1/utils.proto + importPaths: + - ../../proto + +binaries: + default: + type: wasm/rust-v1 + file: ../target/wasm32-unknown-unknown/release/ethereum_maverick_v2.wasm + +modules: + - name: map_components + kind: map + initialBlock: 17918031 # Maverick Protocol Factory deployment block + inputs: + - source: sf.ethereum.type.v2.Block + output: + type: proto:tycho.evm.v1.BlockTransactionProtocolComponents + + - name: store_components + kind: store + initialBlock: 17918031 + updatePolicy: set + valueType: string + inputs: + - map: map_components + + - name: map_relative_balances + kind: map + initialBlock: 17918031 + inputs: + - source: sf.ethereum.type.v2.Block + - store: store_components + output: + type: proto:tycho.evm.v1.BlockBalanceDeltas + + - name: store_balances + kind: store + initialBlock: 17918031 + updatePolicy: add + valueType: bigint + inputs: + - map: map_relative_balances + + - name: map_protocol_changes + kind: map + initialBlock: 17918031 + inputs: + - source: sf.ethereum.type.v2.Block + - map: map_components + - map: map_relative_balances + - store: store_components + - store: store_balances + mode: deltas # This is the key property that simplifies `BalanceChange` handling + output: + type: proto:tycho.evm.v1.BlockChanges