Skip to content

Commit bda49ab

Browse files
committed
update root readme.
update bitmap nonces readme
1 parent 5e07321 commit bda49ab

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ This repo is an ongoing collection of useful, and occasionally clever, solidity/
1515
- Contracts with upgradeable logic.
1616
- [Big Data Storage (SSTORE2)](./patterns/big-data-storage)
1717
- Cost efficient on-chain storage of multi-word data accessible to contracts.
18+
- [Bitmap Nonces](./patterns/bitmap-nonces/)
19+
- Efficiently tracking the state of many operations identifiable by a unique nonce.
1820
- [Commit + Reveal](./patterns/commit-reveal)
1921
- A two-step process for performing partially obscured on-chain actions that can't be front or back runned.
2022
- [EIP712 Signed Messages](./patterns/eip712-signed-messages)
@@ -52,7 +54,7 @@ This repo is an ongoing collection of useful, and occasionally clever, solidity/
5254
- [Read-Only Delegatecall](./patterns/readonly-delegatecall)
5355
- Execute arbitrary delegatecalls in your contract in a read-only manner, without side-effects.
5456
- [Reentrancy](./patterns/reentrancy)
55-
- Explaining reentrancy vulnerabilities and patterns for addressing them.
57+
- Explaining reentrancy vulnerabilities and patterns for addressing them (Checks-Effects-Interactions and reentrancy guards).
5658
- [Separate Allowance Targets](./patterns/separate-allowance-targets/)
5759
- Avoid having to migrate user allowances between upgrades with a dedicated approval contract.
5860
- [Stack-Too-Deep Workarounds](./patterns/stack-too-deep/)

patterns/bitmap-nonces/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@ contract TransferRelay {
101101
}
102102
```
103103

104-
## In the Wild
104+
## Final Thoughts
105105

106-
You can find bitmap nonces being used in major protocols such as Uniswap's [Permit2](https://github.com/Uniswap/permit2/blob/cc56ad0f3439c502c246fc5cfcc3db92bb8b7219/src/SignatureTransfer.sol#L142) and 0x's [Exchange Proxy](https://github.com/0xProject/protocol/blob/e66307ba319e8c3e2a456767403298b576abc85e/contracts/zero-ex/contracts/src/features/nft_orders/ERC721OrdersFeature.sol#L662).
107-
108-
## The Demo
109-
110-
The full, working example can be found [here](./TransferRelay.sol) with complete tests demonstrating its usage and gas savings [here](../../test/TransferRelay.sol).
106+
- You can find bitmap nonces being used in major protocols such as Uniswap's [Permit2](https://github.com/Uniswap/permit2/blob/cc56ad0f3439c502c246fc5cfcc3db92bb8b7219/src/SignatureTransfer.sol#L142) and 0x's [Exchange Proxy](https://github.com/0xProject/protocol/blob/e66307ba319e8c3e2a456767403298b576abc85e/contracts/zero-ex/contracts/src/features/nft_orders/ERC721OrdersFeature.sol#L662).
107+
- There is no reason you couldn't track operations that have more than 2 states using bitmap nonces. You would just simply increase the number of bits in a word assigned to each operation and adjust the mapping formula accordingly.
108+
- The full, working example can be found [here](./TransferRelay.sol) with complete tests demonstrating its usage and gas savings [here](../../test/TransferRelay.sol).

0 commit comments

Comments
 (0)