-
Notifications
You must be signed in to change notification settings - Fork 0
/
command.txt
82 lines (46 loc) · 3.33 KB
/
command.txt
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
acc = '0xA9De700656B15946d72779ce89062345702Bd853'
pid.register_company_account("Zero wing", "7581ac9c227dffd844ae3d6a8f81a8e78cee5256541fbe9192a2f4c28a3e6599", "Asd,car15", {'from': acc})
pid.register_product("0x3234303732303231636f64656f6e72756e70726f647563746964", "0x70726f647563742d69642d3031", "programming", 2021, '1690.00', 2000, 'Thailand', 'Noobie contract', {'from': acc})
Account => Company
Company - Many products
1 company address -> products
"""self.products_details[msg.sender] = Product({
name: _name,
category: _category,
release_year: _release_year,
price: _price,
total_units: _total_units,
country: _country,
description: _description
})
"""
1 Company -> 1000 Products
1 Company -> 1000 Products
1 Product -> 1000 units
Dictionary - Key is PK, value => Product
List of all keys (all pk)
Index for the list of all keys
acc = "0xA7E7732303307Ef78994B396F4624b793675062E"
pid.register_company_account(b"Zero Wing", "a51a7641fafb6a33dc0cd8542d5dea6dc84d4ae219321d2e8675c383ecbf3461", b"Asd,car15", {'from': '0xA7E7732303307Ef78994B396F4624b793675062E'})
pid.register_product(b"Primary_key 222", b"Samsung XR", "Smart Phone", 2020, '1555.05', 2000, 'Thailand', 'Apple SmartPhone', {'from': acc})
PK-124989123812931
pid.register_product(b"PK-124989123812931", b"OnePlus 6T", "Smart Phone", 2020, '1500.02', 1000, 'Thailand', 'Apple Smart Phoen', {'from': acc})
pid.register_product(b"PK-124989123812931", b"iPhone XR", "Smart Phone", 2020, '1500.02',
1000, 'Thailand', 'Apple Smart Phoen', {'from': acc})
def generate(length):
temp = []
for i in range(length):
temp.append(b'0')
return temp
acc = '0xA9De700656B15946d72779ce89062345702Bd853'
sec = '7581ac9c227dffd844ae3d6a8f81a8e78cee5256541fbe9192a2f4c28a3e6599'
pid.register_company_account(b"Zero Wing", sec, b"Asd,car15", {'from': acc})
pid.register_product(b"pk-fawkefjhauwf3faf", b"iPhone XX", b"Smartphoen", 2021, '2000.21', b"Thailand", "iPhone from Apple", [91832123, 123123, 124152, 124123, 12312314, 12412312, 1231231, 123123, 123123, 1231245], {'from': acc})
pid.register_product(b"pk-fawkefjhau1245", b"Samsung XX", b"TV", 2021, '2000.21', b"Singapore", "Samsung TV", [91832123, 123123, 124152, 124123, 12312314, 0, 0, 0, 0, 0], {'from': acc})
acc2 = '0xddeb2F0B04171916944e4DE57d40b26B708A8021'
sec2 = '671678a37bd310301e4d6fe6f805f4a229b320faf6ffff0c1a25e8adddabaee2'
pid.register_company_account(b"Infinity", sec2, b"Asd,car15", {'from': acc2})
pid.register_product(b"pk-fawkefjhauwf124", b"OnePlus 6t", b"Smartphoen", 2018, '3000.21', b"Cambodia", "Android phoen from China", [432123, 123123, 124152, 124123, 12312314, 12412312, 1231231, 123123, 123123, 1231245], {'from': acc2})
pid.register_product(b"pk-53432au1245", b"MSI XX", b"Laptop", 1991, '6000.21', b"China", "Power house laptop", [432123, 123123, 124152, 124123, 12312314, 56, 0, 0, 0, 0], {'from': acc2})
pid.register_product(b"pk008312auwf3faf", b"Vyper", b"Programming Language", 2015, '000.12', b"Australia", "Ethereum Progamming language", [123, 123123, 124152, 124123, 12312314, 12412312, 1231231, 123123, 123123, 1231245], {'from': acc2})
pid.register_product(b"1241daskefjhau1245", b"Yours Truly", b"Human", 2008, '200.21', b"Myanmar", "Teenager boy", [2123, 123123, 124152, 124123, 12312314, 0, 0, 0, 0, 0], {'from': acc2})