diff --git a/cowprotocol/accounting/rewards/mainnet/.sqlfluff b/cowprotocol/accounting/rewards/mainnet/.sqlfluff index afa8fcca..7d84dff3 100644 --- a/cowprotocol/accounting/rewards/mainnet/.sqlfluff +++ b/cowprotocol/accounting/rewards/mainnet/.sqlfluff @@ -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 diff --git a/cowprotocol/accounting/rewards/mainnet/block_number_interval_from_time_interval_query_3333356.sql b/cowprotocol/accounting/rewards/mainnet/block_number_interval_from_time_interval_query_3333356.sql index f40bbd9c..99649f26 100644 --- a/cowprotocol/accounting/rewards/mainnet/block_number_interval_from_time_interval_query_3333356.sql +++ b/cowprotocol/accounting/rewards/mainnet/block_number_interval_from_time_interval_query_3333356.sql @@ -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)