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:AAIDAAAAAAAAB2wIARIFCgMBAQESBAoCCAIaDwoBQRIKcmFuZHNDb3VudBoTCgFCEg5yZW1haW5pbmdSYW5kcxoSCgFDEg1kYXRhS2V5c0NvdW50GhEKAUQSDGRhdGFEb25lVHhJZBoPCgFFEgpsYXN0T2Zmc2V0Gg0KAUYSCHNsb3dJZHgxGg0KAUcSCHNsb3dJZHgyGg0KAUgSCGZhc3RJZHgxGg0KAUkSCGZhc3RJZHgyGhAKAUoSC3JhbmRPckVtcHR5GhEKAUsSDGZ1bGxTdGF0ZVN0choYCgFMEhNleHRyYWN0R2FtZURhdGFMaXN0Gg4KAU0SCXNlc3Npb25JZBoPCgFOEgpyYXdEYXRhU3RyGg0KAU8SCG5leHRSYW5kGggKAVASA2RpdhoICgFREgNtaW4aEQoBUhIMY3VyclJhbmRzU3RyGhIKAVMSDXJlbWFpbmluZ0hhc2gaEAoBVBILbmV4dFJhbmRJbnQaEAoBVRILbmV4dFJhbmRTdHIaDgoBVhIJZHVwbGljYXRlGhEKAVcSDGdlbmVyYXRlUmFuZBoJCgFYEgRmcm9tGgcKAV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ZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAhieXRlVmVjdAUAAAACYmMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAABTQIAAAAEdGVzdAkAAMsAAAACCQABmwAAAAEFAAAAAU0JAAGbAAAAAQUAAAABRAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAFNAgAAAAZ0ZXN0LTICAAAAAmRzBQAAAANuaWwAAAAAW+zXWg==", "height": 1835405, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3XK6M7LVrqCt8ibtUXQt8Eix4muLWgwnXrtWbhE48PFS Next: A7hqptXR326QEmn1GSESPwkjLiu1tHmef3PXWoDtmfb4 Diff:
Old | New | Differences | |
---|---|---|---|
76 | 76 | then [0, (ab + 1), (ac + 1), 0, 1] | |
77 | 77 | else [0, ab, ac, (ad + 1), (ae + 1)] | |
78 | 78 | 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) | |
80 | 85 | } | |
81 | 86 | ||
82 | 87 | ||
83 | - | func | |
84 | - | let | |
85 | - | if ((size( | |
88 | + | func al (M,C,am) = { | |
89 | + | let an = split(am.key, "_") | |
90 | + | if ((size(an) != 2)) | |
86 | 91 | then throw("Invalid data key format. It must follow to ${sessionId}_${num}") | |
87 | 92 | else { | |
88 | - | let | |
89 | - | let | |
90 | - | if ((M != | |
91 | - | then throw(((("Several data keys have different sessionId: " + M) + " and ") + | |
92 | - | else if (isDefined(getString(this, | |
93 | - | then throw(("One of the data keys has already presented in account state: key=" + | |
94 | - | else if ((size( | |
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)) | |
95 | 100 | 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( | |
101 | + | else if ((take(ap, 1) == "0")) | |
97 | 102 | then throw("Invalid data key format. It must follow to ${sessionId}_${num} where ${num} couldn't start from 0") | |
98 | 103 | else { | |
99 | - | let | |
100 | - | if (isDefined( | |
104 | + | let aq = parseInt(ap) | |
105 | + | if (isDefined(aq)) | |
101 | 106 | then { | |
102 | - | let | |
103 | - | if (if ((1 > | |
107 | + | let ar = extract(aq) | |
108 | + | if (if ((1 > ar)) | |
104 | 109 | then true | |
105 | - | else ( | |
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( | |
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))) | |
107 | 112 | else { | |
108 | - | let | |
109 | - | if ($isInstanceOf( | |
113 | + | let as = am.value | |
114 | + | if ($isInstanceOf(as, "String")) | |
110 | 115 | then { | |
111 | - | let | |
116 | + | let at = as | |
112 | 117 | true | |
113 | 118 | } | |
114 | 119 | else throw((M + " draw: only String type is accepted for data transactions")) | |
115 | 120 | } | |
116 | 121 | } | |
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=") + | |
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)) | |
118 | 123 | } | |
119 | 124 | } | |
120 | 125 | } | |
121 | 126 | ||
122 | 127 | ||
123 | - | func | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | let | |
131 | - | let | |
132 | - | let | |
133 | - | let | |
134 | - | let | |
135 | - | let | |
136 | - | let | |
137 | - | then ( | |
138 | - | else if (( | |
139 | - | then ( | |
140 | - | else if (( | |
141 | - | then ( | |
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)) | |
142 | 147 | else throw("Please contact our sales team to generate more than 50k rands") | |
143 | - | let | |
144 | - | if (isDefined( | |
148 | + | let aK = (aJ + aw) | |
149 | + | if (isDefined(av.assetId)) | |
145 | 150 | then throw("Only WAVES can be used as a payment for rands generation") | |
146 | - | else if (( | |
147 | - | then throw(((((("Attached payment is to small to generate " + toString(A)) + " unique randoms numbers and upload at least 1 data tx: actualPmt=") + toString( | |
148 | - | else | |
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 | |
149 | 154 | } | |
150 | 155 | ||
151 | 156 | ||
152 | - | @Callable( | |
157 | + | @Callable(aL) | |
153 | 158 | func initDraw (y,z,A) = { | |
154 | - | let M = toBase58String( | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
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)) | |
161 | 166 | if (if ((0 >= y)) | |
162 | 167 | then true | |
163 | 168 | else (0 >= z)) | |
164 | 169 | then throw("randFrom and randTo must be greater than 0") | |
165 | 170 | else if ((y >= z)) | |
166 | 171 | then throw("randFrom must be strict less then randTo") | |
167 | - | else if ((A > | |
168 | - | then throw(((((((("Impossible to generate " + toString(A)) + " unique numbers for provided random range [") + toString(y)) + ", ") + toString(z)) + "] with actual size ") + toString( | |
169 | - | else if ((A > | |
170 | - | then throw(((((((((("randsCount must be less then 50% of passed range length: range=[" + toString(y)) + ", ") + toString(z)) + "], rangeLength=") + toString( | |
171 | - | else if ((A > | |
172 | - | then throw(((((("randsCount couldn't be kept in 1 data entry: 1_randNumSpace=" + toString(( | |
173 | - | else if (!(isDefined( | |
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))) | |
174 | 179 | then throw("Please provide payment to generate unique random numbers") | |
175 | 180 | else { | |
176 | - | let | |
177 | - | let | |
178 | - | let | |
179 | - | let | |
180 | - | let | |
181 | - | let C = if ((31250 >= ( | |
182 | - | then ( | |
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) | |
183 | 188 | else 31250 | |
184 | - | let x = toBase58String( | |
185 | - | let | |
186 | - | let | |
187 | - | ScriptResult(WriteSet([DataEntry(M, | |
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)])) | |
188 | 193 | } | |
189 | 194 | } | |
190 | 195 | ||
191 | 196 | ||
192 | 197 | ||
193 | - | @Callable( | |
198 | + | @Callable(aL) | |
194 | 199 | func random (M,Z) = { | |
195 | - | let | |
196 | - | let w = | |
197 | - | let x = | |
198 | - | let | |
199 | - | let | |
200 | - | let aa = parseIntValue( | |
201 | - | let R = | |
202 | - | let | |
203 | - | let | |
204 | - | let D = | |
205 | - | let F = parseIntValue( | |
206 | - | let G = parseIntValue( | |
207 | - | let H = parseIntValue( | |
208 | - | let I = parseIntValue( | |
209 | - | let X = parseIntValue( | |
210 | - | let Y = parseIntValue( | |
211 | - | let | |
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) | |
212 | 217 | if ((w != h)) | |
213 | 218 | then throw((M + " draw: it must be in READY state to generate random numbers")) | |
214 | 219 | else if (false) | |
215 | 220 | then throw("Invalid RSA signature") | |
216 | 221 | else { | |
217 | - | let | |
218 | - | WriteSet([DataEntry(" | |
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")]) | |
219 | 224 | } | |
220 | 225 | } | |
221 | 226 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = fromBase64String("base64:LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlHZk1BMEdDU3FHU0liM0RRRUJBUVVBQTRHTkFEQ0JpUUtCZ1FDR25Hd3ZVbG1mTG5ZTkdyRSszczR2QTZRZAowa29PNzdZUjJDdTZpOWQvalE2OVJkU0hHRFlwb3hKM1gvSS84MmtpS1JRcHlwcWJjUS9UY3IxV1VRM1RDQmk1CnFmYyt4ZWVyOS9ncnhUOExJazEvVFhXVEZBQzA2M3R3V1dPbVpXcGNPN3kyZlRuUklkSFRlaUs0T1pzSyt1Z2UKOTdGS3BTbWoxcmpFVDFmM0F3SURBUUFCCi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLQ==") | |
5 | 5 | ||
6 | 6 | let b = addressFromStringValue("3N4vdqMsEsAZSJWfwYJcaCgUzASJTC2BWsP") | |
7 | 7 | ||
8 | 8 | let c = ((100 * 1000) * 1000) | |
9 | 9 | ||
10 | 10 | let d = 44 | |
11 | 11 | ||
12 | 12 | let e = ((5 * c) / 1000) | |
13 | 13 | ||
14 | 14 | let f = 14 | |
15 | 15 | ||
16 | 16 | let g = "INIT" | |
17 | 17 | ||
18 | 18 | let h = "READY" | |
19 | 19 | ||
20 | 20 | let i = "FINISHED" | |
21 | 21 | ||
22 | 22 | let j = 0 | |
23 | 23 | ||
24 | 24 | let k = 1 | |
25 | 25 | ||
26 | 26 | let l = 2 | |
27 | 27 | ||
28 | 28 | let m = 3 | |
29 | 29 | ||
30 | 30 | let n = 4 | |
31 | 31 | ||
32 | 32 | let o = 5 | |
33 | 33 | ||
34 | 34 | let p = 6 | |
35 | 35 | ||
36 | 36 | let q = 7 | |
37 | 37 | ||
38 | 38 | let r = 8 | |
39 | 39 | ||
40 | 40 | let s = 13 | |
41 | 41 | ||
42 | 42 | func t (u) = if ((0 > u)) | |
43 | 43 | then -(u) | |
44 | 44 | else u | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func v (w,x,y,z,A,B,C,D,E,F,G,H,I,J) = { | |
48 | 48 | let K = ((((((((((((((((((((((((w + "_") + x) + "_") + y) + "_") + z) + "_") + A) + "_") + B) + "_") + C) + "_") + D) + "_") + E) + "_") + F) + "_") + G) + "_") + H) + "_") + I) | |
49 | 49 | if ((J == "")) | |
50 | 50 | then ((K + "_") + "-") | |
51 | 51 | else ((K + "_") + J) | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func L (M) = { | |
56 | 56 | let N = getStringValue(this, M) | |
57 | 57 | split(N, "_") | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func O (P,Q,R,B,S) = { | |
62 | 62 | let T = ((t(toInt(S)) % P) + Q) | |
63 | 63 | let U = toString(T) | |
64 | 64 | let V = isDefined(indexOf(R, U)) | |
65 | 65 | if (if (!(V)) | |
66 | 66 | then (B > 0) | |
67 | 67 | else false) | |
68 | 68 | then [((R + "-") + U), "yes"] | |
69 | 69 | else [R, ""] | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func W (M,X,Y,Z,R,B,aa,ab,ac,ad,ae) = { | |
74 | 74 | let af = if (((aa + 1) > 87)) | |
75 | 75 | then if ((ae > 241)) | |
76 | 76 | then [0, (ab + 1), (ac + 1), 0, 1] | |
77 | 77 | else [0, ab, ac, (ad + 1), (ae + 1)] | |
78 | 78 | 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) | |
80 | 85 | } | |
81 | 86 | ||
82 | 87 | ||
83 | - | func | |
84 | - | let | |
85 | - | if ((size( | |
88 | + | func al (M,C,am) = { | |
89 | + | let an = split(am.key, "_") | |
90 | + | if ((size(an) != 2)) | |
86 | 91 | then throw("Invalid data key format. It must follow to ${sessionId}_${num}") | |
87 | 92 | else { | |
88 | - | let | |
89 | - | let | |
90 | - | if ((M != | |
91 | - | then throw(((("Several data keys have different sessionId: " + M) + " and ") + | |
92 | - | else if (isDefined(getString(this, | |
93 | - | then throw(("One of the data keys has already presented in account state: key=" + | |
94 | - | else if ((size( | |
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)) | |
95 | 100 | 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( | |
101 | + | else if ((take(ap, 1) == "0")) | |
97 | 102 | then throw("Invalid data key format. It must follow to ${sessionId}_${num} where ${num} couldn't start from 0") | |
98 | 103 | else { | |
99 | - | let | |
100 | - | if (isDefined( | |
104 | + | let aq = parseInt(ap) | |
105 | + | if (isDefined(aq)) | |
101 | 106 | then { | |
102 | - | let | |
103 | - | if (if ((1 > | |
107 | + | let ar = extract(aq) | |
108 | + | if (if ((1 > ar)) | |
104 | 109 | then true | |
105 | - | else ( | |
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( | |
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))) | |
107 | 112 | else { | |
108 | - | let | |
109 | - | if ($isInstanceOf( | |
113 | + | let as = am.value | |
114 | + | if ($isInstanceOf(as, "String")) | |
110 | 115 | then { | |
111 | - | let | |
116 | + | let at = as | |
112 | 117 | true | |
113 | 118 | } | |
114 | 119 | else throw((M + " draw: only String type is accepted for data transactions")) | |
115 | 120 | } | |
116 | 121 | } | |
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=") + | |
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)) | |
118 | 123 | } | |
119 | 124 | } | |
120 | 125 | } | |
121 | 126 | ||
122 | 127 | ||
123 | - | func | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | let | |
131 | - | let | |
132 | - | let | |
133 | - | let | |
134 | - | let | |
135 | - | let | |
136 | - | let | |
137 | - | then ( | |
138 | - | else if (( | |
139 | - | then ( | |
140 | - | else if (( | |
141 | - | then ( | |
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)) | |
142 | 147 | else throw("Please contact our sales team to generate more than 50k rands") | |
143 | - | let | |
144 | - | if (isDefined( | |
148 | + | let aK = (aJ + aw) | |
149 | + | if (isDefined(av.assetId)) | |
145 | 150 | then throw("Only WAVES can be used as a payment for rands generation") | |
146 | - | else if (( | |
147 | - | then throw(((((("Attached payment is to small to generate " + toString(A)) + " unique randoms numbers and upload at least 1 data tx: actualPmt=") + toString( | |
148 | - | else | |
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 | |
149 | 154 | } | |
150 | 155 | ||
151 | 156 | ||
152 | - | @Callable( | |
157 | + | @Callable(aL) | |
153 | 158 | func initDraw (y,z,A) = { | |
154 | - | let M = toBase58String( | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
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)) | |
161 | 166 | if (if ((0 >= y)) | |
162 | 167 | then true | |
163 | 168 | else (0 >= z)) | |
164 | 169 | then throw("randFrom and randTo must be greater than 0") | |
165 | 170 | else if ((y >= z)) | |
166 | 171 | then throw("randFrom must be strict less then randTo") | |
167 | - | else if ((A > | |
168 | - | then throw(((((((("Impossible to generate " + toString(A)) + " unique numbers for provided random range [") + toString(y)) + ", ") + toString(z)) + "] with actual size ") + toString( | |
169 | - | else if ((A > | |
170 | - | then throw(((((((((("randsCount must be less then 50% of passed range length: range=[" + toString(y)) + ", ") + toString(z)) + "], rangeLength=") + toString( | |
171 | - | else if ((A > | |
172 | - | then throw(((((("randsCount couldn't be kept in 1 data entry: 1_randNumSpace=" + toString(( | |
173 | - | else if (!(isDefined( | |
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))) | |
174 | 179 | then throw("Please provide payment to generate unique random numbers") | |
175 | 180 | else { | |
176 | - | let | |
177 | - | let | |
178 | - | let | |
179 | - | let | |
180 | - | let | |
181 | - | let C = if ((31250 >= ( | |
182 | - | then ( | |
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) | |
183 | 188 | else 31250 | |
184 | - | let x = toBase58String( | |
185 | - | let | |
186 | - | let | |
187 | - | ScriptResult(WriteSet([DataEntry(M, | |
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)])) | |
188 | 193 | } | |
189 | 194 | } | |
190 | 195 | ||
191 | 196 | ||
192 | 197 | ||
193 | - | @Callable( | |
198 | + | @Callable(aL) | |
194 | 199 | func random (M,Z) = { | |
195 | - | let | |
196 | - | let w = | |
197 | - | let x = | |
198 | - | let | |
199 | - | let | |
200 | - | let aa = parseIntValue( | |
201 | - | let R = | |
202 | - | let | |
203 | - | let | |
204 | - | let D = | |
205 | - | let F = parseIntValue( | |
206 | - | let G = parseIntValue( | |
207 | - | let H = parseIntValue( | |
208 | - | let I = parseIntValue( | |
209 | - | let X = parseIntValue( | |
210 | - | let Y = parseIntValue( | |
211 | - | let | |
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) | |
212 | 217 | if ((w != h)) | |
213 | 218 | then throw((M + " draw: it must be in READY state to generate random numbers")) | |
214 | 219 | else if (false) | |
215 | 220 | then throw("Invalid RSA signature") | |
216 | 221 | else { | |
217 | - | let | |
218 | - | WriteSet([DataEntry(" | |
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")]) | |
219 | 224 | } | |
220 | 225 | } | |
221 | 226 | ||
222 | 227 |
github/deemru/w8io/026f985 81.12 ms ◑