tx · GYujRyAXesV6ihRh3Q5zWD9ZQAigXjpxVarDn1f5gaEv

3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7:  -0.01400000 Waves

2021.07.31 04:54 [1637172] smart account 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7 > SELF 0.00000000 Waves

{ "type": 13, "id": "GYujRyAXesV6ihRh3Q5zWD9ZQAigXjpxVarDn1f5gaEv", "fee": 1400000, "feeAssetId": null, "timestamp": 1627696499183, "version": 2, "chainId": 84, "sender": "3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7", "senderPublicKey": "3tp5fNYyPi4jMnkf6s1k4kBqvJ7nm57SxzvLyi8RkxT2", "proofs": [ "5tXot24h9xELJdTUwShN3d7ETqE3igtPGRosU9PeDBAM9EMAf5XcAkWzT6cK32iY4XVrBK9G53KTwqHkMtofaQwD" ], "script": "base64:AAIEAAAAAAAAAC0IAhIDCgEIEgUKAwgBCBIGCgQICAEIEgMKAQgSAwoBCBIECgIICBIFCgMICAgAAAAgAAAAAAROT05FAgAAAAROT05FAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAIRkVBVFVSRUQCAAAACGZlYXR1cmVkAAAAAAhERUxJU1RFRAIAAAAIZGVsaXN0ZWQAAAAABlZPVElORwIAAAAGdm90aW5nAAAAAAZSRVZFQUwCAAAABnJldmVhbAEAAAAOZ2V0U3RyaW5nQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAAAETk9ORQEAAAAPZ2V0SW50ZWdlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAA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ldEtleVZvdGVzQ291bnQAAAACBQAAAARpdGVtBQAAAAR1c2VyBQAAAA1uZXdWb3Rlc0NvdW50CQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAABBnZXRLZXlJdGVtU3RhdHVzAAAAAQUAAAAEaXRlbQUAAAAJbmV3U3RhdHVzBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BybhDrc=", "height": 1637172, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: VCyz55DrHA7ssaQC2qnfheGS55MNjxaJLP7Kqi6bXK1 Next: AvLa41Da37MjHYa4rFrCViEAQgHSFoJNNKgTT2UVLRvr Diff:
OldNewDifferences
155155 let account = getSupplierAccount(supplier)
156156 let itemSupplier = getValueItemSupplier(item)
157157 if ((1 == 1))
158- then throw(((((("-> " + supplier) + " === ") + itemSupplier) + " -- / ") + item))
158+ then throw(((((((("key: " + getKeyItemSupplier(item)) + " -> ") + supplier) + " === ") + itemSupplier) + " -- / ") + item))
159159 else if ((account == NONE))
160160 then throw("You should register as supplier to remove an item")
161161 else if (if ((item == NONE))
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)
157157 if ((1 == 1))
158- then throw(((((("-> " + supplier) + " === ") + itemSupplier) + " -- / ") + item))
158+ then throw(((((((("key: " + getKeyItemSupplier(item)) + " -> ") + supplier) + " === ") + itemSupplier) + " -- / ") + item))
159159 else if ((account == NONE))
160160 then throw("You should register as supplier to remove an item")
161161 else if (if ((item == NONE))
162162 then true
163163 else (supplier != itemSupplier))
164164 then throw(("You don't owned item " + item))
165165 else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)]
166166 }
167167
168168
169169
170170 @Callable(i)
171171 func removeItem (item) = {
172172 let supplier = toBase58String(i.caller.bytes)
173173 let account = getSupplierAccount(supplier)
174174 let itemSupplier = getValueItemSupplier(item)
175175 if ((account == NONE))
176176 then throw("You should register as supplier to remove an item")
177177 else if (if ((item == NONE))
178178 then true
179179 else (supplier != itemSupplier))
180180 then throw(("You don't owned item " + item))
181181 else [DeleteEntry(getKeyItemSupplier(item)), DeleteEntry(getKeyItemTitle(item)), DeleteEntry(getKeyItemPrice(item)), DeleteEntry(getKeyItemData(item))]
182182 }
183183
184184
185185
186186 @Callable(i)
187187 func purchase (item) = {
188188 let pmt = i.payments[0]
189189 if (isDefined(pmt.assetId))
190190 then throw("You can buy tokens only with Waves tokens")
191191 else {
192192 let userAddress = toBase58String(i.caller.bytes)
193193 let price = getValueItemPrice(item)
194194 let supplier = getValueItemSupplier(item)
195195 if ((price > pmt.amount))
196196 then throw("Purchase amount cannot be less than item price")
197197 else if ((pmt.amount > price))
198198 then throw("Purchase amount cannot be higher than item price")
199199 else if ((supplier == NONE))
200200 then throw("Supplier does not exists")
201201 else {
202202 let userItemCounter = getKeyUserItemCounter(userAddress, item)
203203 let newValueUserItemCounter = (getValueUserItemCounter(userAddress, item) + 1)
204204 let supplierBalanceKey = getKeyBalanceSupplier(supplier)
205205 let newSupplierBalance = (getValueBalanceSupplier(supplier) + pmt.amount)
206206 [IntegerEntry(userItemCounter, newValueUserItemCounter), IntegerEntry(supplierBalanceKey, newSupplierBalance)]
207207 }
208208 }
209209 }
210210
211211
212212
213213 @Callable(i)
214214 func voteCommit (item,hash) = {
215215 let user = toBase58String(i.caller.bytes)
216216 let commitsCount = getValueCommitsCount(item)
217217 let status = getValueItemStatus(item)
218218 if ((commitsCount >= VOTERS))
219219 then throw("Reached max number of voters")
220220 else if ((getValueCommit(item, user) != NONE))
221221 then throw("You voted already")
222222 else if ((getKeyItemSupplier(item) == NONE))
223223 then throw("Item does not exists")
224224 else if (if ((status != NONE))
225225 then (status != VOTING)
226226 else false)
227227 then throw("Voting is not active for this item now")
228228 else {
229229 let newStatus = if ((commitsCount == VOTERS))
230230 then REVEAL
231231 else VOTING
232232 [StringEntry(getKeyCommit(item, user), hash), IntegerEntry(getKeyCommitsCount(item), (commitsCount + 1)), StringEntry(getKeyItemStatus(item), newStatus)]
233233 }
234234 }
235235
236236
237237
238238 @Callable(i)
239239 func voteReveal (item,vote,salt) = {
240240 let user = toBase58String(i.caller.bytes)
241241 let status = getValueItemStatus(item)
242242 let newVotesCount = (getValueVotesCount(item, vote) + 1)
243243 let saltedVote = toBase58String(sha256(toBytes(((item + vote) + salt))))
244244 if ((saltedVote != getValueCommit(item, user)))
245245 then throw("Reveal data is not valid")
246246 else if ((VOTERS > getValueCommitsCount(item)))
247247 then throw("Max number of voters not reached")
248248 else if ((getValueReveal(item, user) != NONE))
249249 then throw("You voted already")
250250 else if (if ((status != VOTING))
251251 then (status != REVEAL)
252252 else false)
253253 then throw("Voting is not active for this item now")
254254 else if (if ((vote != FEATURED))
255255 then (vote != DELISTED)
256256 else false)
257257 then throw("Provided voting option is incorrect")
258258 else {
259259 let newStatus = if ((newVotesCount >= QUORUM))
260260 then vote
261261 else REVEAL
262262 [StringEntry(getKeyReveal(item, user), vote), IntegerEntry(getKeyVotesCount(item, user), newVotesCount), StringEntry(getKeyItemStatus(item), newStatus)]
263263 }
264264 }
265265
266266
267267 @Verifier(tx)
268268 func verify () = match tx {
269269 case t: SetScriptTransaction =>
270270 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
271271 case _ =>
272272 false
273273 }
274274

github/deemru/w8io/026f985 
61.95 ms