Labels: medium-difficulty, yul, access, gasguard
Difficulty: Medium
Module: contracts/access/
🧠 Concept
Construct a multi-owner signature approval tracker that records up to 256 owner approval states within a single bytes32 storage slot using bitwise toggles.
⚠️ Problem
Tracking approval states using mapping(address => bool) or mapping(uint256 => bool) writes to separate storage slots per approval ($20,000\text{ gas}$ initial write).
📁 Implementation Scope
contracts/access/BitmaskApprovalTracker.sol
test/access/BitmaskApprovalTracker.test.ts
🛠️ Requirements
- Map owner indices ($0\text{--}255$) to bit positions in a
bytes32 state variable.
- Implement inline assembly checks and toggles using
AND, OR, and XOR.
🎯 Acceptance Criteria
Labels:
medium-difficulty,yul,access,gasguardDifficulty: Medium
Module:
contracts/access/🧠 Concept
Construct a multi-owner signature approval tracker that records up to 256 owner approval states within a single
bytes32storage slot using bitwise toggles.Tracking approval states using$20,000\text{ gas}$ initial write).
mapping(address => bool)ormapping(uint256 => bool)writes to separate storage slots per approval (📁 Implementation Scope
contracts/access/BitmaskApprovalTracker.soltest/access/BitmaskApprovalTracker.test.ts🛠️ Requirements
bytes32state variable.AND,OR, andXOR.🎯 Acceptance Criteria