Skip to content

Instantly share code, notes, and snippets.

@arturmartins
Last active July 14, 2023 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arturmartins/36786fb6071f636e0a65cc513d2d6723 to your computer and use it in GitHub Desktop.
Save arturmartins/36786fb6071f636e0a65cc513d2d6723 to your computer and use it in GitHub Desktop.
Ethereum smart contract with set/get (not pure)
pragma solidity 0.8.20;
contract HelloWorld2{
string userInput;
function set(string memory finalValue) public
{
userInput = finalValue;
}
function get() public view returns(string memory){
return userInput;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment