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 categorizeERCContracts() method to detect and categorize ERC contracts #1048

Conversation

quiet-node
Copy link
Member

@quiet-node quiet-node commented Dec 4, 2024

Description:
This PR introduces a new method, categorizeERCContracts(), for the ERC Registry project. The method analyzes a batch of contract bytecodes to detect ERC contracts and categorize them into ERC20 and ERC721. It returns an object containing two arrays: one for ERC20 contracts and another for ERC721 contracts.

Related issue(s):

Fixes #1039

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 4, 2024
@quiet-node quiet-node added this to the 0.11.0 milestone Dec 4, 2024
@quiet-node quiet-node self-assigned this Dec 4, 2024
@quiet-node quiet-node requested a review from a team as a code owner December 4, 2024 18:52
@quiet-node quiet-node changed the title feat: added categorizeERCContracts() method to detect and categorize ERCcontracts feat: added categorizeERCContracts() method in ERC Registry project to detect and categorize ERC contracts Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

Test Results

 16 files  ± 0   83 suites  +1   12m 27s ⏱️ + 4m 37s
294 tests +26  288 ✅ +28  6 💤 ±0  0 ❌  - 2 
303 runs  +15  296 ✅ +17  7 💤 ±0  0 ❌  - 2 

Results for commit d429579. ± Comparison against base commit cb20372.

This pull request removes 1 and adds 27 tests. Note that renamed tests count towards both.
"before each" hook for "should be able to update fixed fee for HBARs" ‑ TokenManagmentContract Test Suite Update fees "before each" hook for "should be able to update fixed fee for HBARs"
should be able to update fixed HTS fee and royalty fee in NFT ‑ TokenManagmentContract Test Suite Update fees should be able to update fixed HTS fee and royalty fee in NFT
should be able to update fixed HTS fee for NFT ‑ TokenManagmentContract Test Suite Update fees should be able to update fixed HTS fee for NFT
should be able to update fixed fee for HBARs ‑ TokenManagmentContract Test Suite Update fees should be able to update fixed fee for HBARs
should be able to update fixed fee in HBARs for NFT ‑ TokenManagmentContract Test Suite Update fees should be able to update fixed fee in HBARs for NFT
should be able to update fixed fee in the same token ‑ TokenManagmentContract Test Suite Update fees should be able to update fixed fee in the same token
should be able to update fractional fee with net of transfer false in HTS token ‑ TokenManagmentContract Test Suite Update fees should be able to update fractional fee with net of transfer false in HTS token
should be able to update fractional fee with net of transfer true in HTS token ‑ TokenManagmentContract Test Suite Update fees should be able to update fractional fee with net of transfer true in HTS token
should be able to update multiple fixed fees in HBARs ‑ TokenManagmentContract Test Suite Update fees should be able to update multiple fixed fees in HBARs
should be able to update multiple fixed fees in HTS token ‑ TokenManagmentContract Test Suite Update fees should be able to update multiple fixed fees in HTS token
should be able to update multiple fractional fees in HTS token ‑ TokenManagmentContract Test Suite Update fees should be able to update multiple fractional fees in HTS token
…

♻️ This comment has been updated with latest results.

@quiet-node quiet-node changed the title feat: added categorizeERCContracts() method in ERC Registry project to detect and categorize ERC contracts feat: added categorizeERCContracts() method to detect and categorize ERC contracts Dec 4, 2024
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
…ERC contracts

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
@quiet-node quiet-node force-pushed the 1039-erc-registry-add-ercinterfacematcher-service-class-to-perform-interface-signature-matching-for-erc-contracts branch from eb9748f to d429579 Compare December 5, 2024 02:56
Copy link
Contributor

@natanasow natanasow 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 3c9bdf6 into main Dec 5, 2024
30 checks passed
@quiet-node quiet-node deleted the 1039-erc-registry-add-ercinterfacematcher-service-class-to-perform-interface-signature-matching-for-erc-contracts branch December 5, 2024 15:22
quiet-node added a commit that referenced this pull request Dec 5, 2024
…ERC contracts (#1048)

* chore: installed sevm package

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: added new schemas

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

* feat: added categorizeERCContracts() method to detect and categorize ERC contracts

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

---------

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

feat: ------- added categorizeERCContracts() method to detect and categorize ERC contracts

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

feat: added new schemas

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

chore: installed sevm package

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>

Update ERCRegistrySchemas.ts

Signed-off-by: Logan Nguyen <logan.nguyen@swirldslabs.com>
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
Development

Successfully merging this pull request may close these issues.

[ERC Registry] Add BytecodeAnalyzer service class to perform interface signature matching for ERC contracts
2 participants