tx · ABbFYgqQBXE6cR17s8wjGfqwyneH76evR9hkREM85H1w 3N8Mm2G9ttNvpfuvbn5cqN1PKsMuEvzP29o: -0.01400000 Waves 2019.07.10 02:46 [578776] smart account 3N8Mm2G9ttNvpfuvbn5cqN1PKsMuEvzP29o > SELF 0.00000000 Waves
{ "type": 13, "id": "ABbFYgqQBXE6cR17s8wjGfqwyneH76evR9hkREM85H1w", "fee": 1400000, "feeAssetId": null, "timestamp": 1562716013869, "version": 1, "sender": "3N8Mm2G9ttNvpfuvbn5cqN1PKsMuEvzP29o", "senderPublicKey": "88UbpMjfzKauW8YCBU5nv57AdptzCnnC9uHtPuVwf5pz", "proofs": [ "3KoUYaR2stw8N4xqjHZ8Sd5AjF8jYnnj7SgcH9QqJuTfGNJ8TMPjkSknnjmUVTcRmd8GFUcKAkWARrapAN1a3Rj7" ], "script": "base64:AAIDAAAAAAAAAAAAAABVAAAAAAROT05FAgAAAARub25lAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAEmdldEtleVdoaXRlbGlzdFJlZgAAAAEAAAAHYWNjb3VudAkAASwAAAACAgAAAAd3bF9yZWZfBQAAAAdhY2NvdW50AQAAABVnZXRLZXlXaGl0ZWxpc3RTdGF0dXMAAAABAAAAB2FjY291bnQJAAEsAAAAAgIAAAAHd2xfc3RzXwUAAAAHYWN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GFuY2UAAAABBQAAAAdhY2NvdW50CQAAZAAAAAIJAABkAAAAAgkAAGQAAAACCQEAAAAPZ2V0VmFsdWVCYWxhbmNlAAAAAQUAAAAHYWNjb3VudAUAAAAJYmV0cHJvZml0BQAAAAlyb2lwcm9maXQFAAAADGF1dGhvcnByb2ZpdAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEGdldEtleUl0ZW1TdGF0dXMAAAABBQAAAARpdGVtAwkAAGYAAAACBQAAAAxhdXRob3Jwcm9maXQAAAAAAAAAAAAFAAAAB0NBU0hPVVQFAAAABnN0YXR1cwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEmdldEtleUl0ZW1BY2NGaW5hbAAAAAIFAAAABGl0ZW0FAAAAB2FjY291bnQFAAAAB0NMQUlNRUQFAAAAA25pbAAAAAAgP02Y", "chainId": 84, "height": 578776, "spentComplexity": 0 } View: original | compacted Prev: CWACbMLQNMS8BabPNjxfahjwMJDCJsVZiaJkC8avtxu3 Next: 8MYgrU18qmrZ7WvDFqYjX85rJCG9b4JEvgGJitDJJs5E Diff:
Old | New | Differences | |
---|---|---|---|
253 | 253 | @Callable(i) | |
254 | 254 | func inviteuser (newaccount,data) = { | |
255 | 255 | let account = toBase58String(i.caller.bytes) | |
256 | - | if ((getValueWhitelistRef(newaccount) != NONE)) | |
257 | - | then throw("User has already been invited") | |
258 | - | else if (if ((getKeyWhitelistStatus(account) != WHITELISTED)) | |
259 | - | then (account != GENESIS) | |
256 | + | let newstatus = getValueWhitelistStatus(newaccount) | |
257 | + | let currstatus = getValueWhitelistStatus(account) | |
258 | + | if (if ((newstatus == WHITELISTED)) | |
259 | + | then true | |
260 | + | else (newstatus == WHALE)) | |
261 | + | then throw("User has already been registered") | |
262 | + | else if (if (if ((currstatus != WHITELISTED)) | |
263 | + | then (currstatus != GENESIS) | |
260 | 264 | else false) | |
261 | - | then throw("Your account should be whitelisted") | |
265 | + | then (currstatus != WHALE) | |
266 | + | else false) | |
267 | + | then throw(("Your account should be whitelisted. status: " + currstatus)) | |
262 | 268 | else WriteSet([DataEntry(getKeyWhitelistRef(newaccount), account), DataEntry(getKeyWhitelistBio(newaccount), data), DataEntry(getKeyWhitelistStatus(newaccount), INVITED)]) | |
263 | 269 | } | |
264 | 270 | ||
267 | 273 | @Callable(i) | |
268 | 274 | func signup (data,type) = { | |
269 | 275 | let account = toBase58String(i.caller.bytes) | |
270 | - | if ((getValueWhitelistStatus(account) == NONE)) | |
271 | - | then throw("Referral invite needed") | |
272 | - | else WriteSet([DataEntry(getKeyWhitelistBio(account), data), DataEntry(getKeyWhitelistBlock(account), height), DataEntry(getKeyWhitelistStatus(account), WHITELISTED), DataEntry(getKeyWhitelistStatus(account), if ((type == WHALE)) | |
276 | + | let status = getValueWhitelistStatus(account) | |
277 | + | if ((status == NONE)) | |
278 | + | then throw(((((("Referral invite needed. Current status: " + status) + ", key:") + getKeyWhitelistStatus(account)) + ", account:") + account)) | |
279 | + | else WriteSet([DataEntry(getKeyWhitelistBio(account), data), DataEntry(getKeyWhitelistBlock(account), height), DataEntry(getKeyWhitelistStatus(account), if ((type == WHALE)) | |
273 | 280 | then WHALE | |
274 | 281 | else WHITELISTED)]) | |
275 | 282 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let NONE = "none" | |
5 | 5 | ||
6 | 6 | func getNumberByKey (key) = { | |
7 | 7 | let num = match getInteger(this, key) { | |
8 | 8 | case a: Int => | |
9 | 9 | a | |
10 | 10 | case _ => | |
11 | 11 | 0 | |
12 | 12 | } | |
13 | 13 | num | |
14 | 14 | } | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func getStrByKey (key) = { | |
18 | 18 | let str = match getString(this, key) { | |
19 | 19 | case a: String => | |
20 | 20 | a | |
21 | 21 | case _ => | |
22 | 22 | NONE | |
23 | 23 | } | |
24 | 24 | str | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getKeyWhitelistRef (account) = ("wl_ref_" + account) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func getKeyWhitelistStatus (account) = ("wl_sts_" + account) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func getKeyBalance (account) = ("balance_" + account) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getKeyWhitelistBio (account) = ("wl_bio_" + account) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func getKeyWhitelistBlock (account) = ("wl_blk_" + account) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func getKeyItemAuthor (item) = ("author_" + item) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func getKeyItemBlock (item) = ("block_" + item) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func getKeyItemVotingExpiration (item) = ("expiration_block_" + item) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getKeyItemBank (item) = ("bank_" + item) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func getKeyItemStatus (item) = ("status_" + item) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func getKeyItemData (item) = ("datajson_" + item) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getKeyItemCrowdExpiration (item) = ("expiration_one_" + item) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getKeyItemWhaleExpiration (item) = ("expiration_two_" + item) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getKeyItemNCommits (item) = ("ncommits_" + item) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getKeyItemAccCommit (item,account) = ((("commit_" + item) + "_") + account) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getKeyItemAccReveal (item,account) = ((("reveal_" + item) + "_") + account) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func getKeyItemVotesYes (item) = ("cnt_yes_" + item) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getKeyItemVotesNo (item) = ("cnt_no_" + item) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getKeyItemAccFinal (item,account) = ((("final_" + item) + "_") + account) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getKeyItemFundPositive (item) = ("positive_fund_" + item) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func getKeyItemFundNegative (item) = ("negative_fund_" + item) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func getKeyItemAccFundPositive (item,account) = ((getKeyItemFundPositive(item) + "_") + account) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func getKeyItemAccFundNegative (item,account) = ((getKeyItemFundNegative(item) + "_") + account) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getKeyItemAccReviewsCnt (item,account) = ((("reviews_cnt_" + item) + "_") + account) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func getKeyItemAccReview (item,account) = ((("review_" + item) + "_") + account) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func getKeyItemAccReviewText (item,account,cnt) = ((getKeyItemAccReview(item, account) + "_text_id:") + cnt) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getKeyItemAccReviewMode (item,account,cnt) = ((getKeyItemAccReview(item, account) + "_mode_id:") + cnt) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func getKeyItemAccReviewTier (item,account,cnt) = ((getKeyItemAccReview(item, account) + "_tier_id:") + cnt) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func getKeyItemAccVoteReviewText (item,account) = (getKeyItemAccReview(item, account) + "_votereview") | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func getKeyItemAccWhaleReviewText (item,account) = (getKeyItemAccReview(item, account) + "_whalereview") | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func getKeyItemBuyoutAmount (item) = ("buyout_amount_" + item) | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func getKeyItemAccWinnings (item,account) = ((("winnings_" + item) + "_") + account) | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func getValueWhitelistRef (account) = getStrByKey(getKeyWhitelistRef(account)) | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func getValueWhitelistStatus (account) = getStrByKey(getKeyWhitelistStatus(account)) | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func getValueBalance (account) = getNumberByKey(getKeyBalance(account)) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func getValueWhitelistBio (account) = getStrByKey(getKeyWhitelistBio(account)) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func getValueWhitelistBlock (account) = getStrByKey(getKeyWhitelistBlock(account)) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func getValueItemAuthor (item) = getStrByKey(getKeyItemAuthor(item)) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func getValueItemBlock (item) = getNumberByKey(getKeyItemBlock(item)) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func getValueItemVotingExpiration (item) = getNumberByKey(getKeyItemVotingExpiration(item)) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func getValueItemBank (item) = getNumberByKey(getKeyItemBank(item)) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func getValueItemStatus (item) = getStrByKey(getKeyItemStatus(item)) | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func getValueItemData (item) = getStrByKey(getKeyItemData(item)) | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func getValueItemCrowdExpiration (item) = getNumberByKey(getKeyItemCrowdExpiration(item)) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func getValueItemWhaleExpiration (item) = getNumberByKey(getKeyItemWhaleExpiration(item)) | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func getValueItemNCommits (item) = getNumberByKey(getKeyItemNCommits(item)) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func getValueItemAccCommit (item,account) = getStrByKey(getKeyItemAccCommit(item, account)) | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func getValueItemAccReveal (item,account) = getStrByKey(getKeyItemAccReveal(item, account)) | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func getValueItemVotesYes (item) = getNumberByKey(getKeyItemVotesYes(item)) | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func getValueItemVotesNo (item) = getNumberByKey(getKeyItemVotesNo(item)) | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func getValueItemAccFinal (item,account) = getStrByKey(getKeyItemAccFinal(item, account)) | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | func getValueItemFundPositive (item) = getNumberByKey(getKeyItemFundPositive(item)) | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | func getValueItemFundNegative (item) = getNumberByKey(getKeyItemFundNegative(item)) | |
185 | 185 | ||
186 | 186 | ||
187 | 187 | func getValueItemAccFundPositive (item,account) = getNumberByKey(getKeyItemAccFundPositive(item, account)) | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func getValueItemAccFundNegative (item,account) = getNumberByKey(getKeyItemAccFundNegative(item, account)) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func getValueItemAccReviewsCnt (item,account) = getNumberByKey(getKeyItemAccReviewsCnt(item, account)) | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func getValueItemAccReviewText (item,account,cnt) = getStrByKey(getKeyItemAccReviewText(item, account, cnt)) | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func getValueItemAccReviewMode (item,account,cnt) = getStrByKey(getKeyItemAccReviewMode(item, account, cnt)) | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func getValueItemAccReviewTier (item,account,cnt) = getNumberByKey(getKeyItemAccReviewTier(item, account, cnt)) | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func getValueItemBuyoutAmount (item) = getNumberByKey(getKeyItemBuyoutAmount(item)) | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | func getValueItemAccWinnings (item,account) = getNumberByKey(getKeyItemAccWinnings(item, account)) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | let WHITELISTED = "registered" | |
212 | 212 | ||
213 | 213 | let INVITED = "invited" | |
214 | 214 | ||
215 | 215 | let WHALE = "whale" | |
216 | 216 | ||
217 | 217 | let NEW = "new" | |
218 | 218 | ||
219 | 219 | let COMMIT = "voting_commit" | |
220 | 220 | ||
221 | 221 | let REVEAL = "voting_reveal" | |
222 | 222 | ||
223 | 223 | let FEATURED = "featured" | |
224 | 224 | ||
225 | 225 | let DELISTED = "delisted" | |
226 | 226 | ||
227 | 227 | let CASHOUT = "cashout" | |
228 | 228 | ||
229 | 229 | let BUYOUT = "buyout" | |
230 | 230 | ||
231 | 231 | let FINISHED = "finished" | |
232 | 232 | ||
233 | 233 | let CLAIMED = "claimed" | |
234 | 234 | ||
235 | 235 | let POSITIVE = "positive" | |
236 | 236 | ||
237 | 237 | let NEGATIVE = "negative" | |
238 | 238 | ||
239 | 239 | let GENESIS = "3NBB3iv7YDRsD8ZM2Pw2V5eTcsfqh3j2mvF" | |
240 | 240 | ||
241 | 241 | let VOTERS = 3 | |
242 | 242 | ||
243 | 243 | let QUORUM = 2 | |
244 | 244 | ||
245 | 245 | let LISTINGFEE = (500000000 / 1000) | |
246 | 246 | ||
247 | 247 | let VOTEBET = (150000000 / 1000) | |
248 | 248 | ||
249 | 249 | let TIERS = [10, 50, 250, 1250, 6250] | |
250 | 250 | ||
251 | 251 | let MULTIPLIER = 150 | |
252 | 252 | ||
253 | 253 | @Callable(i) | |
254 | 254 | func inviteuser (newaccount,data) = { | |
255 | 255 | let account = toBase58String(i.caller.bytes) | |
256 | - | if ((getValueWhitelistRef(newaccount) != NONE)) | |
257 | - | then throw("User has already been invited") | |
258 | - | else if (if ((getKeyWhitelistStatus(account) != WHITELISTED)) | |
259 | - | then (account != GENESIS) | |
256 | + | let newstatus = getValueWhitelistStatus(newaccount) | |
257 | + | let currstatus = getValueWhitelistStatus(account) | |
258 | + | if (if ((newstatus == WHITELISTED)) | |
259 | + | then true | |
260 | + | else (newstatus == WHALE)) | |
261 | + | then throw("User has already been registered") | |
262 | + | else if (if (if ((currstatus != WHITELISTED)) | |
263 | + | then (currstatus != GENESIS) | |
260 | 264 | else false) | |
261 | - | then throw("Your account should be whitelisted") | |
265 | + | then (currstatus != WHALE) | |
266 | + | else false) | |
267 | + | then throw(("Your account should be whitelisted. status: " + currstatus)) | |
262 | 268 | else WriteSet([DataEntry(getKeyWhitelistRef(newaccount), account), DataEntry(getKeyWhitelistBio(newaccount), data), DataEntry(getKeyWhitelistStatus(newaccount), INVITED)]) | |
263 | 269 | } | |
264 | 270 | ||
265 | 271 | ||
266 | 272 | ||
267 | 273 | @Callable(i) | |
268 | 274 | func signup (data,type) = { | |
269 | 275 | let account = toBase58String(i.caller.bytes) | |
270 | - | if ((getValueWhitelistStatus(account) == NONE)) | |
271 | - | then throw("Referral invite needed") | |
272 | - | else WriteSet([DataEntry(getKeyWhitelistBio(account), data), DataEntry(getKeyWhitelistBlock(account), height), DataEntry(getKeyWhitelistStatus(account), WHITELISTED), DataEntry(getKeyWhitelistStatus(account), if ((type == WHALE)) | |
276 | + | let status = getValueWhitelistStatus(account) | |
277 | + | if ((status == NONE)) | |
278 | + | then throw(((((("Referral invite needed. Current status: " + status) + ", key:") + getKeyWhitelistStatus(account)) + ", account:") + account)) | |
279 | + | else WriteSet([DataEntry(getKeyWhitelistBio(account), data), DataEntry(getKeyWhitelistBlock(account), height), DataEntry(getKeyWhitelistStatus(account), if ((type == WHALE)) | |
273 | 280 | then WHALE | |
274 | 281 | else WHITELISTED)]) | |
275 | 282 | } | |
276 | 283 | ||
277 | 284 | ||
278 | 285 | ||
279 | 286 | @Callable(i) | |
280 | 287 | func userupdate (data,type) = { | |
281 | 288 | let account = toBase58String(i.caller.bytes) | |
282 | 289 | WriteSet([DataEntry(getKeyWhitelistBio(account), data), DataEntry(getKeyWhitelistStatus(account), if ((type == WHALE)) | |
283 | 290 | then WHALE | |
284 | 291 | else WHITELISTED)]) | |
285 | 292 | } | |
286 | 293 | ||
287 | 294 | ||
288 | 295 | ||
289 | 296 | @Callable(i) | |
290 | 297 | func godsmodestring (key,val) = { | |
291 | 298 | let account = toBase58String(i.caller.bytes) | |
292 | 299 | if ((account != GENESIS)) | |
293 | 300 | then throw("you're not admin") | |
294 | 301 | else WriteSet([DataEntry(key, val)]) | |
295 | 302 | } | |
296 | 303 | ||
297 | 304 | ||
298 | 305 | ||
299 | 306 | @Callable(i) | |
300 | 307 | func projupdate (item,data) = { | |
301 | 308 | let account = toBase58String(i.caller.bytes) | |
302 | 309 | if ((getValueItemAuthor(item) != account)) | |
303 | 310 | then throw("You're not author") | |
304 | 311 | else WriteSet([DataEntry(getKeyItemData(item), data)]) | |
305 | 312 | } | |
306 | 313 | ||
307 | 314 | ||
308 | 315 | ||
309 | 316 | @Callable(i) | |
310 | 317 | func withdraw () = { | |
311 | 318 | let currentKey = toBase58String(i.caller.bytes) | |
312 | 319 | let amount = getValueBalance(currentKey) | |
313 | 320 | if ((0 >= amount)) | |
314 | 321 | then throw("Not enough balance") | |
315 | 322 | else ScriptResult(WriteSet([DataEntry(getKeyBalance(currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, amount, unit)])) | |
316 | 323 | } | |
317 | 324 | ||
318 | 325 | ||
319 | 326 | ||
320 | 327 | @Callable(i) | |
321 | 328 | func additem (item,expVoting,expCrowd,expWhale,data) = { | |
322 | 329 | let account = toBase58String(i.caller.bytes) | |
323 | 330 | let pmt = extract(i.payment) | |
324 | 331 | if (isDefined(pmt.assetId)) | |
325 | 332 | then throw("can use waves only at the moment") | |
326 | 333 | else if ((pmt.amount != LISTINGFEE)) | |
327 | 334 | then throw("Please pay exact amount for the listing") | |
328 | 335 | else if (!(if (if ((expVoting > 2)) | |
329 | 336 | then (expCrowd > expVoting) | |
330 | 337 | else false) | |
331 | 338 | then (expWhale > expCrowd) | |
332 | 339 | else false)) | |
333 | 340 | then throw("Incorrect time parameters") | |
334 | 341 | else if ((getValueItemAuthor(item) != NONE)) | |
335 | 342 | then throw("Item already exist") | |
336 | 343 | else WriteSet([DataEntry(getKeyItemAuthor(item), account), DataEntry(getKeyItemBlock(item), height), DataEntry(getKeyItemVotingExpiration(item), (height + expVoting)), DataEntry(getKeyItemBank(item), LISTINGFEE), DataEntry(getKeyItemStatus(item), NEW), DataEntry(getKeyItemData(item), data), DataEntry(getKeyItemCrowdExpiration(item), (height + expCrowd)), DataEntry(getKeyItemWhaleExpiration(item), (height + expWhale))]) | |
337 | 344 | } | |
338 | 345 | ||
339 | 346 | ||
340 | 347 | ||
341 | 348 | @Callable(i) | |
342 | 349 | func votecommit (item,hash) = { | |
343 | 350 | let account = toBase58String(i.caller.bytes) | |
344 | 351 | let commits = getValueItemNCommits(item) | |
345 | 352 | let status = getValueItemStatus(item) | |
346 | 353 | let pmt = extract(i.payment) | |
347 | 354 | if (isDefined(pmt.assetId)) | |
348 | 355 | then throw("can use waves only at the moment") | |
349 | 356 | else if ((pmt.amount != (2 * VOTEBET))) | |
350 | 357 | then throw("Not enough funds to vote for a new item") | |
351 | 358 | else if ((height > getValueItemVotingExpiration(item))) | |
352 | 359 | then throw("The voting has expired") | |
353 | 360 | else if ((getValueItemAuthor(item) == account)) | |
354 | 361 | then throw("Cannot vote for own proposal") | |
355 | 362 | else if (if ((status != NEW)) | |
356 | 363 | then (status != COMMIT) | |
357 | 364 | else false) | |
358 | 365 | then throw("Wrong item status for 'commit' action") | |
359 | 366 | else if ((commits >= VOTERS)) | |
360 | 367 | then throw("No more voters for this item") | |
361 | 368 | else if ((getValueItemAccCommit(item, account) != NONE)) | |
362 | 369 | then throw("Can't vote twice") | |
363 | 370 | else WriteSet([DataEntry(getKeyItemStatus(item), if (((commits + 1) == VOTERS)) | |
364 | 371 | then REVEAL | |
365 | 372 | else COMMIT), DataEntry(getKeyItemAccCommit(item, account), hash), DataEntry(getKeyItemNCommits(item), (commits + 1))]) | |
366 | 373 | } | |
367 | 374 | ||
368 | 375 | ||
369 | 376 | ||
370 | 377 | @Callable(i) | |
371 | 378 | func votereveal (item,vote,salt,review) = { | |
372 | 379 | let ridehash = toBase58String(sha256(toBytes((vote + salt)))) | |
373 | 380 | let account = toBase58String(i.caller.bytes) | |
374 | 381 | let yesmltp = if ((vote == FEATURED)) | |
375 | 382 | then 1 | |
376 | 383 | else 0 | |
377 | 384 | let notmltp = if ((vote == DELISTED)) | |
378 | 385 | then 1 | |
379 | 386 | else 0 | |
380 | 387 | let yescnt = getValueItemVotesYes(item) | |
381 | 388 | let notcnt = getValueItemVotesNo(item) | |
382 | 389 | let newstatus = if ((yescnt >= QUORUM)) | |
383 | 390 | then FEATURED | |
384 | 391 | else if ((notcnt >= QUORUM)) | |
385 | 392 | then DELISTED | |
386 | 393 | else REVEAL | |
387 | 394 | if ((getValueItemAccCommit(item, account) != ridehash)) | |
388 | 395 | then throw("Hashes don't match") | |
389 | 396 | else if ((height > getValueItemVotingExpiration(item))) | |
390 | 397 | then throw("The challenge has expired") | |
391 | 398 | else if ((VOTERS > getValueItemNCommits(item))) | |
392 | 399 | then throw("It's still commit stage") | |
393 | 400 | else if (if ((getValueItemStatus(item) != REVEAL)) | |
394 | 401 | then (getValueItemStatus(item) != newstatus) | |
395 | 402 | else false) | |
396 | 403 | then throw("Wrong item status for 'reveal' action") | |
397 | 404 | else if ((getValueItemAccReveal(item, account) != NONE)) | |
398 | 405 | then throw("Can't vote twice") | |
399 | 406 | else if (if ((vote != FEATURED)) | |
400 | 407 | then (vote != DELISTED) | |
401 | 408 | else false) | |
402 | 409 | then throw("Bad vote result format") | |
403 | 410 | else WriteSet([DataEntry(getKeyItemAccReveal(item, account), vote), DataEntry(getKeyItemVotesYes(item), (yescnt + yesmltp)), DataEntry(getKeyItemVotesNo(item), (notcnt + notmltp)), DataEntry(getKeyItemStatus(item), newstatus), DataEntry(getKeyItemAccVoteReviewText(item, account), review), DataEntry(getKeyBalance(account), (getValueBalance(account) + VOTEBET))]) | |
404 | 411 | } | |
405 | 412 | ||
406 | 413 | ||
407 | 414 | ||
408 | 415 | @Callable(i) | |
409 | 416 | func finalizevoting (item,account) = { | |
410 | 417 | let yescnt = getValueItemVotesYes(item) | |
411 | 418 | let notcnt = getValueItemVotesNo(item) | |
412 | 419 | let accvote = getValueItemAccReveal(item, account) | |
413 | 420 | let isauthor = (account == getValueItemAuthor(item)) | |
414 | 421 | let finalstatus = if ((yescnt > QUORUM)) | |
415 | 422 | then FEATURED | |
416 | 423 | else if ((notcnt > QUORUM)) | |
417 | 424 | then DELISTED | |
418 | 425 | else NONE | |
419 | 426 | let mltisnotfullmajority = if (if ((yescnt == VOTERS)) | |
420 | 427 | then true | |
421 | 428 | else (notcnt == VOTERS)) | |
422 | 429 | then 0 | |
423 | 430 | else 1 | |
424 | 431 | let nwinners = if ((finalstatus == FEATURED)) | |
425 | 432 | then yescnt | |
426 | 433 | else if ((finalstatus == DELISTED)) | |
427 | 434 | then notcnt | |
428 | 435 | else 0 | |
429 | 436 | let nloosers = (VOTERS - nwinners) | |
430 | 437 | let mltacciswinner = if ((finalstatus == accvote)) | |
431 | 438 | then 1 | |
432 | 439 | else 0 | |
433 | 440 | let voteprofit = if ((nwinners == 0)) | |
434 | 441 | then 0 | |
435 | 442 | else (mltacciswinner * (VOTEBET + ((mltisnotfullmajority * ((nloosers * VOTEBET) + LISTINGFEE)) / nwinners))) | |
436 | 443 | let authorreturn = (((LISTINGFEE * (if (isauthor) | |
437 | 444 | then 1 | |
438 | 445 | else 0)) * (if ((mltisnotfullmajority == 1)) | |
439 | 446 | then 0 | |
440 | 447 | else 1)) * (if ((finalstatus == FEATURED)) | |
441 | 448 | then 1 | |
442 | 449 | else 0)) | |
443 | 450 | if ((getValueItemVotingExpiration(item) > height)) | |
444 | 451 | then throw("The voting hasn't finished yet") | |
445 | 452 | else if ((getValueItemAccFinal(item, account) == FINISHED)) | |
446 | 453 | then throw("Account has already claimed") | |
447 | 454 | else if (if ((accvote == NONE)) | |
448 | 455 | then !(isauthor) | |
449 | 456 | else false) | |
450 | 457 | then throw("Account hasnot voted, hasnot reveal or isnot author") | |
451 | 458 | else if ((finalstatus == NONE)) | |
452 | 459 | then throw("Voting has expired") | |
453 | 460 | else WriteSet([DataEntry(getKeyItemAccFinal(item, account), FINISHED), DataEntry(getKeyBalance(account), ((getValueBalance(account) + voteprofit) + authorreturn))]) | |
454 | 461 | } | |
455 | 462 | ||
456 | 463 | ||
457 | 464 | ||
458 | 465 | @Callable(i) | |
459 | 466 | func closeexpiredvoting (item,account) = { | |
460 | 467 | let finalstatus = if ((getValueItemVotesYes(item) > QUORUM)) | |
461 | 468 | then FEATURED | |
462 | 469 | else if ((getValueItemVotesNo(item) > QUORUM)) | |
463 | 470 | then DELISTED | |
464 | 471 | else NONE | |
465 | 472 | let accvote = getValueItemAccReveal(item, account) | |
466 | 473 | let isauthor = (account == getValueItemAuthor(item)) | |
467 | 474 | let acccomi = getValueItemAccCommit(item, account) | |
468 | 475 | let hasrevealstage = (getValueItemNCommits(item) == VOTERS) | |
469 | 476 | let authorreturn = (LISTINGFEE * (if (isauthor) | |
470 | 477 | then 1 | |
471 | 478 | else 0)) | |
472 | 479 | let votersreturn1 = ((VOTEBET * (if (hasrevealstage) | |
473 | 480 | then 1 | |
474 | 481 | else 0)) * (if ((accvote != NONE)) | |
475 | 482 | then 1 | |
476 | 483 | else 0)) | |
477 | 484 | let votersreturn2 = (((2 * VOTEBET) * (if (hasrevealstage) | |
478 | 485 | then 0 | |
479 | 486 | else 1)) * (if ((acccomi != NONE)) | |
480 | 487 | then 1 | |
481 | 488 | else 0)) | |
482 | 489 | if ((getValueItemVotingExpiration(item) > height)) | |
483 | 490 | then throw("The voting hasn't finished yet") | |
484 | 491 | else if (if (!(isauthor)) | |
485 | 492 | then (acccomi == NONE) | |
486 | 493 | else false) | |
487 | 494 | then throw("Wrong account or item") | |
488 | 495 | else if ((getValueItemAccFinal(item, account) == FINISHED)) | |
489 | 496 | then throw("Account has already claimed") | |
490 | 497 | else if ((finalstatus != NONE)) | |
491 | 498 | then throw("Wrong item status") | |
492 | 499 | else WriteSet([DataEntry(getKeyItemAccFinal(item, account), FINISHED), DataEntry(getKeyBalance(account), (((getValueBalance(account) + authorreturn) + votersreturn1) + votersreturn2))]) | |
493 | 500 | } | |
494 | 501 | ||
495 | 502 | ||
496 | 503 | ||
497 | 504 | @Callable(i) | |
498 | 505 | func donate (item,tier,mode,review) = { | |
499 | 506 | let account = toBase58String(i.caller.bytes) | |
500 | 507 | let pmt = extract(i.payment) | |
501 | 508 | if (isDefined(pmt.assetId)) | |
502 | 509 | then throw("can use waves only at the moment") | |
503 | 510 | else { | |
504 | 511 | let cnt = (getValueItemAccReviewsCnt(item, account) + 1) | |
505 | 512 | let newnegativefund = (getValueItemFundNegative(item) + ((if ((mode == NEGATIVE)) | |
506 | 513 | then 1 | |
507 | 514 | else 0) * pmt.amount)) | |
508 | 515 | let newpositivefund = (getValueItemFundPositive(item) + ((if ((mode == POSITIVE)) | |
509 | 516 | then 1 | |
510 | 517 | else 0) * pmt.amount)) | |
511 | 518 | if ((getValueItemStatus(item) != FEATURED)) | |
512 | 519 | then throw("The project hasn't accepted by community") | |
513 | 520 | else if ((height >= getValueItemCrowdExpiration(item))) | |
514 | 521 | then throw("The time for crowdfunding has expired") | |
515 | 522 | else if ((newnegativefund >= newpositivefund)) | |
516 | 523 | then throw("Negative fund can't be higher than positive fund") | |
517 | 524 | else if (if ((mode != POSITIVE)) | |
518 | 525 | then (mode != NEGATIVE) | |
519 | 526 | else false) | |
520 | 527 | then throw("Wrong mode parameter") | |
521 | 528 | else if ((getValueItemAuthor(item) == account)) | |
522 | 529 | then throw("Can't donate own project") | |
523 | 530 | else if ((pmt.amount != TIERS[(tier - 1)])) | |
524 | 531 | then throw(("The payment must be equal to tier amount: " + toString(TIERS[(tier - 1)]))) | |
525 | 532 | else WriteSet([DataEntry(getKeyItemAccReviewsCnt(item, account), cnt), DataEntry(getKeyItemAccFundPositive(item, account), (getValueItemAccFundPositive(item, account) + ((if ((mode == POSITIVE)) | |
526 | 533 | then 1 | |
527 | 534 | else 0) * pmt.amount))), DataEntry(getKeyItemAccFundNegative(item, account), (getValueItemAccFundNegative(item, account) + ((if ((mode == NEGATIVE)) | |
528 | 535 | then 1 | |
529 | 536 | else 0) * pmt.amount))), DataEntry(getKeyItemFundPositive(item), newpositivefund), DataEntry(getKeyItemFundNegative(item), newnegativefund), DataEntry(getKeyItemAccReviewText(item, account, toString(cnt)), review), DataEntry(getKeyItemAccReviewMode(item, account, toString(cnt)), mode), DataEntry(getKeyItemAccReviewTier(item, account, toString(cnt)), tier)]) | |
530 | 537 | } | |
531 | 538 | } | |
532 | 539 | ||
533 | 540 | ||
534 | 541 | ||
535 | 542 | @Callable(i) | |
536 | 543 | func whale (item,review) = { | |
537 | 544 | let account = toBase58String(i.caller.bytes) | |
538 | 545 | let pmt = extract(i.payment) | |
539 | 546 | if (isDefined(pmt.assetId)) | |
540 | 547 | then throw("can use waves only at the moment") | |
541 | 548 | else if ((getValueItemStatus(item) != FEATURED)) | |
542 | 549 | then throw("The project hasn't accepted by community") | |
543 | 550 | else if ((getValueItemCrowdExpiration(item) > height)) | |
544 | 551 | then throw("The time for crowdfunding has not expired yet") | |
545 | 552 | else if ((height > getValueItemWhaleExpiration(item))) | |
546 | 553 | then throw("The time for grant has expired") | |
547 | 554 | else if ((getValueItemStatus(item) == BUYOUT)) | |
548 | 555 | then throw("Investement has already done") | |
549 | 556 | else if ((((getValueItemFundPositive(item) * MULTIPLIER) / 100) > pmt.amount)) | |
550 | 557 | then throw((("Investement must be more than " + toString(MULTIPLIER)) + "% of supportes funds")) | |
551 | 558 | else WriteSet([DataEntry(getKeyItemStatus(item), BUYOUT), DataEntry(getKeyItemAccWhaleReviewText(item, account), review), DataEntry(getKeyBalance(getValueItemAuthor(item)), (getValueBalance(getValueItemAuthor(item)) + getValueItemFundPositive(item))), DataEntry(getKeyItemBuyoutAmount(item), pmt.amount)]) | |
552 | 559 | } | |
553 | 560 | ||
554 | 561 | ||
555 | 562 | ||
556 | 563 | @Callable(i) | |
557 | 564 | func claimwinnings (item,account) = { | |
558 | 565 | let status = getValueItemStatus(item) | |
559 | 566 | let isbayout = if ((status == BUYOUT)) | |
560 | 567 | then 1 | |
561 | 568 | else 0 | |
562 | 569 | let iscrowdf = if ((status != BUYOUT)) | |
563 | 570 | then 1 | |
564 | 571 | else 0 | |
565 | 572 | let positivefund = getValueItemFundPositive(item) | |
566 | 573 | let negativefund = getValueItemFundNegative(item) | |
567 | 574 | let share = (((isbayout * (getValueItemAccFundPositive(item, account) * 100)) / (if ((0 >= positivefund)) | |
568 | 575 | then 1 | |
569 | 576 | else positivefund)) + ((iscrowdf * (getValueItemAccFundNegative(item, account) * 100)) / (if ((0 >= negativefund)) | |
570 | 577 | then 1 | |
571 | 578 | else negativefund))) | |
572 | 579 | let tmpnegwin = ((negativefund * MULTIPLIER) / 100) | |
573 | 580 | let betprofit = ((isbayout * ((share * negativefund) / 100)) + (iscrowdf * ((share * (if ((positivefund > tmpnegwin)) | |
574 | 581 | then tmpnegwin | |
575 | 582 | else positivefund)) / 100))) | |
576 | 583 | let roiprofit = (isbayout * ((share * getValueItemBuyoutAmount(item)) / 100)) | |
577 | 584 | let authorprofit = (((if ((getValueItemAuthor(item) == account)) | |
578 | 585 | then 1 | |
579 | 586 | else 0) * positivefund) * (if ((status != BUYOUT)) | |
580 | 587 | then 1 | |
581 | 588 | else 0)) | |
582 | 589 | if ((status == DELISTED)) | |
583 | 590 | then throw("The project hasn't accepted by community") | |
584 | 591 | else if (if ((status != BUYOUT)) | |
585 | 592 | then (getValueItemWhaleExpiration(item) >= height) | |
586 | 593 | else false) | |
587 | 594 | then throw("The time for grant has not expired yet") | |
588 | 595 | else if ((0 >= (positivefund + negativefund))) | |
589 | 596 | then throw("The campaign wasn't active") | |
590 | 597 | else WriteSet([DataEntry(getKeyBalance(account), (((getValueBalance(account) + betprofit) + roiprofit) + authorprofit)), DataEntry(getKeyItemStatus(item), if ((authorprofit > 0)) | |
591 | 598 | then CASHOUT | |
592 | 599 | else status), DataEntry(getKeyItemAccFinal(item, account), CLAIMED)]) | |
593 | 600 | } | |
594 | 601 | ||
595 | 602 |
github/deemru/w8io/026f985 64.05 ms ◑