Skip to content

Instantly share code, notes, and snippets.

Last active December 1, 2020 12:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
pragma solidity ^0.4.17;
contract pmEtherBox {
string msgWithdrawn = 'Withdrawn';
string msgDeposit = 'Deposit';
string msgBalance = 'Current Balance';
string msgSentTo = 'Sent To';
// address Beneficiary;
event LogStatus (uint i1, string s1, uint i2, string s2);
event LogStatus2 (uint i1, string s1, address B, uint i2, string s2);
function pullOut(uint amount) public {
emit LogStatus(amount,msgWithdrawn,address(this).balance, msgBalance);
function sendTo(uint amount, address Beneficiary) public {
emit LogStatus2(amount,msgSentTo, Beneficiary, address(this).balance, msgBalance);
function putIn(uint amount) payable public {
require(msg.value == amount);
emit LogStatus(amount,msgDeposit,address(this).balance, msgBalance);
// nothing else to do!
function getBalance() public view returns (uint256) {
return address(this).balance;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment