Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on objects processor #311

Merged
merged 1 commit into from
Mar 8, 2024
Merged

Conversation

rtso
Copy link
Collaborator

@rtso rtso commented Mar 7, 2024

Description

To improve dev ex, we remove the dependency of token v2 / fungible asset processor on objects processor.

In fungible_asset_metadata, introduce a column is_token_v2. Fungible asset processor will lookup is_token_v2 to skip indexing fungible tokens.

Token v2 processor will lookup current_token_datas_v2.is_fungible_v2 to index the fungible token.

Test

Fungible token with metadata in same txn. https://explorer.aptoslabs.com/txn/351790067/userTxnOverview?network=mainnet
See that the fungible token is indexed in the tokens table and not the fungible balances table.
Screenshot 2024-03-07 at 6 46 06 PM

Normal fungible asset indexing still works
Screenshot 2024-03-07 at 7 02 18 PM

Normal token indexing still works
Screenshot 2024-03-07 at 7 04 08 PM

Objects indexing still works
Screenshot 2024-03-07 at 7 12 49 PM
Screenshot 2024-03-07 at 7 12 45 PM

@rtso rtso requested review from bowenyang007 and a team March 7, 2024 23:18
@rtso rtso force-pushed the rtso/remove-objects-dependency branch from a7b80d4 to b47c7fe Compare March 8, 2024 00:09
Comment on lines +4 to +9
ALTER TABLE objects
DROP COLUMN IF EXISTS is_fungible_asset,
DROP COLUMN IF EXISTS is_token;
ALTER TABLE current_objects
DROP COLUMN IF EXISTS is_fungible_asset,
DROP COLUMN IF EXISTS is_token;
Copy link
Collaborator

@bowenyang007 bowenyang007 Mar 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to remove these? Maybe we keep them?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to you tho.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk when someone would ever use this. they can just look at the fungible and token tables. and this is gonna change once we have a fungible token standard.

@rtso rtso merged commit 3bd0c04 into main Mar 8, 2024
7 checks passed
@rtso rtso deleted the rtso/remove-objects-dependency branch March 8, 2024 17:14
rtso added a commit that referenced this pull request Mar 8, 2024
rtso added a commit that referenced this pull request Mar 8, 2024
rtso added a commit that referenced this pull request Mar 8, 2024
* Dedupe token burns (#305)

* Remove dependency on objects processor (#311)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants