-
Notifications
You must be signed in to change notification settings - Fork 0
/
new project in celo
41 lines (32 loc) · 1.01 KB
/
new project in celo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// spdx-license-identifyer:MIT
pragma solidity >=0.7.0 <0.9.0;
interface IERCTOKEN (
function transfer(address, uint256) external retunrs (bool);
function approve (address, address, uint256) external returns (bool);
function totalsupply() external view returns (uint256);
functioon balanceof(address) external view returns (uint256);
function allowance(address,address) external view returns (uint256);
event transfer(address indexed from, address indexed to,, uint256 value);
event approval (address indexed owner, address indexed spender, uint256 value;);
)
contract marketplace {
uint internal productslenght = 0;
address internal cUSDTokenadress = 0x874069Fa1Eb16D44d622F2e0Ca25eeA172369bC1;
struct product {
address payable owner;
string name;
string image;
string description;
string location;
uint price;
uint sold;
}
mapping (uint => product) internal products;
function writeproduct{
string memory _name,
string memory _image,
string memory _description,
string memory _location,
uint_price
) public {
uint _sold = 0;