tx · HSjeiAp3BCHdYTNDypzBxkBmBgbPxoYGe53b9uZmR7e5 3MyXFjhxofZUKbHj3p8TUgZwDEPNzq7YNo3: -0.01300000 Waves 2023.09.21 14:38 [2765087] smart account 3MyXFjhxofZUKbHj3p8TUgZwDEPNzq7YNo3 > SELF 0.00000000 Waves
{ "type": 13, "id": "HSjeiAp3BCHdYTNDypzBxkBmBgbPxoYGe53b9uZmR7e5", "fee": 1300000, "feeAssetId": null, "timestamp": 1695296370608, "version": 2, "chainId": 84, "sender": "3MyXFjhxofZUKbHj3p8TUgZwDEPNzq7YNo3", "senderPublicKey": "GMSDsb2uuChLYT3PeuzaUNyxyxCVWUKaV6Y5dP7xWxUV", "proofs": [ "WEgP5aCok7M5CAhtLoJLG6HLXGmruTAcJ2hFvTQRn4Qdw9USC9hssWszyR8sbRiRRxVCP9EbDZzkaM7NiS2DU2y" ], "script": "base64:BgIMCAISAwoBBBIDCgEIKgAMY29udHJhY3RGaWxlAg5sMm1wX3N3YXAucmlkZQADU0VQAgJfXwAGc2NhbGU4AIDC1y8AB3NjYWxlMTgAgICQu7rWrfANABJBRERSRVNTX0JZVEVTX1NJWkUAGgANQkxPQ0tTX0lOX0RBWQCgCwEHd3JhcEVycgEDbXNnCQCsAgIJAKwCAgUMY29udHJhY3RGaWxlAgI6IAUDbXNnAQh0aHJvd0VycgEDbXNnCQACAQkBB3dyYXBFcnIBBQNtc2cADGtleUFzc2V0SW5JZAkAuQkCCQDMCAICAiVzCQDMCAICCWFzc2V0SW5JZAUDbmlsBQNTRVAADWtleUFzc2V0T3V0SWQJALkJAgkAzAgCAgIlcwkAzAgCAgphc3NldE91dElkBQNuaWwFA1NFUAAQa2V5QXNzZXRPdXRQcmljZQkAuQkCCQDMCAICAiVzCQDMCAICDWFzc2V0T3V0UHJpY2UFA25pbAUDU0VQABFrZXlTdGFraW5nQWRkcmVzcwkAuQkCCQDMCAICAiVzCQDMCAICDnN0YWtpbmdBZGRyZXNzBQNuaWwFA1NFUAAPa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FdmFsdWUBBRFhbGxvd2VkVHhJZE9wdGlvbgUEdHhJZAYJAQh0aHJvd0VycgEJAKwCAgUEdHhJZAITIGlzIGFscmVhZHkgYWxsb3dlZAUDbmlsAwkAAAIFA2VycgUDZXJyCQEMdm90ZUlOVEVSTkFMBAUTY2FsbGVyQWRkcmVzc1N0cmluZwUJa2V5UHJlZml4BQZRVU9SVU0FBnJlc3VsdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAECGJ5QWRtaW5zCQAAAggFAnR4AmlkCQDZBAEJAQt2YWx1ZU9yRWxzZQIJAJ0IAgUEdGhpcwkBDmtleUFsbG93ZWRUeElkAAIABAdieU93bmVyAwkAZwIJAJADAQkBDWdldEFkbWluc0xpc3QABQZRVU9SVU0HCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5AwUIYnlBZG1pbnMGBQdieU93bmVy+fn+og==", "height": 2765087, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 79AkM7aG2TTzEYn4BgsCpnofnNo7MA9A7tpUC3Tz6JRF Next: 33k3QHroWr5Q5qiiPzNM9E7bbKB2hmX62QS54axojaR4 Diff:
Old | New | Differences | |
---|---|---|---|
219 | 219 | then invoke(G, "stakeFor", [toString(ay)], [AttachedPayment(A, aC)]) | |
220 | 220 | else unit | |
221 | 221 | if ((aD == aD)) | |
222 | - | then $Tuple2(([ | |
222 | + | then $Tuple2(([IntegerEntry(n, (valueOrElse(getInteger(this, n), 0) + aB)), IntegerEntry(o, (valueOrElse(getInteger(this, o), 0) + aC)), IntegerEntry(p(ay), (valueOrElse(getInteger(this, p(ay)), 0) + aB)), IntegerEntry(r(ay), (valueOrElse(getInteger(this, r(ay)), 0) + aC)), StringEntry(s(ay, ax.transactionId), u(aB, aC, x))] ++ (if (x) | |
223 | 223 | then nil | |
224 | 224 | else [ScriptTransfer(ay, aC, A)])), aC) | |
225 | 225 | else throw("Strict value is not equal to itself.") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "l2mp_swap.ride" | |
5 | 5 | ||
6 | 6 | let b = "__" | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = 1000000000000000000 | |
11 | 11 | ||
12 | 12 | let e = 26 | |
13 | 13 | ||
14 | 14 | let f = 1440 | |
15 | 15 | ||
16 | 16 | func g (h) = ((a + ": ") + h) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func i (h) = throw(g(h)) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | let j = makeString(["%s", "assetInId"], b) | |
23 | 23 | ||
24 | 24 | let k = makeString(["%s", "assetOutId"], b) | |
25 | 25 | ||
26 | 26 | let l = makeString(["%s", "assetOutPrice"], b) | |
27 | 27 | ||
28 | 28 | let m = makeString(["%s", "stakingAddress"], b) | |
29 | 29 | ||
30 | 30 | let n = makeString(["%s%s", "stats", "totalIn"], b) | |
31 | 31 | ||
32 | 32 | let o = makeString(["%s%s", "stats", "totalOut"], b) | |
33 | 33 | ||
34 | 34 | func p (q) = makeString(["%s%s%s", "stats", "totalIn", toString(q)], b) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func r (q) = makeString(["%s%s%s", "stats", "totalOut", toString(q)], b) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func s (q,t) = makeString(["%s%s%s", "history", toString(q), toBase58String(t)], b) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func u (v,w,x) = makeString(["%d%d%d", toString(v), toString(w), toString(x)], b) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | let y = fromBase58String(valueOrErrorMessage(getString(this, j), g("invalid assetInId"))) | |
47 | 47 | ||
48 | 48 | let z = valueOrErrorMessage(assetInfo(y), g("invalid assetInInfo")) | |
49 | 49 | ||
50 | 50 | let A = fromBase58String(valueOrErrorMessage(getString(this, k), g("invalid assetInId"))) | |
51 | 51 | ||
52 | 52 | let B = valueOrErrorMessage(assetInfo(A), g("invalid assetOutInfo")) | |
53 | 53 | ||
54 | 54 | let C = valueOrErrorMessage(getInteger(this, l), g("invalid assetOutPrice")) | |
55 | 55 | ||
56 | 56 | let D = { | |
57 | 57 | let E = getString(this, m) | |
58 | 58 | if ($isInstanceOf(E, "String")) | |
59 | 59 | then { | |
60 | 60 | let F = E | |
61 | 61 | addressFromString(F) | |
62 | 62 | } | |
63 | 63 | else if ($isInstanceOf(E, "Unit")) | |
64 | 64 | then unit | |
65 | 65 | else throw("Match error") | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | let G = valueOrErrorMessage(D, g("invalid stakingAddress")) | |
69 | 69 | ||
70 | 70 | let H = 5 | |
71 | 71 | ||
72 | 72 | let I = 3 | |
73 | 73 | ||
74 | 74 | let J = 32 | |
75 | 75 | ||
76 | 76 | func K (t) = makeString(["%s%s%s", "allowTxId", t], b) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func L (M,N) = makeString([M, N], b) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func O () = makeString(["%s", "adminAddressList"], b) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func P () = makeString(["%s", "txId"], b) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func Q (M,R) = { | |
89 | 89 | let S = L(M, R) | |
90 | 90 | valueOrElse(getInteger(S), 0) | |
91 | 91 | } | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func T () = { | |
95 | 95 | let E = getString(this, O()) | |
96 | 96 | if ($isInstanceOf(E, "String")) | |
97 | 97 | then { | |
98 | 98 | let F = E | |
99 | 99 | split(F, b) | |
100 | 100 | } | |
101 | 101 | else nil | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func U (q) = containsElement(T(), q) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func V (W,N) = { | |
109 | 109 | let X = W | |
110 | 110 | let Y = X._1 | |
111 | 111 | let M = X._2 | |
112 | 112 | $Tuple2((Y :+ L(M, N)), M) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func Z (aa) = { | |
117 | 117 | let ab = O() | |
118 | 118 | let ac = { | |
119 | 119 | let ad = T() | |
120 | 120 | let ae = size(ad) | |
121 | 121 | let af = $Tuple2(nil, aa) | |
122 | 122 | func ag (ah,ai) = if ((ai >= ae)) | |
123 | 123 | then ah | |
124 | 124 | else V(ah, ad[ai]) | |
125 | 125 | ||
126 | 126 | func aj (ah,ai) = if ((ai >= ae)) | |
127 | 127 | then ah | |
128 | 128 | else throw("List size exceeds 5") | |
129 | 129 | ||
130 | 130 | aj(ag(ag(ag(ag(ag(af, 0), 1), 2), 3), 4), 5) | |
131 | 131 | } | |
132 | 132 | let Y = ac._1 | |
133 | 133 | let M = ac._2 | |
134 | 134 | Y | |
135 | 135 | } | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func ak (Y,S) = (Y + valueOrElse(getInteger(S), 0)) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func al (M) = { | |
142 | 142 | let am = Z(M) | |
143 | 143 | let ad = am | |
144 | 144 | let ae = size(ad) | |
145 | 145 | let af = 0 | |
146 | 146 | func ag (ah,ai) = if ((ai >= ae)) | |
147 | 147 | then ah | |
148 | 148 | else ak(ah, ad[ai]) | |
149 | 149 | ||
150 | 150 | func aj (ah,ai) = if ((ai >= ae)) | |
151 | 151 | then ah | |
152 | 152 | else throw("List size exceeds 5") | |
153 | 153 | ||
154 | 154 | aj(ag(ag(ag(ag(ag(af, 0), 1), 2), 3), 4), 5) | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func an (Y,ao) = (Y :+ DeleteEntry(ao)) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func ap (M) = { | |
162 | 162 | let am = Z(M) | |
163 | 163 | let ad = am | |
164 | 164 | let ae = size(ad) | |
165 | 165 | let af = nil | |
166 | 166 | func ag (ah,ai) = if ((ai >= ae)) | |
167 | 167 | then ah | |
168 | 168 | else an(ah, ad[ai]) | |
169 | 169 | ||
170 | 170 | func aj (ah,ai) = if ((ai >= ae)) | |
171 | 171 | then ah | |
172 | 172 | else throw("List size exceeds 5") | |
173 | 173 | ||
174 | 174 | aj(ag(ag(ag(ag(ag(af, 0), 1), 2), 3), 4), 5) | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func aq (ar,aa,as,at) = { | |
179 | 179 | let S = L(aa, ar) | |
180 | 180 | let au = Q(aa, ar) | |
181 | 181 | let av = if (!(U(ar))) | |
182 | 182 | then i((("Address: " + ar) + " not in Admin list")) | |
183 | 183 | else if ((au == 1)) | |
184 | 184 | then i((S + " you already voted")) | |
185 | 185 | else unit | |
186 | 186 | if ((av == av)) | |
187 | 187 | then { | |
188 | 188 | let am = al(aa) | |
189 | 189 | if (((am + 1) >= as)) | |
190 | 190 | then { | |
191 | 191 | let aw = ap(aa) | |
192 | 192 | (aw ++ at) | |
193 | 193 | } | |
194 | 194 | else [IntegerEntry(S, 1)] | |
195 | 195 | } | |
196 | 196 | else throw("Strict value is not equal to itself.") | |
197 | 197 | } | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | @Callable(ax) | |
201 | 201 | func swap (x) = { | |
202 | 202 | let ay = ax.caller | |
203 | 203 | let az = 1 | |
204 | 204 | if ((size(ax.payments) != az)) | |
205 | 205 | then i("invalid payments") | |
206 | 206 | else { | |
207 | 207 | let aA = ax.payments[0] | |
208 | 208 | if ((aA.assetId != y)) | |
209 | 209 | then i("invalid payment assetId") | |
210 | 210 | else if ((C == 0)) | |
211 | 211 | then i("invalid assetOutPrice") | |
212 | 212 | else { | |
213 | 213 | let aB = aA.amount | |
214 | 214 | let aC = fraction(aB, c, C) | |
215 | 215 | if ((aC == 0)) | |
216 | 216 | then i("invalid assetOutAmount") | |
217 | 217 | else { | |
218 | 218 | let aD = if (x) | |
219 | 219 | then invoke(G, "stakeFor", [toString(ay)], [AttachedPayment(A, aC)]) | |
220 | 220 | else unit | |
221 | 221 | if ((aD == aD)) | |
222 | - | then $Tuple2(([ | |
222 | + | then $Tuple2(([IntegerEntry(n, (valueOrElse(getInteger(this, n), 0) + aB)), IntegerEntry(o, (valueOrElse(getInteger(this, o), 0) + aC)), IntegerEntry(p(ay), (valueOrElse(getInteger(this, p(ay)), 0) + aB)), IntegerEntry(r(ay), (valueOrElse(getInteger(this, r(ay)), 0) + aC)), StringEntry(s(ay, ax.transactionId), u(aB, aC, x))] ++ (if (x) | |
223 | 223 | then nil | |
224 | 224 | else [ScriptTransfer(ay, aC, A)])), aC) | |
225 | 225 | else throw("Strict value is not equal to itself.") | |
226 | 226 | } | |
227 | 227 | } | |
228 | 228 | } | |
229 | 229 | } | |
230 | 230 | ||
231 | 231 | ||
232 | 232 | ||
233 | 233 | @Callable(ax) | |
234 | 234 | func voteForTxId (t) = { | |
235 | 235 | let ar = toBase58String(ax.caller.bytes) | |
236 | 236 | let aa = K(t) | |
237 | 237 | let Y = [StringEntry(P(), t)] | |
238 | 238 | let aE = getString(this, P()) | |
239 | 239 | let av = [if ((size(fromBase58String(t)) == J)) | |
240 | 240 | then true | |
241 | 241 | else i((t + " is not valid txId")), if (if ((aE == unit)) | |
242 | 242 | then true | |
243 | 243 | else (value(aE) != t)) | |
244 | 244 | then true | |
245 | 245 | else i((t + " is already allowed"))] | |
246 | 246 | if ((av == av)) | |
247 | 247 | then aq(ar, aa, I, Y) | |
248 | 248 | else throw("Strict value is not equal to itself.") | |
249 | 249 | } | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | @Verifier(aF) | |
253 | 253 | func aG () = { | |
254 | 254 | let aH = (aF.id == fromBase58String(valueOrElse(getString(this, P()), ""))) | |
255 | 255 | let aI = if ((size(T()) >= I)) | |
256 | 256 | then false | |
257 | 257 | else sigVerify(aF.bodyBytes, aF.proofs[0], aF.senderPublicKey) | |
258 | 258 | if (aH) | |
259 | 259 | then true | |
260 | 260 | else aI | |
261 | 261 | } | |
262 | 262 |
github/deemru/w8io/169f3d6 59.69 ms ◑