From 44ab9e23d7cf617376a9cc54eb582ef91c2aafca Mon Sep 17 00:00:00 2001 From: harisang Date: Tue, 3 Dec 2024 02:39:12 +0200 Subject: [PATCH 1/6] add raw order data wrapper query --- cowprotocol/raw_data/.sqlfluff | 4 + cowprotocol/raw_data/order_data_4364122.sql | 180 ++++++++++++++++++++ 2 files changed, 184 insertions(+) create mode 100644 cowprotocol/raw_data/.sqlfluff create mode 100644 cowprotocol/raw_data/order_data_4364122.sql diff --git a/cowprotocol/raw_data/.sqlfluff b/cowprotocol/raw_data/.sqlfluff new file mode 100644 index 0000000..f070685 --- /dev/null +++ b/cowprotocol/raw_data/.sqlfluff @@ -0,0 +1,4 @@ +[sqlfluff:templater:jinja:context] +start_time='2024-08-01 12:00' +end_time='2024-08-02 12:00' +blockchain='ethereum' diff --git a/cowprotocol/raw_data/order_data_4364122.sql b/cowprotocol/raw_data/order_data_4364122.sql new file mode 100644 index 0000000..603d653 --- /dev/null +++ b/cowprotocol/raw_data/order_data_4364122.sql @@ -0,0 +1,180 @@ +-- This query provides data related to rewards/payouts on a per batch auction level +-- for all auctions that had at least one winner. +-- Parameters: +-- {{blockchain}}: the chain for which we want to retrieve batch data +with +past_data_ethereum as ( + select + s.environment, + -1 as auction_id, + d.block_number, + d.order_uid, + d.solver, + d.data.quote_solver, --noqa: RF01 + d.tx_hash, + cast(d.data.surplus_fee as decimal(38, 0)) as surplus_fee, --noqa: RF01 + cast(d.data.amount as decimal(38, 0)) as amount, --noqa: RF01 + cast(d.data.protocol_fee as decimal(38, 0)) as protocol_fee, --noqa: RF01 + d.data.protocol_fee_token, --noqa: RF01 + cast(d.data.protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, --noqa: RF01 + case + when d.data.quote_sell_amount = 'None' then null --noqa: RF01 + else cast(d.data.quote_sell_amount as decimal(38, 0)) --noqa: RF01 + end as quote_sell_amount, + case + when d.data.quote_buy_amount = 'None' then null --noqa: RF01 + else cast(d.data.quote_buy_amount as decimal(38, 0)) --noqa: RF01 + end as quote_buy_amount, + case + when cast(d.data.quote_gas_cost as varchar) = 'NaN' then null --noqa: RF01 + else cast(d.data.quote_gas_cost as decimal(38, 0)) --noqa: RF01 + end as quote_gas_cost, + case + when cast(d.data.quote_sell_token_price as varchar) = 'NaN' then null --noqa: RF01 + else cast(d.data.quote_sell_token_price as decimal(38,0)) --noqa: RF01 + end as quote_sell_token_price, + cast(d.data.partner_fee as decimal(38, 0)) as partner_fee, --noqa: RF01 + d.data.partner_fee_recipient, --noqa: RF01 + d.data.protocol_fee_kind --noqa: RF01 + from cowswap.raw_order_rewards as d inner join cow_protocol_ethereum.solvers as s on cast(d.solver as varchar) = cast(s.address as varchar) where d.block_number < 20866925 +), + +past_data_gnosis as ( --noqa: ST03 +-- data from Jan 23, 2024 till Sept 23, 2024, are present here + select --noqa: ST06 + s.environment, + -1 as auction_id, + d.block_number, + cast(d.order_uid as varchar) as order_uid, + cast(d.solver as varchar) as solver, + cast(d.quote_solver as varchar) as quote_solver, + cast(d.tx_hash as varchar) as tx_hash, + cast(d.surplus_fee as decimal(38, 0)) as surplus_fee, + cast(d.amount as decimal(38, 0)) as amount, + cast(d.protocol_fee as decimal(38, 0)) as protocol_fee, + cast(d.protocol_fee_token as varchar) as protocol_fee_token, + cast(d.protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, + cast(d.quote_sell_amount as decimal(38, 0)) as quote_sell_amount, + cast(d.quote_buy_amount as decimal(38, 0)) as quote_buy_amount, + case + when cast(d.quote_gas_cost as varchar) = 'NaN' then null + else cast(d.quote_gas_cost as decimal(38, 0)) + end as quote_gas_cost, + case + when cast(d.quote_sell_token_price as varchar) = 'NaN' then null + else cast(d.quote_sell_token_price as decimal(38, 0)) + end as quote_sell_token_price, + cast(d.partner_fee as decimal(38, 0)) as partner_fee, + cast(d.partner_fee_recipient as varchar) as partner_fee_recipient, + d.protocol_fee_kind + from dune.cowprotocol.dataset_cowswap_gnosis_raw_order_rewards as d inner join cow_protocol_gnosis.solvers as s on cast(d.solver as varchar) = cast(s.address as varchar) +), + +past_data_arbitrum as ( --noqa: ST03 +-- data till Sept 23, 2024, are present here + select --noqa: ST06 + s.environment, + -1 as auction_id, + d.block_number, + cast(d.order_uid as varchar) as order_uid, + cast(d.solver as varchar) as solver, + cast(d.quote_solver as varchar) as quote_solver, + cast(d.tx_hash as varchar) as tx_hash, + cast(d.surplus_fee as decimal(38, 0)) as surplus_fee, + cast(d.amount as decimal(38, 0)) as amount, + cast(d.protocol_fee as decimal(38, 0)) as protocol_fee, + cast(d.protocol_fee_token as varchar) as protocol_fee_token, + case + when d.protocol_fee_native_price = 'inf' then null + else cast(d.protocol_fee_native_price as decimal(38, 0)) + end as protocol_fee_native_price, + cast(d.quote_sell_amount as decimal(38, 0)) as quote_sell_amount, + cast(d.quote_buy_amount as decimal(38, 0)) as quote_buy_amount, + case + when cast(d.quote_gas_cost as varchar) = 'NaN' then null + else cast(d.quote_gas_cost as decimal(38, 0)) + end as quote_gas_cost, + case + when cast(d.quote_sell_token_price as varchar) = 'NaN' then null + else cast(d.quote_sell_token_price as decimal(38, 0)) + end as quote_sell_token_price, + cast(d.partner_fee as decimal(38, 0)) as partner_fee, + cast(d.partner_fee_recipient as varchar) as partner_fee_recipient, + d.protocol_fee_kind + from dune.cowprotocol.dataset_cowswap_arbitrum_raw_order_rewards as d inner join cow_protocol_arbitrum.solvers as s on cast(d.solver as varchar) = cast(s.address as varchar) +) + +select + environment, + auction_id, + block_number, + cast(order_uid as varchar) as order_uid, + cast(solver as varchar) as solver, + cast(quote_solver as varchar) as quote_solver, + cast(tx_hash as varchar) as tx_hash, + cast(surplus_fee as decimal(38, 0)) as surplus_fee, + cast(amount as decimal(38, 0)) as amount, + cast(protocol_fee as decimal(38, 0)) as protocol_fee, + cast(protocol_fee_token as varchar) as protocol_fee_token, + cast(protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, + cast(quote_sell_amount as decimal(38, 0)) as quote_sell_amount, + cast(quote_buy_amount as decimal(38, 0)) as quote_buy_amount, + cast(quote_gas_cost as decimal(38, 0)) as quote_gas_cost, + case + when quote_sell_token_price = 'inf' then null + else cast(quote_sell_token_price as decimal(38, 0)) + end as quote_sell_token_price, + cast(partner_fee as decimal(38, 0)) as partner_fee, + cast(partner_fee_recipient as varchar) as partner_fee_recipient, + protocol_fee_kind +from dune.cowprotocol.dataset_order_data_{{blockchain}}_2024_10 +union all +select + environment, + auction_id, + block_number, + cast(order_uid as varchar) as order_uid, + cast(solver as varchar) as solver, + cast(quote_solver as varchar) as quote_solver, + cast(tx_hash as varchar) as tx_hash, + cast(surplus_fee as decimal(38, 0)) as surplus_fee, + cast(amount as decimal(38, 0)) as amount, + cast(protocol_fee as decimal(38, 0)) as protocol_fee, + cast(protocol_fee_token as varchar) as protocol_fee_token, + cast(protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, + cast(quote_sell_amount as decimal(38, 0)) as quote_sell_amount, + cast(quote_buy_amount as decimal(38, 0)) as quote_buy_amount, + cast(quote_gas_cost as decimal(38, 0)) as quote_gas_cost, + case + when quote_sell_token_price = 'inf' then null + else cast(quote_sell_token_price as decimal(38, 0)) + end as quote_sell_token_price, + cast(partner_fee as decimal(38, 0)) as partner_fee, + cast(partner_fee_recipient as varchar) as partner_fee_recipient, + protocol_fee_kind +from dune.cowprotocol.dataset_order_data_{{blockchain}}_2024_11 +union all +select + environment, + auction_id, + block_number, + cast(order_uid as varchar) as order_uid, + cast(solver as varchar) as solver, + cast(quote_solver as varchar) as quote_solver, + cast(tx_hash as varchar) as tx_hash, + cast(surplus_fee as decimal(38, 0)) as surplus_fee, + cast(amount as decimal(38, 0)) as amount, + cast(protocol_fee as decimal(38, 0)) as protocol_fee, + cast(protocol_fee_token as varchar) as protocol_fee_token, + cast(protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, + cast(quote_sell_amount as decimal(38, 0)) as quote_sell_amount, + cast(quote_buy_amount as decimal(38, 0)) as quote_buy_amount, + cast(quote_gas_cost as decimal(38, 0)) as quote_gas_cost, + cast(quote_sell_token_price as decimal(38, 0)) as quote_sell_token_price, + cast(partner_fee as decimal(38, 0)) as partner_fee, + cast(partner_fee_recipient as varchar) as partner_fee_recipient, + protocol_fee_kind +from dune.cowprotocol.dataset_order_data_{{blockchain}}_2024_12 +union all +select * +from past_data_{{blockchain}} From f8e89cbc013a94412de01c6d489b2d3e5f063dac Mon Sep 17 00:00:00 2001 From: harisang Date: Tue, 3 Dec 2024 02:41:43 +0200 Subject: [PATCH 2/6] small fix --- cowprotocol/raw_data/order_data_4364122.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cowprotocol/raw_data/order_data_4364122.sql b/cowprotocol/raw_data/order_data_4364122.sql index 603d653..891f4c5 100644 --- a/cowprotocol/raw_data/order_data_4364122.sql +++ b/cowprotocol/raw_data/order_data_4364122.sql @@ -31,7 +31,7 @@ past_data_ethereum as ( end as quote_gas_cost, case when cast(d.data.quote_sell_token_price as varchar) = 'NaN' then null --noqa: RF01 - else cast(d.data.quote_sell_token_price as decimal(38,0)) --noqa: RF01 + else cast(d.data.quote_sell_token_price as decimal(38, 0)) --noqa: RF01 end as quote_sell_token_price, cast(d.data.partner_fee as decimal(38, 0)) as partner_fee, --noqa: RF01 d.data.partner_fee_recipient, --noqa: RF01 From 02d705f35180d716c2070b7b55ac97f09d83ace9 Mon Sep 17 00:00:00 2001 From: harisang Date: Thu, 5 Dec 2024 17:01:43 +0200 Subject: [PATCH 3/6] type changes and move to subfolder of accounting --- .../{ => accounting}/raw_data/.sqlfluff | 0 .../raw_data/order_data_4364122.sql | 75 ++++++++++--------- 2 files changed, 38 insertions(+), 37 deletions(-) rename cowprotocol/{ => accounting}/raw_data/.sqlfluff (100%) rename cowprotocol/{ => accounting}/raw_data/order_data_4364122.sql (78%) diff --git a/cowprotocol/raw_data/.sqlfluff b/cowprotocol/accounting/raw_data/.sqlfluff similarity index 100% rename from cowprotocol/raw_data/.sqlfluff rename to cowprotocol/accounting/raw_data/.sqlfluff diff --git a/cowprotocol/raw_data/order_data_4364122.sql b/cowprotocol/accounting/raw_data/order_data_4364122.sql similarity index 78% rename from cowprotocol/raw_data/order_data_4364122.sql rename to cowprotocol/accounting/raw_data/order_data_4364122.sql index 891f4c5..7462fa6 100644 --- a/cowprotocol/raw_data/order_data_4364122.sql +++ b/cowprotocol/accounting/raw_data/order_data_4364122.sql @@ -2,20 +2,21 @@ -- for all auctions that had at least one winner. -- Parameters: -- {{blockchain}}: the chain for which we want to retrieve batch data + with past_data_ethereum as ( select s.environment, -1 as auction_id, d.block_number, - d.order_uid, - d.solver, - d.data.quote_solver, --noqa: RF01 - d.tx_hash, + from_hex(d.order_uid) as order_uid, + from_hex(d.solver) as solver, + from_hex(d.data.quote_solver) as quote_solver, --noqa: RF01 + from_hex(d.tx_hash) as tx_hash, cast(d.data.surplus_fee as decimal(38, 0)) as surplus_fee, --noqa: RF01 cast(d.data.amount as decimal(38, 0)) as amount, --noqa: RF01 cast(d.data.protocol_fee as decimal(38, 0)) as protocol_fee, --noqa: RF01 - d.data.protocol_fee_token, --noqa: RF01 + from_hex(d.data.protocol_fee_token) as protocol_fee_token, --noqa: RF01 cast(d.data.protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, --noqa: RF01 case when d.data.quote_sell_amount = 'None' then null --noqa: RF01 @@ -34,9 +35,9 @@ past_data_ethereum as ( else cast(d.data.quote_sell_token_price as decimal(38, 0)) --noqa: RF01 end as quote_sell_token_price, cast(d.data.partner_fee as decimal(38, 0)) as partner_fee, --noqa: RF01 - d.data.partner_fee_recipient, --noqa: RF01 + from_hex(d.data.partner_fee_recipient) as partner_fee_recipient, --noqa: RF01 d.data.protocol_fee_kind --noqa: RF01 - from cowswap.raw_order_rewards as d inner join cow_protocol_ethereum.solvers as s on cast(d.solver as varchar) = cast(s.address as varchar) where d.block_number < 20866925 + from cowswap.raw_order_rewards as d inner join cow_protocol_ethereum.solvers as s on from_hex(d.solver) = s.address where d.block_number < 20866925 ), past_data_gnosis as ( --noqa: ST03 @@ -45,14 +46,14 @@ past_data_gnosis as ( --noqa: ST03 s.environment, -1 as auction_id, d.block_number, - cast(d.order_uid as varchar) as order_uid, - cast(d.solver as varchar) as solver, - cast(d.quote_solver as varchar) as quote_solver, - cast(d.tx_hash as varchar) as tx_hash, + d.order_uid, + d.solver, + d.quote_solver, + d.tx_hash, cast(d.surplus_fee as decimal(38, 0)) as surplus_fee, cast(d.amount as decimal(38, 0)) as amount, cast(d.protocol_fee as decimal(38, 0)) as protocol_fee, - cast(d.protocol_fee_token as varchar) as protocol_fee_token, + d.protocol_fee_token, cast(d.protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, cast(d.quote_sell_amount as decimal(38, 0)) as quote_sell_amount, cast(d.quote_buy_amount as decimal(38, 0)) as quote_buy_amount, @@ -65,7 +66,7 @@ past_data_gnosis as ( --noqa: ST03 else cast(d.quote_sell_token_price as decimal(38, 0)) end as quote_sell_token_price, cast(d.partner_fee as decimal(38, 0)) as partner_fee, - cast(d.partner_fee_recipient as varchar) as partner_fee_recipient, + d.partner_fee_recipient, d.protocol_fee_kind from dune.cowprotocol.dataset_cowswap_gnosis_raw_order_rewards as d inner join cow_protocol_gnosis.solvers as s on cast(d.solver as varchar) = cast(s.address as varchar) ), @@ -76,14 +77,14 @@ past_data_arbitrum as ( --noqa: ST03 s.environment, -1 as auction_id, d.block_number, - cast(d.order_uid as varchar) as order_uid, - cast(d.solver as varchar) as solver, - cast(d.quote_solver as varchar) as quote_solver, - cast(d.tx_hash as varchar) as tx_hash, + d.order_uid, + d.solver, + d.quote_solver, + d.tx_hash, cast(d.surplus_fee as decimal(38, 0)) as surplus_fee, cast(d.amount as decimal(38, 0)) as amount, cast(d.protocol_fee as decimal(38, 0)) as protocol_fee, - cast(d.protocol_fee_token as varchar) as protocol_fee_token, + d.protocol_fee_token, case when d.protocol_fee_native_price = 'inf' then null else cast(d.protocol_fee_native_price as decimal(38, 0)) @@ -99,7 +100,7 @@ past_data_arbitrum as ( --noqa: ST03 else cast(d.quote_sell_token_price as decimal(38, 0)) end as quote_sell_token_price, cast(d.partner_fee as decimal(38, 0)) as partner_fee, - cast(d.partner_fee_recipient as varchar) as partner_fee_recipient, + d.partner_fee_recipient, d.protocol_fee_kind from dune.cowprotocol.dataset_cowswap_arbitrum_raw_order_rewards as d inner join cow_protocol_arbitrum.solvers as s on cast(d.solver as varchar) = cast(s.address as varchar) ) @@ -108,14 +109,14 @@ select environment, auction_id, block_number, - cast(order_uid as varchar) as order_uid, - cast(solver as varchar) as solver, - cast(quote_solver as varchar) as quote_solver, - cast(tx_hash as varchar) as tx_hash, + order_uid, + solver, + quote_solver, + tx_hash, cast(surplus_fee as decimal(38, 0)) as surplus_fee, cast(amount as decimal(38, 0)) as amount, cast(protocol_fee as decimal(38, 0)) as protocol_fee, - cast(protocol_fee_token as varchar) as protocol_fee_token, + protocol_fee_token, cast(protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, cast(quote_sell_amount as decimal(38, 0)) as quote_sell_amount, cast(quote_buy_amount as decimal(38, 0)) as quote_buy_amount, @@ -125,7 +126,7 @@ select else cast(quote_sell_token_price as decimal(38, 0)) end as quote_sell_token_price, cast(partner_fee as decimal(38, 0)) as partner_fee, - cast(partner_fee_recipient as varchar) as partner_fee_recipient, + partner_fee_recipient, protocol_fee_kind from dune.cowprotocol.dataset_order_data_{{blockchain}}_2024_10 union all @@ -133,14 +134,14 @@ select environment, auction_id, block_number, - cast(order_uid as varchar) as order_uid, - cast(solver as varchar) as solver, - cast(quote_solver as varchar) as quote_solver, - cast(tx_hash as varchar) as tx_hash, + order_uid, + solver, + quote_solver, + tx_hash, cast(surplus_fee as decimal(38, 0)) as surplus_fee, cast(amount as decimal(38, 0)) as amount, cast(protocol_fee as decimal(38, 0)) as protocol_fee, - cast(protocol_fee_token as varchar) as protocol_fee_token, + protocol_fee_token, cast(protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, cast(quote_sell_amount as decimal(38, 0)) as quote_sell_amount, cast(quote_buy_amount as decimal(38, 0)) as quote_buy_amount, @@ -150,7 +151,7 @@ select else cast(quote_sell_token_price as decimal(38, 0)) end as quote_sell_token_price, cast(partner_fee as decimal(38, 0)) as partner_fee, - cast(partner_fee_recipient as varchar) as partner_fee_recipient, + partner_fee_recipient, protocol_fee_kind from dune.cowprotocol.dataset_order_data_{{blockchain}}_2024_11 union all @@ -158,21 +159,21 @@ select environment, auction_id, block_number, - cast(order_uid as varchar) as order_uid, - cast(solver as varchar) as solver, - cast(quote_solver as varchar) as quote_solver, - cast(tx_hash as varchar) as tx_hash, + order_uid, + solver, + quote_solver, + tx_hash, cast(surplus_fee as decimal(38, 0)) as surplus_fee, cast(amount as decimal(38, 0)) as amount, cast(protocol_fee as decimal(38, 0)) as protocol_fee, - cast(protocol_fee_token as varchar) as protocol_fee_token, + protocol_fee_token, cast(protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, cast(quote_sell_amount as decimal(38, 0)) as quote_sell_amount, cast(quote_buy_amount as decimal(38, 0)) as quote_buy_amount, cast(quote_gas_cost as decimal(38, 0)) as quote_gas_cost, cast(quote_sell_token_price as decimal(38, 0)) as quote_sell_token_price, cast(partner_fee as decimal(38, 0)) as partner_fee, - cast(partner_fee_recipient as varchar) as partner_fee_recipient, + partner_fee_recipient, protocol_fee_kind from dune.cowprotocol.dataset_order_data_{{blockchain}}_2024_12 union all From 71353c7f03847b8057d0765586bd92d851a4405a Mon Sep 17 00:00:00 2001 From: harisang Date: Thu, 5 Dec 2024 17:03:12 +0200 Subject: [PATCH 4/6] minor change --- cowprotocol/accounting/raw_data/order_data_4364122.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cowprotocol/accounting/raw_data/order_data_4364122.sql b/cowprotocol/accounting/raw_data/order_data_4364122.sql index 7462fa6..2330c10 100644 --- a/cowprotocol/accounting/raw_data/order_data_4364122.sql +++ b/cowprotocol/accounting/raw_data/order_data_4364122.sql @@ -105,6 +105,9 @@ past_data_arbitrum as ( --noqa: ST03 from dune.cowprotocol.dataset_cowswap_arbitrum_raw_order_rewards as d inner join cow_protocol_arbitrum.solvers as s on cast(d.solver as varchar) = cast(s.address as varchar) ) +select * +from past_data_{{blockchain}} +union all select environment, auction_id, @@ -176,6 +179,3 @@ select partner_fee_recipient, protocol_fee_kind from dune.cowprotocol.dataset_order_data_{{blockchain}}_2024_12 -union all -select * -from past_data_{{blockchain}} From a698c765b33806480799f6db49297426b1cddcf9 Mon Sep 17 00:00:00 2001 From: harisang Date: Thu, 5 Dec 2024 17:08:37 +0200 Subject: [PATCH 5/6] add column type specification --- .../raw_data/order_data_4364122.sql | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cowprotocol/accounting/raw_data/order_data_4364122.sql b/cowprotocol/accounting/raw_data/order_data_4364122.sql index 2330c10..c97d660 100644 --- a/cowprotocol/accounting/raw_data/order_data_4364122.sql +++ b/cowprotocol/accounting/raw_data/order_data_4364122.sql @@ -3,6 +3,27 @@ -- Parameters: -- {{blockchain}}: the chain for which we want to retrieve batch data +-- The output has the following columns: +-- environment: varchar +-- auction_id: integer +-- block_number: integer +-- order_uid: varbinary +-- solver: varbinary +-- quote_solver: varbinary +-- tx_hash: varbinary +-- surplus_fee: decimal(38, 0) +-- amount: decimal(38, 0) +-- protocol_fee: decimal(38, 0) +-- protocol_fee_token: varbinary +-- protocol_fee_native_price: decimal(38, 0) +-- quote_sell_amount: decimal(38, 0) +-- quote_buy_amount: decimal(38, 0) +-- quote_gas_cost: decimal(38, 0) +-- quote_sell_token_price: decimal(38, 0) +-- partner_fee: decimal(38, 0) +-- partner_fee_recipient: varbinary +-- protocol_fee_kind: varchar + with past_data_ethereum as ( select From d0145b4fa5f0895b75a2a86d41d7c179f48bf423 Mon Sep 17 00:00:00 2001 From: harisang Date: Thu, 5 Dec 2024 17:12:40 +0200 Subject: [PATCH 6/6] remove deprecated column --- cowprotocol/accounting/raw_data/order_data_4364122.sql | 7 ------- 1 file changed, 7 deletions(-) diff --git a/cowprotocol/accounting/raw_data/order_data_4364122.sql b/cowprotocol/accounting/raw_data/order_data_4364122.sql index c97d660..7be4c9e 100644 --- a/cowprotocol/accounting/raw_data/order_data_4364122.sql +++ b/cowprotocol/accounting/raw_data/order_data_4364122.sql @@ -12,7 +12,6 @@ -- quote_solver: varbinary -- tx_hash: varbinary -- surplus_fee: decimal(38, 0) --- amount: decimal(38, 0) -- protocol_fee: decimal(38, 0) -- protocol_fee_token: varbinary -- protocol_fee_native_price: decimal(38, 0) @@ -35,7 +34,6 @@ past_data_ethereum as ( from_hex(d.data.quote_solver) as quote_solver, --noqa: RF01 from_hex(d.tx_hash) as tx_hash, cast(d.data.surplus_fee as decimal(38, 0)) as surplus_fee, --noqa: RF01 - cast(d.data.amount as decimal(38, 0)) as amount, --noqa: RF01 cast(d.data.protocol_fee as decimal(38, 0)) as protocol_fee, --noqa: RF01 from_hex(d.data.protocol_fee_token) as protocol_fee_token, --noqa: RF01 cast(d.data.protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, --noqa: RF01 @@ -72,7 +70,6 @@ past_data_gnosis as ( --noqa: ST03 d.quote_solver, d.tx_hash, cast(d.surplus_fee as decimal(38, 0)) as surplus_fee, - cast(d.amount as decimal(38, 0)) as amount, cast(d.protocol_fee as decimal(38, 0)) as protocol_fee, d.protocol_fee_token, cast(d.protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, @@ -103,7 +100,6 @@ past_data_arbitrum as ( --noqa: ST03 d.quote_solver, d.tx_hash, cast(d.surplus_fee as decimal(38, 0)) as surplus_fee, - cast(d.amount as decimal(38, 0)) as amount, cast(d.protocol_fee as decimal(38, 0)) as protocol_fee, d.protocol_fee_token, case @@ -138,7 +134,6 @@ select quote_solver, tx_hash, cast(surplus_fee as decimal(38, 0)) as surplus_fee, - cast(amount as decimal(38, 0)) as amount, cast(protocol_fee as decimal(38, 0)) as protocol_fee, protocol_fee_token, cast(protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, @@ -163,7 +158,6 @@ select quote_solver, tx_hash, cast(surplus_fee as decimal(38, 0)) as surplus_fee, - cast(amount as decimal(38, 0)) as amount, cast(protocol_fee as decimal(38, 0)) as protocol_fee, protocol_fee_token, cast(protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price, @@ -188,7 +182,6 @@ select quote_solver, tx_hash, cast(surplus_fee as decimal(38, 0)) as surplus_fee, - cast(amount as decimal(38, 0)) as amount, cast(protocol_fee as decimal(38, 0)) as protocol_fee, protocol_fee_token, cast(protocol_fee_native_price as decimal(38, 0)) as protocol_fee_native_price,