Created
February 13, 2022 02:57
-
-
Save tumf/5bce3d0abad122aeb67185cd0f7c8b4c 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: AGPL-3.0-or-later | |
pragma solidity 0.8.11; | |
contract Consumer{ | |
uint256 public counter; | |
function counter1() public { | |
for(uint256 i; i<1000; i++){ | |
counter = counter+i; | |
} | |
} | |
function counter2() public { | |
uint256 j = counter; | |
for(uint256 i; i<1000; i++){ | |
j = j+i; | |
} | |
counter = j; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment