Created
March 4, 2018 07:13
-
-
Save sumitpatel93/f870480f7ebb077b9499463bdeb5c631 to your computer and use it in GitHub Desktop.
product.sol
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; | |
contract UploadDetails { | |
struct Product { | |
uint amount; | |
string Name; | |
uint date; | |
string userName; | |
} | |
mapping (address => Product) product; | |
address[] public userAccts; | |
function setProduct(address _address, uint _amount, string _Name, uint _date, string _userName) public { | |
var Details = product[_address]; | |
Details.amount = _amount; | |
Details.Name = _Name; | |
Details.date = _date; | |
Details.userName = _userName; | |
userAccts.push(_address) -1; | |
} | |
function getProduct() view public returns(address[]) { | |
return userAccts; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment