Created
March 26, 2024 02:01
-
-
Save Juwonlo/2364bee7ee9dd6a2a1ea408312fc40e4 to your computer and use it in GitHub Desktop.
BASE Task
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: MIT | |
pragma solidity ^0.8.0; | |
contract SimpleStorage { | |
uint256 public storedData; | |
event ValueChanged(uint256 newValue); | |
constructor(uint256 _initialValue) { | |
storedData = _initialValue; | |
} | |
function set(uint256 _newValue) public { | |
storedData = _newValue; | |
emit ValueChanged(_newValue); | |
} | |
function get() public view returns (uint256) { | |
return storedData; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment