tx · DdboDYUXcMFTXpowTiXrnVed1cZ9ixFCFHjtiHYkH4F9

3MqQiMkz7T7rtn156oSmKSbhdyuBtRd33dy:  -0.01500000 Waves

2019.06.26 18:25 [559272] smart account 3MqQiMkz7T7rtn156oSmKSbhdyuBtRd33dy > SELF 0.00000000 Waves

{ "type": 13, "id": "DdboDYUXcMFTXpowTiXrnVed1cZ9ixFCFHjtiHYkH4F9", "fee": 1500000, "feeAssetId": null, "timestamp": 1561562734831, "version": 1, "sender": "3MqQiMkz7T7rtn156oSmKSbhdyuBtRd33dy", "senderPublicKey": "3bTcyhMYD17Yh1CAobtE6CkpgRszibMhUhv3yX6UWwjK", "proofs": [ "3n1nj9ufZiHaEeUsqXYr5LE5nJTES2zukFkatEBTUq6vhSV1uAbEXYrb3JqwEQojWrLWjUXsiTwMB5LTvWpe5ivt" ], "script": "base64:AAIDAAAAAAAAAAAAAAAPAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBcWxBaUFOU21CcERIWUtQOXNLZ2VOL2wxYkFiMjhnL3RHbGdEa3dUNUZpTU40WDNwd2R2ZHhFN212U1I4LzQxZFU5cng0akcrNnRacGIxVUxWRFBzNDMxdFIySVJhVFh3NUNqK0FjMnZoTCs1SmFtQ2VyR0QxVVcrYmgvRUdRdHhvOFczWUxEcm9mWEI1UUhKeDRQa3oyS2dmK29TL0M4aEh1Qi9VNGtyTzc2VTA1MDdHVGpaUFA5a1JRMHVMU01lcVFYdDh3WFMrbk1wNXdhanF4UHBETE1hU1JFZ3NLd3YvQUVrUDRkenBUWWJpa0xCWWw0cXRkSnNEODRITEZTa2l3ZDNCaGNPclBqb0lZbUx4UXVCRDVUSU1LVEtEM3NkWmdhWTlyc3lxeDNBMDBpbm55eEQ2enAzYjRnRnBVT1g4SnhLWmRFQzJteUVxbGVOZ2c3R3p3SURBUUFCAAAAAAZTRV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aXB0VHJhbnNhY3Rpb24EAAAABHNzdHgFAAAAByRtYXRjaDAGB8QeANg=", "chainId": 84, "height": 559272, "spentComplexity": 0 } View: original | compacted Prev: none Next: 5p4dCd9WL2qjFzedBfY55EcoJHzLgE3M23mDXTMz2Nh3 Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqlAiANSmBpDHYKP9sKgeN/l1bAb28g/tGlgDkwT5FiMN4X3pwdvdxE7mvSR8/41dU9rx4jG+6tZpb1ULVDPs431tR2IRaTXw5Cj+Ac2vhL+5JamCerGD1UW+bh/EGQtxo8W3YLDrofXB5QHJx4Pkz2Kgf+oS/C8hHuB/U4krO76U0507GTjZPP9kRQ0uLSMeqQXt8wXS+nMp5wajqxPpDLMaSREgsKwv/AEkP4dzpTYbikLBYl4qtdJsD84HLFSkiwd3BhcOrPjoIYmLxQuBD5TIMKTKD3sdZgaY9rsyqx3A00innyxD6zp3b4gFpUOX8JxKZdEC2myEqleNgg7GzwIDAQAB")
5+
6+let SERVER = addressFromStringValue("3NCiG28LmWyTigWG13E5QnvdHBsZFYXSS2j")
7+
8+let SESSIONIDFIXSIZE = 50
9+
10+let EMPTYVECT = toBytes("")
11+
12+let STATEINIT = "INIT"
13+
14+let STATEREADY = "READY"
15+
16+let STATEFINISHED = "FINISHED"
17+
18+func abs (val) = if ((0 > val))
19+ then -(val)
20+ else val
21+
22+
23+func formatStateDataStr (drawState,organizerPubKey58,randOrEmpty) = {
24+ let fullStateStr = ((drawState + "_") + organizerPubKey58)
25+ if ((randOrEmpty == ""))
26+ then fullStateStr
27+ else ((fullStateStr + "_") + randOrEmpty)
28+ }
29+
30+
31+func extractGameDataList (sessionId) = {
32+ let rawDataStr = getStringValue(this, sessionId)
33+ split(rawDataStr, "_")
34+ }
35+
36+
37+func nextRand (currRandsVect,remainingHash) = {
38+ let nextRandInt = abs(toInt(remainingHash))
39+ let nextRandVect = toBytes(nextRandInt)
40+ let s = (size(currRandsVect) / 8)
41+ if ((0 == s))
42+ then [nextRandVect, drop(remainingHash, 1)]
43+ else {
44+ let duplicate = if (if (if (if (if (if (if (if (if ((s >= 1))
45+ then (take(currRandsVect, 8) == nextRandVect)
46+ else false)
47+ then true
48+ else if ((s >= 2))
49+ then (take(drop(currRandsVect, (1 * 8)), 8) == nextRandVect)
50+ else false)
51+ then true
52+ else if ((s >= 3))
53+ then (take(drop(currRandsVect, (2 * 8)), 8) == nextRandVect)
54+ else false)
55+ then true
56+ else if ((s >= 4))
57+ then (take(drop(currRandsVect, (3 * 8)), 8) == nextRandVect)
58+ else false)
59+ then true
60+ else if ((s >= 5))
61+ then (take(drop(currRandsVect, (4 * 8)), 8) == nextRandVect)
62+ else false)
63+ then true
64+ else if ((s >= 6))
65+ then (take(drop(currRandsVect, (5 * 8)), 8) == nextRandVect)
66+ else false)
67+ then true
68+ else if ((s >= 7))
69+ then (take(drop(currRandsVect, (6 * 8)), 8) == nextRandVect)
70+ else false)
71+ then true
72+ else if ((s >= 8))
73+ then (take(drop(currRandsVect, (7 * 8)), 8) == nextRandVect)
74+ else false)
75+ then true
76+ else if ((s >= 9))
77+ then (take(drop(currRandsVect, (8 * 8)), 8) == nextRandVect)
78+ else false
79+ if (duplicate)
80+ then [currRandsVect, drop(remainingHash, 1)]
81+ else [(currRandsVect + nextRandVect), drop(remainingHash, 1)]
82+ }
83+ }
84+
85+
86+func generateRandsVector (sessionId,from,to,rsaSign) = {
87+ let emptyVec = toBytes("")
88+ let randHash = sha256(rsaSign)
89+ let de = DataEntry("r1", 10)
90+ let dtx = DataTransaction(nil, emptyVec, 0, 0, 0, this, emptyVec, emptyVec, [emptyVec])
91+ let nextInfo1 = nextRand(emptyVec, randHash)
92+ let nextInfo2 = nextRand(nextInfo1[0], nextInfo1[1])
93+ let nextInfo3 = nextRand(nextInfo2[0], nextInfo2[1])
94+ let nextInfo4 = nextRand(nextInfo3[0], nextInfo3[1])
95+ let nextInfo5 = nextRand(nextInfo4[0], nextInfo4[1])
96+ let nextInfo6 = nextRand(nextInfo5[0], nextInfo5[1])
97+ let nextInfo7 = nextRand(nextInfo6[0], nextInfo6[1])
98+ let nextInfo8 = nextRand(nextInfo7[0], nextInfo7[1])
99+ let nextInfo9 = nextRand(nextInfo8[0], nextInfo8[1])
100+nextInfo9[0]
101+ }
102+
103+
104+func validateDtxKey (sessionId,data,dataEntriesCount,iteration) = {
105+ let sessionIdFromKey = take(data.key, SESSIONIDFIXSIZE)
106+ if ((iteration >= dataEntriesCount))
107+ then true
108+ else if (if (if ((sessionId == sessionIdFromKey))
109+ then (size(data.key) > SESSIONIDFIXSIZE)
110+ else false)
111+ then !(isDefined(getString(this, data.key)))
112+ else false)
113+ then match data.value {
114+ case str: String =>
115+ true
116+ case _ =>
117+ throw((sessionId + " draw: only String type is accepted for data transactions"))
118+ }
119+ else false
120+ }
121+
122+
123+func nextRand2 (randCtx) = {
124+ let remainingHash = randCtx.bodyBytes
125+ let currRandsEntries = randCtx.data
126+ let nextRandInt = abs(toInt(remainingHash))
127+ let nextHash = drop(remainingHash, 1)
128+ let s = size(currRandsEntries)
129+ if ((0 == s))
130+ then {
131+ let r1Entry = DataEntry(toString(nextRandInt), nextRandInt)
132+ DataTransaction([r1Entry], EMPTYVECT, 0, 0, 0, this, EMPTYVECT, nextHash, [EMPTYVECT])
133+ }
134+ else {
135+ let duplicate = if (if (if (if (if (if (if (if (if ((s >= 1))
136+ then (currRandsEntries[0].value == nextRandInt)
137+ else false)
138+ then true
139+ else if ((s >= 2))
140+ then (currRandsEntries[1].value == nextRandInt)
141+ else false)
142+ then true
143+ else if ((s >= 3))
144+ then (currRandsEntries[2].value == nextRandInt)
145+ else false)
146+ then true
147+ else if ((s >= 4))
148+ then (currRandsEntries[3].value == nextRandInt)
149+ else false)
150+ then true
151+ else if ((s >= 5))
152+ then (currRandsEntries[4].value == nextRandInt)
153+ else false)
154+ then true
155+ else if ((s >= 6))
156+ then (currRandsEntries[5].value == nextRandInt)
157+ else false)
158+ then true
159+ else if ((s >= 7))
160+ then (currRandsEntries[6].value == nextRandInt)
161+ else false)
162+ then true
163+ else if ((s >= 8))
164+ then (currRandsEntries[7].value == nextRandInt)
165+ else false)
166+ then true
167+ else if ((s >= 9))
168+ then (currRandsEntries[8].value == nextRandInt)
169+ else false
170+ if (duplicate)
171+ then DataTransaction(currRandsEntries, EMPTYVECT, 0, 0, 0, this, EMPTYVECT, nextHash, [EMPTYVECT])
172+ else {
173+ let newRandsEntries = DataEntry(toString(nextRandInt), nextRandInt) :: currRandsEntries
174+ DataTransaction(newRandsEntries, EMPTYVECT, 0, 0, 0, this, EMPTYVECT, nextHash, [EMPTYVECT])
175+ }
176+ }
177+ }
178+
179+
180+func generateRandsVector2 (sessionId,from,to,rsaSign) = {
181+ let randHash = sha256(rsaSign)
182+ let randCtx = DataTransaction(nil, EMPTYVECT, 0, 0, 0, this, EMPTYVECT, randHash, [EMPTYVECT])
183+ nextRand2(nextRand2(nextRand2(nextRand2(nextRand2(nextRand2(nextRand2(nextRand2(nextRand2(randCtx)))))))))
184+ }
185+
186+
187+@Callable(i)
188+func random2 (sessionId,rsaSign) = {
189+ let from = 1
190+ let to = 100
191+ let drawParamsList = extractGameDataList(sessionId)
192+ let drawState = drawParamsList[0]
193+ let organizerPubKey58 = drawParamsList[1]
194+ let organizerPubKey = fromBase58String(organizerPubKey58)
195+ if ((drawState != STATEREADY))
196+ then throw((sessionId + " draw: it must be in READY state to generate random numbers"))
197+ else if (!(rsaVerify(SHA256, toBytes(sessionId), rsaSign, RSAPUBLIC)))
198+ then throw("Invalid RSA signature")
199+ else {
200+ let randCtx = generateRandsVector2(sessionId, from, to, rsaSign)
201+ let s = size(randCtx.data)
202+ let rand0 = if ((s >= 1))
203+ then randCtx.data[0].key
204+ else ""
205+ let rand1 = if ((s >= 2))
206+ then ((rand0 + "_") + randCtx.data[0].key)
207+ else rand0
208+ let rand2 = if ((s >= 3))
209+ then ((rand1 + "_") + randCtx.data[1].key)
210+ else rand1
211+ let rand3 = if ((s >= 4))
212+ then ((rand2 + "_") + randCtx.data[2].key)
213+ else rand2
214+ let rand4 = if ((s >= 5))
215+ then ((rand3 + "_") + randCtx.data[3].key)
216+ else rand3
217+ let rand5 = if ((s >= 6))
218+ then ((rand4 + "_") + randCtx.data[4].key)
219+ else rand4
220+ let rand6 = if ((s >= 7))
221+ then ((rand5 + "_") + randCtx.data[5].key)
222+ else rand5
223+ let rand7 = if ((s >= 8))
224+ then ((rand6 + "_") + randCtx.data[6].key)
225+ else rand6
226+ let rand8 = if ((s >= 9))
227+ then ((rand7 + "_") + randCtx.data[7].key)
228+ else rand7
229+ WriteSet([DataEntry(sessionId, formatStateDataStr(STATEFINISHED, organizerPubKey58, rand8))])
230+ }
231+ }
232+
233+
234+
235+@Callable(i)
236+func initDraw (sessionId) = {
237+ let base58Valid = (size(fromBase58String(sessionId)) > 0)
238+ if ((size(sessionId) != SESSIONIDFIXSIZE))
239+ then throw("Draw Id must be exactly 50 simbols")
240+ else if (!(base58Valid))
241+ then throw("Draw id must be in Base58 format")
242+ else {
243+ let organizerPubKey58 = toBase58String(i.callerPublicKey)
244+ let initState = formatStateDataStr(STATEINIT, organizerPubKey58, "")
245+ WriteSet([DataEntry(sessionId, initState)])
246+ }
247+ }
248+
249+
250+
251+@Callable(i)
252+func ready (sessionId) = {
253+ let drawParamsList = extractGameDataList(sessionId)
254+ let drawState = drawParamsList[0]
255+ let organizerPubKey58 = drawParamsList[1]
256+ let organizerPubKey = fromBase58String(organizerPubKey58)
257+ if ((drawState != STATEINIT))
258+ then throw((sessionId + " draw: moving into READY state is allowed only from INIT state"))
259+ else if ((organizerPubKey != i.callerPublicKey))
260+ then throw((sessionId + "draw: moving into READY state is allowed for organizer only"))
261+ else {
262+ let readyState = formatStateDataStr(STATEINIT, organizerPubKey58, "")
263+ WriteSet([DataEntry(sessionId, readyState)])
264+ }
265+ }
266+
267+
268+
269+@Callable(i)
270+func random (sessionId,rsaSign) = {
271+ let from = 1
272+ let to = 100
273+ let drawParamsList = extractGameDataList(sessionId)
274+ let drawState = drawParamsList[0]
275+ let organizerPubKey58 = drawParamsList[1]
276+ let organizerPubKey = fromBase58String(organizerPubKey58)
277+ if ((drawState != STATEREADY))
278+ then throw((sessionId + " draw: it must be in READY state to generate random numbers"))
279+ else if (!(rsaVerify(SHA256, toBytes(sessionId), rsaSign, RSAPUBLIC)))
280+ then throw("Invalid RSA signature")
281+ else {
282+ let currVect = generateRandsVector(sessionId, from, to, rsaSign)
283+ let s = size(currVect)
284+ let rand1 = if ((s >= 1))
285+ then toString(toInt(take(drop(currVect, 0), 8)))
286+ else ""
287+ let rand2 = if ((s >= 2))
288+ then ((rand1 + "_") + toString(toInt(take(drop(currVect, (1 * 8)), 8))))
289+ else rand1
290+ let rand3 = if ((s >= 3))
291+ then ((rand2 + "_") + toString(toInt(take(drop(currVect, (2 * 8)), 8))))
292+ else rand2
293+ let rand4 = if ((s >= 4))
294+ then ((rand3 + "_") + toString(toInt(take(drop(currVect, (3 * 8)), 8))))
295+ else rand3
296+ let rand5 = if ((s >= 5))
297+ then ((rand4 + "_") + toString(toInt(take(drop(currVect, (4 * 8)), 8))))
298+ else rand4
299+ let rand6 = if ((s >= 6))
300+ then ((rand5 + "_") + toString(toInt(take(drop(currVect, (5 * 8)), 8))))
301+ else rand5
302+ let rand7 = if ((s >= 7))
303+ then ((rand6 + "_") + toString(toInt(take(drop(currVect, (6 * 8)), 8))))
304+ else rand6
305+ let rand8 = if ((s >= 8))
306+ then ((rand7 + "_") + toString(toInt(take(drop(currVect, (7 * 8)), 8))))
307+ else rand7
308+ let rand9 = if ((s >= 9))
309+ then ((rand8 + "_") + toString(toInt(take(drop(currVect, (8 * 8)), 8))))
310+ else rand8
311+ WriteSet([DataEntry(sessionId, formatStateDataStr(STATEFINISHED, organizerPubKey58, rand9))])
312+ }
313+ }
314+
315+
316+@Verifier(tx)
317+func verify () = match tx {
318+ case dtx: DataTransaction =>
319+ let data0 = dtx.data[0]
320+ let sessionId = take(data0.key, SESSIONIDFIXSIZE)
321+ let drawParamsList = extractGameDataList(sessionId)
322+ let drawState = drawParamsList[0]
323+ let organizerPubKey58 = drawParamsList[1]
324+ let organizerPubKey = fromBase58String(organizerPubKey58)
325+ let dataEntriesCount = size(dtx.data)
326+ if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if (if ((drawState == STATEINIT))
327+ then sigVerify(tx.bodyBytes, tx.proofs[0], organizerPubKey)
328+ else false)
329+ then (dataEntriesCount > 0)
330+ else false)
331+ then (15 >= dataEntriesCount)
332+ else false)
333+ then validateDtxKey(sessionId, data0, dataEntriesCount, 0)
334+ else false)
335+ then validateDtxKey(sessionId, dtx.data[1], dataEntriesCount, 1)
336+ else false)
337+ then validateDtxKey(sessionId, dtx.data[2], dataEntriesCount, 2)
338+ else false)
339+ then validateDtxKey(sessionId, dtx.data[3], dataEntriesCount, 3)
340+ else false)
341+ then validateDtxKey(sessionId, dtx.data[4], dataEntriesCount, 4)
342+ else false)
343+ then validateDtxKey(sessionId, dtx.data[5], dataEntriesCount, 5)
344+ else false)
345+ then validateDtxKey(sessionId, dtx.data[6], dataEntriesCount, 6)
346+ else false)
347+ then validateDtxKey(sessionId, dtx.data[7], dataEntriesCount, 7)
348+ else false)
349+ then validateDtxKey(sessionId, dtx.data[8], dataEntriesCount, 8)
350+ else false)
351+ then validateDtxKey(sessionId, dtx.data[9], dataEntriesCount, 9)
352+ else false)
353+ then validateDtxKey(sessionId, dtx.data[10], dataEntriesCount, 10)
354+ else false)
355+ then validateDtxKey(sessionId, dtx.data[11], dataEntriesCount, 11)
356+ else false)
357+ then validateDtxKey(sessionId, dtx.data[12], dataEntriesCount, 12)
358+ else false)
359+ then validateDtxKey(sessionId, dtx.data[13], dataEntriesCount, 13)
360+ else false)
361+ then validateDtxKey(sessionId, dtx.data[14], dataEntriesCount, 14)
362+ else false
363+ case sstx: SetScriptTransaction =>
364+ true
365+ case _ =>
366+ false
367+}
368+

github/deemru/w8io/026f985 
26.18 ms