tx · AxTD8udrmhv3kobQQfj1wkFbvfQnJg3aEXo6jWBe7ogw 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq: -0.01000000 Waves 2023.09.19 18:04 [2762421] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves
{ "type": 13, "id": "AxTD8udrmhv3kobQQfj1wkFbvfQnJg3aEXo6jWBe7ogw", "fee": 1000000, "feeAssetId": null, "timestamp": 1695135893042, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "tHs44pM5jMGFVQ1zdVBWZYqtZYjpUZSyMfeGAFr71J2gUtpXhiMx1ivv75U5UXnogN8YT8eZpGqFCET5RLsEpka" ], "script": "base64:BgINCAISABIAEgASAwoBAQcABnVzZG5JZAEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQADndhdmVzMkxUb2tlbklkASDkzSnqu8EXlTZRNkvkaX2ITlFTrbuGFIX8CY7Zd2/OsQAMcHV6emxlTGVuZFNDAiMzTjNEblZmZm5VeVp0ejJNUmJrNVU3Z2lOMTEyV2VtcE1OZAAQZmFrZVB1enpsZVN3YXBTQwIjM01zOGZxYlhNNFJobU02Q1BUcjQ0aFV3SGUyQ0NtVkNmVkEADnVzZG5BZGRyZXNzU3RyAiwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAAPd2F2ZXMyTFRva2VuU3RyAixHUTlRTlZMR2ZZU2JOWjRkUzhOUnl2R0dFTFpMNHNXUEtpVmo4OENWMXJKTAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAQBaQEJbWludExvbmcyAAMDCQECIT0CCQCQA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U3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIXSW5jb3JyZWN0IGludm9rZSByZXN1bHQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEGcmVkZWVtAQt3YXZlc0Ftb3VudAQLdXNlckFkZHJlc3MJAKUIAQgFAWkGY2FsbGVyBBJyZWRlZW1lZFVTRE5BbW91bnQJAPwHBAkBEUBleHRyTmF0aXZlKDEwNjIpAQUQZmFrZVB1enpsZVN3YXBTQwIKc3dhcFRvVVNETgkAzAgCBQt3YXZlc0Ftb3VudAkAzAgCBQt1c2VyQWRkcmVzcwUDbmlsBQNuaWwDCQAAAgUScmVkZWVtZWRVU0ROQW1vdW50BRJyZWRlZW1lZFVTRE5BbW91bnQEByRtYXRjaDAFEnJlZGVlbWVkVVNETkFtb3VudAMJAAECBQckbWF0Y2gwAgNJbnQEE3JlZGVlbWVkQW1vdW50VmFsdWUFByRtYXRjaDAJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgULdXNlckFkZHJlc3MCCV9yZWRlZW1lZAUTcmVkZWVtZWRBbW91bnRWYWx1ZQUDbmlsCQACAQIXSW5jb3JyZWN0IGludm9rZSByZXN1bHQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5ofS3hQ==", "height": 2762421, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6WmY16KmZX5yHg2aiYizHuPD5pKwYAdrL941kkg2MiNt Next: none 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, 49 | |
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)) | |
135 | 135 | ||
136 | 136 | func F (D,E) = if ((E >= A)) | |
137 | 137 | then D | |
138 | - | else throw("List size exceeds | |
138 | + | else throw("List size exceeds 2") | |
139 | 139 | ||
140 | - | F(C(C( | |
140 | + | F(C(C(B, 0), 1), 2) | |
141 | 141 | } | |
142 | 142 | [IntegerEntry("firstSwappedAmountValue", o), ScriptTransfer(k.caller, ((o * y) / 100), b), IntegerEntry("res", y)] | |
143 | 143 | } |
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, 49 | |
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 | (s + t) | |
120 | 120 | } | |
121 | 121 | else throw("Incorrect invoke result") | |
122 | 122 | } | |
123 | 123 | else throw("Strict value is not equal to itself.") | |
124 | 124 | } | |
125 | 125 | else throw("Strict value is not equal to itself.") | |
126 | 126 | } | |
127 | 127 | ||
128 | 128 | let y = { | |
129 | 129 | let z = q | |
130 | 130 | let A = size(z) | |
131 | 131 | let B = 0 | |
132 | 132 | func C (D,E) = if ((E >= A)) | |
133 | 133 | then D | |
134 | 134 | else r(D, z[E]) | |
135 | 135 | ||
136 | 136 | func F (D,E) = if ((E >= A)) | |
137 | 137 | then D | |
138 | - | else throw("List size exceeds | |
138 | + | else throw("List size exceeds 2") | |
139 | 139 | ||
140 | - | F(C(C( | |
140 | + | F(C(C(B, 0), 1), 2) | |
141 | 141 | } | |
142 | 142 | [IntegerEntry("firstSwappedAmountValue", o), ScriptTransfer(k.caller, ((o * y) / 100), b), IntegerEntry("res", y)] | |
143 | 143 | } | |
144 | 144 | else throw("Strict value is not equal to itself.") | |
145 | 145 | } | |
146 | 146 | else throw("Incorrect invoke result") | |
147 | 147 | } | |
148 | 148 | else throw("Strict value is not equal to itself.") | |
149 | 149 | } | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | ||
153 | 153 | @Callable(k) | |
154 | 154 | func mintLong2_test () = if (if ((size(k.payments) != 1)) | |
155 | 155 | then true | |
156 | 156 | else (k.payments[0].amount == 0)) | |
157 | 157 | then throw("1 payment has to be attached mint") | |
158 | 158 | else { | |
159 | 159 | let l = k.payments[0].amount | |
160 | 160 | let m = toString(k.caller) | |
161 | 161 | let n = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), l], nil) | |
162 | 162 | if ((n == n)) | |
163 | 163 | then { | |
164 | 164 | let i = n | |
165 | 165 | if ($isInstanceOf(i, "Int")) | |
166 | 166 | then { | |
167 | 167 | let o = i | |
168 | 168 | let p = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, o)]) | |
169 | 169 | if ((p == p)) | |
170 | 170 | then { | |
171 | 171 | let q = [70, 49, 34, 24, 17] | |
172 | 172 | func r (s,t) = (s + t) | |
173 | 173 | ||
174 | 174 | let y = { | |
175 | 175 | let z = q | |
176 | 176 | let A = size(z) | |
177 | 177 | let B = 0 | |
178 | 178 | func C (D,E) = if ((E >= A)) | |
179 | 179 | then D | |
180 | 180 | else r(D, z[E]) | |
181 | 181 | ||
182 | 182 | func F (D,E) = if ((E >= A)) | |
183 | 183 | then D | |
184 | 184 | else throw("List size exceeds 5") | |
185 | 185 | ||
186 | 186 | F(C(C(C(C(C(B, 0), 1), 2), 3), 4), 5) | |
187 | 187 | } | |
188 | 188 | [IntegerEntry("res", y), IntegerEntry("firstAmountIn", l), IntegerEntry("firstSwappedAmountValue", o), ScriptTransfer(k.caller, ((o * y) / 100), b)] | |
189 | 189 | } | |
190 | 190 | else throw("Strict value is not equal to itself.") | |
191 | 191 | } | |
192 | 192 | else throw("Incorrect invoke result") | |
193 | 193 | } | |
194 | 194 | else throw("Strict value is not equal to itself.") | |
195 | 195 | } | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | ||
199 | 199 | @Callable(k) | |
200 | 200 | func redeem (H) = { | |
201 | 201 | let I = toString(k.caller) | |
202 | 202 | let J = invoke(addressFromStringValue(d), "swapToUSDN", [H, I], nil) | |
203 | 203 | if ((J == J)) | |
204 | 204 | then { | |
205 | 205 | let i = J | |
206 | 206 | if ($isInstanceOf(i, "Int")) | |
207 | 207 | then { | |
208 | 208 | let K = i | |
209 | 209 | [IntegerEntry((I + "_redeemed"), K)] | |
210 | 210 | } | |
211 | 211 | else throw("Incorrect invoke result") | |
212 | 212 | } | |
213 | 213 | else throw("Strict value is not equal to itself.") | |
214 | 214 | } | |
215 | 215 | ||
216 | 216 | ||
217 | 217 | @Verifier(L) | |
218 | 218 | func M () = sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey) | |
219 | 219 |
github/deemru/w8io/169f3d6 59.13 ms ◑