Skip to content

Instantly share code, notes, and snippets.

@Krishna-Ravi
Created September 2, 2020 15:41
Show Gist options
  • Save Krishna-Ravi/fc334e57b02f08fd2a2e4421debdab43 to your computer and use it in GitHub Desktop.
Save Krishna-Ravi/fc334e57b02f08fd2a2e4421debdab43 to your computer and use it in GitHub Desktop.
This is my first smart contract develop using Solidity programming language. This is basic implementation of Electricity Bill, which adds our data into a BLOCKCHAIN network.
pragma solidity 0.4.18 <= 0.6.12;
contract ElectricityBills{
string Name;
string addrs;
string consumerId;
int units;
int amount;
function ElectricityBills(string newName, string newAddrs, string newconsumerId, int newunits, int newamt) public{
Name = newName;
addrs = newAddrs;
consumerId = newconsumerId;
units = newunits;
amount = newamt;
}
function getElectricityBill() public view returns(string,string,string,int,int){
return(Name,addrs,consumerId,units,amount);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment