generated from Uniswap/foundry-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Additional commitments #40
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
Open
mgretzke
wants to merge
4
commits into
permit2-routing
Choose a base branch
from
additional-commitments
base: permit2-routing
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
701947f
AdditionalCommitments HybridAllocator
mgretzke cc01cbb
additionalCommitmentAmounts mandatory in HybridAllocator
mgretzke abef216
additionalCommitmentAmounts mandatory in OnChainAllocator + fixes
mgretzke e7bd57f
tests and small fixes
mgretzke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| "open_simpleOrder": "168865" | ||
| "open_simpleOrder": "168885" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| "openFor_simpleOrder_userHimself": "172309" | ||
| "openFor_simpleOrder_userHimself": "172344" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| { | ||
| "allocateAndRegister_erc20Token": "170490", | ||
| "allocateAndRegister_erc20Token_emptyAmountInput": "171400", | ||
| "allocateAndRegister_multipleTokens": "206420", | ||
| "allocateAndRegister_nativeToken": "122053", | ||
| "allocateAndRegister_nativeToken_emptyAmountInput": "121889", | ||
| "allocateAndRegister_second_erc20Token": "114796", | ||
| "allocateAndRegister_second_nativeToken": "104789", | ||
| "hybrid_execute_single": "157779", | ||
| "hybrid_permit2Allocation_multipleERC20": "253503", | ||
| "hybrid_permit2Allocation_singleERC20": "187123", | ||
| "hybrid_permit2Allocation_singleERC20_withWitness": "188140" | ||
| "allocateAndRegister_erc20Token": "170500", | ||
| "allocateAndRegister_erc20Token_emptyAmountInput": "171409", | ||
| "allocateAndRegister_multipleTokens": "206429", | ||
| "allocateAndRegister_nativeToken": "122063", | ||
| "allocateAndRegister_nativeToken_emptyAmountInput": "121899", | ||
| "allocateAndRegister_second_erc20Token": "114805", | ||
| "allocateAndRegister_second_nativeToken": "104799", | ||
| "hybrid_execute_single": "159843", | ||
| "hybrid_permit2Allocation_multipleERC20": "255228", | ||
| "hybrid_permit2Allocation_singleERC20": "188567", | ||
| "hybrid_permit2Allocation_singleERC20_withWitness": "189597" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| { | ||
| "allocateFor_success_withRegistration": "134199", | ||
| "allocate_and_delete_expired_allocation": "66401", | ||
| "allocate_erc20": "129672", | ||
| "allocate_native": "129432", | ||
| "allocate_second_erc20": "97684", | ||
| "onchain_execute_double": "346560", | ||
| "onchain_execute_single": "220180", | ||
| "onchain_permit2Allocation_multipleERC20": "365724", | ||
| "onchain_permit2Allocation_singleERC20": "232132" | ||
| "allocateFor_success_withRegistration": "134247", | ||
| "allocate_and_delete_expired_allocation": "66426", | ||
| "allocate_erc20": "129697", | ||
| "allocate_native": "129457", | ||
| "allocate_second_erc20": "97709", | ||
| "onchain_execute_double": "355504", | ||
| "onchain_execute_single": "225281", | ||
| "onchain_permit2Allocation_multipleERC20": "374116", | ||
| "onchain_permit2Allocation_singleERC20": "236970" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
not sure whether or not this is going to work; do we have any tests of this functionality yet? the decode-bytes-to-calldata logic is always a little gnarly/counterintuitive
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.
Thanks for looking so detailed at this!
Had all the tests and some tiny fixes committed, but forgot to push this.
I believe this is working as intended, I came up with a similar design for the ERC7683 order data parsing.
This is the setup and the test for this:
sc-allocators/test/HybridAllocator.t.sol
Line 2074 in e7bd57f
sc-allocators/test/HybridAllocator.t.sol
Line 2479 in e7bd57f
I don't have any tests that check the revert scenarios on this _decodeContext function yet though.