tx · DJELd6nir5R88NN8uQtaPMwtv7k3fnAiwFQHHD2gAKCT 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq: -0.01000000 Waves 2023.09.19 00:04 [2761350] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves
{ "type": 13, "id": "DJELd6nir5R88NN8uQtaPMwtv7k3fnAiwFQHHD2gAKCT", "fee": 1000000, "feeAssetId": null, "timestamp": 1695071091699, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "3sPFZZaVZcGiVHiTmCoaACRxHE9otCjSe2AJG6u6VFoeR399FdPy8XYdyMtwxDkVq6SX9vtEaQcLdheie5mfsBkt" ], "script": "base64:BgINCAISABIAEgASAwoBAQcABnVzZG5JZAEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQADndhdmVzMkxUb2tlbklkASDkzSnqu8EXlTZRNkvkaX2ITlFTrbuGFIX8CY7Zd2/OsQAMcHV6emxlTGVuZFNDAiMzTjNEblZmZm5VeVp0ejJNUmJrNVU3Z2lOMTEyV2VtcE1OZAAQZmFrZVB1enpsZVN3YXBTQwIjM01zOGZxYlhNNFJobU02Q1BUcjQ0aFV3SGUyQ0NtVkNmVkEADnVzZG5BZGRyZXNzU3RyAiwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAAPd2F2ZXMyTFRva2VuU3RyAixHUTlRTlZMR2ZZU2JOWjRkUzhOUnl2R0dFTFpMNHNXUEtpVmo4OENWMXJKTAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAQBaQEJbWludExvbmcyAAMDCQECIT0CCQCQAwE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2761350, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9AqxzEVARZP7cCmwMC1nh6i2b5HW2VzbJjhucV4pSQbu Next: 88ypHPvw5M59gbBb4cud6TYNdzmvPhUucA8EH7asfACD Diff:
Old | New | Differences | |
---|---|---|---|
104 | 104 | let p = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, o)]) | |
105 | 105 | if ((p == p)) | |
106 | 106 | then { | |
107 | - | let q = [70] | |
107 | + | let q = [70, 49] | |
108 | 108 | func r (s,t) = { | |
109 | 109 | let G = invoke(addressFromStringValue(c), "borrow", [e, ((l * t) / 100)], nil) | |
110 | 110 | if ((G == G)) | |
138 | 138 | ||
139 | 139 | func F (D,E) = if ((E >= A)) | |
140 | 140 | then D | |
141 | - | else throw("List size exceeds | |
141 | + | else throw("List size exceeds 2") | |
142 | 142 | ||
143 | - | F(C(B, 0), 1) | |
143 | + | F(C(C(B, 0), 1), 2) | |
144 | 144 | } | |
145 | 145 | [IntegerEntry("firstSwappedAmountValue", o), ScriptTransfer(k.caller, ((o * y) / 100), b)] | |
146 | 146 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
5 | 5 | ||
6 | 6 | let b = base58'GQ9QNVLGfYSbNZ4dS8NRyvGGELZL4sWPKiVj88CV1rJL' | |
7 | 7 | ||
8 | 8 | let c = "3N3DnVffnUyZtz2MRbk5U7giN112WempMNd" | |
9 | 9 | ||
10 | 10 | let d = "3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA" | |
11 | 11 | ||
12 | 12 | let e = "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT" | |
13 | 13 | ||
14 | 14 | let f = "GQ9QNVLGfYSbNZ4dS8NRyvGGELZL4sWPKiVj88CV1rJL" | |
15 | 15 | ||
16 | 16 | func g (h) = { | |
17 | 17 | let i = getInteger(this, h) | |
18 | 18 | if ($isInstanceOf(i, "Int")) | |
19 | 19 | then { | |
20 | 20 | let j = i | |
21 | 21 | j | |
22 | 22 | } | |
23 | 23 | else 0 | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | @Callable(k) | |
28 | 28 | func mintLong2 () = if (if ((size(k.payments) != 1)) | |
29 | 29 | then true | |
30 | 30 | else (k.payments[0].amount == 0)) | |
31 | 31 | then throw("1 payment has to be attached mint") | |
32 | 32 | else { | |
33 | 33 | let l = k.payments[0].amount | |
34 | 34 | let m = toString(k.caller) | |
35 | 35 | let n = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), l], nil) | |
36 | 36 | if ((n == n)) | |
37 | 37 | then { | |
38 | 38 | let i = n | |
39 | 39 | if ($isInstanceOf(i, "Int")) | |
40 | 40 | then { | |
41 | 41 | let o = i | |
42 | 42 | let p = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, o)]) | |
43 | 43 | if ((p == p)) | |
44 | 44 | then { | |
45 | 45 | let q = [70, 49, 34, 24, 17] | |
46 | 46 | func r (s,t) = { | |
47 | 47 | let u = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), ((o * s) / 100)], nil) | |
48 | 48 | if ((u == u)) | |
49 | 49 | then { | |
50 | 50 | let v = u | |
51 | 51 | if ($isInstanceOf(v, "Int")) | |
52 | 52 | then { | |
53 | 53 | let w = v | |
54 | 54 | let x = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, w)]) | |
55 | 55 | if ((x == x)) | |
56 | 56 | then (s + t) | |
57 | 57 | else throw("Strict value is not equal to itself.") | |
58 | 58 | } | |
59 | 59 | else throw("Incorrect invoke result") | |
60 | 60 | } | |
61 | 61 | else throw("Strict value is not equal to itself.") | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | let y = { | |
65 | 65 | let z = q | |
66 | 66 | let A = size(z) | |
67 | 67 | let B = 0 | |
68 | 68 | func C (D,E) = if ((E >= A)) | |
69 | 69 | then D | |
70 | 70 | else r(D, z[E]) | |
71 | 71 | ||
72 | 72 | func F (D,E) = if ((E >= A)) | |
73 | 73 | then D | |
74 | 74 | else throw("List size exceeds 5") | |
75 | 75 | ||
76 | 76 | F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5) | |
77 | 77 | } | |
78 | 78 | [ScriptTransfer(k.caller, ((o * y) / 100), b)] | |
79 | 79 | } | |
80 | 80 | else throw("Strict value is not equal to itself.") | |
81 | 81 | } | |
82 | 82 | else throw("Incorrect invoke result") | |
83 | 83 | } | |
84 | 84 | else throw("Strict value is not equal to itself.") | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | ||
89 | 89 | @Callable(k) | |
90 | 90 | func mintLong2_3 () = if (if ((size(k.payments) != 1)) | |
91 | 91 | then true | |
92 | 92 | else (k.payments[0].amount == 0)) | |
93 | 93 | then throw("1 payment has to be attached mint") | |
94 | 94 | else { | |
95 | 95 | let l = k.payments[0].amount | |
96 | 96 | let m = toString(k.caller) | |
97 | 97 | let n = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), l], nil) | |
98 | 98 | if ((n == n)) | |
99 | 99 | then { | |
100 | 100 | let i = n | |
101 | 101 | if ($isInstanceOf(i, "Int")) | |
102 | 102 | then { | |
103 | 103 | let o = i | |
104 | 104 | let p = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, o)]) | |
105 | 105 | if ((p == p)) | |
106 | 106 | then { | |
107 | - | let q = [70] | |
107 | + | let q = [70, 49] | |
108 | 108 | func r (s,t) = { | |
109 | 109 | let G = invoke(addressFromStringValue(c), "borrow", [e, ((l * t) / 100)], nil) | |
110 | 110 | if ((G == G)) | |
111 | 111 | then { | |
112 | 112 | let u = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), ((l * t) / 100)], nil) | |
113 | 113 | if ((u == u)) | |
114 | 114 | then { | |
115 | 115 | let v = u | |
116 | 116 | if ($isInstanceOf(v, "Int")) | |
117 | 117 | then { | |
118 | 118 | let w = v | |
119 | 119 | let x = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, w)]) | |
120 | 120 | if ((x == x)) | |
121 | 121 | then (s + t) | |
122 | 122 | else throw("Strict value is not equal to itself.") | |
123 | 123 | } | |
124 | 124 | else throw("Incorrect invoke result") | |
125 | 125 | } | |
126 | 126 | else throw("Strict value is not equal to itself.") | |
127 | 127 | } | |
128 | 128 | else throw("Strict value is not equal to itself.") | |
129 | 129 | } | |
130 | 130 | ||
131 | 131 | let y = { | |
132 | 132 | let z = q | |
133 | 133 | let A = size(z) | |
134 | 134 | let B = 0 | |
135 | 135 | func C (D,E) = if ((E >= A)) | |
136 | 136 | then D | |
137 | 137 | else r(D, z[E]) | |
138 | 138 | ||
139 | 139 | func F (D,E) = if ((E >= A)) | |
140 | 140 | then D | |
141 | - | else throw("List size exceeds | |
141 | + | else throw("List size exceeds 2") | |
142 | 142 | ||
143 | - | F(C(B, 0), 1) | |
143 | + | F(C(C(B, 0), 1), 2) | |
144 | 144 | } | |
145 | 145 | [IntegerEntry("firstSwappedAmountValue", o), ScriptTransfer(k.caller, ((o * y) / 100), b)] | |
146 | 146 | } | |
147 | 147 | else throw("Strict value is not equal to itself.") | |
148 | 148 | } | |
149 | 149 | else throw("Incorrect invoke result") | |
150 | 150 | } | |
151 | 151 | else throw("Strict value is not equal to itself.") | |
152 | 152 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | ||
156 | 156 | @Callable(k) | |
157 | 157 | func mintLong2_test () = if (if ((size(k.payments) != 1)) | |
158 | 158 | then true | |
159 | 159 | else (k.payments[0].amount == 0)) | |
160 | 160 | then throw("1 payment has to be attached mint") | |
161 | 161 | else { | |
162 | 162 | let l = k.payments[0].amount | |
163 | 163 | let m = toString(k.caller) | |
164 | 164 | let n = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), l], nil) | |
165 | 165 | if ((n == n)) | |
166 | 166 | then { | |
167 | 167 | let i = n | |
168 | 168 | if ($isInstanceOf(i, "Int")) | |
169 | 169 | then { | |
170 | 170 | let o = i | |
171 | 171 | let p = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, o)]) | |
172 | 172 | if ((p == p)) | |
173 | 173 | then { | |
174 | 174 | let q = [70, 49, 34, 24, 17] | |
175 | 175 | func r (s,t) = (s + t) | |
176 | 176 | ||
177 | 177 | let y = { | |
178 | 178 | let z = q | |
179 | 179 | let A = size(z) | |
180 | 180 | let B = 0 | |
181 | 181 | func C (D,E) = if ((E >= A)) | |
182 | 182 | then D | |
183 | 183 | else r(D, z[E]) | |
184 | 184 | ||
185 | 185 | func F (D,E) = if ((E >= A)) | |
186 | 186 | then D | |
187 | 187 | else throw("List size exceeds 5") | |
188 | 188 | ||
189 | 189 | F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5) | |
190 | 190 | } | |
191 | 191 | [IntegerEntry("res", y), IntegerEntry("firstAmountIn", l), IntegerEntry("firstSwappedAmountValue", o), ScriptTransfer(k.caller, ((o * y) / 100), b)] | |
192 | 192 | } | |
193 | 193 | else throw("Strict value is not equal to itself.") | |
194 | 194 | } | |
195 | 195 | else throw("Incorrect invoke result") | |
196 | 196 | } | |
197 | 197 | else throw("Strict value is not equal to itself.") | |
198 | 198 | } | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | ||
202 | 202 | @Callable(k) | |
203 | 203 | func redeem (H) = { | |
204 | 204 | let I = toString(k.caller) | |
205 | 205 | let J = invoke(addressFromStringValue(d), "swapToUSDN", [H, I], nil) | |
206 | 206 | if ((J == J)) | |
207 | 207 | then { | |
208 | 208 | let i = J | |
209 | 209 | if ($isInstanceOf(i, "Int")) | |
210 | 210 | then { | |
211 | 211 | let K = i | |
212 | 212 | [IntegerEntry((I + "_redeemed"), K)] | |
213 | 213 | } | |
214 | 214 | else throw("Incorrect invoke result") | |
215 | 215 | } | |
216 | 216 | else throw("Strict value is not equal to itself.") | |
217 | 217 | } | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | @Verifier(L) | |
221 | 221 | func M () = sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey) | |
222 | 222 |
github/deemru/w8io/169f3d6 37.73 ms ◑