From 8d96b8b38bb74c752377bd5d4399c12ad1de2974 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 11:59:04 +0200 Subject: [PATCH 01/16] add quote info for executed orders --- src/models/order_rewards_schema.py | 4 ++++ src/sql/orderbook/order_rewards.sql | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/models/order_rewards_schema.py b/src/models/order_rewards_schema.py index 44411f4a..c3271b29 100644 --- a/src/models/order_rewards_schema.py +++ b/src/models/order_rewards_schema.py @@ -31,6 +31,10 @@ def from_pdf_to_dune_records(cls, rewards_df: DataFrame) -> list[dict[str, Any]] "protocol_fee_native_price": float( row["protocol_fee_native_price"] ), + "quote_sell_amount": str(row["quote_sell_amount"]), + "quote_buy_amount": str(row["quote_buy_amount"]), + "quote_gas_cost": float(row["quote_gas_cost"]), + "quote_sell_token_price": float(row["quote_sell_token_price"]), }, } for row in rewards_df.to_dict(orient="records") diff --git a/src/sql/orderbook/order_rewards.sql b/src/sql/orderbook/order_rewards.sql index 63d792c0..166594b3 100644 --- a/src/sql/orderbook/order_rewards.sql +++ b/src/sql/orderbook/order_rewards.sql @@ -156,11 +156,16 @@ select CASE WHEN protocol_fee_token is not NULL THEN concat('0x', encode(protocol_fee_token, 'hex')) END as protocol_fee_token, - coalesce(protocol_fee_native_price, 0.0) as protocol_fee_native_price + coalesce(protocol_fee_native_price, 0.0) as protocol_fee_native_price, + oq.sell_amount as quote_sell_amount, + oq.buy_amount as quote_buy_amount, + oq.gas_amount * oq_gas_price as quote_gas_cost, + oq.sell_token_price as quote_sell_token_price from trade_hashes left outer join order_execution o on trade_hashes.order_uid = o.order_uid and trade_hashes.auction_id = o.auction_id left outer join winning_quotes wq on trade_hashes.order_uid = wq.order_uid left outer join order_protocol_fee_prices opfp on trade_hashes.order_uid = opfp.order_uid - and trade_hashes.auction_id = opfp.auction_id; \ No newline at end of file + and trade_hashes.auction_id = opfp.auction_id + left outer join order_quotes oq on trade_hashes.order_uid = oq.order_uid \ No newline at end of file From 8b3924972542f90137ffc6209ae9dd86ee090516 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 12:23:06 +0200 Subject: [PATCH 02/16] update tests --- tests/unit/test_order_rewards_schema.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/unit/test_order_rewards_schema.py b/tests/unit/test_order_rewards_schema.py index 4ac5d358..1be17a92 100644 --- a/tests/unit/test_order_rewards_schema.py +++ b/tests/unit/test_order_rewards_schema.py @@ -19,6 +19,10 @@ def test_order_rewards_transformation(self): "protocol_fee": [1000000000000000, 123123123123123, 0], "protocol_fee_token": ["0x91", "0x92", None], "protocol_fee_native_price": [1.0, 0.1, 0.0], + "quote_sell_amount": [10000000000000000, 2000000000000000, 35000], + "quote_buy_amount": [1000, 2000, 10], + "quote_gas_cost": [5000000000000000, 6000000000000000.52, 12000000000000000.123] + "quote_sell_token_price": [1.0, 250000000, 100000000000000.0], } ) @@ -36,6 +40,10 @@ def test_order_rewards_transformation(self): "protocol_fee": "1000000000000000", "protocol_fee_token": "0x91", "protocol_fee_native_price": 1.0, + "quote_sell_amount": "10000000000000000", + "quote_buy_amount": "1000", + "quote_gas_cost": 5000000000000000, + "quote_sell_token_price": 1.0, }, }, { @@ -50,6 +58,10 @@ def test_order_rewards_transformation(self): "protocol_fee": "123123123123123", "protocol_fee_token": "0x92", "protocol_fee_native_price": 0.1, + "quote_sell_amount": "2000000000000000", + "quote_buy_amount": "2000", + "quote_gas_cost": 6000000000000000.52, + "quote_sell_token_price": 250000000, }, }, { @@ -64,6 +76,10 @@ def test_order_rewards_transformation(self): "protocol_fee": "0", "protocol_fee_token": None, "protocol_fee_native_price": 0.0, + "quote_sell_amount": "12000000000000000.123", + "quote_buy_amount": "10", + "quote_gas_cost": 12000000000000000.123, + "quote_sell_token_price": 100000000000000.0, }, }, ], From 035ba4413eb4a38e81ee64972f6663621d9a817d Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 12:27:29 +0200 Subject: [PATCH 03/16] fix typo and run black --- tests/unit/test_order_rewards_schema.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_order_rewards_schema.py b/tests/unit/test_order_rewards_schema.py index 1be17a92..8e8ac3ba 100644 --- a/tests/unit/test_order_rewards_schema.py +++ b/tests/unit/test_order_rewards_schema.py @@ -21,7 +21,11 @@ def test_order_rewards_transformation(self): "protocol_fee_native_price": [1.0, 0.1, 0.0], "quote_sell_amount": [10000000000000000, 2000000000000000, 35000], "quote_buy_amount": [1000, 2000, 10], - "quote_gas_cost": [5000000000000000, 6000000000000000.52, 12000000000000000.123] + "quote_gas_cost": [ + 5000000000000000, + 6000000000000000.52, + 12000000000000000.123, + ], "quote_sell_token_price": [1.0, 250000000, 100000000000000.0], } ) @@ -61,7 +65,7 @@ def test_order_rewards_transformation(self): "quote_sell_amount": "2000000000000000", "quote_buy_amount": "2000", "quote_gas_cost": 6000000000000000.52, - "quote_sell_token_price": 250000000, + "quote_sell_token_price": 250000000, }, }, { From c86dbe55a44398942e3b047faaa7a5723d06bc65 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 12:31:27 +0200 Subject: [PATCH 04/16] fix test --- tests/unit/test_order_rewards_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_order_rewards_schema.py b/tests/unit/test_order_rewards_schema.py index 8e8ac3ba..175ad549 100644 --- a/tests/unit/test_order_rewards_schema.py +++ b/tests/unit/test_order_rewards_schema.py @@ -80,7 +80,7 @@ def test_order_rewards_transformation(self): "protocol_fee": "0", "protocol_fee_token": None, "protocol_fee_native_price": 0.0, - "quote_sell_amount": "12000000000000000.123", + "quote_sell_amount": "35000", "quote_buy_amount": "10", "quote_gas_cost": 12000000000000000.123, "quote_sell_token_price": 100000000000000.0, From f9c43fdb2e8169405b309824a414d737a7659d5e Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 12:37:27 +0200 Subject: [PATCH 05/16] make table references more explicit --- src/sql/orderbook/order_rewards.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/orderbook/order_rewards.sql b/src/sql/orderbook/order_rewards.sql index 166594b3..4fa9bfa4 100644 --- a/src/sql/orderbook/order_rewards.sql +++ b/src/sql/orderbook/order_rewards.sql @@ -147,7 +147,7 @@ winning_quotes as ( select trade_hashes.block_number as block_number, concat('0x', encode(trade_hashes.order_uid, 'hex')) as order_uid, - concat('0x', encode(solver, 'hex')) as solver, + concat('0x', encode(trade_hashes.solver, 'hex')) as solver, quote_solver, concat('0x', encode(tx_hash, 'hex')) as tx_hash, coalesce(surplus_fee, 0) :: text as surplus_fee, From af0bce6b6cd25062ac85a9d49d75f4d915e27929 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 12:41:04 +0200 Subject: [PATCH 06/16] fix typo --- src/sql/orderbook/order_rewards.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/orderbook/order_rewards.sql b/src/sql/orderbook/order_rewards.sql index 4fa9bfa4..8dced13c 100644 --- a/src/sql/orderbook/order_rewards.sql +++ b/src/sql/orderbook/order_rewards.sql @@ -159,7 +159,7 @@ select coalesce(protocol_fee_native_price, 0.0) as protocol_fee_native_price, oq.sell_amount as quote_sell_amount, oq.buy_amount as quote_buy_amount, - oq.gas_amount * oq_gas_price as quote_gas_cost, + oq.gas_amount * oq.gas_price as quote_gas_cost, oq.sell_token_price as quote_sell_token_price from trade_hashes From fecda6516632cbe45b74c4a2756b3d9b12c3816a Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 19:20:12 +0200 Subject: [PATCH 07/16] fix tests and data type of gas cost --- src/models/order_rewards_schema.py | 2 +- tests/integration/test_fetch_orderbook.py | 36 +++++++++++++++++++++++ tests/unit/test_order_rewards_schema.py | 8 ++--- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/src/models/order_rewards_schema.py b/src/models/order_rewards_schema.py index c3271b29..a2c3c026 100644 --- a/src/models/order_rewards_schema.py +++ b/src/models/order_rewards_schema.py @@ -33,7 +33,7 @@ def from_pdf_to_dune_records(cls, rewards_df: DataFrame) -> list[dict[str, Any]] ), "quote_sell_amount": str(row["quote_sell_amount"]), "quote_buy_amount": str(row["quote_buy_amount"]), - "quote_gas_cost": float(row["quote_gas_cost"]), + "quote_gas_cost": str(int(row["quote_gas_cost"])), "quote_sell_token_price": float(row["quote_sell_token_price"]), }, } diff --git a/tests/integration/test_fetch_orderbook.py b/tests/integration/test_fetch_orderbook.py index 3598d253..694540ca 100644 --- a/tests/integration/test_fetch_orderbook.py +++ b/tests/integration/test_fetch_orderbook.py @@ -110,6 +110,42 @@ def test_get_order_rewards(self): 0.0, 0.0, ], + "quote_sell_amount": [ + "4429378850", + "184573231326057476", + "7500000000", + "192465488420922607", + "1954467549", + "856446990599561516", + "71274765128486370400", + ], + "quote_buy_amount": [ + "12009545997505395163", + "143919269475547068", + "1920099071497969074176" + "110185117837140289", + "427611951239582233762", + "1465179606977149402", + "69200861384935994787", + ], + "quote_gas_cost": [ + "28980049962721130", + "15426768673942524", + "18282786590639504", + "18696459349125884", + "18629380517476576", + "23553009400438484", + "25234871513629598", + ], + "quote_sell_token_price": [ + 410359364.5808475, + 1.0, + 408619711.8704729, + 0.538163462286757, + 409145130.1194029, + 1.0, + 1.0 + ], } ) diff --git a/tests/unit/test_order_rewards_schema.py b/tests/unit/test_order_rewards_schema.py index 175ad549..e29a1874 100644 --- a/tests/unit/test_order_rewards_schema.py +++ b/tests/unit/test_order_rewards_schema.py @@ -23,8 +23,8 @@ def test_order_rewards_transformation(self): "quote_buy_amount": [1000, 2000, 10], "quote_gas_cost": [ 5000000000000000, - 6000000000000000.52, - 12000000000000000.123, + 6000000000000000, + 12000000000000000, ], "quote_sell_token_price": [1.0, 250000000, 100000000000000.0], } @@ -64,7 +64,7 @@ def test_order_rewards_transformation(self): "protocol_fee_native_price": 0.1, "quote_sell_amount": "2000000000000000", "quote_buy_amount": "2000", - "quote_gas_cost": 6000000000000000.52, + "quote_gas_cost": 6000000000000000, "quote_sell_token_price": 250000000, }, }, @@ -82,7 +82,7 @@ def test_order_rewards_transformation(self): "protocol_fee_native_price": 0.0, "quote_sell_amount": "35000", "quote_buy_amount": "10", - "quote_gas_cost": 12000000000000000.123, + "quote_gas_cost": 12000000000000000, "quote_sell_token_price": 100000000000000.0, }, }, From 33a025b1e6f86d0afefd2fafb2db6acfd2067f16 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 19:20:35 +0200 Subject: [PATCH 08/16] black fix --- tests/integration/test_fetch_orderbook.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/integration/test_fetch_orderbook.py b/tests/integration/test_fetch_orderbook.py index 694540ca..e215b0f3 100644 --- a/tests/integration/test_fetch_orderbook.py +++ b/tests/integration/test_fetch_orderbook.py @@ -122,8 +122,7 @@ def test_get_order_rewards(self): "quote_buy_amount": [ "12009545997505395163", "143919269475547068", - "1920099071497969074176" - "110185117837140289", + "1920099071497969074176" "110185117837140289", "427611951239582233762", "1465179606977149402", "69200861384935994787", @@ -144,7 +143,7 @@ def test_get_order_rewards(self): 0.538163462286757, 409145130.1194029, 1.0, - 1.0 + 1.0, ], } ) From f0c04ff16f442347db09abde4e9e6223b9225368 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 19:26:02 +0200 Subject: [PATCH 09/16] fix test --- tests/unit/test_order_rewards_schema.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/test_order_rewards_schema.py b/tests/unit/test_order_rewards_schema.py index e29a1874..978b3431 100644 --- a/tests/unit/test_order_rewards_schema.py +++ b/tests/unit/test_order_rewards_schema.py @@ -46,7 +46,7 @@ def test_order_rewards_transformation(self): "protocol_fee_native_price": 1.0, "quote_sell_amount": "10000000000000000", "quote_buy_amount": "1000", - "quote_gas_cost": 5000000000000000, + "quote_gas_cost": "5000000000000000", "quote_sell_token_price": 1.0, }, }, @@ -64,7 +64,7 @@ def test_order_rewards_transformation(self): "protocol_fee_native_price": 0.1, "quote_sell_amount": "2000000000000000", "quote_buy_amount": "2000", - "quote_gas_cost": 6000000000000000, + "quote_gas_cost": "6000000000000000", "quote_sell_token_price": 250000000, }, }, @@ -82,7 +82,7 @@ def test_order_rewards_transformation(self): "protocol_fee_native_price": 0.0, "quote_sell_amount": "35000", "quote_buy_amount": "10", - "quote_gas_cost": 12000000000000000, + "quote_gas_cost": "12000000000000000", "quote_sell_token_price": 100000000000000.0, }, }, From c02ee18e00df685974858eaf1bdf6d8b2ed51b47 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 19:28:47 +0200 Subject: [PATCH 10/16] add missing comma --- tests/integration/test_fetch_orderbook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/test_fetch_orderbook.py b/tests/integration/test_fetch_orderbook.py index e215b0f3..8e6463bd 100644 --- a/tests/integration/test_fetch_orderbook.py +++ b/tests/integration/test_fetch_orderbook.py @@ -122,7 +122,8 @@ def test_get_order_rewards(self): "quote_buy_amount": [ "12009545997505395163", "143919269475547068", - "1920099071497969074176" "110185117837140289", + "1920099071497969074176", + "110185117837140289", "427611951239582233762", "1465179606977149402", "69200861384935994787", From cacc290914caa83fb3988923dfad2c4fb2ec2f20 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 19:34:22 +0200 Subject: [PATCH 11/16] add sql data casting --- src/sql/orderbook/order_rewards.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/orderbook/order_rewards.sql b/src/sql/orderbook/order_rewards.sql index 8dced13c..32fa94a7 100644 --- a/src/sql/orderbook/order_rewards.sql +++ b/src/sql/orderbook/order_rewards.sql @@ -157,9 +157,9 @@ select WHEN protocol_fee_token is not NULL THEN concat('0x', encode(protocol_fee_token, 'hex')) END as protocol_fee_token, coalesce(protocol_fee_native_price, 0.0) as protocol_fee_native_price, - oq.sell_amount as quote_sell_amount, - oq.buy_amount as quote_buy_amount, - oq.gas_amount * oq.gas_price as quote_gas_cost, + cast(oq.sell_amount as numeric(78, 0)) as quote_sell_amount, + cast(oq.buy_amount numeric(78, 0)) as quote_buy_amount, + cast(oq.gas_amount * oq.gas_price as numeric(78, 0)) as quote_gas_cost, oq.sell_token_price as quote_sell_token_price from trade_hashes From aefcabe3017b8f4654b6d5da83d4de9ece2e9c7a Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 19:36:59 +0200 Subject: [PATCH 12/16] fix typo --- src/sql/orderbook/order_rewards.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/orderbook/order_rewards.sql b/src/sql/orderbook/order_rewards.sql index 32fa94a7..5d2f3d7d 100644 --- a/src/sql/orderbook/order_rewards.sql +++ b/src/sql/orderbook/order_rewards.sql @@ -158,7 +158,7 @@ select END as protocol_fee_token, coalesce(protocol_fee_native_price, 0.0) as protocol_fee_native_price, cast(oq.sell_amount as numeric(78, 0)) as quote_sell_amount, - cast(oq.buy_amount numeric(78, 0)) as quote_buy_amount, + cast(oq.buy_amount as numeric(78, 0)) as quote_buy_amount, cast(oq.gas_amount * oq.gas_price as numeric(78, 0)) as quote_gas_cost, oq.sell_token_price as quote_sell_token_price from From 443c8e92f13dcd8d48c728cd6982a20a9021fbb9 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 19:40:43 +0200 Subject: [PATCH 13/16] fix data cast --- src/sql/orderbook/order_rewards.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/orderbook/order_rewards.sql b/src/sql/orderbook/order_rewards.sql index 5d2f3d7d..15220ad5 100644 --- a/src/sql/orderbook/order_rewards.sql +++ b/src/sql/orderbook/order_rewards.sql @@ -157,9 +157,9 @@ select WHEN protocol_fee_token is not NULL THEN concat('0x', encode(protocol_fee_token, 'hex')) END as protocol_fee_token, coalesce(protocol_fee_native_price, 0.0) as protocol_fee_native_price, - cast(oq.sell_amount as numeric(78, 0)) as quote_sell_amount, - cast(oq.buy_amount as numeric(78, 0)) as quote_buy_amount, - cast(oq.gas_amount * oq.gas_price as numeric(78, 0)) as quote_gas_cost, + cast(oq.sell_amount as numeric(78, 0)) :: text as quote_sell_amount, + cast(oq.buy_amount as numeric(78, 0)) :: text as quote_buy_amount, + cast(oq.gas_amount * oq.gas_price as numeric(78, 0)) :: text as quote_gas_cost, oq.sell_token_price as quote_sell_token_price from trade_hashes From babb2bedfdecc317888ed306b0e33b63e82d0184 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 20:22:30 +0200 Subject: [PATCH 14/16] convert gas cost to float --- src/models/order_rewards_schema.py | 2 +- src/sql/orderbook/order_rewards.sql | 2 +- tests/unit/test_order_rewards_schema.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/models/order_rewards_schema.py b/src/models/order_rewards_schema.py index a2c3c026..c3271b29 100644 --- a/src/models/order_rewards_schema.py +++ b/src/models/order_rewards_schema.py @@ -33,7 +33,7 @@ def from_pdf_to_dune_records(cls, rewards_df: DataFrame) -> list[dict[str, Any]] ), "quote_sell_amount": str(row["quote_sell_amount"]), "quote_buy_amount": str(row["quote_buy_amount"]), - "quote_gas_cost": str(int(row["quote_gas_cost"])), + "quote_gas_cost": float(row["quote_gas_cost"]), "quote_sell_token_price": float(row["quote_sell_token_price"]), }, } diff --git a/src/sql/orderbook/order_rewards.sql b/src/sql/orderbook/order_rewards.sql index 15220ad5..967e85a4 100644 --- a/src/sql/orderbook/order_rewards.sql +++ b/src/sql/orderbook/order_rewards.sql @@ -159,7 +159,7 @@ select coalesce(protocol_fee_native_price, 0.0) as protocol_fee_native_price, cast(oq.sell_amount as numeric(78, 0)) :: text as quote_sell_amount, cast(oq.buy_amount as numeric(78, 0)) :: text as quote_buy_amount, - cast(oq.gas_amount * oq.gas_price as numeric(78, 0)) :: text as quote_gas_cost, + oq.gas_amount * oq.gas_price as quote_gas_cost, oq.sell_token_price as quote_sell_token_price from trade_hashes diff --git a/tests/unit/test_order_rewards_schema.py b/tests/unit/test_order_rewards_schema.py index 978b3431..667351be 100644 --- a/tests/unit/test_order_rewards_schema.py +++ b/tests/unit/test_order_rewards_schema.py @@ -22,7 +22,7 @@ def test_order_rewards_transformation(self): "quote_sell_amount": [10000000000000000, 2000000000000000, 35000], "quote_buy_amount": [1000, 2000, 10], "quote_gas_cost": [ - 5000000000000000, + 5000000000000000.15, 6000000000000000, 12000000000000000, ], @@ -46,7 +46,7 @@ def test_order_rewards_transformation(self): "protocol_fee_native_price": 1.0, "quote_sell_amount": "10000000000000000", "quote_buy_amount": "1000", - "quote_gas_cost": "5000000000000000", + "quote_gas_cost": 5000000000000000.15, "quote_sell_token_price": 1.0, }, }, @@ -64,7 +64,7 @@ def test_order_rewards_transformation(self): "protocol_fee_native_price": 0.1, "quote_sell_amount": "2000000000000000", "quote_buy_amount": "2000", - "quote_gas_cost": "6000000000000000", + "quote_gas_cost": 6000000000000000, "quote_sell_token_price": 250000000, }, }, @@ -82,7 +82,7 @@ def test_order_rewards_transformation(self): "protocol_fee_native_price": 0.0, "quote_sell_amount": "35000", "quote_buy_amount": "10", - "quote_gas_cost": "12000000000000000", + "quote_gas_cost": 12000000000000000, "quote_sell_token_price": 100000000000000.0, }, }, From 75967cf28b7897294869aba6af9fede604f6aa56 Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 20:25:55 +0200 Subject: [PATCH 15/16] change string to float in test --- tests/integration/test_fetch_orderbook.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/integration/test_fetch_orderbook.py b/tests/integration/test_fetch_orderbook.py index 8e6463bd..272e2b35 100644 --- a/tests/integration/test_fetch_orderbook.py +++ b/tests/integration/test_fetch_orderbook.py @@ -129,13 +129,13 @@ def test_get_order_rewards(self): "69200861384935994787", ], "quote_gas_cost": [ - "28980049962721130", - "15426768673942524", - "18282786590639504", - "18696459349125884", - "18629380517476576", - "23553009400438484", - "25234871513629598", + 28980049962721130, + 15426768673942524, + 18282786590639504, + 18696459349125884, + 18629380517476576, + 23553009400438484, + 25234871513629598, ], "quote_sell_token_price": [ 410359364.5808475, From 08429d3e580babdca2239c590d6a4e8dfb4ab92b Mon Sep 17 00:00:00 2001 From: harisang Date: Mon, 12 Feb 2024 20:29:22 +0200 Subject: [PATCH 16/16] make floats explicit --- tests/integration/test_fetch_orderbook.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/integration/test_fetch_orderbook.py b/tests/integration/test_fetch_orderbook.py index 272e2b35..de58d9ed 100644 --- a/tests/integration/test_fetch_orderbook.py +++ b/tests/integration/test_fetch_orderbook.py @@ -129,13 +129,13 @@ def test_get_order_rewards(self): "69200861384935994787", ], "quote_gas_cost": [ - 28980049962721130, - 15426768673942524, - 18282786590639504, - 18696459349125884, - 18629380517476576, - 23553009400438484, - 25234871513629598, + 28980049962721130.0, + 15426768673942524.0, + 18282786590639504.0, + 18696459349125884.0, + 18629380517476576.0, + 23553009400438484.0, + 25234871513629598.0, ], "quote_sell_token_price": [ 410359364.5808475,