Last active
May 10, 2021 02:54
-
-
Save anoochit/1b8497284a552ff893d515ed006f19fe to your computer and use it in GitHub Desktop.
Basic Bank SmartContract
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.6.6; | |
contract OPPBank { | |
int balance; | |
constructor() public { | |
balance=0; | |
} | |
function getBalance() view public returns(int) { | |
return balance; | |
} | |
function depositBalance(int amount) public { | |
balance = balance + amount; | |
} | |
function withdrawBalance(int amount) public { | |
balance = balance - amount; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment