Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ contract Marketplace {
uint sold;
}

mapping (uint => Product) internal products;
mapping (uint => Product) private products;

function writeProduct(
string memory _name,
string memory _image,
string memory _description,
string memory _location,
uint _price
) public {
) public external {
uint _sold = 0;
products[productsLength] = Product(
payable(msg.sender),
Expand Down Expand Up @@ -71,7 +71,7 @@ contract Marketplace {
);
}

function buyProduct(uint _index) public payable {
function buyProduct(uint _index) public external payable {
require(
IERC20Token(cUsdTokenAddress).transferFrom(
msg.sender,
Expand All @@ -86,4 +86,4 @@ contract Marketplace {
function getProductsLength() public view returns (uint) {
return (productsLength);
}
}
}