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

[TS SDK] Add query to fetch all collections that an account has tokens for #8498

Merged
merged 4 commits into from
Jun 6, 2023

Conversation

0xmaayan
Copy link
Contributor

@0xmaayan 0xmaayan commented Jun 2, 2023

Description

Add query to fetch all collections that an account has tokens for. supports v1 and/or v2 standards

Test Plan

Copy link
Contributor

@gregnazario gregnazario left a comment

Choose a reason for hiding this comment

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

It looks fine to me. Could you get @rtso or @bowenyang007 to review the query?

@@ -235,6 +235,11 @@ describe("Indexer", () => {
expect(tokens.current_token_ownerships_v2).toHaveLength(2);
});

it("gets account current tokens from a specified token standrd", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

standard :)

@0xmaayan 0xmaayan requested a review from rtso June 6, 2023 17:10
Copy link
Contributor

@banool banool left a comment

Choose a reason for hiding this comment

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

Query looks correct to me but yeah best to get an indexer expert to double check.

tokenStandard?: TokenStandard;
options?: PaginationArgs;
},
): Promise<GetCollectionsWithOwnedTokensQuery> {
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment about what this returns and the return type here don't match, could you update that?

Copy link
Contributor

@rtso rtso left a comment

Choose a reason for hiding this comment

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

Query looks good to me.

@0xmaayan 0xmaayan enabled auto-merge (squash) June 6, 2023 19:26
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

✅ Forge suite compat success on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 7a446d6e37784a9ed97746483ed5730a3de06e54

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 7a446d6e37784a9ed97746483ed5730a3de06e54 (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 10206 TPS, 3674 ms latency, 5900 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: 7a446d6e37784a9ed97746483ed5730a3de06e54
compatibility::simple-validator-upgrade::single-validator-upgrade : 5948 TPS, 6700 ms latency, 9200 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: 7a446d6e37784a9ed97746483ed5730a3de06e54
compatibility::simple-validator-upgrade::half-validator-upgrade : 5738 TPS, 6899 ms latency, 9300 ms p99 latency,no expired txns
4. upgrading second batch to new version: 7a446d6e37784a9ed97746483ed5730a3de06e54
compatibility::simple-validator-upgrade::rest-validator-upgrade : 8093 TPS, 4686 ms latency, 8800 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 7a446d6e37784a9ed97746483ed5730a3de06e54 passed
Test Ok

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

✅ Forge suite land_blocking success on 7a446d6e37784a9ed97746483ed5730a3de06e54

performance benchmark : 5470 TPS, 7220 ms latency, 27100 ms p99 latency,(!) expired 879 out of 2336720 txns
Test Ok

@github-actions
Copy link
Contributor

github-actions bot commented Jun 6, 2023

✅ Forge suite framework_upgrade success on aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 7a446d6e37784a9ed97746483ed5730a3de06e54

Compatibility test results for aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 7a446d6e37784a9ed97746483ed5730a3de06e54 (PR)
Upgrade the nodes to version: 7a446d6e37784a9ed97746483ed5730a3de06e54
framework_upgrade::framework-upgrade::full-framework-upgrade : 5758 TPS, 7077 ms latency, 14500 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 7a446d6e37784a9ed97746483ed5730a3de06e54 passed
Test Ok

@0xmaayan 0xmaayan merged commit f4ef764 into main Jun 6, 2023
@0xmaayan 0xmaayan deleted the tokenv2_queries branch June 6, 2023 20:08
banool pushed a commit that referenced this pull request Jul 7, 2023
…s for (#8498)

* add query to get all collections that an account has tokens for

* use token standard param in query condition

* update changelog

* address feedback
gedigi pushed a commit that referenced this pull request Aug 2, 2023
…s for (#8498)

* add query to get all collections that an account has tokens for

* use token standard param in query condition

* update changelog

* address feedback
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.

4 participants