Contract purpose

This Smart Contract is used for recording the spendings of the local municipality or of a company and making them available for people to see. This transparent approach should be used in order to discourage reckless or unjustified spendings.

Contract parameters

_adminName: the name of the budget administrator

_totalFunds: the total sum of funds available

Exposed methods and variables

administrator the ethereum address given at contract creation

fundsLeft the remaining funds after the payments were made

numberOfSpendings the total number of spendings recorded

map returns the details of a particular spending

addSpending called by the administrator when he wants to add a new spending to the list and emits the spendingAdded event

parameter nametypedetails
_descriptionstringdetails about how the money will be spent
_sectorstringthe specific economic sector the spending belongs to ( financial, health etc)

addPaymentToSpending called by the administrator to add a new payment to a particular spending and emits the paymentAdded event

parameter nametypedetails
idintegerunique identifier of the spending
_addrethereum addressthe address of the account to which the payment was made
_receiverNamestringthe name of the holder of the account
_amountintegerthe sum of money paid to the aforementioned account
_dateintegerthe date when the payment was made (unix epoch time)

increaseTotalFunds called by the administrator to increase the total available budget (from donations for example)

parameter nametypedetails
amountintegerthe amount by which the funds will be increased



parameter nametypedetails
spendingIDintegerthe unique identifier of the spending


parameter nametypedetails
spendingIDintegerthe unique identifier of the spending
receiverAddrethereum addressthe address of the holder
receiverNamestringthe name of the holder
amountintegerthe amount sent
dateintegerthe date of the payment


parameter nametypedetails
amountintegerthe added amount
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract