tx · BW1iTi1Ja5pjMfBdZAnM48MBfHdLRX7ZjYNiQp3YHEZy

3N8onacEWRHaeezuEsdviprM9SiRgwe5gE1:  -0.01000000 Waves

2019.09.18 10:18 [681383] smart account 3N8onacEWRHaeezuEsdviprM9SiRgwe5gE1 > SELF 0.00000000 Waves

{ "type": 13, "id": "BW1iTi1Ja5pjMfBdZAnM48MBfHdLRX7ZjYNiQp3YHEZy", "fee": 1000000, "feeAssetId": null, "timestamp": 1568790918909, "version": 1, "sender": "3N8onacEWRHaeezuEsdviprM9SiRgwe5gE1", "senderPublicKey": "AACfEVEGCHQ6B1LKVvHqk3pHYjBpFRXgjPCnmqEToCM2", "proofs": [ "2nEveVUbHzjvACopx3n8kLUpJtym6rr8LACjfYNQ14mtKSNnPtSpV7LNcqxzDEtkHPJxVNpFFVYeyUy4waFDQ3Dn" ], "script": "base64:AAIDAAAAAAAAAAAAAAAhAQAAABNnZXRFeHRBZGRyZXNzT3JhY2xlAAAAAAkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTjdqZVVoOTU1WEVWdWpyeXN0MjR0WEt6Vm0yZlhXc1pEUwAAAAALQkxBQ0tMSVNURUQCAAAACWJsYWNrbGlzdAAAAAALb3duZXJQdWJLZXkBAAAAIIgUl7sFA/dz/jsH8vybsWg6EsLb7rb62ZtvBeB1+bIFAAAAAAROT05FAgAAAARub25lAAAAAAZDTE9TRUQCAAAABWNsb3NlAAAAAAZPUEVORUQCAAAABG9wZW4BAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAA251bQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAADbnVtAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDA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nkAAAACCQEAAAARZ2V0S2V5QmFsYW5jZVVzZXIAAAABBQAAAAR1c2VyAAAAAAAAAAAABQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAR1c2VyBQAAAAdiYWxhbmNlBQAAAAR1bml0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2YXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAXMFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAtvd25lclB1YktleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAC293bmVyUHViS2V5B67VjF8=", "chainId": 84, "height": 681383, "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("3N7jeUh955XEVujryst24tXKzVm2fXWsZDS"))
5+
6+
7+let BLACKLISTED = "blacklist"
8+
9+let ownerPubKey = base58'AACfEVEGCHQ6B1LKVvHqk3pHYjBpFRXgjPCnmqEToCM2'
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) = ("propose_" + toBase58String(sha256(toBytes((contributor + outline)))))
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 getKeyBalanceUser (account) = (account + "_balance")
103+
104+
105+func getValueBalanceUser (account) = getNumberByKey(getKeyBalanceUser(account))
106+
107+
108+func getExtKeyUserBlackListStatus (account) = (account + "_blacklisted")
109+
110+
111+func getExtValueUserBlackListStatus (oracle,account) = {
112+ let str = match getString(oracle, getExtKeyUserBlackListStatus(account)) {
113+ case a: String =>
114+ a
115+ case _ =>
116+ NONE
117+ }
118+ str
119+ }
120+
121+
122+@Callable(i)
123+func createRoom (title,data,now,duration) = {
124+ let pmt = extract(i.payment)
125+ if (isDefined(pmt.assetId))
126+ then throw("can use WAVES only at the moment")
127+ else {
128+ let roomer = toBase58String(i.caller.bytes)
129+ let room = getKeyRoom(roomer, title, data)
130+ let prize = pmt.amount
131+ let oracle = getExtAddressOracle()
132+ let roomerVerify = getExtValueUserBlackListStatus(oracle, roomer)
133+ let limit = (now + duration)
134+ if ((0 >= prize))
135+ then throw("prize cannot be negative amount")
136+ else if ((360 >= duration))
137+ then throw("duration cannot be less than 6hours")
138+ else if ((getValueRoomRoomer(room) != NONE))
139+ then throw("the room is already exist")
140+ else if ((roomerVerify == BLACKLISTED))
141+ then throw("your request was denied")
142+ else WriteSet([DataEntry(getKeyRoomPrize(room), prize), DataEntry(getKeyRoomRoomer(room), roomer), DataEntry(getKeyRoomLimit(room), limit), DataEntry(getKeyRoomStatus(room), OPENED), DataEntry(getKeyRoom(roomer, title, data), data)])
143+ }
144+ }
145+
146+
147+
148+@Callable(i)
149+func closeRoom (room) = {
150+ let roomer = getValueRoomRoomer(room)
151+ let prize = getValueRoomPrize(room)
152+ if ((roomer != toBase58String(i.caller.bytes)))
153+ then throw("you cannot close this Room")
154+ else if ((getValueRoomStatus(room) == CLOSED))
155+ then throw("this Room has already closed")
156+ else ScriptResult(WriteSet([DataEntry(getKeyRoomStatus(room), CLOSED)]), TransferSet([ScriptTransfer(addressFromStringValue(roomer), prize, unit)]))
157+ }
158+
159+
160+
161+@Callable(i)
162+func createProposal (room,data,outline,now) = {
163+ let contributor = toBase58String(i.caller.bytes)
164+ let oracle = getExtAddressOracle()
165+ let contributorVerify = getExtValueUserBlackListStatus(oracle, contributor)
166+ let propose = getKeyPropose(contributor, outline)
167+ let roomer = getValueRoomRoomer(room)
168+ let limit = getValueRoomLimit(room)
169+ if ((data == NONE))
170+ then throw("your proposal is empty")
171+ else if ((roomer == NONE))
172+ then throw("room does not exist")
173+ else if ((now >= limit))
174+ then throw("propose to this room is already closed")
175+ else if ((contributorVerify == BLACKLISTED))
176+ then throw("your request was denied")
177+ else if ((getValueRoomStatus(room) == CLOSED))
178+ then throw("this Room has already closed")
179+ else WriteSet([DataEntry(getKeyProposeContributor(propose), contributor), DataEntry(getKeyProposeData(propose), data)])
180+ }
181+
182+
183+
184+@Callable(i)
185+func createAdoption (room,propose) = {
186+ let adoption = getKeyAdoption(room, propose)
187+ let prize = getValueRoomPrize(room)
188+ let winner = getValueProposeContributor(propose)
189+ let roomer = getValueRoomRoomer(room)
190+ if ((roomer != toBase58String(i.caller.bytes)))
191+ then throw("only the Room's owner can do this transaction")
192+ else if ((winner == NONE))
193+ then throw("the winner doesn't exist")
194+ else if ((getValueAdoptionWinner(adoption) != NONE))
195+ then throw("you have already do the adoption")
196+ else if ((getValueRoomStatus(room) == CLOSED))
197+ then throw("this Room has already closed")
198+ else WriteSet([DataEntry(getKeyBalanceUser(winner), (getValueBalanceUser(winner) + prize)), DataEntry(getKeyAdoptionWinner(adoption), winner), DataEntry(getKeyAdoptionPrize(adoption), prize), DataEntry(getKeyRoomStatus(room), CLOSED)])
199+ }
200+
201+
202+
203+@Callable(i)
204+func withdraw () = {
205+ let user = toBase58String(i.caller.bytes)
206+ let balance = getValueBalanceUser(user)
207+ if ((0 >= balance))
208+ then throw("you have nothing to withdraw")
209+ else ScriptResult(WriteSet([DataEntry(getKeyBalanceUser(user), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(user), balance, unit)]))
210+ }
211+
212+
213+@Verifier(tx)
214+func varify () = match tx {
215+ case s: SetScriptTransaction =>
216+ sigVerify(tx.bodyBytes, tx.proofs[0], ownerPubKey)
217+ case d: DataTransaction =>
218+ true
219+ case t: TransferTransaction =>
220+ sigVerify(tx.bodyBytes, tx.proofs[0], ownerPubKey)
221+ case _ =>
222+ false
223+}
224+

github/deemru/w8io/026f985 
22.17 ms