tx · 8cTTKCu9mNNEmPMnZGfWW83a2WK5TKZ8N7RrBh3rjAcS 3Mu5kasZ85VY5xUCpPYoWr6fBzh6eGZwcnt: -0.01000000 Waves 2023.05.22 10:46 [2588893] smart account 3Mu5kasZ85VY5xUCpPYoWr6fBzh6eGZwcnt > SELF 0.00000000 Waves
{ "type": 13, "id": "8cTTKCu9mNNEmPMnZGfWW83a2WK5TKZ8N7RrBh3rjAcS", "fee": 1000000, "feeAssetId": null, "timestamp": 1684741609755, "version": 2, "chainId": 84, "sender": "3Mu5kasZ85VY5xUCpPYoWr6fBzh6eGZwcnt", "senderPublicKey": "6VehQ4nhpSn9EW76xuyThbHcUFYhjEbb4sJDrys5ZEx5", "proofs": [ "5tr6x1uYZr7wmkfKhvRh83vfSZdRutLRBxPZqUAjzWRYmAEjKHMXrSgsPsctjgTrZSoxS65eAQmRwsHncqPCkQ5w" ], "script": "base64:BgIOCAISABIDCgEBEgMKAQEAAwFpAQZnZXROdW0ACQCUCgIFA25pbAAHAWkBDnNldHRlcklOVEVSTkFMAQFuBAVjaGVjawMJAAACCAUBaQZjYWxsZXIFBHRoaXMGCQACAQIHRVJST1IgMQMJAAACBQVjaGVjawUFY2hlY2sEBnRpbWVzdAQHJG1hdGNoMAkA7QcBBQZoZWlnaHQDCQABAgUHJG1hdGNoMAIJQmxvY2tJbmZvBAJiaQUHJG1hdGNoMAgFAmJpCXRpbWVzdGFtcAkAAgECB0VSUk9SIDIJAMwIAgkBDEludGVnZXJFbnRyeQICCG51bVZhbHVlBQFuCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgFoBQZoZWlnaHQJAMwIAgkBDEludGVnZXJFbnRyeQICAXQFBnRpbWVzdAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBBnNldHRlcgEBbgQNb3RoZXJDb250cmFjdAkBEUBleHRyTmF0aXZlKDEwNjIpAQIjM01wTXVHTjhyVzlFcFB3ekVUQVF6ODhQZTlUUWhTd2lyaXEEAnRjCQD8BwQFBHRoaXMCDnNldHRlcklOVEVSTkFMCQDMCAIFAW4FA25pbAUDbmlsAwkAAAIFAnRjBQJ0YwQCb2MJAP0HBAUNb3RoZXJDb250cmFjdAIGdXBkYXRlBQNuaWwFA25pbAkAlAoCBQNuaWwFAm9jCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAIuQk5g=", "height": 2588893, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: B7Wf966y9YKVJPyzFPmxaWQ7GA2uqrLCF5G7fmpicnMY Next: FJm2mXh7QqjoWrWwb63FbPXYWxTdpkX2uUyt4ug4WnMn Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let a = "__" | |
5 | - | ||
6 | - | func b (c) = makeString(["emission.ride:", toString(this), c], " ") | |
7 | 4 | ||
8 | 5 | ||
9 | - | func d (c) = throw(b(c)) | |
10 | - | ||
11 | - | ||
12 | - | func e (f,g) = valueOrErrorMessage(getString(f, g), b((("mandatory this." + g) + " is not defined"))) | |
13 | - | ||
14 | - | ||
15 | - | func h () = "%s%s__config__factoryAddress" | |
16 | - | ||
17 | - | ||
18 | - | let i = "%s%s__config__votingVerifiedContract" | |
19 | - | ||
20 | - | let j = "%s%s__config__votingEmissionCandidateContract" | |
21 | - | ||
22 | - | let k = "%s%s__config__userPoolsContract" | |
23 | - | ||
24 | - | let l = "%s%s__config__votingEmissionRateContract" | |
25 | - | ||
26 | - | let m = addressFromStringValue(e(this, i)) | |
27 | - | ||
28 | - | let n = addressFromStringValue(e(this, j)) | |
29 | - | ||
30 | - | let o = addressFromStringValue(e(this, k)) | |
31 | - | ||
32 | - | let p = addressFromStringValue(e(this, l)) | |
33 | - | ||
34 | - | let q = 1 | |
35 | - | ||
36 | - | let r = 2 | |
37 | - | ||
38 | - | let s = 3 | |
39 | - | ||
40 | - | let t = 4 | |
41 | - | ||
42 | - | let u = 5 | |
43 | - | ||
44 | - | let v = 6 | |
45 | - | ||
46 | - | let w = 7 | |
47 | - | ||
48 | - | let x = 10 | |
49 | - | ||
50 | - | func y () = "%s__factoryConfig" | |
51 | - | ||
52 | - | ||
53 | - | func z (A) = makeString(["%s%s%s", A, "mappings__lpAsset2PoolContract"], a) | |
54 | - | ||
55 | - | ||
56 | - | func B () = "%s__lpTokensList" | |
57 | - | ||
58 | - | ||
59 | - | func C (A) = makeString(["%s%s%s", A, "mappings__lpAsset2PoolContract"], a) | |
60 | - | ||
61 | - | ||
62 | - | func D (E) = makeString(["%s%s", "poolWeight", E], a) | |
63 | - | ||
64 | - | ||
65 | - | func F () = addressFromStringValue(e(this, h())) | |
66 | - | ||
67 | - | ||
68 | - | func G () = split(valueOrElse(getString(F(), B()), ""), a) | |
69 | - | ||
70 | - | ||
71 | - | func H (I) = split(e(I, y()), a) | |
72 | - | ||
73 | - | ||
74 | - | func J (K) = addressFromStringValue(K[r]) | |
75 | - | ||
76 | - | ||
77 | - | func L (K) = addressFromStringValue(K[u]) | |
78 | - | ||
79 | - | ||
80 | - | func M (K) = addressFromStringValue(K[q]) | |
81 | - | ||
82 | - | ||
83 | - | func N (K) = addressFromStringValue(K[x]) | |
84 | - | ||
85 | - | ||
86 | - | func O () = "%s__config" | |
87 | - | ||
88 | - | ||
89 | - | func P () = "%s%s__ratePerBlockMax__current" | |
90 | - | ||
91 | - | ||
92 | - | func Q (R,S) = makeString(["%s%s%d%d__ratePerBlockMax__start", toString(R), toString(S)], a) | |
93 | - | ||
94 | - | ||
95 | - | func T () = "%s%s__ratePerBlock__current" | |
96 | - | ||
97 | - | ||
98 | - | func U (R,S) = makeString(["%s%s%d%d__ratePerBlock__start", toString(R), toString(S)], a) | |
99 | - | ||
100 | - | ||
101 | - | func V () = "%s%s__emission__startBlock" | |
102 | - | ||
103 | - | ||
104 | - | func W () = "%s%s__emission__duration" | |
105 | - | ||
106 | - | ||
107 | - | func X () = "%s%s__emission__endBlock" | |
108 | - | ||
109 | - | ||
110 | - | func Y () = "%s__boostCoeff" | |
111 | - | ||
112 | - | ||
113 | - | let Z = 3 | |
114 | - | ||
115 | - | let aa = valueOrElse(getInteger(this, Y()), Z) | |
116 | - | ||
117 | - | func ab () = "%s%s__gwxHoldersReward__current" | |
118 | - | ||
119 | - | ||
120 | - | func ac () = "%s%s__gwxHoldersReward__next" | |
121 | - | ||
122 | - | ||
123 | - | func ad () = "%s__managerPublicKey" | |
124 | - | ||
125 | - | ||
126 | - | func ae () = "%s__managerVaultAddress" | |
127 | - | ||
128 | - | ||
129 | - | func af () = { | |
130 | - | let ag = getString(ae()) | |
131 | - | if ($isInstanceOf(ag, "String")) | |
132 | - | then { | |
133 | - | let ah = ag | |
134 | - | addressFromStringValue(ah) | |
135 | - | } | |
136 | - | else this | |
137 | - | } | |
138 | - | ||
139 | - | ||
140 | - | func ai () = { | |
141 | - | let aj = af() | |
142 | - | let ag = getString(aj, ad()) | |
143 | - | if ($isInstanceOf(ag, "String")) | |
144 | - | then { | |
145 | - | let ah = ag | |
146 | - | fromBase58String(ah) | |
147 | - | } | |
148 | - | else if ($isInstanceOf(ag, "Unit")) | |
149 | - | then unit | |
150 | - | else throw("Match error") | |
151 | - | } | |
152 | - | ||
153 | - | ||
154 | - | func ak (al) = { | |
155 | - | let am = d("Permission denied") | |
156 | - | let ag = ai() | |
157 | - | if ($isInstanceOf(ag, "ByteVector")) | |
158 | - | then { | |
159 | - | let an = ag | |
160 | - | if ((al.callerPublicKey == an)) | |
161 | - | then true | |
162 | - | else am | |
163 | - | } | |
164 | - | else if ($isInstanceOf(ag, "Unit")) | |
165 | - | then if ((al.caller == this)) | |
166 | - | then true | |
167 | - | else am | |
168 | - | else throw("Match error") | |
169 | - | } | |
170 | - | ||
171 | - | ||
172 | - | @Callable(al) | |
173 | - | func constructor (ao,ap,aq,ar,as,at,au) = { | |
174 | - | let av = ak(al) | |
175 | - | if ((av == av)) | |
176 | - | then [IntegerEntry(Q(at, ar), ap), IntegerEntry(P(), ap), IntegerEntry(U(at, ar), aq), IntegerEntry(T(), aq), IntegerEntry(V(), ar), IntegerEntry(W(), as), IntegerEntry(X(), (ar + as)), StringEntry(h(), ao), StringEntry(O(), ("%s__" + au))] | |
177 | - | else throw("Strict value is not equal to itself.") | |
178 | - | } | |
6 | + | @Callable(a) | |
7 | + | func getNum () = $Tuple2(nil, 7) | |
179 | 8 | ||
180 | 9 | ||
181 | 10 | ||
182 | - | @Callable(al) | |
183 | - | func constructorV2 (aw) = { | |
184 | - | let av = ak(al) | |
185 | - | if ((av == av)) | |
186 | - | then $Tuple2([StringEntry(i, aw)], unit) | |
187 | - | else throw("Strict value is not equal to itself.") | |
188 | - | } | |
189 | - | ||
190 | - | ||
191 | - | ||
192 | - | @Callable(al) | |
193 | - | func emit (ax) = if ((0 >= ax)) | |
194 | - | then $Tuple2(nil, nil) | |
195 | - | else { | |
196 | - | let ay = F() | |
197 | - | let K = H(ay) | |
198 | - | let az = M(K) | |
199 | - | let aA = N(K) | |
200 | - | let aB = al.caller | |
201 | - | if (if ((aB != az)) | |
202 | - | then (aB != aA) | |
203 | - | else false) | |
204 | - | then d("permissions denied") | |
205 | - | else { | |
206 | - | let au = split(e(this, O()), a)[1] | |
207 | - | let aC = fromBase58String(au) | |
208 | - | $Tuple2([ScriptTransfer(aB, ax, aC)], [aC]) | |
11 | + | @Callable(a) | |
12 | + | func setterINTERNAL (b) = { | |
13 | + | let c = if ((a.caller == this)) | |
14 | + | then true | |
15 | + | else throw("ERROR 1") | |
16 | + | if ((c == c)) | |
17 | + | then { | |
18 | + | let d = { | |
19 | + | let e = blockInfoByHeight(height) | |
20 | + | if ($isInstanceOf(e, "BlockInfo")) | |
21 | + | then { | |
22 | + | let f = e | |
23 | + | f.timestamp | |
24 | + | } | |
25 | + | else throw("ERROR 2") | |
209 | 26 | } | |
210 | - | } | |
211 | - | ||
212 | - | ||
213 | - | ||
214 | - | @Callable(al) | |
215 | - | func burn () = { | |
216 | - | let ay = F() | |
217 | - | let K = H(ay) | |
218 | - | let aD = J(K) | |
219 | - | if ((size(al.payments) != 1)) | |
220 | - | then d("exact one payment is allowed") | |
221 | - | else { | |
222 | - | let aE = al.payments[0] | |
223 | - | let aF = value(aE.assetId) | |
224 | - | let aG = aE.amount | |
225 | - | let aC = fromBase58String(split(e(this, O()), a)[1]) | |
226 | - | if ((aF != aC)) | |
227 | - | then d("invalid wxAssetId is passed") | |
228 | - | else if (!(containsElement([aD, m, n, o], al.caller))) | |
229 | - | then d("permissions denied") | |
230 | - | else [Burn(aF, aG), StringEntry(("%s%s%s__history__burn__" + toBase58String(al.transactionId)), makeString(["%d%d%d", toString(height), toString(lastBlock.timestamp), toString(aG)], a))] | |
231 | - | } | |
232 | - | } | |
233 | - | ||
234 | - | ||
235 | - | ||
236 | - | @Callable(al) | |
237 | - | func gwxHoldersRewardUpdate () = { | |
238 | - | let ay = F() | |
239 | - | let K = H(ay) | |
240 | - | let aA = N(K) | |
241 | - | let av = if ((al.caller == aA)) | |
242 | - | then true | |
243 | - | else ak(al) | |
244 | - | if ((av == av)) | |
245 | - | then { | |
246 | - | let aH = valueOrElse(getInteger(ab()), 0) | |
247 | - | let aI = valueOrElse(getInteger(ac()), aH) | |
248 | - | let aJ = (aH != aI) | |
249 | - | let aK = if (aJ) | |
250 | - | then [IntegerEntry(ab(), aI), DeleteEntry(ac())] | |
251 | - | else nil | |
252 | - | $Tuple2(aK, aJ) | |
27 | + | [IntegerEntry("numValue", b), IntegerEntry("h", height), IntegerEntry("t", d)] | |
253 | 28 | } | |
254 | 29 | else throw("Strict value is not equal to itself.") | |
255 | 30 | } | |
256 | 31 | ||
257 | 32 | ||
258 | 33 | ||
259 | - | @Callable(al) | |
260 | - | func getBoostCoeffREADONLY () = $Tuple2(nil, aa) | |
261 | - | ||
262 | - | ||
263 | - | ||
264 | - | @Callable(al) | |
265 | - | func changeRatePerBlockINTERNAL (aL) = { | |
266 | - | let aM = if ((al.caller == this)) | |
267 | - | then true | |
268 | - | else d("should be invoked internally") | |
269 | - | if ((aM == aM)) | |
34 | + | @Callable(a) | |
35 | + | func setter (b) = { | |
36 | + | let g = addressFromStringValue("3MpMuGN8rW9EpPwzETAQz88Pe9TQhSwiriq") | |
37 | + | let h = invoke(this, "setterINTERNAL", [b], nil) | |
38 | + | if ((h == h)) | |
270 | 39 | then { | |
271 | - | let aN = { | |
272 | - | let ag = blockInfoByHeight(height) | |
273 | - | if ($isInstanceOf(ag, "BlockInfo")) | |
274 | - | then { | |
275 | - | let aO = ag | |
276 | - | aO.timestamp | |
277 | - | } | |
278 | - | else d("BlockInfo.timestamp error") | |
279 | - | } | |
280 | - | [IntegerEntry(U(aN, height), aL), IntegerEntry(T(), aL)] | |
40 | + | let i = reentrantInvoke(g, "update", nil, nil) | |
41 | + | $Tuple2(nil, i) | |
281 | 42 | } | |
282 | 43 | else throw("Strict value is not equal to itself.") | |
283 | 44 | } | |
284 | 45 | ||
285 | 46 | ||
286 | - | ||
287 | - | @Callable(al) | |
288 | - | func changeRatePerBlock (aL) = { | |
289 | - | let aM = if ((al.caller == p)) | |
290 | - | then true | |
291 | - | else d("should be invoked by votingEmissionRateContract") | |
292 | - | if ((aM == aM)) | |
293 | - | then { | |
294 | - | let ay = F() | |
295 | - | let K = H(ay) | |
296 | - | let aD = J(K) | |
297 | - | let aP = invoke(this, "changeRatePerBlockINTERNAL", [aL], nil) | |
298 | - | if ((aP == aP)) | |
299 | - | then { | |
300 | - | let aQ = reentrantInvoke(aD, "onBoostEmissionUpdate", nil, nil) | |
301 | - | $Tuple2(nil, aQ) | |
302 | - | } | |
303 | - | else throw("Strict value is not equal to itself.") | |
304 | - | } | |
305 | - | else throw("Strict value is not equal to itself.") | |
306 | - | } | |
307 | - | ||
308 | - | ||
309 | - | @Verifier(aR) | |
310 | - | func aS () = { | |
311 | - | let aT = { | |
312 | - | let ag = ai() | |
313 | - | if ($isInstanceOf(ag, "ByteVector")) | |
314 | - | then { | |
315 | - | let an = ag | |
316 | - | an | |
317 | - | } | |
318 | - | else if ($isInstanceOf(ag, "Unit")) | |
319 | - | then aR.senderPublicKey | |
320 | - | else throw("Match error") | |
321 | - | } | |
322 | - | sigVerify(aR.bodyBytes, aR.proofs[0], aT) | |
323 | - | } | |
324 | - |
github/deemru/w8io/873ac7e 37.90 ms ◑![]()