-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* nit * define all tables * fix migration * only have 2 tables * done with marketplace db schema * storer wip * save * time to test non tradeport indexer * nit * tradeport wip * skip tls validation * Update .gitignore * nit * fix event struct * log * fix * nit * dedup order placed events * debug * Update ask_filled_event_storer.rs * debug * debug * Update ask_filled_event_storer.rs * debug * log * refactor wip * use default vaule when not writing to db * fmt * fix default value * wip * added all tradeport events * parse tradeport * nit * nit
- Loading branch information
Showing
98 changed files
with
4,310 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 0 additions & 54 deletions
54
indexer/src/db_migrations/contract_upgrade_indexer/contract_upgrade_schema.rs
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
...ns/contract_upgrade_indexer/migrations/2024-07-18-194547_create-processor-status/down.sql
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
...db_migrations/contract_upgrade_indexer/migrations/2024-08-01-224558_ledger-infos/down.sql
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
...c/db_migrations/contract_upgrade_indexer/migrations/2024-08-01-224558_ledger-infos/up.sql
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
indexer/src/db_migrations/migrations/2024-07-18-194547_create-processor-status/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql`d | ||
DROP TABLE IF EXISTS processor_status; |
2 changes: 1 addition & 1 deletion
2
...-18-194547_create-processor-status/up.sql → ...-18-194547_create-processor-status/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...s/2024-07-18-202400_test-migration/up.sql → ...s/2024-07-18-202400_test-migration/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
-- Your SQL goes here | ||
ALTER TABLE IF EXISTS contract_upgrade_processor_status | ||
ALTER TABLE IF EXISTS processor_status | ||
ALTER COLUMN last_updated | ||
SET DEFAULT NOW (); |
2 changes: 2 additions & 0 deletions
2
indexer/src/db_migrations/migrations/2024-08-01-224558_ledger-infos/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP TABLE IF EXISTS ledger_infos; |
3 changes: 3 additions & 0 deletions
3
indexer/src/db_migrations/migrations/2024-08-01-224558_ledger-infos/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-- Your SQL goes here | ||
CREATE TABLE | ||
ledger_infos (chain_id BIGINT UNIQUE PRIMARY KEY NOT NULL); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions
2
indexer/src/db_migrations/migrations/2024-12-03-235031_add-nft-asks-table/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- This file should undo anything in `up.sql`d | ||
DROP TABLE IF EXISTS nft_asks; |
47 changes: 47 additions & 0 deletions
47
indexer/src/db_migrations/migrations/2024-12-03-235031_add-nft-asks-table/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
-- This table is backfill safe, i.e. you can re-index without dropping the table | ||
CREATE TABLE | ||
nft_asks ( | ||
ask_obj_addr VARCHAR(300) PRIMARY KEY, | ||
-- For v1 NFTs, this is property_version, for v2 NFTs, this is nft_addr | ||
nft_id VARCHAR(300) NOT NULL, | ||
nft_name VARCHAR(300) NOT NULL, | ||
-- For v2 NFTs, we use collection_addr to identify the collection | ||
collection_addr VARCHAR(300) NOT NULL, | ||
-- For v1 NFTs, we use creator_addr + name to identify the collection | ||
collection_creator_addr VARCHAR(300) NOT NULL, | ||
collection_name VARCHAR(300) NOT NULL, | ||
-- 1 is token v1, 2 is token v2 | ||
nft_standard INT NOT NULL, | ||
marketplace_addr VARCHAR(300) NOT NULL, | ||
-- empty str when it's not filled | ||
buyer_addr VARCHAR(300) NOT NULL, | ||
seller_addr VARCHAR(300) NOT NULL, | ||
-- price in on-chain unit, for APT it's oct | ||
price BIGINT NOT NULL, | ||
-- in on-chain unit, for APT it's oct | ||
royalties BIGINT NOT NULL, | ||
-- in on-chain unit, for APT it's oct | ||
commission BIGINT NOT NULL, | ||
-- for coin APT, this is 0x1::aptos_coin::AptosCoin | ||
-- for fa APT, this is 0xa | ||
payment_token VARCHAR(300) NOT NULL, | ||
-- 1 is coin, 2 is fa | ||
payment_token_type INT NOT NULL, | ||
order_placed_timestamp BIGINT NOT NULL, | ||
order_placed_tx_version BIGINT NOT NULL, | ||
order_placed_event_idx BIGINT NOT NULL, | ||
order_filled_timestamp BIGINT NOT NULL, | ||
order_filled_tx_version BIGINT NOT NULL, | ||
order_filled_event_idx BIGINT NOT NULL, | ||
order_cancelled_timestamp BIGINT NOT NULL, | ||
order_cancelled_tx_version BIGINT NOT NULL, | ||
order_cancelled_event_idx BIGINT NOT NULL, | ||
-- 1 is active, 2 is filled, 3 is cancelled | ||
order_status INT NOT NULL, | ||
-- 1 is fixed price, 2 is auction | ||
order_type INT NOT NULL, | ||
CHECK (nft_standard IN (1, 2)), | ||
CHECK (payment_token_type IN (1, 2)), | ||
CHECK (order_status IN (1, 2, 3)), | ||
CHECK (order_type IN (1, 2)) | ||
); |
16 changes: 16 additions & 0 deletions
16
indexer/src/db_migrations/migrations/2024-12-10-014414_add-index-to-nft-asks-table/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- This file should undo anything in `up.sql` | ||
DROP INDEX idx_nft_asks_nft_id; | ||
|
||
DROP INDEX idx_nft_asks_nft_name; | ||
|
||
DROP INDEX idx_nft_asks_collection_addr; | ||
|
||
DROP INDEX idx_nft_asks_collection_creator_addr; | ||
|
||
DROP INDEX idx_nft_asks_collection_name; | ||
|
||
DROP INDEX idx_nft_asks_buyer_addr; | ||
|
||
DROP INDEX idx_nft_asks_seller_addr; | ||
|
||
DROP INDEX idx_nft_asks_marketplace_addr; |
Oops, something went wrong.