I have a marketplace. I wanted to make a sales receipt for each item sold. The sales receipt will indicate
address_receipt
,nameOfGood
, amountOfGood
,Price
, sumPrice
,address_transaction
. What should I effectively implement through? Through an array? in solidity maybe arrays in an array? or through a struct? I need that when the buyer's address is given at the entrance, his sales receipts should be displayed. thanks in advance
Add a comment
|
You could generate a contract for each item sold and store the sale info on a struct in a more readable and accessible way.
pragma solidity ^0.4.18;
contract MarketplaceContract{
struct SalesReceipt{
address address_receipt
string nameOfGood
uint amountOfGood
uint Price
uint sumPrice
address address_transaction
}
}