Contract purpose

This Smart Contract keeps track of a person's expenditures and records the status of the person's funds.

Contract parameters

_totalBudget: the total funds the person has

Exposed methods and variables

manager the ethereum address of the contractor creator( the person for whom the expenditures are recorded) , given as parameter at contract creation

addExpenditure function called by the manager when he wants to add a new expenditure to the list and returns the inndex by which this expenditure can be further identified in the contract

parameter nametypedetails
_descriptionstringdetails about how the money was spent
_sumintegerthe amount spent
_dateintegerdate when the expenditure took place (unix epoch time)

moneyReceived this function is called by the manager when he received money and wants to update the total funds available

parameter nametypedetails
sumintegerthe amount to be added

getExpenditureDetails returns the details about a particular expenditure stored inside the contract

parameter nametypedetails
indexintegerthe unique index of the expenditure

getMoneyLeft returns the amount of money still available after all the current expenditures

Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract