Salary Record

TOOLSDOCUMENTSUTILITYFINANCIAL

Contract purpose

This Smart Contract keeps track of a person's monthly salary. The details are added to the contract by the creator (assumed to be the employee himself) and allows him to have a record of how much he earns.

Exposed methods and variables

addSalary called by the employee when he wants to add a new record to the list. The function returns an index by which this entry can be further identified inside the contract.

parameter nametypedetails
_sumintegerthe sum earned
_yearintegerthe year when this salary was received
_monthintegerthe month of this salary

getSalary returns the details about a specific entry, given its index

parameter nametypedetails
indexintegerthe index of the salary

getTotalSum returns the total sum earned by the employee so far

getMaxSalary returns the maximum sum the employee earned until now

Buy
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract