From fed651a7165659e4e4e35a9b945c4ce422ddc0f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hildebert=20Mouli=C3=A9?= <h.moulie@gmail.com>
Date: Wed, 26 Oct 2022 14:46:52 +0200
Subject: [PATCH 1/3] fixed archipelago accepted offers

---
 models/archipelago/ethereum/archipelago_ethereum_events.sql | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/models/archipelago/ethereum/archipelago_ethereum_events.sql b/models/archipelago/ethereum/archipelago_ethereum_events.sql
index 0f0639b3d23..928b291f0d6 100644
--- a/models/archipelago/ethereum/archipelago_ethereum_events.sql
+++ b/models/archipelago/ethereum/archipelago_ethereum_events.sql
@@ -202,7 +202,7 @@ SELECT
     , token_standard
     , 1 as number_of_items
     , 'Single Item Trade' as trade_type
-    , case when tx_from = seller then 'Sell' else 'Buy' end as trade_category
+    , case when tx_from = seller then 'Offer Accepted' else 'Buy' end as trade_category
     , 'Trade' as evt_type
     , seller
     , buyer

From a94c7f403acd59a57e9bbc44993cc8f401b9be27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hildebert=20Mouli=C3=A9?= <h.moulie@gmail.com>
Date: Wed, 26 Oct 2022 14:49:03 +0200
Subject: [PATCH 2/3] fixed for element too

---
 models/element/avalanche_c/element_avalanche_c_events.sql | 4 ++--
 models/element/bnb/element_bnb_events.sql                 | 4 ++--
 models/element/ethereum/element_ethereum_events.sql       | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/models/element/avalanche_c/element_avalanche_c_events.sql b/models/element/avalanche_c/element_avalanche_c_events.sql
index 6d7c5eee2b9..33b281ce1f9 100644
--- a/models/element/avalanche_c/element_avalanche_c_events.sql
+++ b/models/element/avalanche_c/element_avalanche_c_events.sql
@@ -19,7 +19,7 @@ WITH element_txs AS (
         , 'erc721' AS token_standard
         , 'Single Item Trade' AS trade_type
         , 1 AS number_of_items
-        , 'Sell' AS trade_category
+        , 'Offer Accepted' AS trade_category
         , ee.maker AS seller
         , ee.taker AS buyer
         , ee.erc20TokenAmount AS amount_raw
@@ -73,7 +73,7 @@ WITH element_txs AS (
         , 'erc1155' AS token_standard
         , 'Single Item Trade' AS trade_type
         , 1 AS number_of_items
-        , 'Sell' AS trade_category
+        , 'Offer Accepted' AS trade_category
         , ee.maker AS seller
         , ee.taker AS buyer
         , ee.erc20FillAmount AS amount_raw
diff --git a/models/element/bnb/element_bnb_events.sql b/models/element/bnb/element_bnb_events.sql
index d591e216fbf..c08c2e82d39 100644
--- a/models/element/bnb/element_bnb_events.sql
+++ b/models/element/bnb/element_bnb_events.sql
@@ -19,7 +19,7 @@ WITH element_txs AS (
         , 'erc721' AS token_standard
         , 'Single Item Trade' AS trade_type
         , 1 AS number_of_items
-        , 'Sell' AS trade_category
+        , 'Offer Accepted' AS trade_category
         , ee.maker AS seller
         , ee.taker AS buyer
         , ee.erc20TokenAmount AS amount_raw
@@ -73,7 +73,7 @@ WITH element_txs AS (
         , 'erc1155' AS token_standard
         , 'Single Item Trade' AS trade_type
         , 1 AS number_of_items
-        , 'Sell' AS trade_category
+        , 'Offer Accepted' AS trade_category
         , ee.maker AS seller
         , ee.taker AS buyer
         , ee.erc20FillAmount AS amount_raw
diff --git a/models/element/ethereum/element_ethereum_events.sql b/models/element/ethereum/element_ethereum_events.sql
index 5a13c3e05d6..7bb0fa73238 100644
--- a/models/element/ethereum/element_ethereum_events.sql
+++ b/models/element/ethereum/element_ethereum_events.sql
@@ -19,7 +19,7 @@ WITH element_txs AS (
         , 'erc721' AS token_standard
         , 'Single Item Trade' AS trade_type
         , 1 AS number_of_items
-        , 'Sell' AS trade_category
+        , 'Offer Accepted' AS trade_category
         , ee.maker AS seller
         , ee.taker AS buyer
         , ee.erc20TokenAmount AS amount_raw
@@ -73,7 +73,7 @@ WITH element_txs AS (
         , 'erc1155' AS token_standard
         , 'Single Item Trade' AS trade_type
         , 1 AS number_of_items
-        , 'Sell' AS trade_category
+        , 'Offer Accepted' AS trade_category
         , ee.maker AS seller
         , ee.taker AS buyer
         , ee.erc20FillAmount AS amount_raw

From b05128fc396e7ae465cea27e07c830fff515609f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hildebert=20Mouli=C3=A9?= <h.moulie@gmail.com>
Date: Wed, 26 Oct 2022 14:53:55 +0200
Subject: [PATCH 3/3] added seaport and zora

---
 .../seaport_ethereum_view_transactions.sql     | 18 +++++++++---------
 models/zora/ethereum/zora_ethereum_events.sql  |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/models/seaport/ethereum/seaport_ethereum_view_transactions.sql b/models/seaport/ethereum/seaport_ethereum_view_transactions.sql
index bc09bbe197b..4f6514e9c0b 100644
--- a/models/seaport/ethereum/seaport_ethereum_view_transactions.sql
+++ b/models/seaport/ethereum/seaport_ethereum_view_transactions.sql
@@ -246,23 +246,23 @@ with iv_availadv as (
           ,a.fee_amount / power(10, e2.decimals) as fee_amount
           ,a.fee_amount / power(10, e2.decimals) * p2.price as fee_usd_amount
           ,a.zone as zone_address
-          ,case when spc1.call_tx_hash is not null then 'Auction'
-                when spc2.call_tx_hash is not null and spc2.parameters:basicOrderType::integer between 16 and 23 then 'Auction'
+          ,case when spc1.call_tx_hash is not null then 'Auction Settled'
+                when spc2.call_tx_hash is not null and spc2.parameters:basicOrderType::integer between 16 and 23 then 'Auction Settled'
                 when spc2.call_tx_hash is not null and spc2.parameters:basicOrderType::integer between 0 and 7 then 'Buy'
                 when spc2.call_tx_hash is not null then 'Buy'
-                when spc3.call_tx_hash is not null and spc3.advancedOrder:parameters:consideration[0]:identifierOrCriteria > '0' then 'Trait Offer'
-                when spc3.call_tx_hash is not null then 'Collection Offer'
-                else 'Private Sales'
+                when spc3.call_tx_hash is not null and spc3.advancedOrder:parameters:consideration[0]:identifierOrCriteria > '0' then 'Trait Offer Accepted'
+                when spc3.call_tx_hash is not null then 'Collection Offer Accepted'
+                else 'Private Sale'
            end as category          
-          ,case when spc1.call_tx_hash is not null then 'Collection/Trait Offers' -- include English Auction and Dutch Auction
+          ,case when spc1.call_tx_hash is not null then 'Collection/Trait Offer Accepted' -- include English Auction and Dutch Auction
                 when spc2.call_tx_hash is not null and spc2.parameters:basicOrderType::integer between 0 and 15 then 'Buy' -- Buy it directly
-                when spc2.call_tx_hash is not null and spc2.parameters:basicOrderType::integer between 16 and 23 and spc2.parameters:considerationIdentifier = a.nft_token_id then 'Individual Offer'
+                when spc2.call_tx_hash is not null and spc2.parameters:basicOrderType::integer between 16 and 23 and spc2.parameters:considerationIdentifier = a.nft_token_id then 'Individual Offer Accepted'
                 when spc2.call_tx_hash is not null then 'Buy'
                 when spc3.call_tx_hash is not null and a.original_currency_contract = '0x0000000000000000000000000000000000000000' then 'Buy'
-                when spc3.call_tx_hash is not null then 'Collection/Trait Offers' -- offer for collection
+                when spc3.call_tx_hash is not null then 'Collection/Trait Offer Accepted' -- offer for collection
                 when spc4.call_tx_hash is not null then 'Bulk Purchase' -- bundles of NFTs are purchased through aggregators or in a cart 
                 when spc5.call_tx_hash is not null then 'Bulk Purchase' -- bundles of NFTs are purchased through aggregators or in a cart 
-                when spc6.call_tx_hash is not null then 'Private Sales' -- sales for designated address
+                when spc6.call_tx_hash is not null then 'Private Sale' -- sales for designated address
                 else 'Buy'
            end as order_type  
 
diff --git a/models/zora/ethereum/zora_ethereum_events.sql b/models/zora/ethereum/zora_ethereum_events.sql
index e0ac02b472e..73dd63c41ea 100644
--- a/models/zora/ethereum/zora_ethereum_events.sql
+++ b/models/zora/ethereum/zora_ethereum_events.sql
@@ -109,7 +109,7 @@ WITH zora_trades AS (
     , z3_ape_af.evt_block_time AS block_time
     , z3_ape_af.evt_block_number AS block_number
     , z3_ape_af.tokenId AS token_id
-    , 'Private Buy' AS trade_category
+    , 'Private Sale' AS trade_category
     , get_json_object(z3_ape_af.ask, '$.seller') AS seller
     , get_json_object(z3_ape_af.ask, '$.buyer') AS buyer
     , get_json_object(z3_ape_af.ask, '$.price') AS amount_raw