Skip to content

Instantly share code, notes, and snippets.

@TehilaFavourite
Created May 4, 2023 00:44
Show Gist options
  • Save TehilaFavourite/225dee7d24de53adefca646b2cb2ba3a to your computer and use it in GitHub Desktop.
Save TehilaFavourite/225dee7d24de53adefca646b2cb2ba3a to your computer and use it in GitHub Desktop.
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