tx · 6LQ842oK4K9JRvCq7uWYBbuwvpSkKsPJrGdgkjHRqdfX 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq: -0.01000000 Waves 2023.09.18 22:28 [2761255] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves
{ "type": 13, "id": "6LQ842oK4K9JRvCq7uWYBbuwvpSkKsPJrGdgkjHRqdfX", "fee": 1000000, "feeAssetId": null, "timestamp": 1695065340471, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "4mpUFe9r2akSLjGEhfgvSdLDwDkvxAVPca4iwQSEXbnHrPxtyusyngNWFsUPBM3ZjbscP8rGQKeeyJqfdhoHKtSZ" ], "script": "base64:BgILCAISABIAEgMKAQEHAAZ1c2RuSWQBIA/yHBKs5MQ8muxGGqslqLDsugcrRsxtiHLwteKSSQG0AA53YXZlczJMVG9rZW5JZAEg5M0p6rvBF5U2UTZL5Gl9iE5RU627hhSF/AmO2XdvzrEADHB1enpsZUxlbmRTQwIjM04zRG5WZmZuVXladHoyTVJiazVVN2dpTjExMldlbXBNTmQAEGZha2VQdXp6bGVTd2FwU0MCIzNNczhmcWJYTTRSaG1NNkNQVHI0NGhVd0hlMkNDbVZDZlZBAA51c2RuQWRkcmVzc1N0cgIsMjVGRXFFalJrcUs2eUNraVQ3THo2U0FZejdnVUZDdHhmQ0NobnJWRkQ1QVQAD3dhdmVzMkxUb2tlblN0cgIsR1E5UU5WTEdmWVNiTlo0ZFM4TlJ5dkdHRUxaTDRzV1BLaVZqODhDVjFySkwBDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAADAWkBCW1pbnRMb25nMgADAwkBAiE9AgkAkAMBCAUB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HJG1hdGNoMAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQt1c2VyQWRkcmVzcwIJX3JlZGVlbWVkBRNyZWRlZW1lZEFtb3VudFZhbHVlBQNuaWwJAAIBAhdJbmNvcnJlY3QgaW52b2tlIHJlc3VsdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXlaLamm", "height": 2761255, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fuhqu4tfnX2mAgBY8AnwK7jfX2RrmnBN82hzetXaKqVb Next: A44whh6sSJckeuCdPtNijTdWGFnTeBY4tFbVM2BE15rZ Diff:
Old | New | Differences | |
---|---|---|---|
44 | 44 | then { | |
45 | 45 | let q = [70, 49, 34, 24, 17] | |
46 | 46 | func r (s,t) = { | |
47 | - | let u = invoke(addressFromStringValue( | |
47 | + | let u = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), ((o * s) / 100)], nil) | |
48 | 48 | if ((u == u)) | |
49 | 49 | then { | |
50 | - | let v = | |
51 | - | if ((v | |
50 | + | let v = u | |
51 | + | if ($isInstanceOf(v, "Int")) | |
52 | 52 | then { | |
53 | 53 | let w = v | |
54 | - | if ($isInstanceOf(w, "Int")) | |
55 | - | then { | |
56 | - | let x = w | |
57 | - | (s + t) | |
58 | - | } | |
59 | - | else throw("Incorrect invoke result") | |
54 | + | (s + t) | |
60 | 55 | } | |
61 | - | else throw(" | |
56 | + | else throw("Incorrect invoke result") | |
62 | 57 | } | |
63 | 58 | else throw("Strict value is not equal to itself.") | |
64 | 59 | } | |
65 | 60 | ||
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | func | |
71 | - | then | |
72 | - | else r( | |
61 | + | let x = { | |
62 | + | let y = q | |
63 | + | let z = size(y) | |
64 | + | let A = 0 | |
65 | + | func B (C,D) = if ((D >= z)) | |
66 | + | then C | |
67 | + | else r(C, y[D]) | |
73 | 68 | ||
74 | - | func | |
75 | - | then | |
69 | + | func E (C,D) = if ((D >= z)) | |
70 | + | then C | |
76 | 71 | else throw("List size exceeds 5") | |
77 | 72 | ||
78 | - | | |
73 | + | E(B(B(B(B(B(A, 0), 1), 2), 3), 4), 5) | |
79 | 74 | } | |
80 | - | [ScriptTransfer(k.caller, ((o * | |
75 | + | [ScriptTransfer(k.caller, ((o * x) / 100), b)] | |
81 | 76 | } | |
82 | 77 | else throw("Strict value is not equal to itself.") | |
83 | 78 | } | |
109 | 104 | let q = [70, 49, 34, 24, 17] | |
110 | 105 | func r (s,t) = (s + t) | |
111 | 106 | ||
112 | - | let | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | func | |
117 | - | then | |
118 | - | else r( | |
107 | + | let x = { | |
108 | + | let y = q | |
109 | + | let z = size(y) | |
110 | + | let A = 0 | |
111 | + | func B (C,D) = if ((D >= z)) | |
112 | + | then C | |
113 | + | else r(C, y[D]) | |
119 | 114 | ||
120 | - | func | |
121 | - | then | |
115 | + | func E (C,D) = if ((D >= z)) | |
116 | + | then C | |
122 | 117 | else throw("List size exceeds 5") | |
123 | 118 | ||
124 | - | | |
119 | + | E(B(B(B(B(B(A, 0), 1), 2), 3), 4), 5) | |
125 | 120 | } | |
126 | - | [IntegerEntry("res", | |
121 | + | [IntegerEntry("res", x), IntegerEntry("firstAmountIn", l), IntegerEntry("firstSwappedAmountValue", o), ScriptTransfer(k.caller, ((o * x) / 100), b)] | |
127 | 122 | } | |
128 | 123 | else throw("Strict value is not equal to itself.") | |
129 | 124 | } | |
135 | 130 | ||
136 | 131 | ||
137 | 132 | @Callable(k) | |
138 | - | func redeem ( | |
139 | - | let | |
140 | - | let | |
141 | - | if (( | |
133 | + | func redeem (F) = { | |
134 | + | let G = toString(k.caller) | |
135 | + | let H = invoke(addressFromStringValue(d), "swapToUSDN", [F, G], nil) | |
136 | + | if ((H == H)) | |
142 | 137 | then { | |
143 | - | let i = | |
138 | + | let i = H | |
144 | 139 | if ($isInstanceOf(i, "Int")) | |
145 | 140 | then { | |
146 | - | let | |
147 | - | [IntegerEntry(( | |
141 | + | let I = i | |
142 | + | [IntegerEntry((G + "_redeemed"), I)] | |
148 | 143 | } | |
149 | 144 | else throw("Incorrect invoke result") | |
150 | 145 | } | |
152 | 147 | } | |
153 | 148 | ||
154 | 149 | ||
155 | - | @Verifier( | |
156 | - | func | |
150 | + | @Verifier(J) | |
151 | + | func K () = sigVerify(J.bodyBytes, J.proofs[0], J.senderPublicKey) | |
157 | 152 |
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 | - | let u = invoke(addressFromStringValue( | |
47 | + | let u = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), ((o * s) / 100)], nil) | |
48 | 48 | if ((u == u)) | |
49 | 49 | then { | |
50 | - | let v = | |
51 | - | if ((v | |
50 | + | let v = u | |
51 | + | if ($isInstanceOf(v, "Int")) | |
52 | 52 | then { | |
53 | 53 | let w = v | |
54 | - | if ($isInstanceOf(w, "Int")) | |
55 | - | then { | |
56 | - | let x = w | |
57 | - | (s + t) | |
58 | - | } | |
59 | - | else throw("Incorrect invoke result") | |
54 | + | (s + t) | |
60 | 55 | } | |
61 | - | else throw(" | |
56 | + | else throw("Incorrect invoke result") | |
62 | 57 | } | |
63 | 58 | else throw("Strict value is not equal to itself.") | |
64 | 59 | } | |
65 | 60 | ||
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | func | |
71 | - | then | |
72 | - | else r( | |
61 | + | let x = { | |
62 | + | let y = q | |
63 | + | let z = size(y) | |
64 | + | let A = 0 | |
65 | + | func B (C,D) = if ((D >= z)) | |
66 | + | then C | |
67 | + | else r(C, y[D]) | |
73 | 68 | ||
74 | - | func | |
75 | - | then | |
69 | + | func E (C,D) = if ((D >= z)) | |
70 | + | then C | |
76 | 71 | else throw("List size exceeds 5") | |
77 | 72 | ||
78 | - | | |
73 | + | E(B(B(B(B(B(A, 0), 1), 2), 3), 4), 5) | |
79 | 74 | } | |
80 | - | [ScriptTransfer(k.caller, ((o * | |
75 | + | [ScriptTransfer(k.caller, ((o * x) / 100), b)] | |
81 | 76 | } | |
82 | 77 | else throw("Strict value is not equal to itself.") | |
83 | 78 | } | |
84 | 79 | else throw("Incorrect invoke result") | |
85 | 80 | } | |
86 | 81 | else throw("Strict value is not equal to itself.") | |
87 | 82 | } | |
88 | 83 | ||
89 | 84 | ||
90 | 85 | ||
91 | 86 | @Callable(k) | |
92 | 87 | func mintLong2_test () = if (if ((size(k.payments) != 1)) | |
93 | 88 | then true | |
94 | 89 | else (k.payments[0].amount == 0)) | |
95 | 90 | then throw("1 payment has to be attached mint") | |
96 | 91 | else { | |
97 | 92 | let l = k.payments[0].amount | |
98 | 93 | let m = toString(k.caller) | |
99 | 94 | let n = invoke(addressFromStringValue(d), "swapToWaves", [toString(k.caller), l], nil) | |
100 | 95 | if ((n == n)) | |
101 | 96 | then { | |
102 | 97 | let i = n | |
103 | 98 | if ($isInstanceOf(i, "Int")) | |
104 | 99 | then { | |
105 | 100 | let o = i | |
106 | 101 | let p = invoke(addressFromStringValue(c), "supply", nil, [AttachedPayment(unit, o)]) | |
107 | 102 | if ((p == p)) | |
108 | 103 | then { | |
109 | 104 | let q = [70, 49, 34, 24, 17] | |
110 | 105 | func r (s,t) = (s + t) | |
111 | 106 | ||
112 | - | let | |
113 | - | let | |
114 | - | let | |
115 | - | let | |
116 | - | func | |
117 | - | then | |
118 | - | else r( | |
107 | + | let x = { | |
108 | + | let y = q | |
109 | + | let z = size(y) | |
110 | + | let A = 0 | |
111 | + | func B (C,D) = if ((D >= z)) | |
112 | + | then C | |
113 | + | else r(C, y[D]) | |
119 | 114 | ||
120 | - | func | |
121 | - | then | |
115 | + | func E (C,D) = if ((D >= z)) | |
116 | + | then C | |
122 | 117 | else throw("List size exceeds 5") | |
123 | 118 | ||
124 | - | | |
119 | + | E(B(B(B(B(B(A, 0), 1), 2), 3), 4), 5) | |
125 | 120 | } | |
126 | - | [IntegerEntry("res", | |
121 | + | [IntegerEntry("res", x), IntegerEntry("firstAmountIn", l), IntegerEntry("firstSwappedAmountValue", o), ScriptTransfer(k.caller, ((o * x) / 100), b)] | |
127 | 122 | } | |
128 | 123 | else throw("Strict value is not equal to itself.") | |
129 | 124 | } | |
130 | 125 | else throw("Incorrect invoke result") | |
131 | 126 | } | |
132 | 127 | else throw("Strict value is not equal to itself.") | |
133 | 128 | } | |
134 | 129 | ||
135 | 130 | ||
136 | 131 | ||
137 | 132 | @Callable(k) | |
138 | - | func redeem ( | |
139 | - | let | |
140 | - | let | |
141 | - | if (( | |
133 | + | func redeem (F) = { | |
134 | + | let G = toString(k.caller) | |
135 | + | let H = invoke(addressFromStringValue(d), "swapToUSDN", [F, G], nil) | |
136 | + | if ((H == H)) | |
142 | 137 | then { | |
143 | - | let i = | |
138 | + | let i = H | |
144 | 139 | if ($isInstanceOf(i, "Int")) | |
145 | 140 | then { | |
146 | - | let | |
147 | - | [IntegerEntry(( | |
141 | + | let I = i | |
142 | + | [IntegerEntry((G + "_redeemed"), I)] | |
148 | 143 | } | |
149 | 144 | else throw("Incorrect invoke result") | |
150 | 145 | } | |
151 | 146 | else throw("Strict value is not equal to itself.") | |
152 | 147 | } | |
153 | 148 | ||
154 | 149 | ||
155 | - | @Verifier( | |
156 | - | func | |
150 | + | @Verifier(J) | |
151 | + | func K () = sigVerify(J.bodyBytes, J.proofs[0], J.senderPublicKey) | |
157 | 152 |
github/deemru/w8io/169f3d6 60.38 ms ◑