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..fa63a7b2 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) diff --git a/cowprotocol/accounting/rewards/mainnet/mainnet_dashboard_query_2510345.sql b/cowprotocol/accounting/rewards/mainnet/mainnet_dashboard_query_2510345.sql index 29796c73..ce6e3516 100644 --- a/cowprotocol/accounting/rewards/mainnet/mainnet_dashboard_query_2510345.sql +++ b/cowprotocol/accounting/rewards/mainnet/mainnet_dashboard_query_2510345.sql @@ -1,7 +1,7 @@ with block_range as ( - select * from "query_3333356(start_time='{{start_time}}',end_time='{{end_time}}')" + select * from "query_3333356(blockchain='ethereum',start_time='{{start_time}}',end_time='{{end_time}}')" ), solver_slippage as ( diff --git a/cowprotocol/accounting/rewards/mainnet/vouch_registry_query_1541516.sql b/cowprotocol/accounting/rewards/mainnet/vouch_registry_query_1541516.sql index 02b78787..c8cbc3ce 100644 --- a/cowprotocol/accounting/rewards/mainnet/vouch_registry_query_1541516.sql +++ b/cowprotocol/accounting/rewards/mainnet/vouch_registry_query_1541516.sql @@ -4,7 +4,7 @@ -- {{end_time}} - the end date timestamp for the accounting period (exclusively) with last_block_before_timestamp as ( - select end_block from "query_3333356(start_time='2018-01-01 00:00:00',end_time='{{end_time}}')" + select end_block from "query_3333356(blockchain='ethereum',start_time='2018-01-01 00:00:00',end_time='{{end_time}}')" ), -- Query Logic Begins here!