Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 453 Bytes

multiple_storage_read.md

File metadata and controls

15 lines (11 loc) · 453 Bytes

Multiple Storage Read

Configuration

  • Check: pess-multiple-storage-read
  • Severity: Optimization
  • Confidence: High

Description

The detector highlights storage values which are read several times in the same function.

Vulnerable Scenario

test scenario

Recommendation

Assign storage value to a local variable when reading it multiple times in order to reduce gas costs.