tx · 3XK6M7LVrqCt8ibtUXQt8Eix4muLWgwnXrtWbhE48PFS

3N3BYKYYK6TKoHtPLZYU8JRn8PcHTnauS9z:  -0.02000000 Waves

2021.12.15 15:49 [1835397] smart account 3N3BYKYYK6TKoHtPLZYU8JRn8PcHTnauS9z > SELF 0.00000000 Waves

{ "type": 13, "id": "3XK6M7LVrqCt8ibtUXQt8Eix4muLWgwnXrtWbhE48PFS", "fee": 2000000, "feeAssetId": null, "timestamp": 1639572595105, "version": 2, "chainId": 84, "sender": "3N3BYKYYK6TKoHtPLZYU8JRn8PcHTnauS9z", "senderPublicKey": "FsjTCE3KV2vD2r7Du9D3J6Ea2T643E6zxzn6y24outXr", "proofs": [ "b67KYYWpN27iQvcQMyUtijUi3J8bfGVbnvRvx2CiUMwkQ5Phym42QkFtVfYKN7PkLSWH4CKTJzwzCXhoL1P3MnN" ], "script": "base64:AAIDAAAAAAAABwoIARIFCgMBAQESBAoCCAIaDwoBQRIKcmFuZHNDb3VudBoTCgFCEg5yZW1haW5pbmdSYW5kcxoSCgFDEg1kYXRhS2V5c0NvdW50GhEKAUQSDGRhdGFEb25lVHhJZBoPCgFFEgpsYXN0T2Zmc2V0Gg0KAUYSCHNsb3dJZHgxGg0KAUcSCHNsb3dJZHgyGg0KAUgSCGZhc3RJZHgxGg0KAUkSCGZhc3RJZHgyGhAKAUoSC3JhbmRPckVtcHR5GhEKAUsSDGZ1bGxTdGF0ZVN0choYCgFMEhNleHRyYWN0R2FtZURhdGFMaXN0Gg4KAU0SCXNlc3Npb25JZBoPCgFOEgpyYXdEYXRhU3RyGg0KAU8SCG5leHRSYW5kGggKAVASA2RpdhoICgFREgNtaW4aEQoBUhIMY3VyclJhbmRzU3RyGhIKAVMSDXJlbWFpbmluZ0hhc2gaEAoBVBILbmV4dFJhbmRJbnQaEAoBVRILbmV4dFJhbmRTdHIaDgoBVhIJZHVwbGljYXRlGhEKAVcSDGdlbmVyYXRlUmFuZBoJCgFYEgRmcm9tGgcKAVkSA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3QJAADLAAAAAgkAAZsAAAABBQAAAAFNCQABmwAAAAEFAAAAAUQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAABTQIAAAAGdGVzdC0yAgAAAAJkcwUAAAADbmlsAAAAAILUYeo=", "height": 1835397, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7XLScQ29pXMkqHTw6ufUuSYViALYvGzS74qUESaqB5Lz Next: wwHH9oWy8GFRKRFuyS1BnqRCLD2DpYqqnS7sZCUTu7M Diff:
OldNewDifferences
7676 then [0, (currSlowIdx1 + 1), (currSlowIdx2 + 1), 0, 1]
7777 else [0, currSlowIdx1, currSlowIdx2, (currFastIdx1 + 1), (currFastIdx2 + 1)]
7878 else [(lastOffsetBytes + 1), currSlowIdx1, currSlowIdx2, currFastIdx1, currFastIdx2]
79- ((((newIncList[0] + newIncList[1]) + newIncList[2]) + newIncList[3]) + newIncList[4])
79+ newIncList
8080 }
8181
8282
212212 then throw("Invalid RSA signature")
213213 else {
214214 let randGenInfo = generateRand(sessionId, from, to, rsaSign, currRandsStr, remainRandsCount, lastOffsetBytes, slowIdx1, slowIdx2, fastIdx1, fastIdx2)
215- WriteSet([DataEntry("byteVect", randGenInfo), DataEntry((sessionId + "test"), (toBytes(sessionId) + toBytes(dataDoneTxId))), DataEntry((sessionId + "test-2"), "ds")])
215+ WriteSet([DataEntry("byteVect1", randGenInfo[1]), DataEntry("byteVect2", randGenInfo[2]), DataEntry("byteVect3", randGenInfo[3]), DataEntry("byteVect4", randGenInfo[4]), DataEntry((sessionId + "test"), (toBytes(sessionId) + toBytes(dataDoneTxId))), DataEntry((sessionId + "test-2"), "ds")])
216216 }
217217 }
218218
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let RSAPUBLIC = fromBase64String("base64:LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FDR25Hd3ZVbG1mTG5ZTkdyRSszczR2QTZRZAowa29PNzdZUjJDdTZpOWQvalE2OVJkU0hHRFlwb3hKM1gvSS84MmtpS1JRcHlwcWJjUS9UY3IxV1VRM1RDQmk1CnFmYyt4ZWVyOS9ncnhUOExJazEvVFhXVEZBQzA2M3R3V1dPbVpXcGNPN3kyZlRuUklkSFRlaUs0T1pzSyt1Z2UKOTdGS3BTbWoxcmpFVDFmM0F3SURBUUFCCi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ==")
55
66 let SERVER = addressFromStringValue("3N4vdqMsEsAZSJWfwYJcaCgUzASJTC2BWsP")
77
88 let WAVELET = ((100 * 1000) * 1000)
99
1010 let SESSIONIDFIXSIZE = 44
1111
1212 let RANDCYCLEPRICE = ((5 * WAVELET) / 1000)
1313
1414 let MAXRANDSPERCYCLE = 14
1515
1616 let STATEINIT = "INIT"
1717
1818 let DATADONE = "READY"
1919
2020 let STATEFINISHED = "FINISHED"
2121
2222 let IdxState = 0
2323
2424 let IdxOrganizerPub = 1
2525
2626 let IdxRandFrom = 2
2727
2828 let IdxRandTo = 3
2929
3030 let IdxRandsCount = 4
3131
3232 let IdxRemainRandsCount = 5
3333
3434 let IdxDataKeysCount = 6
3535
3636 let IdxDataDoneTxId = 7
3737
3838 let IdxLastOffset = 8
3939
4040 let IdxCurrRands = 13
4141
4242 func abs (val) = if ((0 > val))
4343 then -(val)
4444 else val
4545
4646
4747 func formatStateDataStr (drawState,organizerPubKey58,randFrom,randTo,randsCount,remainingRands,dataKeysCount,dataDoneTxId,lastOffset,slowIdx1,slowIdx2,fastIdx1,fastIdx2,randOrEmpty) = {
4848 let fullStateStr = ((((((((((((((((((((((((drawState + "_") + organizerPubKey58) + "_") + randFrom) + "_") + randTo) + "_") + randsCount) + "_") + remainingRands) + "_") + dataKeysCount) + "_") + dataDoneTxId) + "_") + lastOffset) + "_") + slowIdx1) + "_") + slowIdx2) + "_") + fastIdx1) + "_") + fastIdx2)
4949 if ((randOrEmpty == ""))
5050 then ((fullStateStr + "_") + "-")
5151 else ((fullStateStr + "_") + randOrEmpty)
5252 }
5353
5454
5555 func extractGameDataList (sessionId) = {
5656 let rawDataStr = getStringValue(this, sessionId)
5757 split(rawDataStr, "_")
5858 }
5959
6060
6161 func nextRand (div,min,currRandsStr,remainingRands,remainingHash) = {
6262 let nextRandInt = ((abs(toInt(remainingHash)) % div) + min)
6363 let nextRandStr = toString(nextRandInt)
6464 let duplicate = isDefined(indexOf(currRandsStr, nextRandStr))
6565 if (if (!(duplicate))
6666 then (remainingRands > 0)
6767 else false)
6868 then [((currRandsStr + "-") + nextRandStr), "yes"]
6969 else [currRandsStr, ""]
7070 }
7171
7272
7373 func generateRand (sessionId,from,to,rsaSign,currRandsStr,remainingRands,lastOffsetBytes,currSlowIdx1,currSlowIdx2,currFastIdx1,currFastIdx2) = {
7474 let newIncList = if (((lastOffsetBytes + 1) > 87))
7575 then if ((currFastIdx2 > 241))
7676 then [0, (currSlowIdx1 + 1), (currSlowIdx2 + 1), 0, 1]
7777 else [0, currSlowIdx1, currSlowIdx2, (currFastIdx1 + 1), (currFastIdx2 + 1)]
7878 else [(lastOffsetBytes + 1), currSlowIdx1, currSlowIdx2, currFastIdx1, currFastIdx2]
79- ((((newIncList[0] + newIncList[1]) + newIncList[2]) + newIncList[3]) + newIncList[4])
79+ newIncList
8080 }
8181
8282
8383 func validateDtxKey (sessionId,dataKeysCount,data) = {
8484 let dataKeyInfo = split(data.key, "_")
8585 if ((size(dataKeyInfo) != 2))
8686 then throw("Invalid data key format. It must follow to ${sessionId}_${num}")
8787 else {
8888 let keySessionId = dataKeyInfo[0]
8989 let keyPostfix = dataKeyInfo[1]
9090 if ((sessionId != keySessionId))
9191 then throw(((("Several data keys have different sessionId: " + sessionId) + " and ") + keySessionId))
9292 else if (isDefined(getString(this, data.key)))
9393 then throw(("One of the data keys has already presented in account state: key=" + data.key))
9494 else if ((size(keyPostfix) > 4))
9595 then throw("Invalid data key format. It must follow to ${sessionId}_${num} where ${num} length couldn't be greater than 4")
9696 else if ((take(keyPostfix, 1) == "0"))
9797 then throw("Invalid data key format. It must follow to ${sessionId}_${num} where ${num} couldn't start from 0")
9898 else {
9999 let keyPostfixIntOpt = parseInt(keyPostfix)
100100 if (isDefined(keyPostfixIntOpt))
101101 then {
102102 let keyPostfixInt = extract(keyPostfixIntOpt)
103103 if (if ((1 > keyPostfixInt))
104104 then true
105105 else (keyPostfixInt > dataKeysCount))
106106 then throw((((("Invalid data key format. It must follow to ${sessionId}_${num}" + " where ${num} must be a valid int value from 1 to ") + toString(dataKeysCount)) + " but actualNum=") + toString(keyPostfixInt)))
107107 else match data.value {
108108 case str: String =>
109109 true
110110 case _ =>
111111 throw((sessionId + " draw: only String type is accepted for data transactions"))
112112 }
113113 }
114114 else throw((("Invalid data key format. It must follow to ${sessionId}_${num}" + " where ${num} must be a valid int value from 1 to 31250 but actualNum=") + keyPostfix))
115115 }
116116 }
117117 }
118118
119119
120120 func validateAndGetRandsPmt (randsCount,pmt,minDataPmt) = {
121121 let bound1 = 1000
122122 let basePrice1 = ((13 * WAVELET) / 100)
123123 let div1 = 50
124124 let diff1 = ((8 * WAVELET) / 100)
125125 let bound2 = 5000
126126 let basePrice2 = ((297 * WAVELET) / 100)
127127 let div2 = 1000
128128 let diff2 = ((143 * WAVELET) / 100)
129129 let bound3 = 50000
130130 let basePrice3 = ((1427 * WAVELET) / 100)
131131 let div3 = 5000
132132 let diff3 = ((705 * WAVELET) / 100)
133133 let minRandsPmt = if ((bound1 > randsCount))
134134 then (basePrice1 + ((randsCount / div1) * diff1))
135135 else if ((bound2 > randsCount))
136136 then (basePrice2 + (((randsCount / div2) - 1) * diff2))
137137 else if ((bound3 > randsCount))
138138 then (basePrice3 + (((randsCount / div3) - 1) * diff3))
139139 else throw("Please contact our sales team to generate more than 50k rands")
140140 let minPmt = (minRandsPmt + minDataPmt)
141141 if (isDefined(pmt.assetId))
142142 then throw("Only WAVES can be used as a payment for rands generation")
143143 else if ((minPmt > pmt.amount))
144144 then throw(((((("Attached payment is to small to generate " + toString(randsCount)) + " unique randoms numbers and upload at least 1 data tx: actualPmt=") + toString(pmt.amount)) + " but minPmt is ") + toString(minPmt)))
145145 else minRandsPmt
146146 }
147147
148148
149149 @Callable(i)
150150 func initDraw (randFrom,randTo,randsCount) = {
151151 let sessionId = toBase58String(i.transactionId)
152152 let rangeLength = ((randTo - randFrom) + 1)
153153 let maxRangeLength = (rangeLength / 2)
154154 let randToLen = size(toString((randTo - 1)))
155155 let randsCountLen = size(toString(randsCount))
156156 let dynamicStatusLen = (((2 * randToLen) + (2 * randsCountLen)) + 4)
157157 let maxRandsCount = (((5120 - 175) - dynamicStatusLen) / (randToLen + 1))
158158 if (if ((0 >= randFrom))
159159 then true
160160 else (0 >= randTo))
161161 then throw("randFrom and randTo must be greater than 0")
162162 else if ((randFrom >= randTo))
163163 then throw("randFrom must be strict less then randTo")
164164 else if ((randsCount > rangeLength))
165165 then throw(((((((("Impossible to generate " + toString(randsCount)) + " unique numbers for provided random range [") + toString(randFrom)) + ", ") + toString(randTo)) + "] with actual size ") + toString(rangeLength)))
166166 else if ((randsCount > maxRangeLength))
167167 then throw(((((((((("randsCount must be less then 50% of passed range length: range=[" + toString(randFrom)) + ", ") + toString(randTo)) + "], rangeLength=") + toString(rangeLength)) + " randsCount=") + toString(randsCount)) + " allowedRandsCount=") + toString(maxRangeLength)))
168168 else if ((randsCount > maxRandsCount))
169169 then throw(((((("randsCount couldn't be kept in 1 data entry: 1_randNumSpace=" + toString((randToLen + 1))) + " maxAllowedRandsCount=") + toString(maxRandsCount)) + " actualRandsCount=") + toString(randsCount)))
170170 else if (!(isDefined(i.payment)))
171171 then throw("Please provide payment to generate unique random numbers")
172172 else {
173173 let pmt = extract(i.payment)
174174 let minDataPmt = ((((WAVELET * 1) / 1000) * 33) + ((WAVELET * 4) / 1000))
175175 let randsPmt = validateAndGetRandsPmt(randsCount, pmt, minDataPmt)
176176 let dataPmt = (pmt.amount - randsPmt)
177177 let dataTxCount = (dataPmt / minDataPmt)
178178 let dataKeysCount = if ((31250 >= (dataTxCount * 5)))
179179 then (dataTxCount * 5)
180180 else 31250
181181 let organizerPubKey58 = toBase58String(i.callerPublicKey)
182182 let randsCountStr = toString(randsCount)
183183 let initState = formatStateDataStr(DATADONE, organizerPubKey58, toString(randFrom), toString(randTo), randsCountStr, randsCountStr, toString(dataKeysCount), toBase58String(i.transactionId), "0", "0", "1", "0", "1", "")
184184 ScriptResult(WriteSet([DataEntry(sessionId, initState)]), TransferSet([ScriptTransfer(SERVER, randsPmt, unit)]))
185185 }
186186 }
187187
188188
189189
190190 @Callable(i)
191191 func random (sessionId,rsaSign) = {
192192 let drawParamsList = extractGameDataList(sessionId)
193193 let drawState = drawParamsList[IdxState]
194194 let organizerPubKey58 = drawParamsList[IdxOrganizerPub]
195195 let randsCountStr = drawParamsList[IdxRandsCount]
196196 let remainRandsCount = parseIntValue(drawParamsList[IdxRemainRandsCount])
197197 let lastOffsetBytes = parseIntValue(drawParamsList[IdxLastOffset])
198198 let currRandsStr = drawParamsList[IdxCurrRands]
199199 let fromStr = drawParamsList[IdxRandFrom]
200200 let toStr = drawParamsList[IdxRandTo]
201201 let dataDoneTxId = drawParamsList[IdxDataDoneTxId]
202202 let slowIdx1 = parseIntValue(drawParamsList[9])
203203 let slowIdx2 = parseIntValue(drawParamsList[10])
204204 let fastIdx1 = parseIntValue(drawParamsList[11])
205205 let fastIdx2 = parseIntValue(drawParamsList[12])
206206 let from = parseIntValue(fromStr)
207207 let to = parseIntValue(toStr)
208208 let organizerPubKey = fromBase58String(organizerPubKey58)
209209 if ((drawState != DATADONE))
210210 then throw((sessionId + " draw: it must be in READY state to generate random numbers"))
211211 else if (false)
212212 then throw("Invalid RSA signature")
213213 else {
214214 let randGenInfo = generateRand(sessionId, from, to, rsaSign, currRandsStr, remainRandsCount, lastOffsetBytes, slowIdx1, slowIdx2, fastIdx1, fastIdx2)
215- WriteSet([DataEntry("byteVect", randGenInfo), DataEntry((sessionId + "test"), (toBytes(sessionId) + toBytes(dataDoneTxId))), DataEntry((sessionId + "test-2"), "ds")])
215+ WriteSet([DataEntry("byteVect1", randGenInfo[1]), DataEntry("byteVect2", randGenInfo[2]), DataEntry("byteVect3", randGenInfo[3]), DataEntry("byteVect4", randGenInfo[4]), DataEntry((sessionId + "test"), (toBytes(sessionId) + toBytes(dataDoneTxId))), DataEntry((sessionId + "test-2"), "ds")])
216216 }
217217 }
218218
219219

github/deemru/w8io/026f985 
49.12 ms