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

Add return bomb resistance test for ERC165 #610

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sumitvekariya
Copy link

This PR adds a test for return bomb resistance in the ERC165 implementation. The test verifies that the implementation correctly processes interface IDs without excessive gas usage, making it resistant to return bomb attacks.

Changes

  • Added a wrapper contract Erc165Wrapper for testing with the motsu framework
  • Implemented a test that verifies the correct identification of the ERC165 interface ID
  • Added tests for rejecting unsupported interface IDs
  • Added a test with a large number of interface IDs (120) to simulate a potential attack

Resolves #448

PR Checklist

  • Tests
  • Documentation
  • Changelog

Copy link

netlify bot commented Mar 17, 2025

Deploy Preview for contracts-stylus canceled.

Name Link
🔨 Latest commit 9ea723c
🔍 Latest deploy log https://app.netlify.com/sites/contracts-stylus/deploys/67d8edc67a39de0008f30664

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.

[Feature]: Add Test Case Verifying That Erc165 is Resistant to "Return Bombs"
1 participant