* 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>
110 lines
2.5 KiB
Protocol Buffer
110 lines
2.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package ekubo;
|
|
|
|
// Copy of tycho.evm.v1.Transaction to be able to implement conversions to/from TransactionTrace
|
|
message Transaction {
|
|
bytes hash = 1;
|
|
bytes from = 2;
|
|
bytes to = 3;
|
|
uint64 index = 4;
|
|
}
|
|
|
|
message TickDelta {
|
|
bytes pool_id = 1; // bytes32
|
|
int32 tick_index = 2;
|
|
bytes liquidity_net_delta = 3; // int128
|
|
uint64 ordinal = 4;
|
|
Transaction transaction = 5;
|
|
}
|
|
|
|
message TickDeltas {
|
|
repeated TickDelta deltas = 1;
|
|
}
|
|
|
|
enum LiquidityChangeType {
|
|
DELTA = 0;
|
|
ABSOLUTE = 1;
|
|
}
|
|
|
|
message LiquidityChange {
|
|
bytes pool_id = 1; // bytes32
|
|
bytes value = 2; // uint128 or int128, depending on change_type
|
|
LiquidityChangeType change_type = 3;
|
|
uint64 ordinal = 4;
|
|
Transaction transaction = 5;
|
|
}
|
|
|
|
message LiquidityChanges {
|
|
repeated LiquidityChange changes = 1;
|
|
}
|
|
|
|
message PoolDetails {
|
|
bytes token0 = 1; // address
|
|
bytes token1 = 2; // address
|
|
fixed64 fee = 3;
|
|
}
|
|
|
|
message BlockTransactionEvents {
|
|
repeated TransactionEvents block_transaction_events = 1;
|
|
|
|
message TransactionEvents {
|
|
Transaction transaction = 1;
|
|
repeated PoolLog pool_logs = 2;
|
|
|
|
message PoolLog {
|
|
uint64 ordinal = 1;
|
|
bytes pool_id = 2; // bytes32
|
|
|
|
oneof event {
|
|
Swapped swapped = 3;
|
|
PositionUpdated position_updated = 4;
|
|
PositionFeesCollected position_fees_collected = 5;
|
|
PoolInitialized pool_initialized = 6;
|
|
FeesAccumulated fees_accumulated = 7;
|
|
}
|
|
|
|
message Swapped {
|
|
bytes delta0 = 1; // int128
|
|
bytes delta1 = 2; // int128
|
|
bytes sqrt_ratio_after = 3; // uint192
|
|
bytes liquidity_after = 4; // uint128
|
|
sint32 tick_after = 5; // int32
|
|
}
|
|
|
|
message PositionUpdated {
|
|
sint32 lower = 1; // int32
|
|
sint32 upper = 2; // int32
|
|
bytes liquidity_delta = 3; // int128
|
|
bytes delta0 = 4; // int128
|
|
bytes delta1 = 5; // int128
|
|
}
|
|
|
|
message PositionFeesCollected {
|
|
bytes amount0 = 1; // uint128
|
|
bytes amount1 = 2; // uint128
|
|
}
|
|
|
|
message PoolInitialized {
|
|
bytes token0 = 1; // address
|
|
bytes token1 = 2; // address
|
|
bytes config = 3; // bytes32
|
|
sint32 tick = 4; // int32
|
|
bytes sqrt_ratio = 5; // uint192
|
|
Extension extension = 6;
|
|
|
|
enum Extension {
|
|
EXTENSION_UNKNOWN = 0;
|
|
EXTENSION_BASE = 1;
|
|
EXTENSION_ORACLE = 2;
|
|
}
|
|
}
|
|
|
|
message FeesAccumulated {
|
|
bytes amount0 = 1; // uint128
|
|
bytes amount1 = 2; // uint128
|
|
}
|
|
}
|
|
}
|
|
}
|