-
Notifications
You must be signed in to change notification settings - Fork 2
Fix DLLR EIP-2612 bug with Permit2 #3
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
024fe70
introduce permit2
cwsnt 786ffa2
fix: unit test
cwsnt 47b7d59
add permit2 deployment file
cwsnt 26489b2
add sipArgs, on-chain test
cwsnt 3e640d0
consider permit2 as new function
cwsnt 8355492
1/ address review comment
cwsnt 8bb5522
update package publishing scripts
tjcloa a95b6a9
add testnet deployment files
cwsnt b120f28
update README.md
tjcloa c4af258
update prepare dist scripts
tjcloa 29cb206
increment nonce for the permit2 usage
cwsnt 5ff2488
add deployment files
cwsnt ba30c2e
update package version
tjcloa 55707a7
check nonce usage in unit test
cwsnt f2920c0
remove nonce
cwsnt 898d430
add testnet deployments
cwsnt 893f822
update troveManager addrees to proxy
cwsnt 8d2f3c3
.prettierignore deployment/deployments & prettier node scripts
tjcloa e643b61
add mainnet deployments file
cwsnt 5a1df74
update deployment testnet
cwsnt 5040958
update multisig hh tasks - id param to positional param
tjcloa ae0eac0
fix helpers script
tjcloa c530d63
package v0.4.0: PR#3 Fix DLLR EIP-2612 bug with Permit2
tjcloa 3914da8
Merge branch 'development' into feat/permit2
tjcloa 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
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
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 |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| pragma solidity 0.6.11; | ||
|
|
||
| import "./SafeMath.sol"; | ||
|
|
||
| library Counters { | ||
| using SafeMath for uint256; | ||
|
|
||
| struct Counter { | ||
| // This variable should never be directly accessed by users of the library: interactions must be restricted to | ||
| // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add | ||
| // this feature: see https://github.com/ethereum/solidity/issues/4637 | ||
| uint256 _value; // default: 0 | ||
| } | ||
|
|
||
| function current(Counter storage counter) internal view returns (uint256) { | ||
| return counter._value; | ||
| } | ||
|
|
||
| function increment(Counter storage counter) internal { | ||
| // The {SafeMath} overflow check can be skipped here, see the comment at the top | ||
| counter._value += 1; | ||
| } | ||
|
|
||
| function decrement(Counter storage counter) internal { | ||
| counter._value = counter._value.sub(1); | ||
| } | ||
| } | ||
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
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.
Why is it possible to decrement a nonce?
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.
because this is a general purpose library. the function is internal and we don't use it for nonces.