Labels: high-difficulty, yul, proxy, gasguard
Difficulty: High
Module: contracts/proxy/
🧠 Concept
Construct a minimal delegatecall forwarder contract entirely in Yul assembly that forwards incoming calldata directly to implementation logic and returns outputs transparently.
⚠️ Problem
High-level proxy router implementations introduce stack manipulation instructions, increasing execution overhead on every proxied transaction.
📁 Implementation Scope
contracts/proxy/YulProxyForwarder.sol
test/proxy/YulProxyForwarder.test.ts
🛠️ Requirements
- Copy incoming calldata to memory location
0x00 using calldatacopy(0, 0, calldatasize()).
- Execute
delegatecall(gas(), implementation, 0, calldatasize(), 0, 0).
- Copy return payload using
returndatacopy and execute return or revert.
🎯 Acceptance Criteria
Labels:
high-difficulty,yul,proxy,gasguardDifficulty: High
Module:
contracts/proxy/🧠 Concept
Construct a minimal delegatecall forwarder contract entirely in Yul assembly that forwards incoming calldata directly to implementation logic and returns outputs transparently.
High-level proxy router implementations introduce stack manipulation instructions, increasing execution overhead on every proxied transaction.
📁 Implementation Scope
contracts/proxy/YulProxyForwarder.soltest/proxy/YulProxyForwarder.test.ts🛠️ Requirements
0x00usingcalldatacopy(0, 0, calldatasize()).delegatecall(gas(), implementation, 0, calldatasize(), 0, 0).returndatacopyand executereturnorrevert.🎯 Acceptance Criteria