tx · 9DeRvmqZWKVaN97arxHdJh2fi6f1q7nkLQprehsCz9E1

3Mwv6cMyrLP5CQ3dTCsheo4kQjLGfKZE5C4:  -0.01400000 Waves

2019.07.04 09:35 [570321] smart account 3Mwv6cMyrLP5CQ3dTCsheo4kQjLGfKZE5C4 > SELF 0.00000000 Waves

{ "type": 13, "id": "9DeRvmqZWKVaN97arxHdJh2fi6f1q7nkLQprehsCz9E1", "fee": 1400000, "feeAssetId": null, "timestamp": 1562222138944, "version": 1, "sender": "3Mwv6cMyrLP5CQ3dTCsheo4kQjLGfKZE5C4", "senderPublicKey": "DSnYugobtDLc6RsQn654J1NALWpKRBdyZamm98Xc8ChL", "proofs": [ "647HcFkiNKWzEmfKtoR47WB1TXartaWYHtmr1SeiS2BY2Tf6BKB3jLdnpPTtJYgDVBX1ESXxxE5aGbQoubfAvv9r" ], "script": "base64:AAIDAAAAAAAAAAAAAAAjAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAAAAAAETk9ORQIAAAAEbm9uZQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQ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ZwAAAAIAAAAAAAAAAAAFAAAABXByaWNlCQAAAgAAAAECAAAALnB1cmNoYXNlIGFtb3VudCBjYW5ub3QgYmUgbGVzcyB0aGFuIGl0ZW0gcHJpY2UDCQEAAAACIT0AAAACCQEAAAAUZ2V0VmFsdWVJdGVtU3VwcGxpZXIAAAABBQAAAARpdGVtBQAAAAROT05FCQAAAgAAAAECAAAAGGFuIGl0ZW0gaXMgYWxyZWFkeSBleGlzdAMJAAAAAAAAAgUAAAARc3VwcGxpZXJXaGl0ZWxpc3QFAAAAC0JMQUNLTElTVEVECQAAAgAAAAECAAAAJ3N1cHBsaWVyJ3MgYWNjb3VudCBoYXMgYmVlbiBibGFja2xpc3RlZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEmdldEtleUl0ZW1TdXBwbGllcgAAAAEFAAAABGl0ZW0FAAAAD3N1cHBsaWVyQWRkcmVzcwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAD2dldEtleUl0ZW1QcmljZQAAAAEFAAAABGl0ZW0FAAAABXByaWNlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAOZ2V0S2V5SXRlbURhdGEAAAABBQAAAARpdGVtBQAAAARkYXRhCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAcZ2V0RXh0S2V5SXRlbVdoaXRlTGlzdFN0YXR1cwAAAAEFAAAAD3N1cHBsaWVyQWRkcmVzcwUAAAARc3VwcGxpZXJXaGl0ZWxpc3QFAAAAA25pbAAAAAAjiAiC", "chainId": 84, "height": 570321, "spentComplexity": 0 } View: original | compacted Prev: 8tQxFkBcgSnn4rw34QYEuzNTyyUJK3Y956toTBLwZYqE Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func getExtValueItemWhiteListState (item) = (item + "_verifier_status")
4+let VOTERS = 3
5+
6+let QUORUM = 2
7+
8+let VOTING = "voting"
9+
10+let REVEAL = "reveal"
11+
12+let FEATURED = "featured"
13+
14+let DELISTED = "delisted"
15+
16+let NONE = "none"
17+
18+func getNumberByKey (key) = {
19+ let num = match getInteger(this, key) {
20+ case a: Int =>
21+ a
22+ case _ =>
23+ 0
24+ }
25+ num
26+ }
27+
28+
29+func getStrByKey (key) = {
30+ let str = match getString(this, key) {
31+ case a: String =>
32+ a
33+ case _ =>
34+ NONE
35+ }
36+ str
37+ }
38+
39+
40+func getKeyItemPrice (item) = (item + "_price")
41+
42+
43+func getValueItemPrice (item) = getNumberByKey(getKeyItemPrice(item))
44+
45+
46+func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt")
47+
48+
49+func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item))
50+
51+
52+func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title)))))
53+
54+
55+func getKeyItemData (item) = (item + "_data")
56+
57+
58+func getKeyItemSupplier (item) = (item + "_owner")
59+
60+
61+func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item))
62+
63+
64+func getKeyBalanceSupplier (account) = (account + "_balance")
65+
66+
67+func getValueBalanceSupplier (account) = getNumberByKey(getKeyBalanceSupplier(account))
68+
69+
70+func getKeyCommit (item,user) = (((item + "_") + user) + "_commit")
71+
72+
73+func getValueCommit (item,user) = getStrByKey(getKeyCommit(item, user))
74+
75+
76+func getKeyCommitsCount (item) = (item + "_comcnt")
77+
78+
79+func getValueCommitsCount (item) = getNumberByKey(getKeyCommitsCount(item))
80+
81+
82+func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal")
83+
84+
85+func getValueReveal (item,user) = getStrByKey(getKeyReveal(item, user))
86+
87+
88+func getKeyItemStatus (item) = (item + "_status")
89+
90+
91+func getValueItemStatus (item) = getStrByKey(getKeyItemStatus(item))
92+
93+
94+func getKeyVoteCount (item,vote) = ((item + "_res:") + vote)
95+
96+
97+func getValueVoteCount (item,vote) = getNumberByKey(getKeyVoteCount(item, vote))
598
699
7100 let verifier = "3Mwv6cMyrLP5CQ3dTCsheo4kQjLGfKZE5C4"
9102 let VERIFIED = "verified"
10103
11104 let BLACKLISTED = "blacklist"
105+
106+func getExtKeyItemWhiteListStatus (item) = (item + "_verifier_status")
107+
108+
109+func getExtAddressOracle () = extract(addressFromString(verifier))
110+
111+
112+func getExtValueItemWhiteListStatus (oracle,account) = {
113+ let str = match getString(oracle, getExtKeyItemWhiteListStatus(account)) {
114+ case a: String =>
115+ a
116+ case _ =>
117+ NONE
118+ }
119+ str
120+ }
121+
122+
123+@Callable(i)
124+func purchase (item) = {
125+ let pmt = extract(i.payment)
126+ if (isDefined(pmt.assetId))
127+ then throw("WAVES tokens only at the moment")
128+ else {
129+ let userAddress = toBase58String(i.caller.bytes)
130+ let price = getValueItemPrice(item)
131+ let supplierAddress = getValueItemSupplier(item)
132+ if ((pmt.amount > price))
133+ then throw("purchase amount cannot be less than item price")
134+ else if ((pmt.amount > price))
135+ then throw("purchase amount cannot be higher than item price")
136+ else if ((supplierAddress == NONE))
137+ then throw("supplier does not exist")
138+ else WriteSet([DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyBalanceSupplier(supplierAddress), (getValueBalanceSupplier(supplierAddress) + pmt.amount))])
139+ }
140+ }
141+
142+
143+
144+@Callable(i)
145+func withdraw () = {
146+ let supplierAddress = toBase58String(i.caller.bytes)
147+ let balance = getValueBalanceSupplier(supplierAddress)
148+ if ((0 >= balance))
149+ then throw("insufficient balance")
150+ else ScriptResult(WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(supplierAddress), balance, unit)]))
151+ }
152+
153+
154+
155+@Callable(i)
156+func voteCommit (item,hash) = {
157+ let user = toBase58String(i.caller.bytes)
158+ let commits = getValueCommitsCount(item)
159+ let status = getValueItemStatus(item)
160+ if ((commits >= VOTERS))
161+ then throw("reached max num of voters")
162+ else if ((getValueCommit(item, user) != NONE))
163+ then throw("user has already participated")
164+ else if ((getKeyItemSupplier(item) == NONE))
165+ then throw("item does not exist")
166+ else if (if ((status != NONE))
167+ then (status != VOTING)
168+ else false)
169+ then throw("voting is not possible")
170+ else WriteSet([DataEntry(getKeyCommit(item, user), hash), DataEntry(getKeyCommitsCount(item), (commits + 1)), DataEntry(getKeyItemStatus(item), if ((commits == VOTERS))
171+ then REVEAL
172+ else VOTING)])
173+ }
174+
175+
176+
177+@Callable(i)
178+func voteReveal (item,vote,salt) = {
179+ let user = toBase58String(i.caller.bytes)
180+ let status = getValueItemStatus(item)
181+ let newVoteCount = (getValueVoteCount(item, vote) + 1)
182+ if ((toBase58String(sha256(toBytes((vote + salt)))) != getValueCommit(item, user)))
183+ then throw("reveal data is not valid")
184+ else if ((VOTERS > getValueCommitsCount(item)))
185+ then throw("max num of voters hasnt reached yet")
186+ else if ((getValueReveal(item, user) != NONE))
187+ then throw("user has already partcipated")
188+ else if (if ((status != VOTING))
189+ then (status != REVEAL)
190+ else false)
191+ then throw("wrong status")
192+ else if (if ((vote != FEATURED))
193+ then (vote != DELISTED)
194+ else false)
195+ then throw("wrong vote")
196+ else if (if ((status == FEATURED))
197+ then true
198+ else (status == DELISTED))
199+ then throw("vote has finished")
200+ else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM))
201+ then vote
202+ else REVEAL)])
203+ }
204+
205+
12206
13207 @Callable(i)
14208 func setstatus (supplier,status) = {
19213 then (status != BLACKLISTED)
20214 else false)
21215 then throw("wrong status")
22- else WriteSet([DataEntry(getExtValueItemWhiteListState(supplier), status)])
216+ else WriteSet([DataEntry(getExtKeyItemWhiteListStatus(supplier), status)])
217+ }
218+
219+
220+
221+@Callable(i)
222+func addItem (title,price,data) = {
223+ let supplierAddress = toBase58String(i.caller.bytes)
224+ let item = getKeyItem(supplierAddress, title)
225+ let supplierWhitelist = getExtValueItemWhiteListStatus(getExtAddressOracle(), supplierAddress)
226+ if ((0 >= price))
227+ then throw("purchase amount cannot be less than item price")
228+ else if ((getValueItemSupplier(item) != NONE))
229+ then throw("an item is already exist")
230+ else if ((supplierWhitelist == BLACKLISTED))
231+ then throw("supplier's account has been blacklisted")
232+ else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data), DataEntry(getExtKeyItemWhiteListStatus(supplierAddress), supplierWhitelist)])
23233 }
24234
25235
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-func getExtValueItemWhiteListState (item) = (item + "_verifier_status")
4+let VOTERS = 3
5+
6+let QUORUM = 2
7+
8+let VOTING = "voting"
9+
10+let REVEAL = "reveal"
11+
12+let FEATURED = "featured"
13+
14+let DELISTED = "delisted"
15+
16+let NONE = "none"
17+
18+func getNumberByKey (key) = {
19+ let num = match getInteger(this, key) {
20+ case a: Int =>
21+ a
22+ case _ =>
23+ 0
24+ }
25+ num
26+ }
27+
28+
29+func getStrByKey (key) = {
30+ let str = match getString(this, key) {
31+ case a: String =>
32+ a
33+ case _ =>
34+ NONE
35+ }
36+ str
37+ }
38+
39+
40+func getKeyItemPrice (item) = (item + "_price")
41+
42+
43+func getValueItemPrice (item) = getNumberByKey(getKeyItemPrice(item))
44+
45+
46+func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt")
47+
48+
49+func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item))
50+
51+
52+func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title)))))
53+
54+
55+func getKeyItemData (item) = (item + "_data")
56+
57+
58+func getKeyItemSupplier (item) = (item + "_owner")
59+
60+
61+func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item))
62+
63+
64+func getKeyBalanceSupplier (account) = (account + "_balance")
65+
66+
67+func getValueBalanceSupplier (account) = getNumberByKey(getKeyBalanceSupplier(account))
68+
69+
70+func getKeyCommit (item,user) = (((item + "_") + user) + "_commit")
71+
72+
73+func getValueCommit (item,user) = getStrByKey(getKeyCommit(item, user))
74+
75+
76+func getKeyCommitsCount (item) = (item + "_comcnt")
77+
78+
79+func getValueCommitsCount (item) = getNumberByKey(getKeyCommitsCount(item))
80+
81+
82+func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal")
83+
84+
85+func getValueReveal (item,user) = getStrByKey(getKeyReveal(item, user))
86+
87+
88+func getKeyItemStatus (item) = (item + "_status")
89+
90+
91+func getValueItemStatus (item) = getStrByKey(getKeyItemStatus(item))
92+
93+
94+func getKeyVoteCount (item,vote) = ((item + "_res:") + vote)
95+
96+
97+func getValueVoteCount (item,vote) = getNumberByKey(getKeyVoteCount(item, vote))
598
699
7100 let verifier = "3Mwv6cMyrLP5CQ3dTCsheo4kQjLGfKZE5C4"
8101
9102 let VERIFIED = "verified"
10103
11104 let BLACKLISTED = "blacklist"
105+
106+func getExtKeyItemWhiteListStatus (item) = (item + "_verifier_status")
107+
108+
109+func getExtAddressOracle () = extract(addressFromString(verifier))
110+
111+
112+func getExtValueItemWhiteListStatus (oracle,account) = {
113+ let str = match getString(oracle, getExtKeyItemWhiteListStatus(account)) {
114+ case a: String =>
115+ a
116+ case _ =>
117+ NONE
118+ }
119+ str
120+ }
121+
122+
123+@Callable(i)
124+func purchase (item) = {
125+ let pmt = extract(i.payment)
126+ if (isDefined(pmt.assetId))
127+ then throw("WAVES tokens only at the moment")
128+ else {
129+ let userAddress = toBase58String(i.caller.bytes)
130+ let price = getValueItemPrice(item)
131+ let supplierAddress = getValueItemSupplier(item)
132+ if ((pmt.amount > price))
133+ then throw("purchase amount cannot be less than item price")
134+ else if ((pmt.amount > price))
135+ then throw("purchase amount cannot be higher than item price")
136+ else if ((supplierAddress == NONE))
137+ then throw("supplier does not exist")
138+ else WriteSet([DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyBalanceSupplier(supplierAddress), (getValueBalanceSupplier(supplierAddress) + pmt.amount))])
139+ }
140+ }
141+
142+
143+
144+@Callable(i)
145+func withdraw () = {
146+ let supplierAddress = toBase58String(i.caller.bytes)
147+ let balance = getValueBalanceSupplier(supplierAddress)
148+ if ((0 >= balance))
149+ then throw("insufficient balance")
150+ else ScriptResult(WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(supplierAddress), balance, unit)]))
151+ }
152+
153+
154+
155+@Callable(i)
156+func voteCommit (item,hash) = {
157+ let user = toBase58String(i.caller.bytes)
158+ let commits = getValueCommitsCount(item)
159+ let status = getValueItemStatus(item)
160+ if ((commits >= VOTERS))
161+ then throw("reached max num of voters")
162+ else if ((getValueCommit(item, user) != NONE))
163+ then throw("user has already participated")
164+ else if ((getKeyItemSupplier(item) == NONE))
165+ then throw("item does not exist")
166+ else if (if ((status != NONE))
167+ then (status != VOTING)
168+ else false)
169+ then throw("voting is not possible")
170+ else WriteSet([DataEntry(getKeyCommit(item, user), hash), DataEntry(getKeyCommitsCount(item), (commits + 1)), DataEntry(getKeyItemStatus(item), if ((commits == VOTERS))
171+ then REVEAL
172+ else VOTING)])
173+ }
174+
175+
176+
177+@Callable(i)
178+func voteReveal (item,vote,salt) = {
179+ let user = toBase58String(i.caller.bytes)
180+ let status = getValueItemStatus(item)
181+ let newVoteCount = (getValueVoteCount(item, vote) + 1)
182+ if ((toBase58String(sha256(toBytes((vote + salt)))) != getValueCommit(item, user)))
183+ then throw("reveal data is not valid")
184+ else if ((VOTERS > getValueCommitsCount(item)))
185+ then throw("max num of voters hasnt reached yet")
186+ else if ((getValueReveal(item, user) != NONE))
187+ then throw("user has already partcipated")
188+ else if (if ((status != VOTING))
189+ then (status != REVEAL)
190+ else false)
191+ then throw("wrong status")
192+ else if (if ((vote != FEATURED))
193+ then (vote != DELISTED)
194+ else false)
195+ then throw("wrong vote")
196+ else if (if ((status == FEATURED))
197+ then true
198+ else (status == DELISTED))
199+ then throw("vote has finished")
200+ else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM))
201+ then vote
202+ else REVEAL)])
203+ }
204+
205+
12206
13207 @Callable(i)
14208 func setstatus (supplier,status) = {
15209 let account = toBase58String(i.caller.bytes)
16210 if ((account != verifier))
17211 then throw("only oracle verifier are able to manage whitelist")
18212 else if (if ((status != VERIFIED))
19213 then (status != BLACKLISTED)
20214 else false)
21215 then throw("wrong status")
22- else WriteSet([DataEntry(getExtValueItemWhiteListState(supplier), status)])
216+ else WriteSet([DataEntry(getExtKeyItemWhiteListStatus(supplier), status)])
217+ }
218+
219+
220+
221+@Callable(i)
222+func addItem (title,price,data) = {
223+ let supplierAddress = toBase58String(i.caller.bytes)
224+ let item = getKeyItem(supplierAddress, title)
225+ let supplierWhitelist = getExtValueItemWhiteListStatus(getExtAddressOracle(), supplierAddress)
226+ if ((0 >= price))
227+ then throw("purchase amount cannot be less than item price")
228+ else if ((getValueItemSupplier(item) != NONE))
229+ then throw("an item is already exist")
230+ else if ((supplierWhitelist == BLACKLISTED))
231+ then throw("supplier's account has been blacklisted")
232+ else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data), DataEntry(getExtKeyItemWhiteListStatus(supplierAddress), supplierWhitelist)])
23233 }
24234
25235

github/deemru/w8io/169f3d6 
49.50 ms