Simple Bank

Under Review

FINANCIALDOCUMENTS

Contract purpose

This contract acts as a bank, people can deposit, withdraw money and read their balance. Bonus, the first 3 clients are rewarded with 10 ethers each

Contract parameters

owner : address of the bank manager

Exposed methods and variables

enroll : used to enroll a customer with the bank, giving the first 3 of them 10 ether as reward. It return the balance of the user after enrolling

deposit : called to deposit ether into bank and returns the balance of the user after deposit is made

withdraw : allows to withdraw ether from bank and returns the remaining balance for the user

parameter nametypedetails
withdrawAmountintegerthe sum to be withdrawn

balance : returns the current balance of the client

depositsBalance : returns the balance of the contract

Reviewed by Modex
Buy

Copyright © Modex Marketplace