Labels: medium-difficulty, yul, tokens, gasguard
Difficulty: Medium
Module: contracts/tokens/
🧠 Concept
Construct an inline assembly ERC-20 permit caller that formats EIP-2612 permit calls directly in memory without using high-level abi.encodeWithSelector.
⚠️ Problem
Standard permit wrappers allocate dynamic memory for call data, generating excessive mstore operations and expanding memory bounds prior to signature submission.
📁 Implementation Scope
contracts/tokens/YulPermitHandler.sol
test/tokens/YulPermitHandler.test.ts
🛠️ Requirements
- Pack
permit(address,address,uint256,uint256,uint8,bytes32,bytes32) selector and arguments directly into scratch memory using Yul.
- Execute low-level
call to target token contract and evaluate success return status.
🎯 Acceptance Criteria
Labels:
medium-difficulty,yul,tokens,gasguardDifficulty: Medium
Module:
contracts/tokens/🧠 Concept
Construct an inline assembly ERC-20
permitcaller that formats EIP-2612 permit calls directly in memory without using high-levelabi.encodeWithSelector.Standard permit wrappers allocate dynamic memory for call data, generating excessive
mstoreoperations and expanding memory bounds prior to signature submission.📁 Implementation Scope
contracts/tokens/YulPermitHandler.soltest/tokens/YulPermitHandler.test.ts🛠️ Requirements
permit(address,address,uint256,uint256,uint8,bytes32,bytes32)selector and arguments directly into scratch memory using Yul.callto target token contract and evaluate success return status.🎯 Acceptance Criteria