Created
August 28, 2018 04:38
-
-
Save savepong/913072e4dc487beb2c20b230df4f0c04 to your computer and use it in GitHub Desktop.
Simple Smart Contract
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.4.18; | |
contract SimpleContract { | |
uint balance; | |
constructor() public { | |
// Set initial balance as 1000 | |
balance = 1000; | |
} | |
function setBalance(uint newBalance) public { | |
// Set new balance | |
balance = newBalance; | |
} | |
function getBalance() public view returns(uint) { | |
return balance; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment