tx · G9q5Pgx6bboREvJtPWaXwaspwajW3jNo6FN7WbiD8ncT

3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7:  -0.01400000 Waves

2021.07.31 20:50 [1638133] smart account 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7 > SELF 0.00000000 Waves

{ "type": 13, "id": "G9q5Pgx6bboREvJtPWaXwaspwajW3jNo6FN7WbiD8ncT", "fee": 1400000, "feeAssetId": null, "timestamp": 1627753822803, "version": 2, "chainId": 84, "sender": "3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7", "senderPublicKey": "3tp5fNYyPi4jMnkf6s1k4kBqvJ7nm57SxzvLyi8RkxT2", "proofs": [ "Dw8v8whvqPmFYkGrnM7WVnemcnQvPmiFfwwWNuRme8HNonqerAcwZT7WG3pxu7XrizrjeshzTmK7X7qLDPLmMiZ" ], "script": "base64:AAIEAAAAAAAAAC8IAhIDCgEIEgYKBAgBCAESBwoFCAgBCAESAwoBCBIDCgEIEgQKAggIEgUKAwgICAAAACIAAAAABE5PTkUCAAAABE5PTkUAAAAABlZPVEVSUwAAAAAAAAAAAwAAAAAGUVVPUlVNAAAAAAAAAAACAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FAQAAAA9nZXRJbnRlZ2VyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQA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M", "height": 1638133, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6fVaqvvStosUw9oDXN6ACyBGwjNRBhQN4bhuqCDRX36m Next: 2iKmC1AfjngVF8QJ47GNYUANHmyPyTzSRJfLyV2Rp6ny Diff:
OldNewDifferences
197197 let price = getValueItemPrice(item)
198198 let supplier = getValueItemSupplier(item)
199199 let expire = getValueItemExpireTime(item)
200- if ((lastBlock.timestamp >= expire))
200+ if (if ((expire > 0))
201+ then (lastBlock.timestamp >= expire)
202+ else false)
201203 then throw("Coupon expired")
202204 else if ((price > pmt.amount))
203205 then throw("Purchase amount cannot be less than item price")
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 getKeyItemExpireDate (item) = (item + "_expiredate")
5959
6060
6161 func getKeyCommit (item,user) = (((item + "_") + user) + "_commit")
6262
6363
6464 func getKeyCommitsCount (item) = (item + "_cmtcnt")
6565
6666
6767 func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal")
6868
6969
7070 func getKeyItemStatus (item) = (item + "_status")
7171
7272
7373 func getKeyVotesCount (item,vote) = ((item + "_res:") + vote)
7474
7575
7676 func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt")
7777
7878
7979 func getKeyBalanceSupplier (account) = (account + "_balance")
8080
8181
8282 func getValueBalanceSupplier (account) = {
8383 let supplierBalanceKey = getKeyBalanceSupplier(account)
8484 match getInteger(this, supplierBalanceKey) {
8585 case a: Int =>
8686 a
8787 case _ =>
8888 0
8989 }
9090 }
9191
9292
9393 func getValueUserItemCounter (user,item) = {
9494 let userItemCounterKey = getKeyUserItemCounter(user, item)
9595 match getInteger(this, userItemCounterKey) {
9696 case a: Int =>
9797 a
9898 case _ =>
9999 0
100100 }
101101 }
102102
103103
104104 func getValueItemPrice (item) = {
105105 let keyItemPrice = getKeyItemPrice(item)
106106 getIntegerValue(this, keyItemPrice)
107107 }
108108
109109
110110 func getValueItemSupplier (item) = getStringByKey(getKeyItemSupplier(item))
111111
112112
113113 func getValueItemExpireTime (item) = getIntegerByKey(getKeyItemExpireDate(item))
114114
115115
116116 func getValueCommit (item,user) = getStringByKey(getKeyCommit(item, user))
117117
118118
119119 func getValueCommitsCount (item) = getIntegerByKey(getKeyCommitsCount(item))
120120
121121
122122 func getValueReveal (item,user) = getStringByKey(getKeyReveal(item, user))
123123
124124
125125 func getValueItemStatus (item) = getStringByKey(getKeyItemStatus(item))
126126
127127
128128 func getValueVotesCount (item,vote) = getIntegerByKey(getKeyVotesCount(item, vote))
129129
130130
131131 @Callable(i)
132132 func registerSupplier (data) = {
133133 let supplier = toBase58String(i.caller.bytes)
134134 let account = getSupplierAccount(supplier)
135135 if ((account != NONE))
136136 then throw("This address has already registred as supplier")
137137 else [StringEntry(getKeySupplierAccount(supplier), data)]
138138 }
139139
140140
141141
142142 @Callable(i)
143143 func addItem (title,price,data,expire) = {
144144 let supplier = toBase58String(i.caller.bytes)
145145 let account = getSupplierAccount(supplier)
146146 let item = getKeyItem(supplier, title)
147147 if ((account == NONE))
148148 then throw("You should register as supplier to add an item")
149149 else if ((0 >= price))
150150 then throw("Purchase amount cannot be less than item price")
151151 else if ((getValueItemSupplier(item) != NONE))
152152 then throw("An item already exists")
153153 else [StringEntry(getKeyItemSupplier(item), supplier), StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data), IntegerEntry(getKeyItemExpireDate(item), expire)]
154154 }
155155
156156
157157
158158 @Callable(i)
159159 func updateItem (item,title,price,data,expire) = {
160160 let supplier = toBase58String(i.caller.bytes)
161161 let account = getSupplierAccount(supplier)
162162 let itemSupplier = getValueItemSupplier(item)
163163 if ((account == NONE))
164164 then throw("You should register as supplier to remove an item")
165165 else if (if ((item == NONE))
166166 then true
167167 else (supplier != itemSupplier))
168168 then throw(("You don't owned item " + item))
169169 else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data), IntegerEntry(getKeyItemExpireDate(item), expire)]
170170 }
171171
172172
173173
174174 @Callable(i)
175175 func removeItem (item) = {
176176 let supplier = toBase58String(i.caller.bytes)
177177 let account = getSupplierAccount(supplier)
178178 let itemSupplier = getValueItemSupplier(item)
179179 if ((account == NONE))
180180 then throw("You should register as supplier to remove an item")
181181 else if (if ((item == NONE))
182182 then true
183183 else (supplier != itemSupplier))
184184 then throw(("You don't owned item " + item))
185185 else [DeleteEntry(getKeyItemSupplier(item)), DeleteEntry(getKeyItemTitle(item)), DeleteEntry(getKeyItemPrice(item)), DeleteEntry(getKeyItemData(item)), DeleteEntry(getKeyItemExpireDate(item))]
186186 }
187187
188188
189189
190190 @Callable(i)
191191 func purchase (item) = {
192192 let pmt = i.payments[0]
193193 if (isDefined(pmt.assetId))
194194 then throw("You can buy tokens only with Waves tokens")
195195 else {
196196 let userAddress = toBase58String(i.caller.bytes)
197197 let price = getValueItemPrice(item)
198198 let supplier = getValueItemSupplier(item)
199199 let expire = getValueItemExpireTime(item)
200- if ((lastBlock.timestamp >= expire))
200+ if (if ((expire > 0))
201+ then (lastBlock.timestamp >= expire)
202+ else false)
201203 then throw("Coupon expired")
202204 else if ((price > pmt.amount))
203205 then throw("Purchase amount cannot be less than item price")
204206 else if ((pmt.amount > price))
205207 then throw("Purchase amount cannot be higher than item price")
206208 else if ((supplier == NONE))
207209 then throw("Supplier does not exists")
208210 else {
209211 let userItemCounter = getKeyUserItemCounter(userAddress, item)
210212 let newValueUserItemCounter = (getValueUserItemCounter(userAddress, item) + 1)
211213 let supplierBalanceKey = getKeyBalanceSupplier(supplier)
212214 let newSupplierBalance = (getValueBalanceSupplier(supplier) + pmt.amount)
213215 let asset = Issue("Asset", "", 1, 0, true, unit, 0)
214216 let assetId = calculateAssetId(asset)
215217 [IntegerEntry(userItemCounter, newValueUserItemCounter), IntegerEntry(supplierBalanceKey, newSupplierBalance)]
216218 }
217219 }
218220 }
219221
220222
221223
222224 @Callable(i)
223225 func voteCommit (item,hash) = {
224226 let user = toBase58String(i.caller.bytes)
225227 let commitsCount = getValueCommitsCount(item)
226228 let status = getValueItemStatus(item)
227229 if ((commitsCount >= VOTERS))
228230 then throw("Reached max number of voters")
229231 else if ((getValueCommit(item, user) != NONE))
230232 then throw("You voted already")
231233 else if ((getKeyItemSupplier(item) == NONE))
232234 then throw("Item does not exists")
233235 else if (if ((status != NONE))
234236 then (status != VOTING)
235237 else false)
236238 then throw("Voting is not active for this item now")
237239 else {
238240 let newStatus = if ((commitsCount == VOTERS))
239241 then REVEAL
240242 else VOTING
241243 [StringEntry(getKeyCommit(item, user), hash), IntegerEntry(getKeyCommitsCount(item), (commitsCount + 1)), StringEntry(getKeyItemStatus(item), newStatus)]
242244 }
243245 }
244246
245247
246248
247249 @Callable(i)
248250 func voteReveal (item,vote,salt) = {
249251 let user = toBase58String(i.caller.bytes)
250252 let status = getValueItemStatus(item)
251253 let newVotesCount = (getValueVotesCount(item, vote) + 1)
252254 let saltedVote = toBase58String(sha256(toBytes(((item + vote) + salt))))
253255 if ((saltedVote != getValueCommit(item, user)))
254256 then throw("Reveal data is not valid")
255257 else if ((VOTERS > getValueCommitsCount(item)))
256258 then throw("Max number of voters not reached")
257259 else if ((getValueReveal(item, user) != NONE))
258260 then throw("You voted already")
259261 else if (if ((status != VOTING))
260262 then (status != REVEAL)
261263 else false)
262264 then throw("Voting is not active for this item now")
263265 else if (if ((vote != FEATURED))
264266 then (vote != DELISTED)
265267 else false)
266268 then throw("Provided voting option is incorrect")
267269 else {
268270 let newStatus = if ((newVotesCount >= QUORUM))
269271 then vote
270272 else REVEAL
271273 [StringEntry(getKeyReveal(item, user), vote), IntegerEntry(getKeyVotesCount(item, user), newVotesCount), StringEntry(getKeyItemStatus(item), newStatus)]
272274 }
273275 }
274276
275277
276278 @Verifier(tx)
277279 func verify () = match tx {
278280 case t: SetScriptTransaction =>
279281 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
280282 case _ =>
281283 false
282284 }
283285

github/deemru/w8io/026f985 
36.72 ms