Skip to content

Commit

Permalink
Add block_number to balancer.trades (#5789)
Browse files Browse the repository at this point in the history
* add missing tokens

* add block number to balancer trades

* update upstream models
  • Loading branch information
viniabussafi authored Apr 17, 2024
1 parent c2175c0 commit 8cf9a2e
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions models/balancer/arbitrum/balancer_arbitrum_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ FROM (
block_month,
block_date,
block_time,
block_number,
token_bought_symbol,
token_sold_symbol,
token_pair,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ FROM (
block_month,
block_date,
block_time,
block_number,
token_bought_symbol,
token_sold_symbol,
token_pair,
Expand Down
1 change: 1 addition & 0 deletions models/balancer/balancer_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ FROM (
block_month,
block_date,
block_time,
block_number,
token_bought_symbol,
token_sold_symbol,
token_pair,
Expand Down
1 change: 1 addition & 0 deletions models/balancer/base/balancer_base_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ FROM (
block_month,
block_date,
block_time,
block_number,
token_bought_symbol,
token_sold_symbol,
token_pair,
Expand Down
1 change: 1 addition & 0 deletions models/balancer/ethereum/balancer_ethereum_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ FROM (
block_month,
block_date,
block_time,
block_number,
token_bought_symbol,
token_sold_symbol,
token_pair,
Expand Down
4 changes: 3 additions & 1 deletion models/balancer/ethereum/balancer_v1_ethereum_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ v1 AS (
(swapFee / 1e18) AS swap_fee_percentage,
swaps.evt_block_time,
swaps.evt_tx_hash,
swaps.evt_index
swaps.evt_index,
swaps.evt_block_number
FROM {{ source('balancer_v1_ethereum', 'BPool_evt_LOG_SWAP') }} swaps
LEFT JOIN swap_fees fees
ON fees.evt_tx_hash = swaps.evt_tx_hash
Expand Down Expand Up @@ -76,6 +77,7 @@ SELECT
DATE_TRUNC('DAY', evt_block_time) AS block_date,
TRY_CAST(DATE_TRUNC('MONTH', evt_block_time) AS date) AS block_month,
evt_block_time AS block_time,
trades.evt_block_number AS block_number,
erc20a.symbol AS token_bought_symbol,
erc20b.symbol AS token_sold_symbol,
CASE
Expand Down
1 change: 1 addition & 0 deletions models/balancer/gnosis/balancer_gnosis_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ FROM (
block_month,
block_date,
block_time,
block_number,
token_bought_symbol,
token_sold_symbol,
token_pair,
Expand Down
1 change: 1 addition & 0 deletions models/balancer/optimism/balancer_optimism_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ FROM (
block_month,
block_date,
block_time,
block_number,
token_bought_symbol,
token_sold_symbol,
token_pair,
Expand Down
1 change: 1 addition & 0 deletions models/balancer/polygon/balancer_polygon_trades.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ FROM (
block_month,
block_date,
block_time,
block_number,
token_bought_symbol,
token_sold_symbol,
token_pair,
Expand Down

0 comments on commit 8cf9a2e

Please sign in to comment.