Skip to content

Instantly share code, notes, and snippets.

@Juwonlo
Created March 26, 2024 02:01
Show Gist options
  • Save Juwonlo/2364bee7ee9dd6a2a1ea408312fc40e4 to your computer and use it in GitHub Desktop.
Save Juwonlo/2364bee7ee9dd6a2a1ea408312fc40e4 to your computer and use it in GitHub Desktop.
BASE Task
// 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