tx · 9j6P8LHettTwSsMB2wUsdAsVtMELBU5fqnN2VNAACBQR 3MrFUxcMycRcQDahrA16JhvuEKnbmMF3QZP: -0.01400000 Waves 2021.11.18 19:09 [1796694] smart account 3MrFUxcMycRcQDahrA16JhvuEKnbmMF3QZP > SELF 0.00000000 Waves
{ "type": 13, "id": "9j6P8LHettTwSsMB2wUsdAsVtMELBU5fqnN2VNAACBQR", "fee": 1400000, "feeAssetId": null, "timestamp": 1637251889460, "version": 2, "chainId": 84, "sender": "3MrFUxcMycRcQDahrA16JhvuEKnbmMF3QZP", "senderPublicKey": "HtiJZF4j7Jo8jR12wxtKDkNhS3qCe3qsk8QxnnjVvXyq", "proofs": [ "5ZH8Cb2RyhXXsaeGeHR2xharhJXnLiCYB1QpAE7eG9BXjjYtePMSTpzJg5XJmY5SZK8VePZyGpZCJULauxkwaW6h" ], "script": "base64:AAIDAAAAAAAAAB0IARIFCgMIAQgSAwoBCBIAEgQKAggIEgUKAwgICAAAACEAAAAADm93bmVyUHVibGljS2V5AQAAACD6+lAsvaY9/ICsFhS1sYMY13YGhvh1jT1AiPapnK+uIAAAAAALcHViS2V5QWxpY2UBAAAAIPr6UCy9pj38gKwWFLWxgxjXdgaG+HWNPUCI9qmcr64gAAAAAAlwdWJLZXlCb2IBAAAAIJSwJHqny7GXkLqb/9sX0sw4nnCkaYeDrScKSJwbx9dLAAAAAAxwdWJLZXlDb29wZXIBAAAAIMviW1daO0ECCbLD7je58oUri4AFkKl3dlICXnEszUFIAAAAAAROT05FAgAAAARub25lAAAAAAZWT1RFUlMAAAAAAAAAAAMAAAAABlFVT1JVTQAAAAAAAAAAAgAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF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AAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADm93bmVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAGCQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAAAtzaWduZWRBbGljZQUAAAAJc2lnbmVkQm9iBQAAAAxzaWduZWRDb29wZXIAAAAAAAAAAAJmhy3i", "height": 1796694, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HfKqTxXBxNHaxUYi4SsCqf1UL28oZkpGNjoTxrtbg6xC Next: AHUws8cxfiDFUmwwVXVu3B4ipwPTCvFx9v5tEron3TsV Diff:
Old | New | Differences | |
---|---|---|---|
99 | 99 | func getValueItemStatus (item) = getStrByKey(getKeyItemStatus(item)) | |
100 | 100 | ||
101 | 101 | ||
102 | - | func getKeyVoteCount (item,vote) = (item + "_ | |
102 | + | func getKeyVoteCount (item,vote) = ((item + "_res:") + vote) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getValueVoteCount (item,vote) = getNumberByKey(getKeyVoteCount(item, vote)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let ownerPublicKey = base58'HtiJZF4j7Jo8jR12wxtKDkNhS3qCe3qsk8QxnnjVvXyq' | |
5 | 5 | ||
6 | 6 | let pubKeyAlice = base58'HtiJZF4j7Jo8jR12wxtKDkNhS3qCe3qsk8QxnnjVvXyq' | |
7 | 7 | ||
8 | 8 | let pubKeyBob = base58'B1R7zeh6VgTv4Xxe3aHhdoZ9aQgWcqN8LFC9smacE96r' | |
9 | 9 | ||
10 | 10 | let pubKeyCooper = base58'EisxKQktzqqd4UsxE7UgVjSHqoWindUpjoB7dsDwfG4o' | |
11 | 11 | ||
12 | 12 | let NONE = "none" | |
13 | 13 | ||
14 | 14 | let VOTERS = 3 | |
15 | 15 | ||
16 | 16 | let QUORUM = 2 | |
17 | 17 | ||
18 | 18 | let VOTING = "voting" | |
19 | 19 | ||
20 | 20 | let REVEAL = "reveal" | |
21 | 21 | ||
22 | 22 | let FEATURED = "featured" | |
23 | 23 | ||
24 | 24 | let DELISTED = "delisted" | |
25 | 25 | ||
26 | 26 | func getNumberByKey (key) = { | |
27 | 27 | let num = match getInteger(this, key) { | |
28 | 28 | case t: Int => | |
29 | 29 | t | |
30 | 30 | case _ => | |
31 | 31 | 0 | |
32 | 32 | } | |
33 | 33 | num | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getStrByKey (key) = { | |
38 | 38 | let str = match getString(this, key) { | |
39 | 39 | case t: String => | |
40 | 40 | t | |
41 | 41 | case _ => | |
42 | 42 | NONE | |
43 | 43 | } | |
44 | 44 | str | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func getKeyItemPrice (item) = (item + "_price") | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func getValueItemPrice (item) = getNumberByKey(getKeyItemPrice(item)) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt") | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item)) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title))))) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getKeyItemData (item) = (item + "_data") | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func getKeyItemSupplier (item) = (item + "_owner") | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item)) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getKeyBalanceSupplier (account) = (account + "_balance") | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getValueBalanceSupplier (account) = getNumberByKey(getKeyBalanceSupplier(account)) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getKeyCommit (item,user) = (((item + "_") + user) + "_commit") | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getValueCommit (item,user) = getStrByKey(getKeyCommit(item, user)) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getKeyCommitsCount (item) = (item + "_comcnt") | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getValueCommitsCount (item) = getNumberByKey(getKeyCommitsCount(item)) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal") | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getValueReveal (item,user) = getStrByKey(getKeyReveal(item, user)) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getKeyItemStatus (item) = (item + "_status") | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getValueItemStatus (item) = getStrByKey(getKeyItemStatus(item)) | |
100 | 100 | ||
101 | 101 | ||
102 | - | func getKeyVoteCount (item,vote) = (item + "_ | |
102 | + | func getKeyVoteCount (item,vote) = ((item + "_res:") + vote) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getValueVoteCount (item,vote) = getNumberByKey(getKeyVoteCount(item, vote)) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | @Callable(i) | |
109 | 109 | func addItem (title,price,data) = { | |
110 | 110 | let supplierAddress = toBase58String(i.caller.bytes) | |
111 | 111 | let item = getKeyItem(supplierAddress, title) | |
112 | 112 | if ((0 >= price)) | |
113 | 113 | then throw("purchase amount cannot be less than item price") | |
114 | 114 | else if ((getValueItemSupplier(item) != NONE)) | |
115 | 115 | then throw("an item is already exist") | |
116 | 116 | else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data)]) | |
117 | 117 | } | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | ||
121 | 121 | @Callable(i) | |
122 | 122 | func purchase (itemKey) = { | |
123 | 123 | let pmt = extract(i.payment) | |
124 | 124 | if (isDefined(pmt.assetId)) | |
125 | 125 | then throw("can use WAVES only at the moment") | |
126 | 126 | else if (!(isDefined(itemKey))) | |
127 | 127 | then throw("You must select Item") | |
128 | 128 | else { | |
129 | 129 | let customerAddress = toBase58String(i.caller.bytes) | |
130 | 130 | let price = getValueItemPrice(itemKey) | |
131 | 131 | let supplierAddress = getValueItemSupplier(itemKey) | |
132 | 132 | if ((price > pmt.amount)) | |
133 | 133 | then throw("purchase amoun cannot be less than item price") | |
134 | 134 | else if ((pmt.amount > price)) | |
135 | 135 | then throw("purchase amoun cannot be higher than item price") | |
136 | 136 | else if ((supplierAddress == NONE)) | |
137 | 137 | then throw("supplier does not exist") | |
138 | 138 | else WriteSet([DataEntry(getKeyUserItemCounter(customerAddress, itemKey), (getValueUserItemCounter(customerAddress, itemKey) + 1)), DataEntry(getKeyBalanceSupplier(supplierAddress), (getValueBalanceSupplier(supplierAddress) + pmt.amount))]) | |
139 | 139 | } | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | ||
144 | 144 | @Callable(i) | |
145 | 145 | func withdraw () = { | |
146 | 146 | let supplierAddress = toBase58String(i.caller.bytes) | |
147 | 147 | let balance = getValueBalanceSupplier(supplierAddress) | |
148 | 148 | if ((0 >= balance)) | |
149 | 149 | then throw("no money - no honey") | |
150 | 150 | else ScriptResult(WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(supplierAddress), balance, unit)])) | |
151 | 151 | } | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | ||
155 | 155 | @Callable(i) | |
156 | 156 | func voteCommit (item,hash) = if ((getKeyItemSupplier(item) == NONE)) | |
157 | 157 | then throw("item does not exist") | |
158 | 158 | else { | |
159 | 159 | let user = toBase58String(i.caller.bytes) | |
160 | 160 | let commits = getValueCommitsCount(item) | |
161 | 161 | let status = getValueItemStatus(item) | |
162 | 162 | if ((commits >= VOTERS)) | |
163 | 163 | then throw("reached max num of voters") | |
164 | 164 | else if ((getValueCommit(item, user) != NONE)) | |
165 | 165 | then throw("user has already participated") | |
166 | 166 | else if (if ((status != NONE)) | |
167 | 167 | then (status != VOTING) | |
168 | 168 | else false) | |
169 | 169 | then throw("voting is not possible") | |
170 | 170 | else WriteSet([DataEntry(getKeyCommit(item, user), hash), DataEntry(getKeyCommitsCount(item), (commits + 1)), DataEntry(getKeyItemStatus(item), if (((commits + 1) == VOTERS)) | |
171 | 171 | then REVEAL | |
172 | 172 | else VOTING)]) | |
173 | 173 | } | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | ||
177 | 177 | @Callable(i) | |
178 | 178 | func voteReveal (item,vote,salt) = if ((getKeyItemSupplier(item) == NONE)) | |
179 | 179 | then throw("item does not exist") | |
180 | 180 | else { | |
181 | 181 | let user = toBase58String(i.caller.bytes) | |
182 | 182 | let status = getValueItemStatus(item) | |
183 | 183 | let newVoteCount = (getValueVoteCount(item, vote) + 1) | |
184 | 184 | if ((toBase58String(sha256(toBytes((vote + salt)))) != getValueCommit(item, user))) | |
185 | 185 | then throw("reveal data not valid") | |
186 | 186 | else if ((VOTERS > getValueCommitsCount(item))) | |
187 | 187 | then throw("max num of voters hasn't reached yet") | |
188 | 188 | else if ((getValueReveal(item, user) != NONE)) | |
189 | 189 | then throw("user has already participated") | |
190 | 190 | else if (if ((status != VOTING)) | |
191 | 191 | then (status != REVEAL) | |
192 | 192 | else false) | |
193 | 193 | then throw("wrong status") | |
194 | 194 | else if (if ((vote != FEATURED)) | |
195 | 195 | then (vote != DELISTED) | |
196 | 196 | else false) | |
197 | 197 | then throw("wrong vote") | |
198 | 198 | else if (if ((status == FEATURED)) | |
199 | 199 | then true | |
200 | 200 | else (status == DELISTED)) | |
201 | 201 | then throw("vote has finished") | |
202 | 202 | else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM)) | |
203 | 203 | then vote | |
204 | 204 | else REVEAL)]) | |
205 | 205 | } | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | @Verifier(tx) | |
209 | 209 | func verify () = { | |
210 | 210 | let signedAlice = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyAlice)) | |
211 | 211 | then true | |
212 | 212 | else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyAlice)) | |
213 | 213 | then true | |
214 | 214 | else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyAlice)) | |
215 | 215 | then 1 | |
216 | 216 | else 0 | |
217 | 217 | let signedBob = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyBob)) | |
218 | 218 | then true | |
219 | 219 | else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyBob)) | |
220 | 220 | then true | |
221 | 221 | else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyBob)) | |
222 | 222 | then 1 | |
223 | 223 | else 0 | |
224 | 224 | let signedCooper = if (if (if (sigVerify(tx.bodyBytes, tx.proofs[0], pubKeyCooper)) | |
225 | 225 | then true | |
226 | 226 | else sigVerify(tx.bodyBytes, tx.proofs[1], pubKeyCooper)) | |
227 | 227 | then true | |
228 | 228 | else sigVerify(tx.bodyBytes, tx.proofs[2], pubKeyCooper)) | |
229 | 229 | then 1 | |
230 | 230 | else 0 | |
231 | 231 | match tx { | |
232 | 232 | case d: SetScriptTransaction => | |
233 | 233 | sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey) | |
234 | 234 | case d: DataTransaction => | |
235 | 235 | true | |
236 | 236 | case _ => | |
237 | 237 | (((signedAlice + signedBob) + signedCooper) >= 2) | |
238 | 238 | } | |
239 | 239 | } | |
240 | 240 |
github/deemru/w8io/026f985 28.88 ms ◑