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