Skip to content

Filter Token Accounts by Account Type#1611

Merged
stefangutica merged 9 commits into
developmentfrom
filter-token-accounts-by-address-type
Jul 6, 2026
Merged

Filter Token Accounts by Account Type#1611
stefangutica merged 9 commits into
developmentfrom
filter-token-accounts-by-address-type

Conversation

@stefangutica

Copy link
Copy Markdown
Collaborator

Reasoning

  • token holders accounts endpoint returned all holders, normal wallets holders + smart contracts holders

Proposed Changes

  • add filtering option depending on account type

How to test

  • when filtering by an account type, only that specific account type should be returned as a response

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

k6 load testing comparison.
Base Commit Hash: 370d50f
Target Commit Hash: c3acf15

Metric Base Target Diff
AvgMax9095AvgMax9095AvgMax9095
Blocks38.50581.1149.3252.0246.96479.7355.9758.80+21.98% 🔴-17.45% ✅+13.49% 🔴+13.03% 🔴
Nodes55.3614139.3554.5872.4042.57617.0955.4957.84-23.10% ✅-95.64% ✅+1.66% 🔴-20.11% ✅
Pool34.76214.9047.9851.6242.48584.6255.3857.88+22.23% 🔴+172.04% 🔴+15.44% 🔴+12.12% 🔴
Accounts39.45865.9150.1052.9443.98871.5355.5458.02+11.47% 🔴+0.65% 🔴+10.86% 🔴+9.59% 🔴
Mex34.82272.3547.8851.6142.28330.2355.4458.00+21.44% 🔴+21.25% 🔴+15.80% 🔴+12.38% 🔴
Transactions58.6713613.0551.3253.4147.91683.9056.2359.48-18.34% ✅-94.98% ✅+9.55% 🔴+11.35% 🔴
Tokens34.72200.0848.0051.8542.29311.5155.4657.98+21.79% 🔴+55.69% 🔴+15.54% 🔴+11.82% 🔴
Test Run Duration60001.6660004.35

Legend: Avg - Average Response Time, Max - Maximum Response Time, 90 - 90th Percentile, 95 - 95th Percentile
All times are in milliseconds.

.withCondition(QueryConditionOptions.must, [QueryType.Match("token", identifier, QueryOperator.AND)]);


const contractAddressPrefix = 'erd1' + 'q'.repeat(12);;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Extract this logic into a helper function. Same code used in the getTokenAccounts method

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

stray double semicolon and double blank line. const contractAddressPrefix = 'erd1' + 'q'.repeat(12);; has a trailing ;;, and lines 145-146 are two consecutive blank lines

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added

.withCondition(QueryConditionOptions.must, [QueryType.Match("token", identifier, QueryOperator.AND)]);


const contractAddressPrefix = 'erd1' + 'q'.repeat(12);;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

stray double semicolon and double blank line. const contractAddressPrefix = 'erd1' + 'q'.repeat(12);; has a trailing ;;, and lines 145-146 are two consecutive blank lines

@stefangutica stefangutica merged commit 496e7e9 into development Jul 6, 2026
6 of 11 checks passed
@stefangutica stefangutica deleted the filter-token-accounts-by-address-type branch July 6, 2026 14:00
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.

3 participants