tx · AvLa41Da37MjHYa4rFrCViEAQgHSFoJNNKgTT2UVLRvr

3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7:  -0.01400000 Waves

2021.07.31 04:58 [1637177] smart account 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7 > SELF 0.00000000 Waves

{ "type": 13, "id": "AvLa41Da37MjHYa4rFrCViEAQgHSFoJNNKgTT2UVLRvr", "fee": 1400000, "feeAssetId": null, "timestamp": 1627696742203, "version": 2, "chainId": 84, "sender": "3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7", "senderPublicKey": "3tp5fNYyPi4jMnkf6s1k4kBqvJ7nm57SxzvLyi8RkxT2", "proofs": [ "4Ng4sdMnRUCMeRWcsBCaaV3RsHUUzZHRzZzbc3CCeoFMLd5FTe7hyzW9y8LbQTXGc9ZbgQATpjte6da5M2V99gVu" ], "script": "base64:AAIEAAAAAAAAAC0IAhIDCgEIEgUKAwgBCBIGCgQICAEIEgMKAQgSAwoBCBIECgIICBIFCgMICAgAAAAgAAAAAAROT05FAgAAAAROT05FAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAIRkVBVFVSRUQCAAAACGZlYXR1cmVkAAAAAAhERUxJU1RFRAIAAAAIZGVsaXN0ZWQAAAAABlZPVElORwIAAAAGdm90aW5nAAAAAAZSRVZFQUwCAAAABnJldmVhbAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQEAAAAPZ2V0SW50ZWdlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAA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RTY3JpcHRUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkHKV7xOQ==", "height": 1637177, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GYujRyAXesV6ihRh3Q5zWD9ZQAigXjpxVarDn1f5gaEv Next: 9y6jWuaC3kozzLLk4BsqxqwDJ2kU1bZdC5nrQGP51Hcq Diff:
OldNewDifferences
154154 let supplier = toBase58String(i.caller.bytes)
155155 let account = getSupplierAccount(supplier)
156156 let itemSupplier = getValueItemSupplier(item)
157- if ((1 == 1))
158- then throw(((((((("key: " + getKeyItemSupplier(item)) + " -> ") + supplier) + " === ") + itemSupplier) + " -- / ") + item))
159- else if ((account == NONE))
160- then throw("You should register as supplier to remove an item")
161- else if (if ((item == NONE))
162- then true
163- else (supplier != itemSupplier))
164- then throw(("You don't owned item " + item))
165- else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)]
157+ if ((account == NONE))
158+ then throw("You should register as supplier to remove an item")
159+ else if (if ((item == NONE))
160+ then true
161+ else (supplier != itemSupplier))
162+ then throw(("You don't owned item " + item))
163+ else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)]
166164 }
167165
168166
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "NONE"
55
66 let VOTERS = 3
77
88 let QUORUM = 2
99
1010 let FEATURED = "featured"
1111
1212 let DELISTED = "delisted"
1313
1414 let VOTING = "voting"
1515
1616 let REVEAL = "reveal"
1717
1818 func getStringByKey (key) = match getString(this, key) {
1919 case a: String =>
2020 a
2121 case _ =>
2222 NONE
2323 }
2424
2525
2626 func getIntegerByKey (key) = match getInteger(this, key) {
2727 case a: Int =>
2828 a
2929 case _ =>
3030 0
3131 }
3232
3333
3434 func getKeySupplierAccount (account) = (account + "_account")
3535
3636
3737 func getSupplierAccount (account) = getStringByKey(getKeySupplierAccount(account))
3838
3939
4040 func getKeyItem (supplier,title) = {
4141 let supplierTitle = (supplier + title)
4242 ("item_" + toBase58String(sha256(toBytes(supplierTitle))))
4343 }
4444
4545
4646 func getKeyItemSupplier (item) = (item + "_owner")
4747
4848
4949 func getKeyItemTitle (item) = (item + "_title")
5050
5151
5252 func getKeyItemPrice (item) = (item + "_price")
5353
5454
5555 func getKeyItemData (item) = (item + "_data")
5656
5757
5858 func getKeyCommit (item,user) = (((item + "_") + user) + "_commit")
5959
6060
6161 func getKeyCommitsCount (item) = (item + "_cmtcnt")
6262
6363
6464 func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal")
6565
6666
6767 func getKeyItemStatus (item) = (item + "_status")
6868
6969
7070 func getKeyVotesCount (item,vote) = ((item + "_res:") + vote)
7171
7272
7373 func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt")
7474
7575
7676 func getKeyBalanceSupplier (account) = (account + "_balance")
7777
7878
7979 func getValueBalanceSupplier (account) = {
8080 let supplierBalanceKey = getKeyBalanceSupplier(account)
8181 match getInteger(this, supplierBalanceKey) {
8282 case a: Int =>
8383 a
8484 case _ =>
8585 0
8686 }
8787 }
8888
8989
9090 func getValueUserItemCounter (user,item) = {
9191 let userItemCounterKey = getKeyUserItemCounter(user, item)
9292 match getInteger(this, userItemCounterKey) {
9393 case a: Int =>
9494 a
9595 case _ =>
9696 0
9797 }
9898 }
9999
100100
101101 func getValueItemPrice (item) = {
102102 let keyItemPrice = getKeyItemPrice(item)
103103 getIntegerValue(this, keyItemPrice)
104104 }
105105
106106
107107 func getValueItemSupplier (account) = getStringByKey(getKeyItemSupplier(account))
108108
109109
110110 func getValueCommit (item,user) = getStringByKey(getKeyCommit(item, user))
111111
112112
113113 func getValueCommitsCount (item) = getIntegerByKey(getKeyCommitsCount(item))
114114
115115
116116 func getValueReveal (item,user) = getStringByKey(getKeyReveal(item, user))
117117
118118
119119 func getValueItemStatus (item) = getStringByKey(getKeyItemStatus(item))
120120
121121
122122 func getValueVotesCount (item,vote) = getIntegerByKey(getKeyVotesCount(item, vote))
123123
124124
125125 @Callable(i)
126126 func registerSupplier (data) = {
127127 let supplier = toBase58String(i.caller.bytes)
128128 let account = getSupplierAccount(supplier)
129129 if ((account != NONE))
130130 then throw("This address has already registred as supplier")
131131 else [StringEntry(getKeySupplierAccount(supplier), data)]
132132 }
133133
134134
135135
136136 @Callable(i)
137137 func addItem (title,price,data) = {
138138 let supplier = toBase58String(i.caller.bytes)
139139 let account = getSupplierAccount(supplier)
140140 let item = getKeyItem(supplier, title)
141141 if ((account == NONE))
142142 then throw("You should register as supplier to add an item")
143143 else if ((0 >= price))
144144 then throw("Purchase amount cannot be less than item price")
145145 else if ((getValueItemSupplier(item) != NONE))
146146 then throw("An item already exists")
147147 else [StringEntry(getKeyItemSupplier(item), supplier), StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)]
148148 }
149149
150150
151151
152152 @Callable(i)
153153 func updateItem (item,title,price,data) = {
154154 let supplier = toBase58String(i.caller.bytes)
155155 let account = getSupplierAccount(supplier)
156156 let itemSupplier = getValueItemSupplier(item)
157- if ((1 == 1))
158- then throw(((((((("key: " + getKeyItemSupplier(item)) + " -> ") + supplier) + " === ") + itemSupplier) + " -- / ") + item))
159- else if ((account == NONE))
160- then throw("You should register as supplier to remove an item")
161- else if (if ((item == NONE))
162- then true
163- else (supplier != itemSupplier))
164- then throw(("You don't owned item " + item))
165- else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)]
157+ if ((account == NONE))
158+ then throw("You should register as supplier to remove an item")
159+ else if (if ((item == NONE))
160+ then true
161+ else (supplier != itemSupplier))
162+ then throw(("You don't owned item " + item))
163+ else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)]
166164 }
167165
168166
169167
170168 @Callable(i)
171169 func removeItem (item) = {
172170 let supplier = toBase58String(i.caller.bytes)
173171 let account = getSupplierAccount(supplier)
174172 let itemSupplier = getValueItemSupplier(item)
175173 if ((account == NONE))
176174 then throw("You should register as supplier to remove an item")
177175 else if (if ((item == NONE))
178176 then true
179177 else (supplier != itemSupplier))
180178 then throw(("You don't owned item " + item))
181179 else [DeleteEntry(getKeyItemSupplier(item)), DeleteEntry(getKeyItemTitle(item)), DeleteEntry(getKeyItemPrice(item)), DeleteEntry(getKeyItemData(item))]
182180 }
183181
184182
185183
186184 @Callable(i)
187185 func purchase (item) = {
188186 let pmt = i.payments[0]
189187 if (isDefined(pmt.assetId))
190188 then throw("You can buy tokens only with Waves tokens")
191189 else {
192190 let userAddress = toBase58String(i.caller.bytes)
193191 let price = getValueItemPrice(item)
194192 let supplier = getValueItemSupplier(item)
195193 if ((price > pmt.amount))
196194 then throw("Purchase amount cannot be less than item price")
197195 else if ((pmt.amount > price))
198196 then throw("Purchase amount cannot be higher than item price")
199197 else if ((supplier == NONE))
200198 then throw("Supplier does not exists")
201199 else {
202200 let userItemCounter = getKeyUserItemCounter(userAddress, item)
203201 let newValueUserItemCounter = (getValueUserItemCounter(userAddress, item) + 1)
204202 let supplierBalanceKey = getKeyBalanceSupplier(supplier)
205203 let newSupplierBalance = (getValueBalanceSupplier(supplier) + pmt.amount)
206204 [IntegerEntry(userItemCounter, newValueUserItemCounter), IntegerEntry(supplierBalanceKey, newSupplierBalance)]
207205 }
208206 }
209207 }
210208
211209
212210
213211 @Callable(i)
214212 func voteCommit (item,hash) = {
215213 let user = toBase58String(i.caller.bytes)
216214 let commitsCount = getValueCommitsCount(item)
217215 let status = getValueItemStatus(item)
218216 if ((commitsCount >= VOTERS))
219217 then throw("Reached max number of voters")
220218 else if ((getValueCommit(item, user) != NONE))
221219 then throw("You voted already")
222220 else if ((getKeyItemSupplier(item) == NONE))
223221 then throw("Item does not exists")
224222 else if (if ((status != NONE))
225223 then (status != VOTING)
226224 else false)
227225 then throw("Voting is not active for this item now")
228226 else {
229227 let newStatus = if ((commitsCount == VOTERS))
230228 then REVEAL
231229 else VOTING
232230 [StringEntry(getKeyCommit(item, user), hash), IntegerEntry(getKeyCommitsCount(item), (commitsCount + 1)), StringEntry(getKeyItemStatus(item), newStatus)]
233231 }
234232 }
235233
236234
237235
238236 @Callable(i)
239237 func voteReveal (item,vote,salt) = {
240238 let user = toBase58String(i.caller.bytes)
241239 let status = getValueItemStatus(item)
242240 let newVotesCount = (getValueVotesCount(item, vote) + 1)
243241 let saltedVote = toBase58String(sha256(toBytes(((item + vote) + salt))))
244242 if ((saltedVote != getValueCommit(item, user)))
245243 then throw("Reveal data is not valid")
246244 else if ((VOTERS > getValueCommitsCount(item)))
247245 then throw("Max number of voters not reached")
248246 else if ((getValueReveal(item, user) != NONE))
249247 then throw("You voted already")
250248 else if (if ((status != VOTING))
251249 then (status != REVEAL)
252250 else false)
253251 then throw("Voting is not active for this item now")
254252 else if (if ((vote != FEATURED))
255253 then (vote != DELISTED)
256254 else false)
257255 then throw("Provided voting option is incorrect")
258256 else {
259257 let newStatus = if ((newVotesCount >= QUORUM))
260258 then vote
261259 else REVEAL
262260 [StringEntry(getKeyReveal(item, user), vote), IntegerEntry(getKeyVotesCount(item, user), newVotesCount), StringEntry(getKeyItemStatus(item), newStatus)]
263261 }
264262 }
265263
266264
267265 @Verifier(tx)
268266 func verify () = match tx {
269267 case t: SetScriptTransaction =>
270268 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
271269 case _ =>
272270 false
273271 }
274272

github/deemru/w8io/026f985 
47.13 ms