bro-n-bro / spacebox

MIT License
35 stars 4 forks source link

Create table and writer view spacebox.delegation_message #47

Closed bro-n-bro-0 closed 2 months ago

bro-n-bro-0 commented 4 months ago
CREATE TABLE IF NOT EXISTS spacebox.delegation_message
(
    `timestamp` DateTime,
    `operator_address`  String,
    `delegator_address` String,
    `coin`              String,
    `height`            Int64,
    `tx_hash`           String
) ENGINE = MergeTree()
      ORDER BY (`operator_address`, `delegator_address`, `height`,  `tx_hash`, `timestamp`);

Based on message delegate event

Find the necessary events and parse them into the corresponding fields