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