tx · wwHH9oWy8GFRKRFuyS1BnqRCLD2DpYqqnS7sZCUTu7M

3N3BYKYYK6TKoHtPLZYU8JRn8PcHTnauS9z:  -0.02000000 Waves

2021.12.15 15:59 [1835405] smart account 3N3BYKYYK6TKoHtPLZYU8JRn8PcHTnauS9z > SELF 0.00000000 Waves

{ "type": 13, "id": "wwHH9oWy8GFRKRFuyS1BnqRCLD2DpYqqnS7sZCUTu7M", "fee": 2000000, "feeAssetId": null, "timestamp": 1639573167535, "version": 2, "chainId": 84, "sender": "3N3BYKYYK6TKoHtPLZYU8JRn8PcHTnauS9z", "senderPublicKey": "FsjTCE3KV2vD2r7Du9D3J6Ea2T643E6zxzn6y24outXr", "proofs": [ "5hgCDhbfmNRGqsUxRehb4YdPNPC5BCuNtBEKbaqPunTXWx8JGzTLvCkKPb4tTZNqiDzUH2BUaqSDfsLP4ba8JACM" ], "script": "base64:AAIDAAAAAAAAB2wIARIFCgMBAQESBAoCCAIaDwoBQRIKcmFuZHNDb3VudBoTCgFCEg5yZW1haW5pbmdSYW5kcxoSCgFDEg1kYXRhS2V5c0NvdW50GhEKAUQSDGRhdGFEb25lVHhJZBoPCgFFEgpsYXN0T2Zmc2V0Gg0KAUYSCHNsb3dJZHgxGg0KAUcSCHNsb3dJZHgyGg0KAUgSCGZhc3RJZHgxGg0KAUkSCGZhc3RJZHgyGhAKAUoSC3JhbmRPckVtcHR5GhEKAUsSDGZ1bGxTdGF0ZVN0choYCgFMEhNleHRyYWN0R2FtZURhdGFMaXN0Gg4KAU0SCXNlc3Npb25JZBoPCgFOEgpyYXdEYXRhU3RyGg0KAU8SCG5leHRSYW5kGggKAVASA2RpdhoICgFREgNtaW4aEQoBUhIMY3VyclJhbmRzU3RyGhIKAVMSDXJlbWFpbmluZ0hhc2gaEAoBVBILbmV4dFJhbmRJbnQaEAoBVRILbmV4dFJhbmRTdHIaDgoBVhIJZHVwbGljYXRlGhEKAVcSDGdlbmVyYXRlUmFuZBoJCgFYEgRmcm9tGgcKA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TZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAhieXRlVmVjdAUAAAACYmMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAABTQIAAAAEdGVzdAkAAMsAAAACCQABmwAAAAEFAAAAAU0JAAGbAAAAAQUAAAABRAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAFNAgAAAAZ0ZXN0LTICAAAAAmRzBQAAAANuaWwAAAAAW+zXWg==", "height": 1835405, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3XK6M7LVrqCt8ibtUXQt8Eix4muLWgwnXrtWbhE48PFS Next: A7hqptXR326QEmn1GSESPwkjLiu1tHmef3PXWoDtmfb4 Diff:
OldNewDifferences
7676 then [0, (ab + 1), (ac + 1), 0, 1]
7777 else [0, ab, ac, (ad + 1), (ae + 1)]
7878 else [(aa + 1), ab, ac, ad, ae]
79- af
79+ let ag = af[0]
80+ let ah = af[1]
81+ let ai = af[2]
82+ let aj = af[3]
83+ let ak = af[4]
84+ take(drop(Z, ah), 1)
8085 }
8186
8287
83-func ag (M,C,ah) = {
84- let ai = split(ah.key, "_")
85- if ((size(ai) != 2))
88+func al (M,C,am) = {
89+ let an = split(am.key, "_")
90+ if ((size(an) != 2))
8691 then throw("Invalid data key format. It must follow to ${sessionId}_${num}")
8792 else {
88- let aj = ai[0]
89- let ak = ai[1]
90- if ((M != aj))
91- then throw(((("Several data keys have different sessionId: " + M) + " and ") + aj))
92- else if (isDefined(getString(this, ah.key)))
93- then throw(("One of the data keys has already presented in account state: key=" + ah.key))
94- else if ((size(ak) > 4))
93+ let ao = an[0]
94+ let ap = an[1]
95+ if ((M != ao))
96+ then throw(((("Several data keys have different sessionId: " + M) + " and ") + ao))
97+ else if (isDefined(getString(this, am.key)))
98+ then throw(("One of the data keys has already presented in account state: key=" + am.key))
99+ else if ((size(ap) > 4))
95100 then throw("Invalid data key format. It must follow to ${sessionId}_${num} where ${num} length couldn't be greater than 4")
96- else if ((take(ak, 1) == "0"))
101+ else if ((take(ap, 1) == "0"))
97102 then throw("Invalid data key format. It must follow to ${sessionId}_${num} where ${num} couldn't start from 0")
98103 else {
99- let al = parseInt(ak)
100- if (isDefined(al))
104+ let aq = parseInt(ap)
105+ if (isDefined(aq))
101106 then {
102- let am = extract(al)
103- if (if ((1 > am))
107+ let ar = extract(aq)
108+ if (if ((1 > ar))
104109 then true
105- else (am > C))
106- then throw((((("Invalid data key format. It must follow to ${sessionId}_${num}" + " where ${num} must be a valid int value from 1 to ") + toString(C)) + " but actualNum=") + toString(am)))
110+ else (ar > C))
111+ then throw((((("Invalid data key format. It must follow to ${sessionId}_${num}" + " where ${num} must be a valid int value from 1 to ") + toString(C)) + " but actualNum=") + toString(ar)))
107112 else {
108- let an = ah.value
109- if ($isInstanceOf(an, "String"))
113+ let as = am.value
114+ if ($isInstanceOf(as, "String"))
110115 then {
111- let ao = an
116+ let at = as
112117 true
113118 }
114119 else throw((M + " draw: only String type is accepted for data transactions"))
115120 }
116121 }
117- 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=") + ak))
122+ 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=") + ap))
118123 }
119124 }
120125 }
121126
122127
123-func ap (A,aq,ar) = {
124- let as = 1000
125- let at = ((13 * c) / 100)
126- let au = 50
127- let av = ((8 * c) / 100)
128- let aw = 5000
129- let ax = ((297 * c) / 100)
130- let ay = 1000
131- let az = ((143 * c) / 100)
132- let aA = 50000
133- let aB = ((1427 * c) / 100)
134- let aC = 5000
135- let aD = ((705 * c) / 100)
136- let aE = if ((as > A))
137- then (at + ((A / au) * av))
138- else if ((aw > A))
139- then (ax + (((A / ay) - 1) * az))
140- else if ((aA > A))
141- then (aB + (((A / aC) - 1) * aD))
128+func au (A,av,aw) = {
129+ let ax = 1000
130+ let ay = ((13 * c) / 100)
131+ let az = 50
132+ let aA = ((8 * c) / 100)
133+ let aB = 5000
134+ let aC = ((297 * c) / 100)
135+ let aD = 1000
136+ let aE = ((143 * c) / 100)
137+ let aF = 50000
138+ let aG = ((1427 * c) / 100)
139+ let aH = 5000
140+ let aI = ((705 * c) / 100)
141+ let aJ = if ((ax > A))
142+ then (ay + ((A / az) * aA))
143+ else if ((aB > A))
144+ then (aC + (((A / aD) - 1) * aE))
145+ else if ((aF > A))
146+ then (aG + (((A / aH) - 1) * aI))
142147 else throw("Please contact our sales team to generate more than 50k rands")
143- let aF = (aE + ar)
144- if (isDefined(aq.assetId))
148+ let aK = (aJ + aw)
149+ if (isDefined(av.assetId))
145150 then throw("Only WAVES can be used as a payment for rands generation")
146- else if ((aF > aq.amount))
147- then throw(((((("Attached payment is to small to generate " + toString(A)) + " unique randoms numbers and upload at least 1 data tx: actualPmt=") + toString(aq.amount)) + " but minPmt is ") + toString(aF)))
148- else aE
151+ else if ((aK > av.amount))
152+ then throw(((((("Attached payment is to small to generate " + toString(A)) + " unique randoms numbers and upload at least 1 data tx: actualPmt=") + toString(av.amount)) + " but minPmt is ") + toString(aK)))
153+ else aJ
149154 }
150155
151156
152-@Callable(aG)
157+@Callable(aL)
153158 func initDraw (y,z,A) = {
154- let M = toBase58String(aG.transactionId)
155- let aH = ((z - y) + 1)
156- let aI = (aH / 2)
157- let aJ = size(toString((z - 1)))
158- let aK = size(toString(A))
159- let aL = (((2 * aJ) + (2 * aK)) + 4)
160- let aM = (((5120 - 175) - aL) / (aJ + 1))
159+ let M = toBase58String(aL.transactionId)
160+ let aM = ((z - y) + 1)
161+ let aN = (aM / 2)
162+ let aO = size(toString((z - 1)))
163+ let aP = size(toString(A))
164+ let aQ = (((2 * aO) + (2 * aP)) + 4)
165+ let aR = (((5120 - 175) - aQ) / (aO + 1))
161166 if (if ((0 >= y))
162167 then true
163168 else (0 >= z))
164169 then throw("randFrom and randTo must be greater than 0")
165170 else if ((y >= z))
166171 then throw("randFrom must be strict less then randTo")
167- else if ((A > aH))
168- then throw(((((((("Impossible to generate " + toString(A)) + " unique numbers for provided random range [") + toString(y)) + ", ") + toString(z)) + "] with actual size ") + toString(aH)))
169- else if ((A > aI))
170- then throw(((((((((("randsCount must be less then 50% of passed range length: range=[" + toString(y)) + ", ") + toString(z)) + "], rangeLength=") + toString(aH)) + " randsCount=") + toString(A)) + " allowedRandsCount=") + toString(aI)))
171- else if ((A > aM))
172- then throw(((((("randsCount couldn't be kept in 1 data entry: 1_randNumSpace=" + toString((aJ + 1))) + " maxAllowedRandsCount=") + toString(aM)) + " actualRandsCount=") + toString(A)))
173- else if (!(isDefined(aG.payment)))
172+ else if ((A > aM))
173+ then throw(((((((("Impossible to generate " + toString(A)) + " unique numbers for provided random range [") + toString(y)) + ", ") + toString(z)) + "] with actual size ") + toString(aM)))
174+ else if ((A > aN))
175+ then throw(((((((((("randsCount must be less then 50% of passed range length: range=[" + toString(y)) + ", ") + toString(z)) + "], rangeLength=") + toString(aM)) + " randsCount=") + toString(A)) + " allowedRandsCount=") + toString(aN)))
176+ else if ((A > aR))
177+ then throw(((((("randsCount couldn't be kept in 1 data entry: 1_randNumSpace=" + toString((aO + 1))) + " maxAllowedRandsCount=") + toString(aR)) + " actualRandsCount=") + toString(A)))
178+ else if (!(isDefined(aL.payment)))
174179 then throw("Please provide payment to generate unique random numbers")
175180 else {
176- let aq = extract(aG.payment)
177- let ar = ((((c * 1) / 1000) * 33) + ((c * 4) / 1000))
178- let aN = ap(A, aq, ar)
179- let aO = (aq.amount - aN)
180- let aP = (aO / ar)
181- let C = if ((31250 >= (aP * 5)))
182- then (aP * 5)
181+ let av = extract(aL.payment)
182+ let aw = ((((c * 1) / 1000) * 33) + ((c * 4) / 1000))
183+ let aS = au(A, av, aw)
184+ let aT = (av.amount - aS)
185+ let aU = (aT / aw)
186+ let C = if ((31250 >= (aU * 5)))
187+ then (aU * 5)
183188 else 31250
184- let x = toBase58String(aG.callerPublicKey)
185- let aQ = toString(A)
186- let aR = v(h, x, toString(y), toString(z), aQ, aQ, toString(C), toBase58String(aG.transactionId), "0", "0", "1", "0", "1", "")
187- ScriptResult(WriteSet([DataEntry(M, aR)]), TransferSet([ScriptTransfer(b, aN, unit)]))
189+ let x = toBase58String(aL.callerPublicKey)
190+ let aV = toString(A)
191+ let aW = v(h, x, toString(y), toString(z), aV, aV, toString(C), toBase58String(aL.transactionId), "0", "0", "1", "0", "1", "")
192+ ScriptResult(WriteSet([DataEntry(M, aW)]), TransferSet([ScriptTransfer(b, aS, unit)]))
188193 }
189194 }
190195
191196
192197
193-@Callable(aG)
198+@Callable(aL)
194199 func random (M,Z) = {
195- let aS = L(M)
196- let w = aS[j]
197- let x = aS[k]
198- let aQ = aS[n]
199- let aT = parseIntValue(aS[o])
200- let aa = parseIntValue(aS[r])
201- let R = aS[s]
202- let aU = aS[l]
203- let aV = aS[m]
204- let D = aS[q]
205- let F = parseIntValue(aS[9])
206- let G = parseIntValue(aS[10])
207- let H = parseIntValue(aS[11])
208- let I = parseIntValue(aS[12])
209- let X = parseIntValue(aU)
210- let Y = parseIntValue(aV)
211- let aW = fromBase58String(x)
200+ let aX = L(M)
201+ let w = aX[j]
202+ let x = aX[k]
203+ let aV = aX[n]
204+ let aY = parseIntValue(aX[o])
205+ let aa = parseIntValue(aX[r])
206+ let R = aX[s]
207+ let aZ = aX[l]
208+ let ba = aX[m]
209+ let D = aX[q]
210+ let F = parseIntValue(aX[9])
211+ let G = parseIntValue(aX[10])
212+ let H = parseIntValue(aX[11])
213+ let I = parseIntValue(aX[12])
214+ let X = parseIntValue(aZ)
215+ let Y = parseIntValue(ba)
216+ let bb = fromBase58String(x)
212217 if ((w != h))
213218 then throw((M + " draw: it must be in READY state to generate random numbers"))
214219 else if (false)
215220 then throw("Invalid RSA signature")
216221 else {
217- let aX = W(M, X, Y, Z, R, aT, aa, F, G, H, I)
218- WriteSet([DataEntry("byteVect1", aX[1]), DataEntry("byteVect2", aX[2]), DataEntry("byteVect3", aX[3]), DataEntry("byteVect4", aX[4]), DataEntry((M + "test"), (toBytes(M) + toBytes(D))), DataEntry((M + "test-2"), "ds")])
222+ let bc = W(M, X, Y, Z, R, aY, aa, F, G, H, I)
223+ WriteSet([DataEntry("byteVect", bc), DataEntry((M + "test"), (toBytes(M) + toBytes(D))), DataEntry((M + "test-2"), "ds")])
219224 }
220225 }
221226
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = fromBase64String("base64:LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FDR25Hd3ZVbG1mTG5ZTkdyRSszczR2QTZRZAowa29PNzdZUjJDdTZpOWQvalE2OVJkU0hHRFlwb3hKM1gvSS84MmtpS1JRcHlwcWJjUS9UY3IxV1VRM1RDQmk1CnFmYyt4ZWVyOS9ncnhUOExJazEvVFhXVEZBQzA2M3R3V1dPbVpXcGNPN3kyZlRuUklkSFRlaUs0T1pzSyt1Z2UKOTdGS3BTbWoxcmpFVDFmM0F3SURBUUFCCi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ==")
55
66 let b = addressFromStringValue("3N4vdqMsEsAZSJWfwYJcaCgUzASJTC2BWsP")
77
88 let c = ((100 * 1000) * 1000)
99
1010 let d = 44
1111
1212 let e = ((5 * c) / 1000)
1313
1414 let f = 14
1515
1616 let g = "INIT"
1717
1818 let h = "READY"
1919
2020 let i = "FINISHED"
2121
2222 let j = 0
2323
2424 let k = 1
2525
2626 let l = 2
2727
2828 let m = 3
2929
3030 let n = 4
3131
3232 let o = 5
3333
3434 let p = 6
3535
3636 let q = 7
3737
3838 let r = 8
3939
4040 let s = 13
4141
4242 func t (u) = if ((0 > u))
4343 then -(u)
4444 else u
4545
4646
4747 func v (w,x,y,z,A,B,C,D,E,F,G,H,I,J) = {
4848 let K = ((((((((((((((((((((((((w + "_") + x) + "_") + y) + "_") + z) + "_") + A) + "_") + B) + "_") + C) + "_") + D) + "_") + E) + "_") + F) + "_") + G) + "_") + H) + "_") + I)
4949 if ((J == ""))
5050 then ((K + "_") + "-")
5151 else ((K + "_") + J)
5252 }
5353
5454
5555 func L (M) = {
5656 let N = getStringValue(this, M)
5757 split(N, "_")
5858 }
5959
6060
6161 func O (P,Q,R,B,S) = {
6262 let T = ((t(toInt(S)) % P) + Q)
6363 let U = toString(T)
6464 let V = isDefined(indexOf(R, U))
6565 if (if (!(V))
6666 then (B > 0)
6767 else false)
6868 then [((R + "-") + U), "yes"]
6969 else [R, ""]
7070 }
7171
7272
7373 func W (M,X,Y,Z,R,B,aa,ab,ac,ad,ae) = {
7474 let af = if (((aa + 1) > 87))
7575 then if ((ae > 241))
7676 then [0, (ab + 1), (ac + 1), 0, 1]
7777 else [0, ab, ac, (ad + 1), (ae + 1)]
7878 else [(aa + 1), ab, ac, ad, ae]
79- af
79+ let ag = af[0]
80+ let ah = af[1]
81+ let ai = af[2]
82+ let aj = af[3]
83+ let ak = af[4]
84+ take(drop(Z, ah), 1)
8085 }
8186
8287
83-func ag (M,C,ah) = {
84- let ai = split(ah.key, "_")
85- if ((size(ai) != 2))
88+func al (M,C,am) = {
89+ let an = split(am.key, "_")
90+ if ((size(an) != 2))
8691 then throw("Invalid data key format. It must follow to ${sessionId}_${num}")
8792 else {
88- let aj = ai[0]
89- let ak = ai[1]
90- if ((M != aj))
91- then throw(((("Several data keys have different sessionId: " + M) + " and ") + aj))
92- else if (isDefined(getString(this, ah.key)))
93- then throw(("One of the data keys has already presented in account state: key=" + ah.key))
94- else if ((size(ak) > 4))
93+ let ao = an[0]
94+ let ap = an[1]
95+ if ((M != ao))
96+ then throw(((("Several data keys have different sessionId: " + M) + " and ") + ao))
97+ else if (isDefined(getString(this, am.key)))
98+ then throw(("One of the data keys has already presented in account state: key=" + am.key))
99+ else if ((size(ap) > 4))
95100 then throw("Invalid data key format. It must follow to ${sessionId}_${num} where ${num} length couldn't be greater than 4")
96- else if ((take(ak, 1) == "0"))
101+ else if ((take(ap, 1) == "0"))
97102 then throw("Invalid data key format. It must follow to ${sessionId}_${num} where ${num} couldn't start from 0")
98103 else {
99- let al = parseInt(ak)
100- if (isDefined(al))
104+ let aq = parseInt(ap)
105+ if (isDefined(aq))
101106 then {
102- let am = extract(al)
103- if (if ((1 > am))
107+ let ar = extract(aq)
108+ if (if ((1 > ar))
104109 then true
105- else (am > C))
106- then throw((((("Invalid data key format. It must follow to ${sessionId}_${num}" + " where ${num} must be a valid int value from 1 to ") + toString(C)) + " but actualNum=") + toString(am)))
110+ else (ar > C))
111+ then throw((((("Invalid data key format. It must follow to ${sessionId}_${num}" + " where ${num} must be a valid int value from 1 to ") + toString(C)) + " but actualNum=") + toString(ar)))
107112 else {
108- let an = ah.value
109- if ($isInstanceOf(an, "String"))
113+ let as = am.value
114+ if ($isInstanceOf(as, "String"))
110115 then {
111- let ao = an
116+ let at = as
112117 true
113118 }
114119 else throw((M + " draw: only String type is accepted for data transactions"))
115120 }
116121 }
117- 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=") + ak))
122+ 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=") + ap))
118123 }
119124 }
120125 }
121126
122127
123-func ap (A,aq,ar) = {
124- let as = 1000
125- let at = ((13 * c) / 100)
126- let au = 50
127- let av = ((8 * c) / 100)
128- let aw = 5000
129- let ax = ((297 * c) / 100)
130- let ay = 1000
131- let az = ((143 * c) / 100)
132- let aA = 50000
133- let aB = ((1427 * c) / 100)
134- let aC = 5000
135- let aD = ((705 * c) / 100)
136- let aE = if ((as > A))
137- then (at + ((A / au) * av))
138- else if ((aw > A))
139- then (ax + (((A / ay) - 1) * az))
140- else if ((aA > A))
141- then (aB + (((A / aC) - 1) * aD))
128+func au (A,av,aw) = {
129+ let ax = 1000
130+ let ay = ((13 * c) / 100)
131+ let az = 50
132+ let aA = ((8 * c) / 100)
133+ let aB = 5000
134+ let aC = ((297 * c) / 100)
135+ let aD = 1000
136+ let aE = ((143 * c) / 100)
137+ let aF = 50000
138+ let aG = ((1427 * c) / 100)
139+ let aH = 5000
140+ let aI = ((705 * c) / 100)
141+ let aJ = if ((ax > A))
142+ then (ay + ((A / az) * aA))
143+ else if ((aB > A))
144+ then (aC + (((A / aD) - 1) * aE))
145+ else if ((aF > A))
146+ then (aG + (((A / aH) - 1) * aI))
142147 else throw("Please contact our sales team to generate more than 50k rands")
143- let aF = (aE + ar)
144- if (isDefined(aq.assetId))
148+ let aK = (aJ + aw)
149+ if (isDefined(av.assetId))
145150 then throw("Only WAVES can be used as a payment for rands generation")
146- else if ((aF > aq.amount))
147- then throw(((((("Attached payment is to small to generate " + toString(A)) + " unique randoms numbers and upload at least 1 data tx: actualPmt=") + toString(aq.amount)) + " but minPmt is ") + toString(aF)))
148- else aE
151+ else if ((aK > av.amount))
152+ then throw(((((("Attached payment is to small to generate " + toString(A)) + " unique randoms numbers and upload at least 1 data tx: actualPmt=") + toString(av.amount)) + " but minPmt is ") + toString(aK)))
153+ else aJ
149154 }
150155
151156
152-@Callable(aG)
157+@Callable(aL)
153158 func initDraw (y,z,A) = {
154- let M = toBase58String(aG.transactionId)
155- let aH = ((z - y) + 1)
156- let aI = (aH / 2)
157- let aJ = size(toString((z - 1)))
158- let aK = size(toString(A))
159- let aL = (((2 * aJ) + (2 * aK)) + 4)
160- let aM = (((5120 - 175) - aL) / (aJ + 1))
159+ let M = toBase58String(aL.transactionId)
160+ let aM = ((z - y) + 1)
161+ let aN = (aM / 2)
162+ let aO = size(toString((z - 1)))
163+ let aP = size(toString(A))
164+ let aQ = (((2 * aO) + (2 * aP)) + 4)
165+ let aR = (((5120 - 175) - aQ) / (aO + 1))
161166 if (if ((0 >= y))
162167 then true
163168 else (0 >= z))
164169 then throw("randFrom and randTo must be greater than 0")
165170 else if ((y >= z))
166171 then throw("randFrom must be strict less then randTo")
167- else if ((A > aH))
168- then throw(((((((("Impossible to generate " + toString(A)) + " unique numbers for provided random range [") + toString(y)) + ", ") + toString(z)) + "] with actual size ") + toString(aH)))
169- else if ((A > aI))
170- then throw(((((((((("randsCount must be less then 50% of passed range length: range=[" + toString(y)) + ", ") + toString(z)) + "], rangeLength=") + toString(aH)) + " randsCount=") + toString(A)) + " allowedRandsCount=") + toString(aI)))
171- else if ((A > aM))
172- then throw(((((("randsCount couldn't be kept in 1 data entry: 1_randNumSpace=" + toString((aJ + 1))) + " maxAllowedRandsCount=") + toString(aM)) + " actualRandsCount=") + toString(A)))
173- else if (!(isDefined(aG.payment)))
172+ else if ((A > aM))
173+ then throw(((((((("Impossible to generate " + toString(A)) + " unique numbers for provided random range [") + toString(y)) + ", ") + toString(z)) + "] with actual size ") + toString(aM)))
174+ else if ((A > aN))
175+ then throw(((((((((("randsCount must be less then 50% of passed range length: range=[" + toString(y)) + ", ") + toString(z)) + "], rangeLength=") + toString(aM)) + " randsCount=") + toString(A)) + " allowedRandsCount=") + toString(aN)))
176+ else if ((A > aR))
177+ then throw(((((("randsCount couldn't be kept in 1 data entry: 1_randNumSpace=" + toString((aO + 1))) + " maxAllowedRandsCount=") + toString(aR)) + " actualRandsCount=") + toString(A)))
178+ else if (!(isDefined(aL.payment)))
174179 then throw("Please provide payment to generate unique random numbers")
175180 else {
176- let aq = extract(aG.payment)
177- let ar = ((((c * 1) / 1000) * 33) + ((c * 4) / 1000))
178- let aN = ap(A, aq, ar)
179- let aO = (aq.amount - aN)
180- let aP = (aO / ar)
181- let C = if ((31250 >= (aP * 5)))
182- then (aP * 5)
181+ let av = extract(aL.payment)
182+ let aw = ((((c * 1) / 1000) * 33) + ((c * 4) / 1000))
183+ let aS = au(A, av, aw)
184+ let aT = (av.amount - aS)
185+ let aU = (aT / aw)
186+ let C = if ((31250 >= (aU * 5)))
187+ then (aU * 5)
183188 else 31250
184- let x = toBase58String(aG.callerPublicKey)
185- let aQ = toString(A)
186- let aR = v(h, x, toString(y), toString(z), aQ, aQ, toString(C), toBase58String(aG.transactionId), "0", "0", "1", "0", "1", "")
187- ScriptResult(WriteSet([DataEntry(M, aR)]), TransferSet([ScriptTransfer(b, aN, unit)]))
189+ let x = toBase58String(aL.callerPublicKey)
190+ let aV = toString(A)
191+ let aW = v(h, x, toString(y), toString(z), aV, aV, toString(C), toBase58String(aL.transactionId), "0", "0", "1", "0", "1", "")
192+ ScriptResult(WriteSet([DataEntry(M, aW)]), TransferSet([ScriptTransfer(b, aS, unit)]))
188193 }
189194 }
190195
191196
192197
193-@Callable(aG)
198+@Callable(aL)
194199 func random (M,Z) = {
195- let aS = L(M)
196- let w = aS[j]
197- let x = aS[k]
198- let aQ = aS[n]
199- let aT = parseIntValue(aS[o])
200- let aa = parseIntValue(aS[r])
201- let R = aS[s]
202- let aU = aS[l]
203- let aV = aS[m]
204- let D = aS[q]
205- let F = parseIntValue(aS[9])
206- let G = parseIntValue(aS[10])
207- let H = parseIntValue(aS[11])
208- let I = parseIntValue(aS[12])
209- let X = parseIntValue(aU)
210- let Y = parseIntValue(aV)
211- let aW = fromBase58String(x)
200+ let aX = L(M)
201+ let w = aX[j]
202+ let x = aX[k]
203+ let aV = aX[n]
204+ let aY = parseIntValue(aX[o])
205+ let aa = parseIntValue(aX[r])
206+ let R = aX[s]
207+ let aZ = aX[l]
208+ let ba = aX[m]
209+ let D = aX[q]
210+ let F = parseIntValue(aX[9])
211+ let G = parseIntValue(aX[10])
212+ let H = parseIntValue(aX[11])
213+ let I = parseIntValue(aX[12])
214+ let X = parseIntValue(aZ)
215+ let Y = parseIntValue(ba)
216+ let bb = fromBase58String(x)
212217 if ((w != h))
213218 then throw((M + " draw: it must be in READY state to generate random numbers"))
214219 else if (false)
215220 then throw("Invalid RSA signature")
216221 else {
217- let aX = W(M, X, Y, Z, R, aT, aa, F, G, H, I)
218- WriteSet([DataEntry("byteVect1", aX[1]), DataEntry("byteVect2", aX[2]), DataEntry("byteVect3", aX[3]), DataEntry("byteVect4", aX[4]), DataEntry((M + "test"), (toBytes(M) + toBytes(D))), DataEntry((M + "test-2"), "ds")])
222+ let bc = W(M, X, Y, Z, R, aY, aa, F, G, H, I)
223+ WriteSet([DataEntry("byteVect", bc), DataEntry((M + "test"), (toBytes(M) + toBytes(D))), DataEntry((M + "test-2"), "ds")])
219224 }
220225 }
221226
222227

github/deemru/w8io/026f985 
81.12 ms