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: added getErcTokenInfo() to retrieve detailed token information in the ERC Registry project. #1064

Conversation

quiet-node
Copy link
Member

Description:

  • The ContractScanner service class now includes a new method, contractCallRequest(), which submits a contract call request to the mirror node targeting an ERC contract to fetch detailed standard token information such as name, symbol, decimals, and totalSupply.
  • The ByteCodeAnalyzer service leverages the newly added ContractScanner.contractCallRequest() method to retrieve token information whenever a new ERC contract is detected.

Below is an example of the output ERC object written to the registry:

erc20:{
  "contractId": "0.0.15707",
  "address": "0x0000000000000000000000000000000000003d5b",
  "name": "CUSD",
  "symbol": "CUSD",
  "totalSupply": 0,
  "decimals": 18
},

erc721: {
  "contractId": "0.0.1778110",
  "address": "0x00000000000000000000000000000000001b21be",
  "name": "Genesis SpheraHead",
  "symbol": "SPH"
}

Related issue(s):

Fixes #1059

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@quiet-node quiet-node added the enhancement New feature or request label Dec 8, 2024
@quiet-node quiet-node added this to the 0.11.0 milestone Dec 8, 2024
@quiet-node quiet-node self-assigned this Dec 8, 2024
@quiet-node quiet-node requested a review from a team as a code owner December 8, 2024 19:43
Copy link

github-actions bot commented Dec 8, 2024

Test Results

 16 files  ±0   83 suites  ±0   12m 10s ⏱️ +39s
294 tests +5  288 ✅ +7  6 💤 ±0  0 ❌  - 2 
303 runs  ±0  296 ✅ +2  7 💤 ±0  0 ❌  - 2 

Results for commit 94bee74. ± Comparison against base commit 78fb1ee.

This pull request removes 1 and adds 6 tests. Note that renamed tests count towards both.
"before each" hook for "should fail when the provided fee collector is invalid" ‑ TokenManagmentContract Test Suite Update fees "before each" hook for "should fail when the provided fee collector is invalid"
should fail for updateFungibleTokenCustomFees when token is not associated to fee collector ‑ TokenManagmentContract Test Suite Update fees Update fees negative cases should fail for updateFungibleTokenCustomFees when token is not associated to fee collector
should fail for updateNonFungibleTokenCustomFees when token is not associated to fee collector ‑ TokenManagmentContract Test Suite Update fees Update fees negative cases should fail for updateNonFungibleTokenCustomFees when token is not associated to fee collector
should fail when the provided fee collector is invalid for NFT ‑ TokenManagmentContract Test Suite Update fees Update fees negative cases should fail when the provided fee collector is invalid for NFT
should fail when the provided fee collector is invalid ‑ TokenManagmentContract Test Suite Update fees Update fees negative cases should fail when the provided fee collector is invalid
should fail when the provided token id is invalid for NFT ‑ TokenManagmentContract Test Suite Update fees Update fees negative cases should fail when the provided token id is invalid for NFT
should fail when the provided token id is invalid ‑ TokenManagmentContract Test Suite Update fees Update fees negative cases should fail when the provided token id is invalid

♻️ This comment has been updated with latest results.

Copy link
Contributor

@acuarica acuarica left a comment

Choose a reason for hiding this comment

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

lgtm

@quiet-node quiet-node merged commit af82723 into main Dec 10, 2024
32 of 33 checks passed
@quiet-node quiet-node deleted the 1059-erc-registry-phase-2-utilize-eth_call-for-enhanced-accuracy-and-to-retrieve-token-details branch December 10, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants