Skip to content
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

fix: accidental Markdown usage in Nonce Schema section of permit2 docs #715

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/contracts/permit2/reference/signature-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ It’s important to note that when hashing multiple typed structs, the ordering

Instead of using incrementing nonces, we introduce non-monotonic, or unordered nonces with a `nonceBitmap`.

The `nonceBitmap` maps an owner's address to a uint248 value, which we will call `wordPos` which is the index of the desired bitmap. There are 2**248 possible indices and this 2**248 possible bitmaps where each bitmap holds 256 bits. A bit must be flipped on to prevent replays of users’ signatures. Bits that are dirtied may not be used again.
The `nonceBitmap` maps an owner's address to a `uint248` value, which we will call `wordPos` which is the index of the desired bitmap. There are 2\*\*248 possible indices and thus 2\*\*248 possible bitmaps where each bitmap holds 256 bits. A bit must be flipped on to prevent replays of users’ signatures. Bits that are dirtied may not be used again.

```solidity
// nonceBitmap[ownerAddress][wordPosition] retrieves a uint256 bitmap
Expand Down Expand Up @@ -238,4 +238,4 @@ A signer called Bob signs a permit to transfer 100 USDC with a router contract a

</aside>

Universal Router protects against this by checking that the `msg.sender` from inside the routing contract is the supposed spender by passing `msg.sender` in as the `owner` param in any permit calls and by passing in `msg.sender` as the `from` param in any transfer calls.
Universal Router protects against this by checking that the `msg.sender` from inside the routing contract is the supposed spender by passing `msg.sender` in as the `owner` param in any permit calls and by passing in `msg.sender` as the `from` param in any transfer calls.