Last active
July 14, 2023 16:11
-
-
Save arturmartins/36786fb6071f636e0a65cc513d2d6723 to your computer and use it in GitHub Desktop.
Ethereum smart contract with set/get (not pure)
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.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