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

feat: Support ERC tokens #1587

Merged
merged 52 commits into from
Jan 8, 2025
Merged

feat: Support ERC tokens #1587

merged 52 commits into from
Jan 8, 2025

Conversation

svienot
Copy link
Collaborator

@svienot svienot commented Jan 7, 2025

Description:

Provides the following 2 aspects of ERC token support

  • decorate contract details page for contracts which happen to be either ERC20 or ERC721, based on static lists of known ERCs currently stored in the repository and updated regularly.
  • search token names among the lists of ERC in addition to the search among HTS tokens.

Related issue(s):

Relates to #1500

ericleponner and others added 30 commits January 7, 2025 19:33
Signed-off-by: Simon Viénot <[email protected]>
Signed-off-by: Eric Le Ponner <[email protected]>
Signed-off-by: Eric Le Ponner <[email protected]>
ericleponner and others added 17 commits January 7, 2025 19:33
…actByteCodeSection and ContractDetails.

Signed-off-by: Simon Viénot <[email protected]>
…tune display of contract 'pills'.

Signed-off-by: Simon Viénot <[email protected]>
Slight refactoring of ContractDetails.
Add ERC type property.

Signed-off-by: Simon Viénot <[email protected]>
Signed-off-by: Simon Viénot <[email protected]>
Signed-off-by: Simon Viénot <[email protected]>
Signed-off-by: Simon Viénot <[email protected]>
Signed-off-by: Simon Viénot <[email protected]>
Signed-off-by: Simon Viénot <[email protected]>
@svienot svienot requested a review from ericleponner as a code owner January 7, 2025 19:47
Copy link

github-actions bot commented Jan 7, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 74.02% 25295 / 34172
🔵 Statements 74.02% 25295 / 34172
🔵 Functions 57.8% 970 / 1678
🔵 Branches 82.97% 4558 / 5493
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/components/account/FungibleTable.vue 90.54% 100% 0% 90.54% 89-91, 140-143
src/components/account/NftsTable.vue 91.66% 100% 0% 91.66% 102-104, 154-157
src/components/account/PendingFungibleAirdropTable.vue 91.13% 60% 0% 91.13% 97-99, 148-151
src/components/account/PendingNftAirdropTable.vue 91.56% 100% 0% 91.56% 103-105, 154-157
src/components/contract/ContractByteCodeSection.vue 77.97% 59.25% 7.69% 77.97% 1, 147-148, 171-172, 239-240, 252-254, 261-262, 265-266, 269-286, 288-295, 301, 310-317, 321-329, 340, 345, 349
src/components/contract/ContractERCSection.vue 96.25% 100% 100% 96.25% 113-115
src/components/contract/ContractResult.vue 100% 91.66% 100% 100%
src/components/contract/ContractResultsSection.vue 100% 80% 100% 100%
src/components/contract/ERC20ByNameTable.vue 100% 100% 100% 100%
src/components/contract/ERC20ByNameTableLoader.ts 7.14% 100% 0% 7.14% 27-28, 34-37, 43-51, 53-56, 58-64
src/components/contract/ERC721ByNameTable.vue 100% 100% 100% 100%
src/components/contract/ERC721ByNameTableLoader.ts 7.14% 100% 0% 7.14% 27-28, 34-37, 43-51, 53-56, 58-64
src/components/search/SearchAgent.ts 78.73% 80.91% 73.33% 78.73% 66, 79-80, 85-86, 93-94, 192-193, 195-204, 206-212, 391, 424-428, 464-467, 470-489, 533-534, 555-556, 593-598, 626-627, 632-633, 659-660, 679-683, 685-691, 694, 696, 729-733, 738-739, 742-743, 765-769, 774-775, 778-779
src/components/search/SearchController.ts 86.5% 88.88% 80% 86.5% 148-150, 169-170, 184-192, 239-241
src/components/token/TokensSection.vue 82.11% 84.09% 27.27% 82.11% 281-282, 285-291, 294-295, 299-308, 316-317, 321, 335-344, 347-348, 351-361, 369-370
src/config/NetworkConfig.ts 82.94% 60% 73.68% 82.94% 43-44, 46-47, 49-50, 52-53, 77-78, 92-93, 116-117, 119-120, 122-123, 127-128, 181-182, 253-261, 268-269, 304-305, 307-308
src/pages/ContractDetails.vue 98.71% 90.52% 33.33% 98.71% 36, 40, 43, 46
src/pages/ERC20ByName.vue 100% 100% 100% 100%
src/pages/ERC721ByName.vue 100% 100% 100% 100%
src/pages/TokensByPopularity.vue 100% 100% 100% 100%
src/utils/ERCUtils.ts 60.75% 40% 44.44% 60.75% 36-40, 45-49, 54-58, 80-81, 89, 103-107, 111-115, 134, 137-138
src/utils/RouteManager.ts 77.5% 77.77% 60.34% 77.5% 138, 174-182, 205-214, 217-226, 244-245, 263-272, 279-282, 285-286, 307-316, 319-323, 326-330, 333-342, 345-349, 352-356, 374-383, 386-390, 393-397, 408-417, 428-437, 448-457, 464-467, 478-479, 518-519, 536-537, 548, 564-565, 567-568, 570-571, 573-574, 576-577, 579-580, 582-583, 585-586, 588-589, 591-592, 594-595, 597, 608, 630-631, 634-635
src/utils/URLUtils.ts 86.15% 84% 100% 86.15% 41-42, 79-80, 84-86, 88-89
src/utils/analyzer/ContractAnalyzer.ts 81.81% 82.43% 87.5% 81.81% 74-84, 98-99, 130-131, 141, 159, 171-182, 226-230, 269-270, 283-284, 297-298
src/utils/cache/CacheUtils.ts 100% 100% 100% 100%
src/utils/cache/ERC20Cache.ts 71.42% 57.14% 100% 71.42% 33-37, 46-49, 61
src/utils/cache/ERC20InfoCache.ts 33.33% 66.66% 66.66% 33.33% 38, 50-76
src/utils/cache/ERC721Cache.ts 67.5% 57.14% 80% 67.5% 37-41, 50-53, 58-60, 70
src/utils/cache/ERC721InfoCache.ts 36% 50% 66.66% 36% 38, 42-43, 45-52, 66-68, 70-87
src/utils/parser/AccountLocParser.ts 86.84% 94.44% 83.33% 86.84% 71-72, 74-88, 94-95, 200
Generated in workflow #1546

Signed-off-by: Simon Viénot <[email protected]>
'Show all tokens' link present only when needed.

Signed-off-by: Simon Viénot <[email protected]>
Copy link
Collaborator Author

@svienot svienot left a comment

Choose a reason for hiding this comment

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

Looks good to go.

Copy link
Collaborator

@ericleponner ericleponner left a comment

Choose a reason for hiding this comment

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

Ok for me

Copy link

sonarqubecloud bot commented Jan 8, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@svienot svienot merged commit 789d70e into main Jan 8, 2025
12 of 13 checks passed
@svienot svienot deleted the ERC-tokens branch January 8, 2025 10: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.

2 participants