-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 Foundry tests for EAS.sol #13538
base: develop
Are you sure you want to change the base?
Conversation
/ci authorize 3b8e02b |
go run ./scripts/checks/unused-imports
❌ test/vendor/eas/EAS.t.sol: IERC1271
❌ test/vendor/eas/EAS.t.sol: Strings
❌ test/vendor/eas/EAS.t.sol: ECDSA
error: processing failed
exit status 1
error: Recipe `unused-imports-check-no-build` failed on line 233 with exit code 1 Try fixing this and pushing another commit |
/ci authorize 7c8354b |
Run |
/ci authorize b3e3c4a |
/ci authorize 6d88f14 |
/ci authorize 9440c30 |
@@ -0,0 +1,3080 @@ | |||
// SPDX-License-Identifier: MIT | |||
pragma solidity =0.8.15; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: nowhere else in the codebase does it do =0.8.15
, this is semantically correct but also equivalent to just 0.8.15
which the rest of the codebase uses
} | ||
} | ||
|
||
// Mainnet Contract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this comment isn't useful
error DeadlineExpired(); | ||
|
||
// Test State | ||
ISchemaRegistry public registry; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registry
looks unused. Can you make sure there aren't any unused variables here?
/ci authorize 444c106 |
Looks like this needs a rebase, its a small conflict |
@@ -0,0 +1,6 @@ | |||
// SPDX-License-Identifier: MIT | |||
pragma solidity ^0.8.0; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is only used in the test file, I think its fine to define in there, unless the linter requires this file to exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface was moved into its own file to fix a CI testing failure. I can't recall the specific error but it was related to the Solidity version.
…tionWithSignatures, and testDetailedAttestationScenarios
…tion_invalidLength_reverts and test_attestation_dataScenarios_succeeds
…ime_succeeds and test_attestation_delegated_succeeds
…_succeeds and test_cascadingRevocation_succeeds
…atedUnique_succeeds
444c106
to
dd8fb10
Compare
Description
This PR adds EAS.t.sol, a comprehensive test suite for the EAS (Ethereum Attestation Service) contract implementation. The test suite verifies core EAS functionality including:
Tests
The test suite includes:
Construction Tests
Signature Verification Tests
Attestation Tests
Revocation Tests
Timestamping Tests
All tests use the Forge testing framework and include fuzz testing for enhanced coverage.
Changes to Supporting Files