Skip to content

test: expand eip712 signing test fixtures and edge cases (#465) - #556

Merged
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
gbengaeben:fix/465-eip712-edge-cases
Jun 28, 2026
Merged

test: expand eip712 signing test fixtures and edge cases (#465)#556
nanaf6203-bit merged 1 commit into
MettaChain:mainfrom
gbengaeben:fix/465-eip712-edge-cases

Conversation

@gbengaeben

Copy link
Copy Markdown
Contributor

Summary

Expands EIP-712 signing tests with comprehensive edge case coverage, including empty signers, malformed payloads, and replay protection scenarios.

Changes

  • Converted test file from vitest to jest to match project test framework
  • Empty Signers: Tests for zero-address recipients and missing nonce defaults
  • Malformed Payloads: Tests for undefined data, empty transaction objects, invalid addresses, partial domains, zero-value transactions, negative deadlines, extreme gas prices
  • Replay Protection: Tests for expired deadlines, near-expiry warnings, unique nonces, different chain IDs, verifyingContract inclusion, and deadline-based message differentiation
  • Fixed pre-existing test values (100 ETH → 101 ETH, 100 gwei → 101 gwei) to properly exceed threshold
  • 35 tests passing (added 18 new test cases)

Closes #465

@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@gbengaeben Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Copy link
Copy Markdown
Contributor

Solid edge-case coverage. Merging.

@nanaf6203-bit
nanaf6203-bit merged commit b304e84 into MettaChain:main Jun 28, 2026
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.

testing: expand eip712 signing test fixtures and edge cases

2 participants