tx · H9MFkxvQjGv41zXn5QbsdSN1N97sgwcuAUyuXvrkvDns 3MuhEmHjLD7cZhMqFDCcpCxewcTDMKuqQoH: -0.01000000 Waves 2019.09.24 11:57 [690214] smart account 3MuhEmHjLD7cZhMqFDCcpCxewcTDMKuqQoH > SELF 0.00000000 Waves
{ "type": 13, "id": "H9MFkxvQjGv41zXn5QbsdSN1N97sgwcuAUyuXvrkvDns", "fee": 1000000, "feeAssetId": null, "timestamp": 1569315465120, "version": 1, "sender": "3MuhEmHjLD7cZhMqFDCcpCxewcTDMKuqQoH", "senderPublicKey": "4cT1SS1xf5Gop5nTH3Q8EYeUcvgtnuqnnR3onoy1tcUj", "proofs": [ "5xco8bKcwhE3QNrPiP3nh86ramNffMowF7PZSAXB4S5XEk1rQ8pHJpgBhMEMnc1vFKMaSDYzm8ztda193F1uGB3H" ], "script": "base64:AAIDAAAAAAAAAAAAAAA3AQAAABNnZXRFeHRBZGRyZXNzT3JhY2xlAAAAAAkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTjYzcVRyamRYWGltdVdqWHdnQTc3RzY3THBmajlwdkNFcwAAAAALQkxBQ0tMSVNURUQCAAAACWJsYWNrbGlzdAAAAAALb3duZXJQdWJLZXkBAAAAIDWny8KdpDJMgXmfU0W0+fQCxhtzv4eSjAPrxb9Yb9UsAAAAAAROT05FAgAAAARub25lAAAAAAZDTE9TRUQCAAAABWNsb3NlAAAAAAZPUEVORUQCAAAABG9wZW4BAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAAQ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wgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAtvd25lclB1YktleQexhjyc", "chainId": 84, "height": 690214, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func getExtAddressOracle () = extract(addressFromString("3N63qTrjdXXimuWjXwgA77G67Lpfj9pvCEs")) | |
5 | + | ||
6 | + | ||
7 | + | let BLACKLISTED = "blacklist" | |
8 | + | ||
9 | + | let ownerPubKey = base58'4cT1SS1xf5Gop5nTH3Q8EYeUcvgtnuqnnR3onoy1tcUj' | |
10 | + | ||
11 | + | let NONE = "none" | |
12 | + | ||
13 | + | let CLOSED = "close" | |
14 | + | ||
15 | + | let OPENED = "open" | |
16 | + | ||
17 | + | func getNumberByKey (key) = { | |
18 | + | let num = match getInteger(this, key) { | |
19 | + | case a: Int => | |
20 | + | a | |
21 | + | case _ => | |
22 | + | 0 | |
23 | + | } | |
24 | + | num | |
25 | + | } | |
26 | + | ||
27 | + | ||
28 | + | func getStrByKey (key) = { | |
29 | + | let str = match getString(this, key) { | |
30 | + | case a: String => | |
31 | + | a | |
32 | + | case _ => | |
33 | + | NONE | |
34 | + | } | |
35 | + | str | |
36 | + | } | |
37 | + | ||
38 | + | ||
39 | + | func getKeyRoom (roomer,title,data) = ("room_" + toBase58String(sha256(toBytes(((roomer + title) + data))))) | |
40 | + | ||
41 | + | ||
42 | + | func getKeyRoomPrize (room) = (room + "_prize") | |
43 | + | ||
44 | + | ||
45 | + | func getValueRoomPrize (room) = getNumberByKey(getKeyRoomPrize(room)) | |
46 | + | ||
47 | + | ||
48 | + | func getKeyRoomRoomer (room) = (room + "_roomer") | |
49 | + | ||
50 | + | ||
51 | + | func getValueRoomRoomer (room) = getStrByKey(getKeyRoomRoomer(room)) | |
52 | + | ||
53 | + | ||
54 | + | func getKeyRoomLimit (room) = (room + "_limit") | |
55 | + | ||
56 | + | ||
57 | + | func getValueRoomLimit (room) = getNumberByKey(getKeyRoomLimit(room)) | |
58 | + | ||
59 | + | ||
60 | + | func getKeyRoomStatus (room) = (room + "_status") | |
61 | + | ||
62 | + | ||
63 | + | func getValueRoomStatus (room) = getStrByKey(getKeyRoomStatus(room)) | |
64 | + | ||
65 | + | ||
66 | + | func getKeyRoomData (room) = (room + "_data") | |
67 | + | ||
68 | + | ||
69 | + | func getValueRoomData (room) = getStrByKey(getKeyRoomData(room)) | |
70 | + | ||
71 | + | ||
72 | + | func getKeyProposeCountRoom (room) = (room + "_proposals") | |
73 | + | ||
74 | + | ||
75 | + | func getValueProposeCountRoom (room) = getNumberByKey(getKeyProposeCountRoom(room)) | |
76 | + | ||
77 | + | ||
78 | + | func getKeyPropose (contributor,outline,data) = ("propose_" + toBase58String(sha256(toBytes(((contributor + outline) + data))))) | |
79 | + | ||
80 | + | ||
81 | + | func getKeyProposeContributor (propose) = (propose + "_contributor") | |
82 | + | ||
83 | + | ||
84 | + | func getValueProposeContributor (propose) = getStrByKey(getKeyProposeContributor(propose)) | |
85 | + | ||
86 | + | ||
87 | + | func getKeyProposeData (propose) = (propose + "_data") | |
88 | + | ||
89 | + | ||
90 | + | func getValueProposeData (propose) = getStrByKey(getKeyProposeData(propose)) | |
91 | + | ||
92 | + | ||
93 | + | func getKeyAdoption (room,propose) = ("adoption_" + toBase58String(sha256(toBytes((room + propose))))) | |
94 | + | ||
95 | + | ||
96 | + | func getKeyAdoptionWinner (adoption) = (adoption + "_winner") | |
97 | + | ||
98 | + | ||
99 | + | func getValueAdoptionWinner (adoption) = getStrByKey(getKeyAdoptionWinner(adoption)) | |
100 | + | ||
101 | + | ||
102 | + | func getKeyAdoptionPrize (adoption) = (adoption + "_prize") | |
103 | + | ||
104 | + | ||
105 | + | func getValueAdoptionPrize (adoption) = getStrByKey(getKeyAdoptionPrize(adoption)) | |
106 | + | ||
107 | + | ||
108 | + | func getKeyMealpolicyUser (account) = (toBase58String(sha256(toBytes(account))) + "_mealpolicy") | |
109 | + | ||
110 | + | ||
111 | + | func getValueMealpolicyUser (account) = getStrByKey(getKeyMealpolicyUser(account)) | |
112 | + | ||
113 | + | ||
114 | + | func getKeySexUser (account) = (toBase58String(sha256(toBytes(account))) + "_sex") | |
115 | + | ||
116 | + | ||
117 | + | func getValueSexUser (account) = getStrByKey(getKeySexUser(account)) | |
118 | + | ||
119 | + | ||
120 | + | func getKeyAgeUser (account) = (toBase58String(sha256(toBytes(account))) + "_age") | |
121 | + | ||
122 | + | ||
123 | + | func getValueAgeUser (account) = getNumberByKey(getKeyAgeUser(account)) | |
124 | + | ||
125 | + | ||
126 | + | func getKeyHobbyUser (account) = (toBase58String(sha256(toBytes(account))) + "_hobby") | |
127 | + | ||
128 | + | ||
129 | + | func getValueHobbyUser (account) = getStrByKey(getKeyHobbyUser(account)) | |
130 | + | ||
131 | + | ||
132 | + | func getKeyAreaUser (account) = (toBase58String(sha256(toBytes(account))) + "_area") | |
133 | + | ||
134 | + | ||
135 | + | func getValueAreaUser (account) = getStrByKey(getKeyAreaUser(account)) | |
136 | + | ||
137 | + | ||
138 | + | func getKeyRoomCountRoomer (account) = (toBase58String(sha256(toBytes(account))) + "_roomCount") | |
139 | + | ||
140 | + | ||
141 | + | func getValueRoomCountRoomer (account) = getNumberByKey(getKeyRoomCountRoomer(account)) | |
142 | + | ||
143 | + | ||
144 | + | func getKeyAdoptCountRoomer (account) = (toBase58String(sha256(toBytes(account))) + "_adoptCount") | |
145 | + | ||
146 | + | ||
147 | + | func getValueAdoptCountRoomer (account) = getNumberByKey(getKeyAdoptCountRoomer(account)) | |
148 | + | ||
149 | + | ||
150 | + | func getKeyEvaluateData (room,propose) = ("evaluate_" + toBase58String(sha256(toBytes((propose + room))))) | |
151 | + | ||
152 | + | ||
153 | + | func getValueEvaluateData (room,propose) = getStrByKey(getKeyEvaluateData(propose, room)) | |
154 | + | ||
155 | + | ||
156 | + | func getKeyEvaluateCountProposer (account) = (toBase58String(sha256(toBytes(account))) + "_evaluateCount") | |
157 | + | ||
158 | + | ||
159 | + | func getValueEvaluateCountProposer (account) = getNumberByKey(getKeyEvaluateCountProposer(account)) | |
160 | + | ||
161 | + | ||
162 | + | func getKeyTotalPointProposer (account) = (toBase58String(sha256(toBytes(account))) + "_evaluateTotal") | |
163 | + | ||
164 | + | ||
165 | + | func getValueTotalPointProposer (account) = getNumberByKey(getKeyTotalPointProposer(account)) | |
166 | + | ||
167 | + | ||
168 | + | func getKeyBalanceUser (account) = (toBase58String(sha256(toBytes(account))) + "_balance") | |
169 | + | ||
170 | + | ||
171 | + | func getValueBalanceUser (account) = getNumberByKey(getKeyBalanceUser(account)) | |
172 | + | ||
173 | + | ||
174 | + | func getExtKeyUserBlackListStatus (account) = (account + "_blacklisted") | |
175 | + | ||
176 | + | ||
177 | + | func getExtValueUserBlackListStatus (oracle,account) = { | |
178 | + | let str = match getString(oracle, getExtKeyUserBlackListStatus(account)) { | |
179 | + | case a: String => | |
180 | + | a | |
181 | + | case _ => | |
182 | + | NONE | |
183 | + | } | |
184 | + | str | |
185 | + | } | |
186 | + | ||
187 | + | ||
188 | + | @Callable(i) | |
189 | + | func setUser (account,mealpolicy,sex,age,hobby,area) = WriteSet([DataEntry(getKeyMealpolicyUser(account), mealpolicy), DataEntry(getKeySexUser(account), sex), DataEntry(getKeyAgeUser(account), age), DataEntry(getKeyHobbyUser(account), hobby), DataEntry(getKeyAreaUser(account), area)]) | |
190 | + | ||
191 | + | ||
192 | + | ||
193 | + | @Callable(i) | |
194 | + | func createRoom (title,data,now,duration) = { | |
195 | + | let pmt = extract(i.payment) | |
196 | + | if (isDefined(pmt.assetId)) | |
197 | + | then throw("can use WAVES only at the moment") | |
198 | + | else { | |
199 | + | let roomer = toBase58String(i.caller.bytes) | |
200 | + | let room = getKeyRoom(roomer, title, data) | |
201 | + | let prize = pmt.amount | |
202 | + | let oracle = getExtAddressOracle() | |
203 | + | let roomerVerify = getExtValueUserBlackListStatus(oracle, roomer) | |
204 | + | let limit = (now + duration) | |
205 | + | if ((0 >= prize)) | |
206 | + | then throw("prize cannot be negative amount") | |
207 | + | else if ((360 >= duration)) | |
208 | + | then throw("duration cannot be less than 6hours") | |
209 | + | else if ((getValueRoomRoomer(room) != NONE)) | |
210 | + | then throw("the room is already exist") | |
211 | + | else if ((roomerVerify == BLACKLISTED)) | |
212 | + | then throw("your request was denied") | |
213 | + | else WriteSet([DataEntry(getKeyRoomPrize(room), prize), DataEntry(getKeyRoomRoomer(room), roomer), DataEntry(getKeyRoomLimit(room), limit), DataEntry(getKeyRoomStatus(room), OPENED), DataEntry(getKeyRoomData(room), data), DataEntry(getKeyRoomCountRoomer(roomer), (getValueRoomCountRoomer(roomer) + 1))]) | |
214 | + | } | |
215 | + | } | |
216 | + | ||
217 | + | ||
218 | + | ||
219 | + | @Callable(i) | |
220 | + | func editRoom (data,room) = { | |
221 | + | let roomer = toBase58String(i.caller.bytes) | |
222 | + | let oracle = getExtAddressOracle() | |
223 | + | let roomerVerify = getExtValueUserBlackListStatus(oracle, roomer) | |
224 | + | if ((getValueRoomRoomer(room) != roomer)) | |
225 | + | then throw("you cannot edit this room") | |
226 | + | else if ((roomerVerify == BLACKLISTED)) | |
227 | + | then throw("your request was denied") | |
228 | + | else WriteSet([DataEntry(getKeyRoomData(room), data)]) | |
229 | + | } | |
230 | + | ||
231 | + | ||
232 | + | ||
233 | + | @Callable(i) | |
234 | + | func closeRoom (room) = { | |
235 | + | let roomer = getValueRoomRoomer(room) | |
236 | + | let prize = getValueRoomPrize(room) | |
237 | + | if ((roomer != toBase58String(i.caller.bytes))) | |
238 | + | then throw("you cannot close this Room") | |
239 | + | else if ((getValueRoomStatus(room) == CLOSED)) | |
240 | + | then throw("this Room has already closed") | |
241 | + | else ScriptResult(WriteSet([DataEntry(getKeyRoomStatus(room), CLOSED)]), TransferSet([ScriptTransfer(addressFromStringValue(roomer), prize, unit)])) | |
242 | + | } | |
243 | + | ||
244 | + | ||
245 | + | ||
246 | + | @Callable(i) | |
247 | + | func createProposal (room,data,outline,now) = { | |
248 | + | let contributor = toBase58String(i.caller.bytes) | |
249 | + | let oracle = getExtAddressOracle() | |
250 | + | let contributorVerify = getExtValueUserBlackListStatus(oracle, contributor) | |
251 | + | let propose = getKeyPropose(contributor, outline, data) | |
252 | + | let roomer = getValueRoomRoomer(room) | |
253 | + | let limit = getValueRoomLimit(room) | |
254 | + | if ((data == NONE)) | |
255 | + | then throw("your proposal is empty") | |
256 | + | else if ((roomer == NONE)) | |
257 | + | then throw("room does not exist") | |
258 | + | else if ((now >= limit)) | |
259 | + | then throw("propose to this room is already closed") | |
260 | + | else if ((contributorVerify == BLACKLISTED)) | |
261 | + | then throw("your request was denied") | |
262 | + | else if ((getValueRoomStatus(room) == CLOSED)) | |
263 | + | then throw("this Room has already closed") | |
264 | + | else WriteSet([DataEntry(getKeyProposeContributor(propose), contributor), DataEntry(getKeyProposeData(propose), data), DataEntry(getKeyProposeCountRoom(room), (getValueProposeCountRoom(room) + 1))]) | |
265 | + | } | |
266 | + | ||
267 | + | ||
268 | + | ||
269 | + | @Callable(i) | |
270 | + | func editProposal (propose,data) = { | |
271 | + | let contributor = toBase58String(i.caller.bytes) | |
272 | + | let oracle = getExtAddressOracle() | |
273 | + | let contributorVerify = getExtValueUserBlackListStatus(oracle, contributor) | |
274 | + | if ((data == NONE)) | |
275 | + | then throw("your proposal is empty") | |
276 | + | else if ((getValueProposeContributor(propose) != contributor)) | |
277 | + | then throw("you cannot edit this proposal") | |
278 | + | else if ((contributorVerify == BLACKLISTED)) | |
279 | + | then throw("your request was denied") | |
280 | + | else WriteSet([DataEntry(getKeyProposeData(propose), data)]) | |
281 | + | } | |
282 | + | ||
283 | + | ||
284 | + | ||
285 | + | @Callable(i) | |
286 | + | func createAdoption (room,propose) = { | |
287 | + | let adoption = getKeyAdoption(room, propose) | |
288 | + | let prize = getValueRoomPrize(room) | |
289 | + | let winner = getValueProposeContributor(propose) | |
290 | + | let roomer = getValueRoomRoomer(room) | |
291 | + | if ((roomer != toBase58String(i.caller.bytes))) | |
292 | + | then throw("only the Room's owner can do this transaction") | |
293 | + | else if ((winner == NONE)) | |
294 | + | then throw("the winner doesn't exist") | |
295 | + | else if ((getValueAdoptionWinner(adoption) != NONE)) | |
296 | + | then throw("you have already do the adoption") | |
297 | + | else if ((getValueRoomStatus(room) == CLOSED)) | |
298 | + | then throw("this Room has already closed") | |
299 | + | else WriteSet([DataEntry(getKeyBalanceUser(winner), (getValueBalanceUser(winner) + prize)), DataEntry(getKeyAdoptionWinner(adoption), winner), DataEntry(getKeyAdoptionPrize(adoption), prize), DataEntry(getKeyRoomStatus(room), CLOSED), DataEntry(getKeyAdoptCountRoomer(roomer), (getValueAdoptCountRoomer(roomer) + 1))]) | |
300 | + | } | |
301 | + | ||
302 | + | ||
303 | + | ||
304 | + | @Callable(i) | |
305 | + | func evaluateProposer (propose,room,point,data) = { | |
306 | + | let adoption = getKeyAdoption(room, propose) | |
307 | + | let winner = getValueProposeContributor(propose) | |
308 | + | let roomer = getValueRoomRoomer(room) | |
309 | + | if ((roomer != toBase58String(i.caller.bytes))) | |
310 | + | then throw("only the Room's owner can do this transaction") | |
311 | + | else if ((winner == NONE)) | |
312 | + | then throw("proposer doesn't exist") | |
313 | + | else if ((adoption == NONE)) | |
314 | + | then throw("you cannot evaluate this proposer") | |
315 | + | else if ((getValueEvaluateData(room, propose) != NONE)) | |
316 | + | then throw("you have already evaluate") | |
317 | + | else WriteSet([DataEntry(getKeyEvaluateData(room, propose), data), DataEntry(getKeyEvaluateCountProposer(winner), (getValueEvaluateCountProposer(winner) + 1)), DataEntry(getKeyTotalPointProposer(winner), (getValueTotalPointProposer(winner) + point))]) | |
318 | + | } | |
319 | + | ||
320 | + | ||
321 | + | ||
322 | + | @Callable(i) | |
323 | + | func withdraw () = { | |
324 | + | let user = toBase58String(i.caller.bytes) | |
325 | + | let balance = getValueBalanceUser(user) | |
326 | + | if ((0 >= balance)) | |
327 | + | then throw("you have nothing to withdraw") | |
328 | + | else ScriptResult(WriteSet([DataEntry(getKeyBalanceUser(user), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(user), balance, unit)])) | |
329 | + | } | |
330 | + | ||
331 | + | ||
332 | + | @Verifier(tx) | |
333 | + | func varify () = match tx { | |
334 | + | case s: SetScriptTransaction => | |
335 | + | sigVerify(tx.bodyBytes, tx.proofs[0], ownerPubKey) | |
336 | + | case d: DataTransaction => | |
337 | + | true | |
338 | + | case t: TransferTransaction => | |
339 | + | sigVerify(tx.bodyBytes, tx.proofs[0], ownerPubKey) | |
340 | + | case _ => | |
341 | + | false | |
342 | + | } | |
343 | + |
github/deemru/w8io/169f3d6 47.78 ms ◑