tx · 5J8S3pu2XeqHcGPjTxR4sY7P7TCgBQviM4FPbLrPWbqW 3N15nAdj9qrHvDH1DgLbmepCntjN99so5jc: -0.01500000 Waves 2019.07.04 16:47 [570765] smart account 3N15nAdj9qrHvDH1DgLbmepCntjN99so5jc > SELF 0.00000000 Waves
{ "type": 13, "id": "5J8S3pu2XeqHcGPjTxR4sY7P7TCgBQviM4FPbLrPWbqW", "fee": 1500000, "feeAssetId": null, "timestamp": 1562248071868, "version": 1, "sender": "3N15nAdj9qrHvDH1DgLbmepCntjN99so5jc", "senderPublicKey": "D68JmfUWTpU1LBah5jzrSJyBnewyue1stMqKSEFAq8po", "proofs": [ "3K7W17nBrNHpHDHFjL5ENdU48ZNxBH3u6sMCU7aRKRJH9oHJtYmaVBrQqrEkRXqjnWt9DBQey3EgnG7LVX8RfFtq" ], "script": "base64:AAIDAAAAAAAAAAAAAAASAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBcWxBaUFOU21CcERIWUtQOXNLZ2VOL2wxYkFiMjhnL3RHbGdEa3dUNUZpTU40WDNwd2R2ZHhFN212U1I4LzQxZFU5cng0akcrNnRacGIxVUxWRFBzNDMxdFIySVJhVFh3NUNqK0FjMnZoTCs1SmFtQ2VyR0QxVVcrYmgvRUdRdHhvOFczWUxEcm9mWEI1UUhKeDRQa3oyS2dmK29TL0M4aEh1Qi9VNGtyTzc2VTA1MDdHVGpaUFA5a1JRMHVMU01lcVFYdDh3WFMrbk1wNXdhanF4UHBETE1hU1JFZ3NLd3YvQUVrUDRkenBUWWJpa0xCWWw0cXRkSnNEODRITEZTa2l3ZDNCaGNPclBqb0lZbUx4UXVCRDVUSU1LVEtEM3NkWmdhWTlyc3lxeDNBMDBpbm55eEQ2enAzYjRnRnBVT1g4SnhLWmRFQzJteUVxbGVOZ2c3R3p3SURBUUFCAAAAAAZTRVJWRVIJ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AAABGRhdGEAAAAAAAAAAAUFAAAAEGRhdGFFbnRyaWVzQ291bnQAAAAAAAAAAAUHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAAEc3N0eAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAYHdpYPDQ==", "chainId": 84, "height": 570765, "spentComplexity": 0 } View: original | compacted Prev: none Next: 7j19M9bF1pkG6zz5xihwnD9KGozLgyGb85rz732D8muX Full:
Old | New | Differences | |
---|---|---|---|
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 WAVELET = ((100 * 1000) * 1000) | |
9 | + | ||
10 | + | let EMPTYSTRING = "" | |
11 | + | ||
12 | + | let EMPTYVECT = toBytes(EMPTYSTRING) | |
13 | + | ||
14 | + | let SEPARATOR = "_" | |
15 | + | ||
16 | + | let SESSIONIDFIXSIZE = 50 | |
17 | + | ||
18 | + | let RANDCYCLEPRICE = ((5 * WAVELET) / 1000) | |
19 | + | ||
20 | + | let MAXRANDSPERCYCLE = 15 | |
21 | + | ||
22 | + | let STATEINIT = "INIT" | |
23 | + | ||
24 | + | let DATADONE = "READY" | |
25 | + | ||
26 | + | let STATEFINISHED = "FINISHED" | |
27 | + | ||
28 | + | func abs (val) = if ((0 > val)) | |
29 | + | then -(val) | |
30 | + | else val | |
31 | + | ||
32 | + | ||
33 | + | func formatStateDataStr (drawState,organizerPubKey58,randOrEmpty) = { | |
34 | + | let fullStateStr = ((drawState + SEPARATOR) + organizerPubKey58) | |
35 | + | if ((randOrEmpty == EMPTYSTRING)) | |
36 | + | then fullStateStr | |
37 | + | else ((fullStateStr + SEPARATOR) + randOrEmpty) | |
38 | + | } | |
39 | + | ||
40 | + | ||
41 | + | func extractGameDataList (sessionId) = { | |
42 | + | let rawDataStr = getStringValue(this, sessionId) | |
43 | + | split(rawDataStr, SEPARATOR) | |
44 | + | } | |
45 | + | ||
46 | + | ||
47 | + | func nextRand (currRandsStr,remainingHash) = { | |
48 | + | let nextRandInt = abs(toInt(remainingHash)) | |
49 | + | let nextRandStr = toString(nextRandInt) | |
50 | + | let duplicate = isDefined(indexOf(currRandsStr, nextRandStr)) | |
51 | + | if (if ((currRandsStr == EMPTYSTRING)) | |
52 | + | then true | |
53 | + | else !(duplicate)) | |
54 | + | then [((currRandsStr + SEPARATOR) + nextRandStr), "yes"] | |
55 | + | else [currRandsStr, EMPTYSTRING] | |
56 | + | } | |
57 | + | ||
58 | + | ||
59 | + | func generateRand (sessionId,from,to,rsaSign) = { | |
60 | + | let randHash = sha256(rsaSign) | |
61 | + | let currRandsStr = getStringValue(this, sessionId) | |
62 | + | let lastOffset = getIntegerValue(this, sessionId) | |
63 | + | let rand1 = nextRand(currRandsStr, drop(randHash, (lastOffset + 1))) | |
64 | + | let rand2 = nextRand(currRandsStr, drop(randHash, (lastOffset + 2))) | |
65 | + | let rand3 = nextRand(currRandsStr, drop(randHash, (lastOffset + 3))) | |
66 | + | let rand4 = nextRand(currRandsStr, drop(randHash, (lastOffset + 4))) | |
67 | + | let rand5 = nextRand(currRandsStr, drop(randHash, (lastOffset + 5))) | |
68 | + | let rand6 = nextRand(currRandsStr, drop(randHash, (lastOffset + 6))) | |
69 | + | let rand7 = nextRand(currRandsStr, drop(randHash, (lastOffset + 7))) | |
70 | + | let rand8 = nextRand(currRandsStr, drop(randHash, (lastOffset + 8))) | |
71 | + | let rand9 = nextRand(currRandsStr, drop(randHash, (lastOffset + 9))) | |
72 | + | let rand10 = nextRand(currRandsStr, drop(randHash, (lastOffset + 10))) | |
73 | + | let rand11 = nextRand(currRandsStr, drop(randHash, (lastOffset + 11))) | |
74 | + | let rand12 = nextRand(currRandsStr, drop(randHash, (lastOffset + 12))) | |
75 | + | let rand13 = nextRand(currRandsStr, drop(randHash, (lastOffset + 13))) | |
76 | + | let rand14 = nextRand(currRandsStr, drop(randHash, (lastOffset + 14))) | |
77 | + | let rand15 = nextRand(currRandsStr, drop(randHash, (lastOffset + 15))) | |
78 | + | let unq1 = if ((rand1[1] != EMPTYSTRING)) | |
79 | + | then 1 | |
80 | + | else 0 | |
81 | + | let unq2 = if ((rand2[1] != EMPTYSTRING)) | |
82 | + | then 1 | |
83 | + | else 0 | |
84 | + | let unq3 = if ((rand3[1] != EMPTYSTRING)) | |
85 | + | then 1 | |
86 | + | else 0 | |
87 | + | let unq4 = if ((rand4[1] != EMPTYSTRING)) | |
88 | + | then 1 | |
89 | + | else 0 | |
90 | + | let unq5 = if ((rand5[1] != EMPTYSTRING)) | |
91 | + | then 1 | |
92 | + | else 0 | |
93 | + | let unq6 = if ((rand6[1] != EMPTYSTRING)) | |
94 | + | then 1 | |
95 | + | else 0 | |
96 | + | let unq7 = if ((rand7[1] != EMPTYSTRING)) | |
97 | + | then 1 | |
98 | + | else 0 | |
99 | + | let unq8 = if ((rand8[1] != EMPTYSTRING)) | |
100 | + | then 1 | |
101 | + | else 0 | |
102 | + | let unq9 = if ((rand9[1] != EMPTYSTRING)) | |
103 | + | then 1 | |
104 | + | else 0 | |
105 | + | let unq10 = if ((rand10[1] != EMPTYSTRING)) | |
106 | + | then 1 | |
107 | + | else 0 | |
108 | + | let unq11 = if ((rand11[1] != EMPTYSTRING)) | |
109 | + | then 1 | |
110 | + | else 0 | |
111 | + | let unq12 = if ((rand12[1] != EMPTYSTRING)) | |
112 | + | then 1 | |
113 | + | else 0 | |
114 | + | let unq13 = if ((rand13[1] != EMPTYSTRING)) | |
115 | + | then 1 | |
116 | + | else 0 | |
117 | + | let unq14 = if ((rand14[1] != EMPTYSTRING)) | |
118 | + | then 1 | |
119 | + | else 0 | |
120 | + | let unq15 = if ((rand15[1] != EMPTYSTRING)) | |
121 | + | then 1 | |
122 | + | else 0 | |
123 | + | let unqCount = ((((((((((((((unq1 + unq2) + unq3) + unq4) + unq5) + unq6) + unq7) + unq8) + unq9) + unq10) + unq11) + unq12) + unq13) + unq14) + unq15) | |
124 | + | [rand15[0], toString(unqCount)] | |
125 | + | } | |
126 | + | ||
127 | + | ||
128 | + | func validateDtxKey (sessionId,data,dataEntriesCount,iteration) = { | |
129 | + | let sessionIdFromKey = take(data.key, SESSIONIDFIXSIZE) | |
130 | + | if ((iteration >= dataEntriesCount)) | |
131 | + | then true | |
132 | + | else if (if (if ((sessionId == sessionIdFromKey)) | |
133 | + | then (size(data.key) > SESSIONIDFIXSIZE) | |
134 | + | else false) | |
135 | + | then !(isDefined(getString(this, data.key))) | |
136 | + | else false) | |
137 | + | then match data.value { | |
138 | + | case str: String => | |
139 | + | true | |
140 | + | case _ => | |
141 | + | throw((sessionId + " draw: only String type is accepted for data transactions")) | |
142 | + | } | |
143 | + | else false | |
144 | + | } | |
145 | + | ||
146 | + | ||
147 | + | @Callable(i) | |
148 | + | func initDraw (sessionId,randFrom,randTo,randsCount,uniqueOnly) = { | |
149 | + | let base58Valid = (size(fromBase58String(sessionId)) > 0) | |
150 | + | if ((size(sessionId) != SESSIONIDFIXSIZE)) | |
151 | + | then throw("Draw Id must be exactly 50 simbols") | |
152 | + | else if (!(base58Valid)) | |
153 | + | then throw("Draw id must be in Base58 format") | |
154 | + | else if (if ((0 >= randFrom)) | |
155 | + | then true | |
156 | + | else (0 >= randTo)) | |
157 | + | then throw("randFrom and randTo must be greater than 0") | |
158 | + | else if ((randFrom >= randTo)) | |
159 | + | then throw("randFrom must be strict less then randTo") | |
160 | + | else if (if (uniqueOnly) | |
161 | + | then (randsCount > ((randTo - randFrom) + 1)) | |
162 | + | else false) | |
163 | + | then throw(((((("Impossible to generate " + toString(randsCount)) + " for provided random range - from ") + toString(randFrom)) + " to ") + toString(randTo))) | |
164 | + | else { | |
165 | + | let organizerPubKey58 = toBase58String(i.callerPublicKey) | |
166 | + | let initState = formatStateDataStr(STATEINIT, organizerPubKey58, EMPTYSTRING) | |
167 | + | ScriptResult(WriteSet([DataEntry(sessionId, initState)]), TransferSet([ScriptTransfer(SERVER, 1000, unit)])) | |
168 | + | } | |
169 | + | } | |
170 | + | ||
171 | + | ||
172 | + | ||
173 | + | @Callable(i) | |
174 | + | func ready (sessionId) = { | |
175 | + | let drawParamsList = extractGameDataList(sessionId) | |
176 | + | let drawState = drawParamsList[0] | |
177 | + | let organizerPubKey58 = drawParamsList[1] | |
178 | + | let organizerPubKey = fromBase58String(organizerPubKey58) | |
179 | + | if ((drawState != STATEINIT)) | |
180 | + | then throw((sessionId + " draw: moving into READY state is allowed only from INIT state")) | |
181 | + | else if ((organizerPubKey != i.callerPublicKey)) | |
182 | + | then throw((sessionId + "draw: moving into READY state is allowed for organizer only")) | |
183 | + | else { | |
184 | + | let readyState = formatStateDataStr(DATADONE, organizerPubKey58, EMPTYSTRING) | |
185 | + | WriteSet([DataEntry(sessionId, readyState)]) | |
186 | + | } | |
187 | + | } | |
188 | + | ||
189 | + | ||
190 | + | ||
191 | + | @Callable(i) | |
192 | + | func random (sessionId,rsaSign) = { | |
193 | + | let from = 1 | |
194 | + | let to = 100 | |
195 | + | let drawParamsList = extractGameDataList(sessionId) | |
196 | + | let drawState = drawParamsList[0] | |
197 | + | let organizerPubKey58 = drawParamsList[1] | |
198 | + | let organizerPubKey = fromBase58String(organizerPubKey58) | |
199 | + | if ((drawState != DATADONE)) | |
200 | + | then throw((sessionId + " draw: it must be in READY state to generate random numbers")) | |
201 | + | else if (!(rsaVerify(SHA256, toBytes(sessionId), rsaSign, RSAPUBLIC))) | |
202 | + | then throw("Invalid RSA signature") | |
203 | + | else { | |
204 | + | let randGenInfo = generateRand(sessionId, from, to, rsaSign) | |
205 | + | let rand = randGenInfo[0] | |
206 | + | if ((rand != EMPTYSTRING)) | |
207 | + | then ScriptResult(WriteSet([DataEntry(sessionId, formatStateDataStr(STATEFINISHED, organizerPubKey58, "-1")), DataEntry((sessionId + "A"), randGenInfo[1])]), TransferSet([ScriptTransfer(SERVER, 1000, unit)])) | |
208 | + | else ScriptResult(WriteSet([DataEntry(sessionId, formatStateDataStr(STATEFINISHED, organizerPubKey58, rand)), DataEntry((sessionId + "A"), randGenInfo[1])]), TransferSet([ScriptTransfer(SERVER, 1000, unit)])) | |
209 | + | } | |
210 | + | } | |
211 | + | ||
212 | + | ||
213 | + | @Verifier(tx) | |
214 | + | func verify () = match tx { | |
215 | + | case dtx: DataTransaction => | |
216 | + | let data0 = dtx.data[0] | |
217 | + | let sessionId = take(data0.key, SESSIONIDFIXSIZE) | |
218 | + | let drawParamsList = extractGameDataList(sessionId) | |
219 | + | let drawState = drawParamsList[0] | |
220 | + | let organizerPubKey58 = drawParamsList[1] | |
221 | + | let organizerPubKey = fromBase58String(organizerPubKey58) | |
222 | + | let dataEntriesCount = size(dtx.data) | |
223 | + | if (if (if (if (if (if (if (if (if ((drawState == STATEINIT)) | |
224 | + | then sigVerify(tx.bodyBytes, tx.proofs[0], organizerPubKey) | |
225 | + | else false) | |
226 | + | then (dataEntriesCount > 0) | |
227 | + | else false) | |
228 | + | then (5 >= dataEntriesCount) | |
229 | + | else false) | |
230 | + | then validateDtxKey(sessionId, data0, dataEntriesCount, 0) | |
231 | + | else false) | |
232 | + | then validateDtxKey(sessionId, dtx.data[1], dataEntriesCount, 1) | |
233 | + | else false) | |
234 | + | then validateDtxKey(sessionId, dtx.data[2], dataEntriesCount, 2) | |
235 | + | else false) | |
236 | + | then validateDtxKey(sessionId, dtx.data[3], dataEntriesCount, 3) | |
237 | + | else false) | |
238 | + | then validateDtxKey(sessionId, dtx.data[4], dataEntriesCount, 4) | |
239 | + | else false) | |
240 | + | then validateDtxKey(sessionId, dtx.data[5], dataEntriesCount, 5) | |
241 | + | else false | |
242 | + | case sstx: SetScriptTransaction => | |
243 | + | true | |
244 | + | case ttx: TransferTransaction => | |
245 | + | true | |
246 | + | case _ => | |
247 | + | false | |
248 | + | } | |
249 | + |
github/deemru/w8io/169f3d6 30.99 ms ◑