* fix: Implement ethereum-ekubo * fix: Remove unnecessary store * fix: Correct balance accounting * Adjust deltas by fee at PositionUpdated event * Add partial Ekubo integration * Generalize Hexable * Native Ekubo integration * cargo fmt & clippy --------- Co-authored-by: kayibal <alan@datarevenue.com> Co-authored-by: Zizou <111426680+zizou0x@users.noreply.github.com>
123 lines
2.6 KiB
YAML
123 lines
2.6 KiB
YAML
specVersion: v0.1.0
|
|
package:
|
|
name: "ethereum_ekubo"
|
|
version: v0.1.0
|
|
|
|
protobuf:
|
|
files:
|
|
- tycho/evm/v1/common.proto
|
|
- tycho/evm/v1/utils.proto
|
|
- ekubo.proto
|
|
importPaths:
|
|
- ../../proto
|
|
- ./proto
|
|
excludePaths:
|
|
- sf/substreams
|
|
- google
|
|
- tycho
|
|
|
|
binaries:
|
|
default:
|
|
type: wasm/rust-v1
|
|
file: ../target/wasm32-unknown-unknown/release/ethereum_ekubo.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
|