tx · BUGgRT9xfAthJ1syRHWy9tRPS3BVykAJjH7AZFGy2TgE

3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7:  -0.01400000 Waves

2021.07.31 19:56 [1638077] smart account 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7 > SELF 0.00000000 Waves

{ "type": 13, "id": "BUGgRT9xfAthJ1syRHWy9tRPS3BVykAJjH7AZFGy2TgE", "fee": 1400000, "feeAssetId": null, "timestamp": 1627750585039, "version": 2, "chainId": 84, "sender": "3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7", "senderPublicKey": "3tp5fNYyPi4jMnkf6s1k4kBqvJ7nm57SxzvLyi8RkxT2", "proofs": [ "2LZGaaHg9p7KpmM8TU8QtqHFaaseEhviQ2AwW7nZLdU6cAe9Pgy8zJzJ43yP2S4xcU1VpPuyXuZUqWTyiRGvmkGD" ], "script": "base64:AAIEAAAAAAAAAC8IAhIDCgEIEgYKBAgBCAESBwoFCAgBCAESAwoBCBIDCgEIEgQKAggIEgUKAwgICAAAACIAAAAABE5PTkUCAAAABE5PTkUAAAAABlZPVEVSUwAAAAAAAAAAAwAAAAAGUVVPUlVNAAAAAAAAAAACAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FAQAAAA9nZXRJbnRlZ2VyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAA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ZWN0BAAAAAluZXdTdGF0dXMDCQAAZwAAAAIFAAAADW5ld1ZvdGVzQ291bnQFAAAABlFVT1JVTQUAAAAEdm90ZQUAAAAGUkVWRUFMCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAxnZXRLZXlSZXZlYWwAAAACBQAAAARpdGVtBQAAAAR1c2VyBQAAAAR2b3RlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAAQZ2V0S2V5Vm90ZXNDb3VudAAAAAIFAAAABGl0ZW0FAAAABHVzZXIFAAAADW5ld1ZvdGVzQ291bnQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAAEGdldEtleUl0ZW1TdGF0dXMAAAABBQAAAARpdGVtBQAAAAluZXdTdGF0dXMFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkHmH3dlA==", "height": 1638077, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9y6jWuaC3kozzLLk4BsqxqwDJ2kU1bZdC5nrQGP51Hcq Next: 6fVaqvvStosUw9oDXN6ACyBGwjNRBhQN4bhuqCDRX36m Diff:
OldNewDifferences
5555 func getKeyItemData (item) = (item + "_data")
5656
5757
58+func getKeyItemExpireDate (item) = (item + "_expiredate")
59+
60+
5861 func getKeyCommit (item,user) = (((item + "_") + user) + "_commit")
5962
6063
104107 }
105108
106109
107-func getValueItemSupplier (account) = getStringByKey(getKeyItemSupplier(account))
110+func getValueItemSupplier (item) = getStringByKey(getKeyItemSupplier(item))
111+
112+
113+func getValueItemExpireTime (item) = getIntegerByKey(getKeyItemExpireDate(item))
108114
109115
110116 func getValueCommit (item,user) = getStringByKey(getKeyCommit(item, user))
134140
135141
136142 @Callable(i)
137-func addItem (title,price,data) = {
143+func addItem (title,price,data,expire) = {
138144 let supplier = toBase58String(i.caller.bytes)
139145 let account = getSupplierAccount(supplier)
140146 let item = getKeyItem(supplier, title)
144150 then throw("Purchase amount cannot be less than item price")
145151 else if ((getValueItemSupplier(item) != NONE))
146152 then throw("An item already exists")
147- else [StringEntry(getKeyItemSupplier(item), supplier), StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)]
153+ else [StringEntry(getKeyItemSupplier(item), supplier), StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data), IntegerEntry(getKeyItemExpireDate(item), expire)]
148154 }
149155
150156
151157
152158 @Callable(i)
153-func updateItem (item,title,price,data) = {
159+func updateItem (item,title,price,data,expire) = {
154160 let supplier = toBase58String(i.caller.bytes)
155161 let account = getSupplierAccount(supplier)
156162 let itemSupplier = getValueItemSupplier(item)
160166 then true
161167 else (supplier != itemSupplier))
162168 then throw(("You don't owned item " + item))
163- else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)]
169+ else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data), IntegerEntry(getKeyItemExpireDate(item), expire)]
164170 }
165171
166172
176182 then true
177183 else (supplier != itemSupplier))
178184 then throw(("You don't owned item " + item))
179- else [DeleteEntry(getKeyItemSupplier(item)), DeleteEntry(getKeyItemTitle(item)), DeleteEntry(getKeyItemPrice(item)), DeleteEntry(getKeyItemData(item))]
185+ else [DeleteEntry(getKeyItemSupplier(item)), DeleteEntry(getKeyItemTitle(item)), DeleteEntry(getKeyItemPrice(item)), DeleteEntry(getKeyItemData(item)), DeleteEntry(getKeyItemExpireDate(item))]
180186 }
181187
182188
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
58+func getKeyItemExpireDate (item) = (item + "_expiredate")
59+
60+
5861 func getKeyCommit (item,user) = (((item + "_") + user) + "_commit")
5962
6063
6164 func getKeyCommitsCount (item) = (item + "_cmtcnt")
6265
6366
6467 func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal")
6568
6669
6770 func getKeyItemStatus (item) = (item + "_status")
6871
6972
7073 func getKeyVotesCount (item,vote) = ((item + "_res:") + vote)
7174
7275
7376 func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt")
7477
7578
7679 func getKeyBalanceSupplier (account) = (account + "_balance")
7780
7881
7982 func getValueBalanceSupplier (account) = {
8083 let supplierBalanceKey = getKeyBalanceSupplier(account)
8184 match getInteger(this, supplierBalanceKey) {
8285 case a: Int =>
8386 a
8487 case _ =>
8588 0
8689 }
8790 }
8891
8992
9093 func getValueUserItemCounter (user,item) = {
9194 let userItemCounterKey = getKeyUserItemCounter(user, item)
9295 match getInteger(this, userItemCounterKey) {
9396 case a: Int =>
9497 a
9598 case _ =>
9699 0
97100 }
98101 }
99102
100103
101104 func getValueItemPrice (item) = {
102105 let keyItemPrice = getKeyItemPrice(item)
103106 getIntegerValue(this, keyItemPrice)
104107 }
105108
106109
107-func getValueItemSupplier (account) = getStringByKey(getKeyItemSupplier(account))
110+func getValueItemSupplier (item) = getStringByKey(getKeyItemSupplier(item))
111+
112+
113+func getValueItemExpireTime (item) = getIntegerByKey(getKeyItemExpireDate(item))
108114
109115
110116 func getValueCommit (item,user) = getStringByKey(getKeyCommit(item, user))
111117
112118
113119 func getValueCommitsCount (item) = getIntegerByKey(getKeyCommitsCount(item))
114120
115121
116122 func getValueReveal (item,user) = getStringByKey(getKeyReveal(item, user))
117123
118124
119125 func getValueItemStatus (item) = getStringByKey(getKeyItemStatus(item))
120126
121127
122128 func getValueVotesCount (item,vote) = getIntegerByKey(getKeyVotesCount(item, vote))
123129
124130
125131 @Callable(i)
126132 func registerSupplier (data) = {
127133 let supplier = toBase58String(i.caller.bytes)
128134 let account = getSupplierAccount(supplier)
129135 if ((account != NONE))
130136 then throw("This address has already registred as supplier")
131137 else [StringEntry(getKeySupplierAccount(supplier), data)]
132138 }
133139
134140
135141
136142 @Callable(i)
137-func addItem (title,price,data) = {
143+func addItem (title,price,data,expire) = {
138144 let supplier = toBase58String(i.caller.bytes)
139145 let account = getSupplierAccount(supplier)
140146 let item = getKeyItem(supplier, title)
141147 if ((account == NONE))
142148 then throw("You should register as supplier to add an item")
143149 else if ((0 >= price))
144150 then throw("Purchase amount cannot be less than item price")
145151 else if ((getValueItemSupplier(item) != NONE))
146152 then throw("An item already exists")
147- else [StringEntry(getKeyItemSupplier(item), supplier), StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)]
153+ else [StringEntry(getKeyItemSupplier(item), supplier), StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data), IntegerEntry(getKeyItemExpireDate(item), expire)]
148154 }
149155
150156
151157
152158 @Callable(i)
153-func updateItem (item,title,price,data) = {
159+func updateItem (item,title,price,data,expire) = {
154160 let supplier = toBase58String(i.caller.bytes)
155161 let account = getSupplierAccount(supplier)
156162 let itemSupplier = getValueItemSupplier(item)
157163 if ((account == NONE))
158164 then throw("You should register as supplier to remove an item")
159165 else if (if ((item == NONE))
160166 then true
161167 else (supplier != itemSupplier))
162168 then throw(("You don't owned item " + item))
163- else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data)]
169+ else [StringEntry(getKeyItemTitle(item), title), IntegerEntry(getKeyItemPrice(item), price), StringEntry(getKeyItemData(item), data), IntegerEntry(getKeyItemExpireDate(item), expire)]
164170 }
165171
166172
167173
168174 @Callable(i)
169175 func removeItem (item) = {
170176 let supplier = toBase58String(i.caller.bytes)
171177 let account = getSupplierAccount(supplier)
172178 let itemSupplier = getValueItemSupplier(item)
173179 if ((account == NONE))
174180 then throw("You should register as supplier to remove an item")
175181 else if (if ((item == NONE))
176182 then true
177183 else (supplier != itemSupplier))
178184 then throw(("You don't owned item " + item))
179- else [DeleteEntry(getKeyItemSupplier(item)), DeleteEntry(getKeyItemTitle(item)), DeleteEntry(getKeyItemPrice(item)), DeleteEntry(getKeyItemData(item))]
185+ else [DeleteEntry(getKeyItemSupplier(item)), DeleteEntry(getKeyItemTitle(item)), DeleteEntry(getKeyItemPrice(item)), DeleteEntry(getKeyItemData(item)), DeleteEntry(getKeyItemExpireDate(item))]
180186 }
181187
182188
183189
184190 @Callable(i)
185191 func purchase (item) = {
186192 let pmt = i.payments[0]
187193 if (isDefined(pmt.assetId))
188194 then throw("You can buy tokens only with Waves tokens")
189195 else {
190196 let userAddress = toBase58String(i.caller.bytes)
191197 let price = getValueItemPrice(item)
192198 let supplier = getValueItemSupplier(item)
193199 if ((price > pmt.amount))
194200 then throw("Purchase amount cannot be less than item price")
195201 else if ((pmt.amount > price))
196202 then throw("Purchase amount cannot be higher than item price")
197203 else if ((supplier == NONE))
198204 then throw("Supplier does not exists")
199205 else {
200206 let userItemCounter = getKeyUserItemCounter(userAddress, item)
201207 let newValueUserItemCounter = (getValueUserItemCounter(userAddress, item) + 1)
202208 let supplierBalanceKey = getKeyBalanceSupplier(supplier)
203209 let newSupplierBalance = (getValueBalanceSupplier(supplier) + pmt.amount)
204210 [IntegerEntry(userItemCounter, newValueUserItemCounter), IntegerEntry(supplierBalanceKey, newSupplierBalance)]
205211 }
206212 }
207213 }
208214
209215
210216
211217 @Callable(i)
212218 func voteCommit (item,hash) = {
213219 let user = toBase58String(i.caller.bytes)
214220 let commitsCount = getValueCommitsCount(item)
215221 let status = getValueItemStatus(item)
216222 if ((commitsCount >= VOTERS))
217223 then throw("Reached max number of voters")
218224 else if ((getValueCommit(item, user) != NONE))
219225 then throw("You voted already")
220226 else if ((getKeyItemSupplier(item) == NONE))
221227 then throw("Item does not exists")
222228 else if (if ((status != NONE))
223229 then (status != VOTING)
224230 else false)
225231 then throw("Voting is not active for this item now")
226232 else {
227233 let newStatus = if ((commitsCount == VOTERS))
228234 then REVEAL
229235 else VOTING
230236 [StringEntry(getKeyCommit(item, user), hash), IntegerEntry(getKeyCommitsCount(item), (commitsCount + 1)), StringEntry(getKeyItemStatus(item), newStatus)]
231237 }
232238 }
233239
234240
235241
236242 @Callable(i)
237243 func voteReveal (item,vote,salt) = {
238244 let user = toBase58String(i.caller.bytes)
239245 let status = getValueItemStatus(item)
240246 let newVotesCount = (getValueVotesCount(item, vote) + 1)
241247 let saltedVote = toBase58String(sha256(toBytes(((item + vote) + salt))))
242248 if ((saltedVote != getValueCommit(item, user)))
243249 then throw("Reveal data is not valid")
244250 else if ((VOTERS > getValueCommitsCount(item)))
245251 then throw("Max number of voters not reached")
246252 else if ((getValueReveal(item, user) != NONE))
247253 then throw("You voted already")
248254 else if (if ((status != VOTING))
249255 then (status != REVEAL)
250256 else false)
251257 then throw("Voting is not active for this item now")
252258 else if (if ((vote != FEATURED))
253259 then (vote != DELISTED)
254260 else false)
255261 then throw("Provided voting option is incorrect")
256262 else {
257263 let newStatus = if ((newVotesCount >= QUORUM))
258264 then vote
259265 else REVEAL
260266 [StringEntry(getKeyReveal(item, user), vote), IntegerEntry(getKeyVotesCount(item, user), newVotesCount), StringEntry(getKeyItemStatus(item), newStatus)]
261267 }
262268 }
263269
264270
265271 @Verifier(tx)
266272 func verify () = match tx {
267273 case t: SetScriptTransaction =>
268274 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
269275 case _ =>
270276 false
271277 }
272278

github/deemru/w8io/026f985 
53.15 ms