-
Notifications
You must be signed in to change notification settings - Fork 0
feat(permitter): Add minTokensPerBidder, remove maxBid from Permit struct #5
feat(permitter): Add minTokensPerBidder, remove maxBid from Permit struct #5
Conversation
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.
Pull request overview
This PR introduces a minimum bid requirement (minTokensPerBidder) to the Permitter system and removes the per-permit maxBidAmount field, simplifying the bid validation logic to rely solely on the global maxTokensPerBidder cap.
Changes:
- Added
minTokensPerBidderparameter to enforce a minimum bid amount per transaction - Removed
maxBidAmountfrom thePermitstruct, streamlining to only includebidderandexpiry - Updated EIP-712 typehash to reflect the simplified Permit structure
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Permitter.sol | Adds minTokensPerBidder validation, removes maxBidAmount from Permit struct, simplifies personal cap checking |
| src/interfaces/IPermitter.sol | Adds BidBelowMinimum and MinTokensExceedsMaxTokens errors, removes maxBidAmount from Permit struct, adds minTokensPerBidder getter |
| src/PermitterFactory.sol | Adds minTokensPerBidder parameter to factory methods and events |
| src/interfaces/IPermitterFactory.sol | Adds minTokensPerBidder to factory interface and events |
| test/Permitter.t.sol | Updates all test signatures to remove maxBidAmount, adds comprehensive tests for minimum bid enforcement |
| test/PermitterFactory.t.sol | Updates all factory calls to include minTokensPerBidder parameter |
| test/Integration.t.sol | Updates integration tests to use simplified permit signatures |
| test/Fuzz.t.sol | Updates fuzz tests with minimum bid constraints and simplified signatures |
| test/ExploitTests.t.sol | Updates exploit tests to use new permit structure |
| .mcp.json | Adds MCP server configuration |
| .gitmodules | Adds Claude commands submodule |
| .claude/commands | Adds Claude commands submodule reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Coverage after merging jemil/tally-9985-add-mintokensperbidder-constructor-parameter-and-remove into main will be
Coverage Report
|
|||||||||||||||||||||||||
0xpetersatoshi
left a comment
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.
lgtm
No description provided.