Last active
October 26, 2020 19:56
-
-
Save wissalHaji/507404a4b6f260667288bbc26c55f32f to your computer and use it in GitHub Desktop.
State and local variables in solidity
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: GPL-3.0 | |
pragma solidity ^0.7.0; | |
contract HelloWorldContract { | |
address owner; // state variable | |
function helloWorld() external pure returns(string memory){ | |
string memory greeting ="hello world"; // local variable | |
return greeting; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment