Created
May 4, 2023 00:44
-
-
Save TehilaFavourite/225dee7d24de53adefca646b2cb2ba3a 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
pragma solidity 0.8.19; | |
contract Variables { | |
uint256 public stateVar; //state variable | |
bool public stateVar2; //state variable | |
address public stateVar3; //state variable | |
constructor() { | |
stateVar = 20; // using the state variable | |
} | |
function localvariable() external pure { | |
uint256 localVar = 50; //local variable | |
bool M = true; //local variable | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment