Skip to content

Instantly share code, notes, and snippets.

@anoochit
Last active May 10, 2021 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anoochit/1b8497284a552ff893d515ed006f19fe to your computer and use it in GitHub Desktop.
Save anoochit/1b8497284a552ff893d515ed006f19fe to your computer and use it in GitHub Desktop.
Basic Bank SmartContract
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