fix: small fix and refactor after testing EkuboV2 (#188)
* fix: add `balance_owner` attribute for ekubo_v2 components * refactor: rename `ekubo` into `ekubo-v2` * refactor: freeze `substreams-helper` version in ekubo V2 module * docs: improve integration test comment * docs: add TODO to remove `balance_owner` in favor of `AccountBalances` --------- Co-authored-by: zizou <111426680+flopell@users.noreply.github.com>
This commit is contained in:
122
substreams/ethereum-ekubo-v2/substreams.yaml
Normal file
122
substreams/ethereum-ekubo-v2/substreams.yaml
Normal file
@@ -0,0 +1,122 @@
|
||||
specVersion: v0.1.0
|
||||
package:
|
||||
name: "ethereum_ekubo_v2"
|
||||
version: v0.1.0
|
||||
url: "https://github.com/propeller-heads/tycho-protocol-sdk/tree/main/substreams/ethereum-ekubo-v2"
|
||||
|
||||
protobuf:
|
||||
files:
|
||||
- tycho/evm/v1/common.proto
|
||||
- tycho/evm/v1/utils.proto
|
||||
- ekubo.proto
|
||||
importPaths:
|
||||
- ../../proto
|
||||
- ./proto
|
||||
excludePaths:
|
||||
- google
|
||||
- tycho
|
||||
|
||||
binaries:
|
||||
default:
|
||||
type: wasm/rust-v1
|
||||
file: ../target/wasm32-unknown-unknown/release/ethereum_ekubo_v2.wasm
|
||||
|
||||
network: ethereum
|
||||
networks:
|
||||
ethereum:
|
||||
initialBlock:
|
||||
map_events: 22048334 # First pool initialization https://etherscan.io/tx/0x7c2e697e73dc1f114a5473d1015c411f10585b2b671bee0bd6d5706895e16b27
|
||||
params:
|
||||
map_events: "core=e0e0e08A6A4b9Dc7bD67BCB7aadE5cF48157d444&oracle=51d02A5948496a67827242EaBc5725531342527C"
|
||||
|
||||
modules:
|
||||
- name: map_events
|
||||
kind: map
|
||||
inputs:
|
||||
- params: string
|
||||
- source: sf.ethereum.type.v2.Block
|
||||
output:
|
||||
type: proto:ekubo.BlockTransactionEvents
|
||||
|
||||
- name: map_components
|
||||
kind: map
|
||||
inputs:
|
||||
- map: map_events
|
||||
output:
|
||||
type: proto:tycho.evm.v1.BlockChanges
|
||||
|
||||
- name: map_tick_changes
|
||||
kind: map
|
||||
inputs:
|
||||
- map: map_events
|
||||
output:
|
||||
type: proto:ekubo.TickDeltas
|
||||
|
||||
- name: store_active_ticks
|
||||
kind: store
|
||||
valueType: int64
|
||||
updatePolicy: set
|
||||
inputs:
|
||||
- map: map_events
|
||||
|
||||
- name: map_liquidity_changes
|
||||
kind: map
|
||||
inputs:
|
||||
- map: map_events
|
||||
- store: store_active_ticks
|
||||
output:
|
||||
type: proto:ekubo.LiquidityChanges
|
||||
|
||||
- name: store_pool_details
|
||||
kind: store
|
||||
valueType: proto:ekubo.PoolDetails
|
||||
updatePolicy: set_if_not_exists
|
||||
inputs:
|
||||
- map: map_components
|
||||
|
||||
- name: store_tick_liquidities
|
||||
kind: store
|
||||
valueType: bigint
|
||||
updatePolicy: add
|
||||
inputs:
|
||||
- map: map_tick_changes
|
||||
|
||||
- name: map_balance_changes
|
||||
kind: map
|
||||
inputs:
|
||||
- map: map_events
|
||||
- store: store_pool_details
|
||||
output:
|
||||
type: proto:tycho.evm.v1.BlockBalanceDeltas
|
||||
|
||||
- name: store_liquidities
|
||||
kind: store
|
||||
valueType: bigint
|
||||
updatePolicy: set_sum
|
||||
inputs:
|
||||
- map: map_liquidity_changes
|
||||
|
||||
- name: store_balance_changes
|
||||
kind: store
|
||||
valueType: bigint
|
||||
updatePolicy: add
|
||||
inputs:
|
||||
- map: map_balance_changes
|
||||
|
||||
- name: map_protocol_changes
|
||||
kind: map
|
||||
inputs:
|
||||
- source: sf.ethereum.type.v2.Block
|
||||
- map: map_components
|
||||
- map: map_events
|
||||
- map: map_balance_changes
|
||||
- store: store_balance_changes
|
||||
mode: deltas
|
||||
- map: map_tick_changes
|
||||
- store: store_tick_liquidities
|
||||
mode: deltas
|
||||
- map: map_liquidity_changes
|
||||
- store: store_liquidities
|
||||
mode: deltas
|
||||
output:
|
||||
type: proto:tycho.evm.v1.BlockChanges
|
||||
Reference in New Issue
Block a user