Created
December 29, 2022 15:10
-
-
Save BellaBe/150ef80f83dbe9725349793b8cd418d7 to your computer and use it in GitHub Desktop.
Create Smart contract with constructor
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.13; | |
contract Demo { | |
uint private simpleUint; | |
constructor() { | |
simpleUint = 5; | |
} | |
function getValue() public view returns(uint){ | |
return simpleUint; | |
} | |
function setValue(uint _value) public{ | |
simpleUint = _value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment