-
Notifications
You must be signed in to change notification settings - Fork 0
/
EmteIdentity.sol
80 lines (65 loc) · 1.56 KB
/
EmteIdentity.sol
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "./EmtePayment.sol";
contract EmteIdentity {
struct User{
string name;
string md5_password;
string email;
Wallet[] wallets;
BankAccount[] bank_accounts;
}
struct VendorValidatior{
string method;
string validation_address;
string validation_value;
}
struct Vendor{
User user;
string brand_name;
address wallet_public_key;
VendorValidatior[] validators;
}
struct Product{
Vendor vendor;
string name;
string image_url;
uint price;
bool on_sale;
}
struct PaymentByCoin{
string coin_type;
Wallet sender_wallet;
Wallet receiver_wallet;
uint amount;
address transfer_validation_hash;
bool is_validated;
uint256 created_at;
}
struct BankAccount{
string full_name;
string iban;
}
struct PaymentByCreditCard{
BankAccount sender_account;
BankAccount receiver_account;
uint amount;
bool is_validated;
uint256 created_at;
}
struct Validation{
string request_url;
string request_method;
string request_headers;
string valid_regex_pattern;
}
struct PaymentByOtherMethod{
string method_name;
string sender_identifier;
string receiver_identifier;
Validation validation;
uint amount;
bool is_validated;
uint256 created_at;
}
}