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