tx · 9s5pB5z5mHW4Ct6PkhzUrU1Frh6xgLFGDz4UhUTLBR5h 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq: -0.01000000 Waves 2023.07.23 01:48 [2677680] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves
{ "type": 13, "id": "9s5pB5z5mHW4Ct6PkhzUrU1Frh6xgLFGDz4UhUTLBR5h", "fee": 1000000, "feeAssetId": null, "timestamp": 1690066133894, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "37bZY4HHsADGRzTGGsVUVMmoG6CQ8QWtAD5hKLfGAYXjzvjtarEs2UUgjmcZYJ8oWK5f7dVjfw19tkjjFguyKsXb" ], "script": "base64:BgIwCAISBAoCAQgSABIAEgASAwoBARIDCgEBEgMKAQESBAoCCAESABIECgIIARIDCgEIBgADYXJyCQDMCAIAAQkAzAgCAAIJAMwIAgADCQDMCAIABAkAzAgCAAUFA25pbAAEYXJyMgkAzAgCAAEJAMwIAgACBQNuaWwBA3N1bQIBYQFiCQD8BwQJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNOM0RuVmZmblV5WnR6Mk1SYms1VTdnaU4xMTJXZW1wTU5kAgZib3Jyb3cJAMwIAgIsMjVGRXFFalJrcUs2eUNraVQ3THo2U0FZejdnVUZDdHhmQ0NobnJWRkQ1QVQJAMwIAgDAhD0FA25pbAUDbmlsAQpnZXRCYWxhbmNlAgphc3NldElkU3RyB2FkZHJlc3MDCQAAAgUKYXNzZXRJZFN0cgIFV0FWRVMICQDvBwEFB2FkZHJlc3MJYXZhaWxhYmxlCQDwBwIFB2FkZHJlc3MJANkEAQUKYXNzZXRJZFN0cgEPZ2V0Q3VycmVudFByaWNlAQphc3NldElkU3RyAwkAAAIFCmFzc2V0SWRTdHICBVdBVkVTAAIJAAIBA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GRyYXcJAMwIAgUKYXNzZXRJZFN0cgkAzAgCBQthc3NldEFtb3VudAUDbmlsBQNuaWwDCQAAAgUDcmVzBQNyZXMJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkArAICBQdhZGRyZXNzAgpfd2l0aGRyZXdfBQphc3NldElkU3RyBQthc3NldEFtb3VudAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAWkBDGNoZWNrQmFsYW5jZQEKYXNzZXRJZFN0cgQHYWRkcmVzcwgFAWkGY2FsbGVyAwkAAAIFCmFzc2V0SWRTdHICBVdBVkVTCQDMCAIJAQxJbnRlZ2VyRW50cnkCAg1XYXZlcyBCYWxhbmNlCAkA7wcBBQdhZGRyZXNzCWF2YWlsYWJsZQUDbmlsCQDMCAIJAQxJbnRlZ2VyRW50cnkCAg1Bc3NldCBCYWxhbmNlCQDwBwIFB2FkZHJlc3MJANkEAQUKYXNzZXRJZFN0cgUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleS1NI8M=", "height": 2677680, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Bk5vvHEUnvz6sQBnAGmH7qbUQSJ6vJfkKCH3esRqDzxQ Next: 9xxyqUz9LzeErkcCaaK72m5D8cbvmYvTgqN6RUu12ngR Diff:
Old | New | Differences | |
---|---|---|---|
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Callable(l) | |
32 | - | func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", | |
32 | + | func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", 10000000000, 6, true)], unit) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = [1, 2, 3, 4, 5] | |
5 | 5 | ||
6 | 6 | let b = [1, 2] | |
7 | 7 | ||
8 | 8 | func c (d,e) = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", 1000000], nil) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func f (g,h) = if ((g == "WAVES")) | |
12 | 12 | then wavesBalance(h).available | |
13 | 13 | else assetBalance(h, fromBase58String(g)) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func i (g) = if ((g == "WAVES")) | |
17 | 17 | then 2 | |
18 | 18 | else throw("Error") | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func j (g,k,h) = [IntegerEntry(((h + "_deposited_") + g), k)] | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | @Callable(l) | |
25 | 25 | func transferWaves (k,m) = if ((l.caller != this)) | |
26 | 26 | then throw("only for internal smart contract invocations") | |
27 | 27 | else [ScriptTransfer(this, k, unit), IntegerEntry((m + "_deposited_WAVES"), k)] | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Callable(l) | |
32 | - | func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", | |
32 | + | func issue3xLong () = $Tuple2([Issue("WAVES3L", "WAVES_USDN_LONG3X Token", 10000000000, 6, true)], unit) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | ||
36 | 36 | @Callable(l) | |
37 | 37 | func transferWavesTest () = if (if ((size(l.payments) != 1)) | |
38 | 38 | then true | |
39 | 39 | else (l.payments[0].amount == 0)) | |
40 | 40 | then throw("1 payment has to be attached") | |
41 | 41 | else { | |
42 | 42 | let g = "WAVES" | |
43 | 43 | let k = l.payments[0].amount | |
44 | 44 | j(g, k, toString(l.caller)) | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | ||
49 | 49 | @Callable(l) | |
50 | 50 | func long2x_v2 () = if (if ((size(l.payments) != 1)) | |
51 | 51 | then true | |
52 | 52 | else (l.payments[0].amount == 0)) | |
53 | 53 | then throw("1 payment has to be attached") | |
54 | 54 | else { | |
55 | 55 | let h = toString(l.caller) | |
56 | 56 | let g = "WAVES" | |
57 | 57 | let n = l.payments[0].amount | |
58 | 58 | let o = f(g, l.caller) | |
59 | 59 | if ((o > n)) | |
60 | 60 | then { | |
61 | 61 | let p = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, n)]) | |
62 | 62 | if ((p == p)) | |
63 | 63 | then { | |
64 | 64 | func q (r,s) = { | |
65 | 65 | let t = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((n * i("WAVES")) / 100)], nil) | |
66 | 66 | if ((t == t)) | |
67 | 67 | then (r + s) | |
68 | 68 | else throw("Strict value is not equal to itself.") | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | let u = [n, n] | |
72 | 72 | let v = { | |
73 | 73 | let w = u | |
74 | 74 | let x = size(w) | |
75 | 75 | let y = 0 | |
76 | 76 | func z (A,B) = if ((B >= x)) | |
77 | 77 | then A | |
78 | 78 | else q(A, w[B]) | |
79 | 79 | ||
80 | 80 | func C (A,B) = if ((B >= x)) | |
81 | 81 | then A | |
82 | 82 | else throw("List size exceeds 2") | |
83 | 83 | ||
84 | 84 | C(z(z(y, 0), 1), 2) | |
85 | 85 | } | |
86 | 86 | [IntegerEntry((h + "_deposited_WAVES"), n), IntegerEntry(((h + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (n * i("WAVES"))), ScriptTransfer(l.caller, ((v * i("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')] | |
87 | 87 | } | |
88 | 88 | else throw("Strict value is not equal to itself.") | |
89 | 89 | } | |
90 | 90 | else throw("Not enough WAVES to deposit!") | |
91 | 91 | } | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | ||
95 | 95 | @Callable(l) | |
96 | 96 | func long2x (k) = { | |
97 | 97 | let h = toString(l.caller) | |
98 | 98 | let D = f("WAVES", l.caller) | |
99 | 99 | if ((D > k)) | |
100 | 100 | then { | |
101 | 101 | func q (r,s) = { | |
102 | 102 | let E = invoke(this, "transferWaves", [k, l.caller], nil) | |
103 | 103 | if ((E == E)) | |
104 | 104 | then { | |
105 | 105 | let F = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, k)]) | |
106 | 106 | if ((F == F)) | |
107 | 107 | then { | |
108 | 108 | let t = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((k * i("WAVES")) / 100)], nil) | |
109 | 109 | if ((t == t)) | |
110 | 110 | then (r + s) | |
111 | 111 | else throw("Strict value is not equal to itself.") | |
112 | 112 | } | |
113 | 113 | else throw("Strict value is not equal to itself.") | |
114 | 114 | } | |
115 | 115 | else throw("Strict value is not equal to itself.") | |
116 | 116 | } | |
117 | 117 | ||
118 | 118 | let u = [k, k] | |
119 | 119 | let v = { | |
120 | 120 | let w = u | |
121 | 121 | let x = size(w) | |
122 | 122 | let y = 0 | |
123 | 123 | func z (A,B) = if ((B >= x)) | |
124 | 124 | then A | |
125 | 125 | else q(A, w[B]) | |
126 | 126 | ||
127 | 127 | func C (A,B) = if ((B >= x)) | |
128 | 128 | then A | |
129 | 129 | else throw("List size exceeds 2") | |
130 | 130 | ||
131 | 131 | C(z(z(y, 0), 1), 2) | |
132 | 132 | } | |
133 | 133 | [IntegerEntry(((h + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), (k * i("WAVES"))), ScriptTransfer(l.caller, ((v * i("WAVES")) / 100), base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), ScriptTransfer(this, v, unit)] | |
134 | 134 | } | |
135 | 135 | else throw("Error!") | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(l) | |
141 | 141 | func borrow (k) = { | |
142 | 142 | let h = toString(l.caller) | |
143 | 143 | let v = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil) | |
144 | 144 | if ((v == v)) | |
145 | 145 | then [ScriptTransfer(l.caller, k, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'), IntegerEntry(((h + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k)] | |
146 | 146 | else throw("Strict value is not equal to itself.") | |
147 | 147 | } | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | ||
151 | 151 | @Callable(l) | |
152 | 152 | func borrow2 (k) = { | |
153 | 153 | let h = toString(l.caller) | |
154 | 154 | func q (r,s) = { | |
155 | 155 | let G = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", k], nil) | |
156 | 156 | if ((G == G)) | |
157 | 157 | then (r + s) | |
158 | 158 | else throw("Strict value is not equal to itself.") | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | let u = [k, k] | |
162 | 162 | let v = { | |
163 | 163 | let w = u | |
164 | 164 | let x = size(w) | |
165 | 165 | let y = 0 | |
166 | 166 | func z (A,B) = if ((B >= x)) | |
167 | 167 | then A | |
168 | 168 | else q(A, w[B]) | |
169 | 169 | ||
170 | 170 | func C (A,B) = if ((B >= x)) | |
171 | 171 | then A | |
172 | 172 | else throw("List size exceeds 2") | |
173 | 173 | ||
174 | 174 | C(z(z(y, 0), 1), 2) | |
175 | 175 | } | |
176 | 176 | [IntegerEntry(((h + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), k), ScriptTransfer(l.caller, v, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')] | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | ||
181 | 181 | @Callable(l) | |
182 | 182 | func borrow5 (g,k) = { | |
183 | 183 | let h = toString(l.caller) | |
184 | 184 | let v = { | |
185 | 185 | let w = a | |
186 | 186 | let x = size(w) | |
187 | 187 | let y = 0 | |
188 | 188 | func z (A,B) = if ((B >= x)) | |
189 | 189 | then A | |
190 | 190 | else c(A, w[B]) | |
191 | 191 | ||
192 | 192 | func C (A,B) = if ((B >= x)) | |
193 | 193 | then A | |
194 | 194 | else throw("List size exceeds 5") | |
195 | 195 | ||
196 | 196 | C(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5) | |
197 | 197 | } | |
198 | 198 | if ((v == v)) | |
199 | 199 | then [IntegerEntry(((h + "_borrowed_") + g), k)] | |
200 | 200 | else throw("Strict value is not equal to itself.") | |
201 | 201 | } | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | ||
205 | 205 | @Callable(l) | |
206 | 206 | func deposit () = { | |
207 | 207 | let h = toString(l.caller) | |
208 | 208 | let v = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, 1000000)]) | |
209 | 209 | if ((v == v)) | |
210 | 210 | then [IntegerEntry((h + "supply_waves"), 1000000)] | |
211 | 211 | else throw("Strict value is not equal to itself.") | |
212 | 212 | } | |
213 | 213 | ||
214 | 214 | ||
215 | 215 | ||
216 | 216 | @Callable(l) | |
217 | 217 | func withdraw (g,k) = { | |
218 | 218 | let h = toString(l.caller) | |
219 | 219 | let v = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "withdraw", [g, k], nil) | |
220 | 220 | if ((v == v)) | |
221 | 221 | then [IntegerEntry(((h + "_withdrew_") + g), k)] | |
222 | 222 | else throw("Strict value is not equal to itself.") | |
223 | 223 | } | |
224 | 224 | ||
225 | 225 | ||
226 | 226 | ||
227 | 227 | @Callable(l) | |
228 | 228 | func checkBalance (g) = { | |
229 | 229 | let h = l.caller | |
230 | 230 | if ((g == "WAVES")) | |
231 | 231 | then [IntegerEntry("Waves Balance", wavesBalance(h).available)] | |
232 | 232 | else [IntegerEntry("Asset Balance", assetBalance(h, fromBase58String(g)))] | |
233 | 233 | } | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | @Verifier(H) | |
237 | 237 | func I () = sigVerify(H.bodyBytes, H.proofs[0], H.senderPublicKey) | |
238 | 238 |
github/deemru/w8io/169f3d6 41.34 ms ◑