Skip to content

Commit

Permalink
extend blockrange query to multiple chains
Browse files Browse the repository at this point in the history
  • Loading branch information
harisang committed Dec 2, 2024
1 parent 3f95dbd commit 15c0bfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cowprotocol/accounting/rewards/mainnet/.sqlfluff
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ min_absolute_slippage_tolerance=100
relative_slippage_tolerance=0.3
significant_slippage_value=1000
time='2024-08-27 00:00:00'
blockchain=ethereum
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
-- Parameters:
-- {{start_time}} - the start date timestamp for the accounting period (inclusively)
-- {{end_time}} - the end date timestamp for the accounting period (exclusively)
-- {{blockchain}} -- the corresponding chain

select
min("number") as start_block,
max("number") as end_block
from ethereum.blocks
from {{blockchain}}.blocks
where time >= cast('{{start_time}}' as timestamp) and time < cast('{{end_time}}' as timestamp)

0 comments on commit 15c0bfa

Please sign in to comment.