This file contains hidden or 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: MIT | |
| pragma solidity ^0.8.20; | |
| contract SimpleStorage { | |
| string public message; | |
| function setMessage(string memory _message) public { | |
| message = _message; | |
| } |
This file contains hidden or 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: MIT | |
| pragma solidity ^0.8.20; | |
| contract OneClickVote { | |
| bool public vote; // true = YES, false = NO | |
| address public voter; // who voted | |
| bool public hasVoted; | |
| function voteYes() public { |
This file contains hidden or 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: MIT | |
| pragma solidity ^0.8.20; | |
| contract MessageBoard { | |
| string public lastMessage; | |
| address public lastSender; | |
| uint public totalMessages; | |
| function postMessage(string memory _message) public { |