Last active
January 25, 2022 16:45
-
-
Save mudgen/676e96500d9a63abeb18de6f9d49350a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.11; | |
function doIt() external { | |
uint256 length = myArray.length; // state read | |
uint b; | |
for(uint256 i; i < length; i++) { // local reads | |
b++; // local write | |
} | |
mySum = b; // state write | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment