Skip to content

Instantly share code, notes, and snippets.

Last active July 11, 2018 15:02
What would you like to do?
pragma solidity ^0.4.24;
contract SimpleBank {
mapping (address => uint) private balances;
event LogDepositMade(address accountAddress, uint amount);
address public owner;
constructor() public {
owner = msg.sender;
function deposit() public payable returns (uint) {
balances[msg.sender] += msg.value;
emit LogDepositMade(msg.sender, msg.value);
return balances[msg.sender];
function balance() constant public returns (uint) {
return balances[msg.sender];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment