tx · CDzRQ2Kz3VodxdMgpN5uPXhxFLroiHt3oxwKcBqpSCt3

3N9qeBe25aSyqVmMRfajmykaJFGCrjsTqF7:  -0.01000000 Waves

2019.09.23 17:22 [689109] smart account 3N9qeBe25aSyqVmMRfajmykaJFGCrjsTqF7 > SELF 0.00000000 Waves

{ "type": 13, "id": "CDzRQ2Kz3VodxdMgpN5uPXhxFLroiHt3oxwKcBqpSCt3", "fee": 1000000, "feeAssetId": null, "timestamp": 1569248557729, "version": 1, "sender": "3N9qeBe25aSyqVmMRfajmykaJFGCrjsTqF7", "senderPublicKey": "Ez94vLaB6gdFgg47ptnZQTFgQJiNpQpNsuhNbs6FjR4Q", "proofs": [ "2jjzLoFya7kwnhN8ikeo57MhoBGJa2mnX69HsVoMQuouyh2kTmox74uWpRLBjp5FKDyo4ZUHps53ySbv8Gk4ZKtT" ], "script": "base64:AAIDAAAAAAAAAAAAAAA1AQAAABNnZXRFeHRBZGRyZXNzT3JhY2xlAAAAAAkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTjYzcVRyamRYWGltdVdqWHdnQTc3RzY3THBmajlwdkNFcwAAAAALQkxBQ0tMSVNURUQCAAAACWJsYWNrbGlzdAAAAAALb3duZXJQdWJLZXkBAAAAIM/LKH/dwJjMfMlly817iSAYRNjNgkx92Cg3h0w9wDw1AAAAAAROT05FAgAAAARub25lAAAAAAZDTE9TRUQCAAAABWNsb3NlAAAAAAZPUEVORUQCAAAABG9wZW4BAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAA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ZXRLZXlCYWxhbmNlVXNlcgAAAAEFAAAABHVzZXIAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAABHVzZXIFAAAAB2JhbGFuY2UFAAAABHVuaXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZhcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABcwUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAC293bmVyUHViS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAF0BQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAALb3duZXJQdWJLZXkHrqGdDw==", "chainId": 84, "height": 689109, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
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'Ez94vLaB6gdFgg47ptnZQTFgQJiNpQpNsuhNbs6FjR4Q'
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 getKeyPropose (contributor,outline,data) = ("propose_" + toBase58String(sha256(toBytes(((contributor + outline) + data)))))
73+
74+
75+func getKeyProposeContributor (propose) = (propose + "_contributor")
76+
77+
78+func getValueProposeContributor (propose) = getStrByKey(getKeyProposeContributor(propose))
79+
80+
81+func getKeyProposeData (propose) = (propose + "_data")
82+
83+
84+func getValueProposeData (propose) = getStrByKey(getKeyProposeData(propose))
85+
86+
87+func getKeyAdoption (room,propose) = ("adoption_" + toBase58String(sha256(toBytes((room + propose)))))
88+
89+
90+func getKeyAdoptionWinner (adoption) = (adoption + "_winner")
91+
92+
93+func getValueAdoptionWinner (adoption) = getStrByKey(getKeyAdoptionWinner(adoption))
94+
95+
96+func getKeyAdoptionPrize (adoption) = (adoption + "_prize")
97+
98+
99+func getValueAdoptionPrize (adoption) = getStrByKey(getKeyAdoptionPrize(adoption))
100+
101+
102+func getKeyMealpolicyUser (account) = (toBase58String(sha256(toBytes(account))) + "_mealpolicy")
103+
104+
105+func getValueMealpolicyUser (account) = getStrByKey(getKeyMealpolicyUser(account))
106+
107+
108+func getKeySexUser (account) = (toBase58String(sha256(toBytes(account))) + "_sex")
109+
110+
111+func getValueSexUser (account) = getStrByKey(getKeySexUser(account))
112+
113+
114+func getKeyAgeUser (account) = (toBase58String(sha256(toBytes(account))) + "_age")
115+
116+
117+func getValueAgeUser (account) = getNumberByKey(getKeyAgeUser(account))
118+
119+
120+func getKeyHobbyUser (account) = (toBase58String(sha256(toBytes(account))) + "_hobby")
121+
122+
123+func getValueHobbyUser (account) = getStrByKey(getKeyHobbyUser(account))
124+
125+
126+func getKeyAreaUser (account) = (toBase58String(sha256(toBytes(account))) + "_area")
127+
128+
129+func getValueAreaUser (account) = getStrByKey(getKeyAreaUser(account))
130+
131+
132+func getKeyRoomCountRoomer (account) = (toBase58String(sha256(toBytes(account))) + "_roomCount")
133+
134+
135+func getValueRoomCountRoomer (account) = getNumberByKey(getKeyRoomCountRoomer(account))
136+
137+
138+func getKeyAdoptCountRoomer (account) = (toBase58String(sha256(toBytes(account))) + "_adoptCount")
139+
140+
141+func getValueAdoptCountRoomer (account) = getNumberByKey(getKeyAdoptCountRoomer(account))
142+
143+
144+func getKeyEvaluateData (room,propose) = ("evaluate_" + toBase58String(sha256(toBytes((propose + room)))))
145+
146+
147+func getValueEvaluateData (room,propose) = getStrByKey(getKeyEvaluateData(propose, room))
148+
149+
150+func getKeyEvaluateCountProposer (account) = (toBase58String(sha256(toBytes(account))) + "_evaluateCount")
151+
152+
153+func getValueEvaluateCountProposer (account) = getNumberByKey(getKeyEvaluateCountProposer(account))
154+
155+
156+func getKeyTotalPointProposer (account) = (toBase58String(sha256(toBytes(account))) + "_evaluateCount")
157+
158+
159+func getValueTotalPointProposer (account) = getNumberByKey(getKeyTotalPointProposer(account))
160+
161+
162+func getKeyBalanceUser (account) = (toBase58String(sha256(toBytes(account))) + "_balance")
163+
164+
165+func getValueBalanceUser (account) = getNumberByKey(getKeyBalanceUser(account))
166+
167+
168+func getExtKeyUserBlackListStatus (account) = (account + "_blacklisted")
169+
170+
171+func getExtValueUserBlackListStatus (oracle,account) = {
172+ let str = match getString(oracle, getExtKeyUserBlackListStatus(account)) {
173+ case a: String =>
174+ a
175+ case _ =>
176+ NONE
177+ }
178+ str
179+ }
180+
181+
182+@Callable(i)
183+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)])
184+
185+
186+
187+@Callable(i)
188+func createRoom (title,data,now,duration) = {
189+ let pmt = extract(i.payment)
190+ if (isDefined(pmt.assetId))
191+ then throw("can use WAVES only at the moment")
192+ else {
193+ let roomer = toBase58String(i.caller.bytes)
194+ let room = getKeyRoom(roomer, title, data)
195+ let prize = pmt.amount
196+ let oracle = getExtAddressOracle()
197+ let roomerVerify = getExtValueUserBlackListStatus(oracle, roomer)
198+ let limit = (now + duration)
199+ if ((0 >= prize))
200+ then throw("prize cannot be negative amount")
201+ else if ((360 >= duration))
202+ then throw("duration cannot be less than 6hours")
203+ else if ((getValueRoomRoomer(room) != NONE))
204+ then throw("the room is already exist")
205+ else if ((roomerVerify == BLACKLISTED))
206+ then throw("your request was denied")
207+ 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))])
208+ }
209+ }
210+
211+
212+
213+@Callable(i)
214+func editRoom (data,room) = {
215+ let roomer = toBase58String(i.caller.bytes)
216+ let oracle = getExtAddressOracle()
217+ let roomerVerify = getExtValueUserBlackListStatus(oracle, roomer)
218+ if ((getValueRoomRoomer(room) != roomer))
219+ then throw("you cannot edit this room")
220+ else if ((roomerVerify == BLACKLISTED))
221+ then throw("your request was denied")
222+ else WriteSet([DataEntry(getKeyRoomData(room), data)])
223+ }
224+
225+
226+
227+@Callable(i)
228+func closeRoom (room) = {
229+ let roomer = getValueRoomRoomer(room)
230+ let prize = getValueRoomPrize(room)
231+ if ((roomer != toBase58String(i.caller.bytes)))
232+ then throw("you cannot close this Room")
233+ else if ((getValueRoomStatus(room) == CLOSED))
234+ then throw("this Room has already closed")
235+ else ScriptResult(WriteSet([DataEntry(getKeyRoomStatus(room), CLOSED)]), TransferSet([ScriptTransfer(addressFromStringValue(roomer), prize, unit)]))
236+ }
237+
238+
239+
240+@Callable(i)
241+func createProposal (room,data,outline,now) = {
242+ let contributor = toBase58String(i.caller.bytes)
243+ let oracle = getExtAddressOracle()
244+ let contributorVerify = getExtValueUserBlackListStatus(oracle, contributor)
245+ let propose = getKeyPropose(contributor, outline, data)
246+ let roomer = getValueRoomRoomer(room)
247+ let limit = getValueRoomLimit(room)
248+ if ((data == NONE))
249+ then throw("your proposal is empty")
250+ else if ((roomer == NONE))
251+ then throw("room does not exist")
252+ else if ((now >= limit))
253+ then throw("propose to this room is already closed")
254+ else if ((contributorVerify == BLACKLISTED))
255+ then throw("your request was denied")
256+ else if ((getValueRoomStatus(room) == CLOSED))
257+ then throw("this Room has already closed")
258+ else WriteSet([DataEntry(getKeyProposeContributor(propose), contributor), DataEntry(getKeyProposeData(propose), data)])
259+ }
260+
261+
262+
263+@Callable(i)
264+func editProposal (propose,data) = {
265+ let contributor = toBase58String(i.caller.bytes)
266+ let oracle = getExtAddressOracle()
267+ let contributorVerify = getExtValueUserBlackListStatus(oracle, contributor)
268+ if ((data == NONE))
269+ then throw("your proposal is empty")
270+ else if ((getValueProposeContributor(propose) != contributor))
271+ then throw("you cannot edit this proposal")
272+ else if ((contributorVerify == BLACKLISTED))
273+ then throw("your request was denied")
274+ else WriteSet([DataEntry(getKeyProposeData(propose), data)])
275+ }
276+
277+
278+
279+@Callable(i)
280+func createAdoption (room,propose) = {
281+ let adoption = getKeyAdoption(room, propose)
282+ let prize = getValueRoomPrize(room)
283+ let winner = getValueProposeContributor(propose)
284+ let roomer = getValueRoomRoomer(room)
285+ if ((roomer != toBase58String(i.caller.bytes)))
286+ then throw("only the Room's owner can do this transaction")
287+ else if ((winner == NONE))
288+ then throw("the winner doesn't exist")
289+ else if ((getValueAdoptionWinner(adoption) != NONE))
290+ then throw("you have already do the adoption")
291+ else if ((getValueRoomStatus(room) == CLOSED))
292+ then throw("this Room has already closed")
293+ 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))])
294+ }
295+
296+
297+
298+@Callable(i)
299+func evaluateProposer (propose,room,point,data) = {
300+ let adoption = getKeyAdoption(room, propose)
301+ let winner = getValueProposeContributor(propose)
302+ let roomer = getValueRoomRoomer(room)
303+ if ((roomer != toBase58String(i.caller.bytes)))
304+ then throw("only the Room's owner can do this transaction")
305+ else if ((winner == NONE))
306+ then throw("proposer doesn't exist")
307+ else if ((adoption == NONE))
308+ then throw("you cannot evaluate this proposer")
309+ else if ((getValueEvaluateData(room, propose) != NONE))
310+ then throw("you have already evaluate")
311+ else WriteSet([DataEntry(getKeyEvaluateData(room, propose), data), DataEntry(getKeyEvaluateCountProposer(winner), (getValueEvaluateCountProposer(winner) + 1)), DataEntry(getKeyTotalPointProposer(winner), (getValueTotalPointProposer(winner) + point))])
312+ }
313+
314+
315+
316+@Callable(i)
317+func withdraw () = {
318+ let user = toBase58String(i.caller.bytes)
319+ let balance = getValueBalanceUser(user)
320+ if ((0 >= balance))
321+ then throw("you have nothing to withdraw")
322+ else ScriptResult(WriteSet([DataEntry(getKeyBalanceUser(user), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(user), balance, unit)]))
323+ }
324+
325+
326+@Verifier(tx)
327+func varify () = match tx {
328+ case s: SetScriptTransaction =>
329+ sigVerify(tx.bodyBytes, tx.proofs[0], ownerPubKey)
330+ case d: DataTransaction =>
331+ true
332+ case t: TransferTransaction =>
333+ sigVerify(tx.bodyBytes, tx.proofs[0], ownerPubKey)
334+ case _ =>
335+ false
336+}
337+

github/deemru/w8io/169f3d6 
26.61 ms