Labels: medium-difficulty, solidity, eip1153, gasguard
Difficulty: Medium
Module: contracts/cache/
🧠 Concept
Utilize EVM transient storage opcodes (TSTORE / TLOAD) to maintain intra-transaction calculation caches without writing to persistent storage slots.
⚠️ Problem
Writing intermediate execution calculations to persistent storage (SSTORE) and clearing them later costs far more gas than using transient storage.
📁 Implementation Scope
contracts/cache/TransientCache.sol
test/cache/TransientCache.test.ts
🛠️ Requirements
- Implement Yul wrappers for
tstore(slot, val) and tload(slot).
- Cache intermediate exchange rates and fee benchmarks during complex execution pipelines.
- Ensure values flush automatically at transaction completion without residual gas overhead.
🎯 Acceptance Criteria
Labels:
medium-difficulty,solidity,eip1153,gasguardDifficulty: Medium
Module:
contracts/cache/🧠 Concept
Utilize EVM transient storage opcodes (
TSTORE/TLOAD) to maintain intra-transaction calculation caches without writing to persistent storage slots.Writing intermediate execution calculations to persistent storage (
SSTORE) and clearing them later costs far more gas than using transient storage.📁 Implementation Scope
contracts/cache/TransientCache.soltest/cache/TransientCache.test.ts🛠️ Requirements
tstore(slot, val)andtload(slot).🎯 Acceptance Criteria