Created
September 2, 2020 15:41
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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