tx · DufuYD9u5wXSXHa6inCHyfBFAYfTmZsR85hHpi7s7Agq
3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T: -0.00400000 Waves
2024.09.26 09:05 [3300196] smart account 3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T > SELF 0.00000000 Waves
{
"type": 13,
"id": "DufuYD9u5wXSXHa6inCHyfBFAYfTmZsR85hHpi7s7Agq",
"fee": 400000,
"feeAssetId": null,
"timestamp": 1727330762875,
"version": 2,
"chainId": 84,
"sender": "3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T",
"senderPublicKey": "iTiQR3Kvxn7i8PFgEbZn36n5iFLxFwkTA6M3wi846Vx",
"proofs": [
"fSpY3Tc9buWJfBA5HjL8JovFRc51XuXrPAUryiwZBjFxJL4zid3Foejkb7KWqgDuyva8fnysoAKZJS48FwayBmX"
],
"script": "base64:BwJLCAISAwoBCBIECgIICBIECgIIARIECgIIBBIECgIIAhIDCgEIEgUKAwIBBBIECgICARIFCgMCAQISBQoDAhIREgQKAgIBEgQKAggYEQAJc2VwYXJhdG9yAgJfXwALd2F2ZXNTdHJpbmcCBVdBVkVTABBjb250cmFjdEZpbGVuYW1lAhRtZW1lX2ltX2ZhY3RvcnkucmlkZQALa1ByaWNlQXNzZXQCDHByaWNlX19hc3NldAAJa1NodXRkb3duAg5zaHV0ZG93bl9fZmxhZwAIc2h1dGRvd24JAQt2YWx1ZU9yRWxzZQIJAKAIAQUJa1NodXRkb3duBwEHd3JhcEVycgEBcwkArAICCQCsAgIFEGNvbnRyYWN0RmlsZW5hbWUCAjogBQFzAQh0aHJvd0VycgEBcwkAAgEJAQd3cmFwRXJyAQUBcwEPdmFsaWRhdGVBZGRyZXNzAQdhZGRyZXNzCQEJaXNEZWZpbmVkAQkApggBBQdhZGRyZXNzABJrQ2FsY3VsYXRvckFkZHJlc3MCE2NhbGN1bGF0b3JfX2FkZHJlc3MAF2NhbGN1bGF0b3JBZGRyZXNzT3B0aW9uBA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CUCgIFA25pbAUGcmVzdWx0AJ7SxsM=",
"height": 3300196,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: kRCDW286NqnJjmQ3Nt1MuK4xUYDmTFjP7f5jmcPvEED
Next: 9qU7EAnwWLH1QGDQ1rLaqUkncccAESQxL1TLBzpDcTNG
Diff:
Old | New | | Differences |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "meme_im_factory.ride" |
---|
9 | 9 | | |
---|
10 | | - | let d = "shutdown__flag" |
---|
| 10 | + | let d = "price__asset" |
---|
11 | 11 | | |
---|
12 | | - | let e = valueOrElse(getBoolean(d), false) |
---|
| 12 | + | let e = "shutdown__flag" |
---|
13 | 13 | | |
---|
14 | | - | func f (g) = ((c + ": ") + g) |
---|
| 14 | + | let f = valueOrElse(getBoolean(e), false) |
---|
| 15 | + | |
---|
| 16 | + | func g (h) = ((c + ": ") + h) |
---|
15 | 17 | | |
---|
16 | 18 | | |
---|
17 | | - | func h (g) = throw(f(g)) |
---|
| 19 | + | func i (h) = throw(g(h)) |
---|
18 | 20 | | |
---|
19 | 21 | | |
---|
20 | | - | func i (j) = isDefined(addressFromString(j)) |
---|
| 22 | + | func j (k) = isDefined(addressFromString(k)) |
---|
21 | 23 | | |
---|
22 | 24 | | |
---|
23 | | - | let k = "calculator__address" |
---|
| 25 | + | let l = "calculator__address" |
---|
24 | 26 | | |
---|
25 | | - | let l = { |
---|
26 | | - | let m = getString(this, k) |
---|
27 | | - | if ($isInstanceOf(m, "String")) |
---|
| 27 | + | let m = { |
---|
| 28 | + | let n = getString(this, l) |
---|
| 29 | + | if ($isInstanceOf(n, "String")) |
---|
28 | 30 | | then { |
---|
29 | | - | let g = m |
---|
30 | | - | addressFromString(g) |
---|
| 31 | + | let h = n |
---|
| 32 | + | addressFromString(h) |
---|
31 | 33 | | } |
---|
32 | | - | else if ($isInstanceOf(m, "Unit")) |
---|
| 34 | + | else if ($isInstanceOf(n, "Unit")) |
---|
33 | 35 | | then unit |
---|
34 | 36 | | else throw("Match error") |
---|
35 | 37 | | } |
---|
36 | 38 | | |
---|
37 | | - | let n = valueOrErrorMessage(l, f("invalid calculator address")) |
---|
| 39 | + | let o = valueOrErrorMessage(m, g("invalid calculator address")) |
---|
38 | 40 | | |
---|
39 | | - | func o (p,j) = if ((p.caller == j)) |
---|
| 41 | + | func p (q,k) = if ((q.caller == k)) |
---|
40 | 42 | | then true |
---|
41 | | - | else h("permission denied") |
---|
| 43 | + | else i("permission denied") |
---|
42 | 44 | | |
---|
43 | 45 | | |
---|
44 | | - | func q (p) = o(p, this) |
---|
| 46 | + | func r (q) = p(q, this) |
---|
45 | 47 | | |
---|
46 | 48 | | |
---|
47 | | - | func r (p) = o(p, n) |
---|
| 49 | + | func s (q) = p(q, o) |
---|
48 | 50 | | |
---|
49 | 51 | | |
---|
50 | | - | func s (t) = if ((t == b)) |
---|
| 52 | + | func t (u) = if ((u == b)) |
---|
51 | 53 | | then unit |
---|
52 | | - | else fromBase58String(t) |
---|
| 54 | + | else fromBase58String(u) |
---|
53 | 55 | | |
---|
54 | 56 | | |
---|
55 | | - | func u (t) = if ((t == unit)) |
---|
| 57 | + | func v (u) = if ((u == unit)) |
---|
56 | 58 | | then b |
---|
57 | | - | else toBase58String(value(t)) |
---|
| 59 | + | else toBase58String(value(u)) |
---|
58 | 60 | | |
---|
59 | 61 | | |
---|
60 | | - | @Callable(p) |
---|
61 | | - | func init (v) = { |
---|
62 | | - | let w = q(p) |
---|
63 | | - | if ((w == w)) |
---|
64 | | - | then $Tuple2([StringEntry(k, v), StringEntry("price__asset", b)], unit) |
---|
| 62 | + | @Callable(q) |
---|
| 63 | + | func init (w) = { |
---|
| 64 | + | let x = r(q) |
---|
| 65 | + | if ((x == x)) |
---|
| 66 | + | then $Tuple2([StringEntry(l, w), StringEntry(d, b)], unit) |
---|
65 | 67 | | else throw("Strict value is not equal to itself.") |
---|
66 | 68 | | } |
---|
67 | 69 | | |
---|
68 | 70 | | |
---|
69 | 71 | | |
---|
70 | | - | @Callable(p) |
---|
71 | | - | func stringEntry (x,y) = if (if (!(e)) |
---|
72 | | - | then r(p) |
---|
| 72 | + | @Callable(q) |
---|
| 73 | + | func stringEntry (y,z) = if (if (!(f)) |
---|
| 74 | + | then s(q) |
---|
73 | 75 | | else false) |
---|
74 | | - | then $Tuple2([StringEntry(x, y)], x) |
---|
75 | | - | else h("not allowed") |
---|
| 76 | + | then $Tuple2([StringEntry(y, z)], y) |
---|
| 77 | + | else i("not allowed") |
---|
76 | 78 | | |
---|
77 | 79 | | |
---|
78 | 80 | | |
---|
79 | | - | @Callable(p) |
---|
80 | | - | func integerEntry (x,y) = if (if (!(e)) |
---|
81 | | - | then r(p) |
---|
| 81 | + | @Callable(q) |
---|
| 82 | + | func integerEntry (y,z) = if (if (!(f)) |
---|
| 83 | + | then s(q) |
---|
82 | 84 | | else false) |
---|
83 | | - | then $Tuple2([IntegerEntry(x, y)], x) |
---|
84 | | - | else h("not allowed") |
---|
| 85 | + | then $Tuple2([IntegerEntry(y, z)], y) |
---|
| 86 | + | else i("not allowed") |
---|
85 | 87 | | |
---|
86 | 88 | | |
---|
87 | 89 | | |
---|
88 | | - | @Callable(p) |
---|
89 | | - | func booleanEntry (x,y) = if (if (!(e)) |
---|
90 | | - | then r(p) |
---|
| 90 | + | @Callable(q) |
---|
| 91 | + | func booleanEntry (y,z) = if (if (!(f)) |
---|
| 92 | + | then s(q) |
---|
91 | 93 | | else false) |
---|
92 | | - | then $Tuple2([BooleanEntry(x, y)], x) |
---|
93 | | - | else h("not allowed") |
---|
| 94 | + | then $Tuple2([BooleanEntry(y, z)], y) |
---|
| 95 | + | else i("not allowed") |
---|
94 | 96 | | |
---|
95 | 97 | | |
---|
96 | 98 | | |
---|
97 | | - | @Callable(p) |
---|
98 | | - | func binaryEntry (x,y) = if (if (!(e)) |
---|
99 | | - | then r(p) |
---|
| 99 | + | @Callable(q) |
---|
| 100 | + | func binaryEntry (y,z) = if (if (!(f)) |
---|
| 101 | + | then s(q) |
---|
100 | 102 | | else false) |
---|
101 | | - | then $Tuple2([BinaryEntry(x, y)], x) |
---|
102 | | - | else h("not allowed") |
---|
| 103 | + | then $Tuple2([BinaryEntry(y, z)], y) |
---|
| 104 | + | else i("not allowed") |
---|
103 | 105 | | |
---|
104 | 106 | | |
---|
105 | 107 | | |
---|
106 | | - | @Callable(p) |
---|
107 | | - | func deleteEntry (x) = if (if (!(e)) |
---|
108 | | - | then r(p) |
---|
| 108 | + | @Callable(q) |
---|
| 109 | + | func deleteEntry (y) = if (if (!(f)) |
---|
| 110 | + | then s(q) |
---|
109 | 111 | | else false) |
---|
110 | | - | then $Tuple2([DeleteEntry(x)], x) |
---|
111 | | - | else h("not allowed") |
---|
| 112 | + | then $Tuple2([DeleteEntry(y)], y) |
---|
| 113 | + | else i("not allowed") |
---|
112 | 114 | | |
---|
113 | 115 | | |
---|
114 | 116 | | |
---|
115 | | - | @Callable(p) |
---|
116 | | - | func reissue (z,A,B) = if (if (!(e)) |
---|
117 | | - | then r(p) |
---|
| 117 | + | @Callable(q) |
---|
| 118 | + | func reissue (A,B,C) = if (if (!(f)) |
---|
| 119 | + | then s(q) |
---|
118 | 120 | | else false) |
---|
119 | | - | then $Tuple2([Reissue(z, A, B)], A) |
---|
120 | | - | else h("not allowed") |
---|
| 121 | + | then $Tuple2([Reissue(A, B, C)], B) |
---|
| 122 | + | else i("not allowed") |
---|
121 | 123 | | |
---|
122 | 124 | | |
---|
123 | 125 | | |
---|
124 | | - | @Callable(p) |
---|
125 | | - | func burn (z,A) = if (if (!(e)) |
---|
126 | | - | then r(p) |
---|
| 126 | + | @Callable(q) |
---|
| 127 | + | func burn (A,B) = if (if (!(f)) |
---|
| 128 | + | then s(q) |
---|
127 | 129 | | else false) |
---|
128 | | - | then $Tuple2([Burn(z, A)], A) |
---|
129 | | - | else h("not allowed") |
---|
| 130 | + | then $Tuple2([Burn(A, B)], B) |
---|
| 131 | + | else i("not allowed") |
---|
130 | 132 | | |
---|
131 | 133 | | |
---|
132 | 134 | | |
---|
133 | | - | @Callable(p) |
---|
134 | | - | func transferAsset (C,A,z) = if (if (!(e)) |
---|
135 | | - | then r(p) |
---|
| 135 | + | @Callable(q) |
---|
| 136 | + | func transferAsset (D,B,A) = if (if (!(f)) |
---|
| 137 | + | then s(q) |
---|
136 | 138 | | else false) |
---|
137 | | - | then $Tuple2([ScriptTransfer(Address(C), A, z)], A) |
---|
138 | | - | else h("not allowed") |
---|
| 139 | + | then $Tuple2([ScriptTransfer(Address(D), B, A)], B) |
---|
| 140 | + | else i("not allowed") |
---|
139 | 141 | | |
---|
140 | 142 | | |
---|
141 | 143 | | |
---|
142 | | - | @Callable(p) |
---|
143 | | - | func transferAssets (C,D,E) = if (if (!(e)) |
---|
144 | | - | then r(p) |
---|
| 144 | + | @Callable(q) |
---|
| 145 | + | func transferAssets (D,E,F) = if (if (!(f)) |
---|
| 146 | + | then s(q) |
---|
145 | 147 | | else false) |
---|
146 | 148 | | then { |
---|
147 | | - | func F (G,H) = { |
---|
148 | | - | let I = G |
---|
149 | | - | let J = I._1 |
---|
150 | | - | let K = I._2 |
---|
151 | | - | let L = ScriptTransfer(Address(C), E[K], D[K]) |
---|
152 | | - | let M = (J :+ L) |
---|
153 | | - | $Tuple2(M, (K + 1)) |
---|
| 149 | + | func G (H,I) = { |
---|
| 150 | + | let J = H |
---|
| 151 | + | let K = J._1 |
---|
| 152 | + | let L = J._2 |
---|
| 153 | + | let M = ScriptTransfer(Address(D), F[L], E[L]) |
---|
| 154 | + | let N = (K :+ M) |
---|
| 155 | + | $Tuple2(N, (L + 1)) |
---|
154 | 156 | | } |
---|
155 | 157 | | |
---|
156 | | - | let N = { |
---|
157 | | - | let O = D |
---|
158 | | - | let P = size(O) |
---|
159 | | - | let Q = $Tuple2(nil, 0) |
---|
160 | | - | func R (S,T) = if ((T >= P)) |
---|
161 | | - | then S |
---|
162 | | - | else F(S, O[T]) |
---|
| 158 | + | let O = { |
---|
| 159 | + | let P = E |
---|
| 160 | + | let Q = size(P) |
---|
| 161 | + | let R = $Tuple2(nil, 0) |
---|
| 162 | + | func S (T,U) = if ((U >= Q)) |
---|
| 163 | + | then T |
---|
| 164 | + | else G(T, P[U]) |
---|
163 | 165 | | |
---|
164 | | - | func U (S,T) = if ((T >= P)) |
---|
165 | | - | then S |
---|
| 166 | + | func V (T,U) = if ((U >= Q)) |
---|
| 167 | + | then T |
---|
166 | 168 | | else throw("List size exceeds 10") |
---|
167 | 169 | | |
---|
168 | | - | U(R(R(R(R(R(R(R(R(R(R(Q, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) |
---|
| 170 | + | V(S(S(S(S(S(S(S(S(S(S(R, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) |
---|
169 | 171 | | } |
---|
170 | | - | let V = N._1 |
---|
171 | | - | let W = N._2 |
---|
172 | | - | $Tuple2(V, unit) |
---|
| 172 | + | let W = O._1 |
---|
| 173 | + | let X = O._2 |
---|
| 174 | + | $Tuple2(W, unit) |
---|
173 | 175 | | } |
---|
174 | | - | else h("not allowed") |
---|
| 176 | + | else i("not allowed") |
---|
175 | 177 | | |
---|
176 | 178 | | |
---|
177 | 179 | | |
---|
178 | | - | @Callable(p) |
---|
179 | | - | func transferWaves (C,A) = if (if (!(e)) |
---|
180 | | - | then r(p) |
---|
| 180 | + | @Callable(q) |
---|
| 181 | + | func transferWaves (D,B) = if (if (!(f)) |
---|
| 182 | + | then s(q) |
---|
181 | 183 | | else false) |
---|
182 | | - | then $Tuple2([ScriptTransfer(Address(C), A, unit)], A) |
---|
183 | | - | else h("not allowed") |
---|
| 184 | + | then $Tuple2([ScriptTransfer(Address(D), B, unit)], B) |
---|
| 185 | + | else i("not allowed") |
---|
184 | 186 | | |
---|
185 | 187 | | |
---|
186 | 188 | | |
---|
187 | | - | @Callable(p) |
---|
188 | | - | func call (X,Y) = { |
---|
189 | | - | let Z = if ((p.callerPublicKey == base58'11111111111111111111111111111111')) |
---|
| 189 | + | @Callable(q) |
---|
| 190 | + | func call (Y,Z) = { |
---|
| 191 | + | let aa = if ((q.callerPublicKey == base58'11111111111111111111111111111111')) |
---|
190 | 192 | | then nil |
---|
191 | | - | else p.payments |
---|
192 | | - | let aa = reentrantInvoke(n, X, [p.callerPublicKey, Y], Z) |
---|
193 | | - | $Tuple2(nil, aa) |
---|
| 193 | + | else q.payments |
---|
| 194 | + | let ab = reentrantInvoke(o, Y, [q.callerPublicKey, Z], aa) |
---|
| 195 | + | $Tuple2(nil, ab) |
---|
194 | 196 | | } |
---|
195 | 197 | | |
---|
196 | 198 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 7 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "__" |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "WAVES" |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "meme_im_factory.ride" |
---|
9 | 9 | | |
---|
10 | | - | let d = "shutdown__flag" |
---|
| 10 | + | let d = "price__asset" |
---|
11 | 11 | | |
---|
12 | | - | let e = valueOrElse(getBoolean(d), false) |
---|
| 12 | + | let e = "shutdown__flag" |
---|
13 | 13 | | |
---|
14 | | - | func f (g) = ((c + ": ") + g) |
---|
| 14 | + | let f = valueOrElse(getBoolean(e), false) |
---|
| 15 | + | |
---|
| 16 | + | func g (h) = ((c + ": ") + h) |
---|
15 | 17 | | |
---|
16 | 18 | | |
---|
17 | | - | func h (g) = throw(f(g)) |
---|
| 19 | + | func i (h) = throw(g(h)) |
---|
18 | 20 | | |
---|
19 | 21 | | |
---|
20 | | - | func i (j) = isDefined(addressFromString(j)) |
---|
| 22 | + | func j (k) = isDefined(addressFromString(k)) |
---|
21 | 23 | | |
---|
22 | 24 | | |
---|
23 | | - | let k = "calculator__address" |
---|
| 25 | + | let l = "calculator__address" |
---|
24 | 26 | | |
---|
25 | | - | let l = { |
---|
26 | | - | let m = getString(this, k) |
---|
27 | | - | if ($isInstanceOf(m, "String")) |
---|
| 27 | + | let m = { |
---|
| 28 | + | let n = getString(this, l) |
---|
| 29 | + | if ($isInstanceOf(n, "String")) |
---|
28 | 30 | | then { |
---|
29 | | - | let g = m |
---|
30 | | - | addressFromString(g) |
---|
| 31 | + | let h = n |
---|
| 32 | + | addressFromString(h) |
---|
31 | 33 | | } |
---|
32 | | - | else if ($isInstanceOf(m, "Unit")) |
---|
| 34 | + | else if ($isInstanceOf(n, "Unit")) |
---|
33 | 35 | | then unit |
---|
34 | 36 | | else throw("Match error") |
---|
35 | 37 | | } |
---|
36 | 38 | | |
---|
37 | | - | let n = valueOrErrorMessage(l, f("invalid calculator address")) |
---|
| 39 | + | let o = valueOrErrorMessage(m, g("invalid calculator address")) |
---|
38 | 40 | | |
---|
39 | | - | func o (p,j) = if ((p.caller == j)) |
---|
| 41 | + | func p (q,k) = if ((q.caller == k)) |
---|
40 | 42 | | then true |
---|
41 | | - | else h("permission denied") |
---|
| 43 | + | else i("permission denied") |
---|
42 | 44 | | |
---|
43 | 45 | | |
---|
44 | | - | func q (p) = o(p, this) |
---|
| 46 | + | func r (q) = p(q, this) |
---|
45 | 47 | | |
---|
46 | 48 | | |
---|
47 | | - | func r (p) = o(p, n) |
---|
| 49 | + | func s (q) = p(q, o) |
---|
48 | 50 | | |
---|
49 | 51 | | |
---|
50 | | - | func s (t) = if ((t == b)) |
---|
| 52 | + | func t (u) = if ((u == b)) |
---|
51 | 53 | | then unit |
---|
52 | | - | else fromBase58String(t) |
---|
| 54 | + | else fromBase58String(u) |
---|
53 | 55 | | |
---|
54 | 56 | | |
---|
55 | | - | func u (t) = if ((t == unit)) |
---|
| 57 | + | func v (u) = if ((u == unit)) |
---|
56 | 58 | | then b |
---|
57 | | - | else toBase58String(value(t)) |
---|
| 59 | + | else toBase58String(value(u)) |
---|
58 | 60 | | |
---|
59 | 61 | | |
---|
60 | | - | @Callable(p) |
---|
61 | | - | func init (v) = { |
---|
62 | | - | let w = q(p) |
---|
63 | | - | if ((w == w)) |
---|
64 | | - | then $Tuple2([StringEntry(k, v), StringEntry("price__asset", b)], unit) |
---|
| 62 | + | @Callable(q) |
---|
| 63 | + | func init (w) = { |
---|
| 64 | + | let x = r(q) |
---|
| 65 | + | if ((x == x)) |
---|
| 66 | + | then $Tuple2([StringEntry(l, w), StringEntry(d, b)], unit) |
---|
65 | 67 | | else throw("Strict value is not equal to itself.") |
---|
66 | 68 | | } |
---|
67 | 69 | | |
---|
68 | 70 | | |
---|
69 | 71 | | |
---|
70 | | - | @Callable(p) |
---|
71 | | - | func stringEntry (x,y) = if (if (!(e)) |
---|
72 | | - | then r(p) |
---|
| 72 | + | @Callable(q) |
---|
| 73 | + | func stringEntry (y,z) = if (if (!(f)) |
---|
| 74 | + | then s(q) |
---|
73 | 75 | | else false) |
---|
74 | | - | then $Tuple2([StringEntry(x, y)], x) |
---|
75 | | - | else h("not allowed") |
---|
| 76 | + | then $Tuple2([StringEntry(y, z)], y) |
---|
| 77 | + | else i("not allowed") |
---|
76 | 78 | | |
---|
77 | 79 | | |
---|
78 | 80 | | |
---|
79 | | - | @Callable(p) |
---|
80 | | - | func integerEntry (x,y) = if (if (!(e)) |
---|
81 | | - | then r(p) |
---|
| 81 | + | @Callable(q) |
---|
| 82 | + | func integerEntry (y,z) = if (if (!(f)) |
---|
| 83 | + | then s(q) |
---|
82 | 84 | | else false) |
---|
83 | | - | then $Tuple2([IntegerEntry(x, y)], x) |
---|
84 | | - | else h("not allowed") |
---|
| 85 | + | then $Tuple2([IntegerEntry(y, z)], y) |
---|
| 86 | + | else i("not allowed") |
---|
85 | 87 | | |
---|
86 | 88 | | |
---|
87 | 89 | | |
---|
88 | | - | @Callable(p) |
---|
89 | | - | func booleanEntry (x,y) = if (if (!(e)) |
---|
90 | | - | then r(p) |
---|
| 90 | + | @Callable(q) |
---|
| 91 | + | func booleanEntry (y,z) = if (if (!(f)) |
---|
| 92 | + | then s(q) |
---|
91 | 93 | | else false) |
---|
92 | | - | then $Tuple2([BooleanEntry(x, y)], x) |
---|
93 | | - | else h("not allowed") |
---|
| 94 | + | then $Tuple2([BooleanEntry(y, z)], y) |
---|
| 95 | + | else i("not allowed") |
---|
94 | 96 | | |
---|
95 | 97 | | |
---|
96 | 98 | | |
---|
97 | | - | @Callable(p) |
---|
98 | | - | func binaryEntry (x,y) = if (if (!(e)) |
---|
99 | | - | then r(p) |
---|
| 99 | + | @Callable(q) |
---|
| 100 | + | func binaryEntry (y,z) = if (if (!(f)) |
---|
| 101 | + | then s(q) |
---|
100 | 102 | | else false) |
---|
101 | | - | then $Tuple2([BinaryEntry(x, y)], x) |
---|
102 | | - | else h("not allowed") |
---|
| 103 | + | then $Tuple2([BinaryEntry(y, z)], y) |
---|
| 104 | + | else i("not allowed") |
---|
103 | 105 | | |
---|
104 | 106 | | |
---|
105 | 107 | | |
---|
106 | | - | @Callable(p) |
---|
107 | | - | func deleteEntry (x) = if (if (!(e)) |
---|
108 | | - | then r(p) |
---|
| 108 | + | @Callable(q) |
---|
| 109 | + | func deleteEntry (y) = if (if (!(f)) |
---|
| 110 | + | then s(q) |
---|
109 | 111 | | else false) |
---|
110 | | - | then $Tuple2([DeleteEntry(x)], x) |
---|
111 | | - | else h("not allowed") |
---|
| 112 | + | then $Tuple2([DeleteEntry(y)], y) |
---|
| 113 | + | else i("not allowed") |
---|
112 | 114 | | |
---|
113 | 115 | | |
---|
114 | 116 | | |
---|
115 | | - | @Callable(p) |
---|
116 | | - | func reissue (z,A,B) = if (if (!(e)) |
---|
117 | | - | then r(p) |
---|
| 117 | + | @Callable(q) |
---|
| 118 | + | func reissue (A,B,C) = if (if (!(f)) |
---|
| 119 | + | then s(q) |
---|
118 | 120 | | else false) |
---|
119 | | - | then $Tuple2([Reissue(z, A, B)], A) |
---|
120 | | - | else h("not allowed") |
---|
| 121 | + | then $Tuple2([Reissue(A, B, C)], B) |
---|
| 122 | + | else i("not allowed") |
---|
121 | 123 | | |
---|
122 | 124 | | |
---|
123 | 125 | | |
---|
124 | | - | @Callable(p) |
---|
125 | | - | func burn (z,A) = if (if (!(e)) |
---|
126 | | - | then r(p) |
---|
| 126 | + | @Callable(q) |
---|
| 127 | + | func burn (A,B) = if (if (!(f)) |
---|
| 128 | + | then s(q) |
---|
127 | 129 | | else false) |
---|
128 | | - | then $Tuple2([Burn(z, A)], A) |
---|
129 | | - | else h("not allowed") |
---|
| 130 | + | then $Tuple2([Burn(A, B)], B) |
---|
| 131 | + | else i("not allowed") |
---|
130 | 132 | | |
---|
131 | 133 | | |
---|
132 | 134 | | |
---|
133 | | - | @Callable(p) |
---|
134 | | - | func transferAsset (C,A,z) = if (if (!(e)) |
---|
135 | | - | then r(p) |
---|
| 135 | + | @Callable(q) |
---|
| 136 | + | func transferAsset (D,B,A) = if (if (!(f)) |
---|
| 137 | + | then s(q) |
---|
136 | 138 | | else false) |
---|
137 | | - | then $Tuple2([ScriptTransfer(Address(C), A, z)], A) |
---|
138 | | - | else h("not allowed") |
---|
| 139 | + | then $Tuple2([ScriptTransfer(Address(D), B, A)], B) |
---|
| 140 | + | else i("not allowed") |
---|
139 | 141 | | |
---|
140 | 142 | | |
---|
141 | 143 | | |
---|
142 | | - | @Callable(p) |
---|
143 | | - | func transferAssets (C,D,E) = if (if (!(e)) |
---|
144 | | - | then r(p) |
---|
| 144 | + | @Callable(q) |
---|
| 145 | + | func transferAssets (D,E,F) = if (if (!(f)) |
---|
| 146 | + | then s(q) |
---|
145 | 147 | | else false) |
---|
146 | 148 | | then { |
---|
147 | | - | func F (G,H) = { |
---|
148 | | - | let I = G |
---|
149 | | - | let J = I._1 |
---|
150 | | - | let K = I._2 |
---|
151 | | - | let L = ScriptTransfer(Address(C), E[K], D[K]) |
---|
152 | | - | let M = (J :+ L) |
---|
153 | | - | $Tuple2(M, (K + 1)) |
---|
| 149 | + | func G (H,I) = { |
---|
| 150 | + | let J = H |
---|
| 151 | + | let K = J._1 |
---|
| 152 | + | let L = J._2 |
---|
| 153 | + | let M = ScriptTransfer(Address(D), F[L], E[L]) |
---|
| 154 | + | let N = (K :+ M) |
---|
| 155 | + | $Tuple2(N, (L + 1)) |
---|
154 | 156 | | } |
---|
155 | 157 | | |
---|
156 | | - | let N = { |
---|
157 | | - | let O = D |
---|
158 | | - | let P = size(O) |
---|
159 | | - | let Q = $Tuple2(nil, 0) |
---|
160 | | - | func R (S,T) = if ((T >= P)) |
---|
161 | | - | then S |
---|
162 | | - | else F(S, O[T]) |
---|
| 158 | + | let O = { |
---|
| 159 | + | let P = E |
---|
| 160 | + | let Q = size(P) |
---|
| 161 | + | let R = $Tuple2(nil, 0) |
---|
| 162 | + | func S (T,U) = if ((U >= Q)) |
---|
| 163 | + | then T |
---|
| 164 | + | else G(T, P[U]) |
---|
163 | 165 | | |
---|
164 | | - | func U (S,T) = if ((T >= P)) |
---|
165 | | - | then S |
---|
| 166 | + | func V (T,U) = if ((U >= Q)) |
---|
| 167 | + | then T |
---|
166 | 168 | | else throw("List size exceeds 10") |
---|
167 | 169 | | |
---|
168 | | - | U(R(R(R(R(R(R(R(R(R(R(Q, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) |
---|
| 170 | + | V(S(S(S(S(S(S(S(S(S(S(R, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) |
---|
169 | 171 | | } |
---|
170 | | - | let V = N._1 |
---|
171 | | - | let W = N._2 |
---|
172 | | - | $Tuple2(V, unit) |
---|
| 172 | + | let W = O._1 |
---|
| 173 | + | let X = O._2 |
---|
| 174 | + | $Tuple2(W, unit) |
---|
173 | 175 | | } |
---|
174 | | - | else h("not allowed") |
---|
| 176 | + | else i("not allowed") |
---|
175 | 177 | | |
---|
176 | 178 | | |
---|
177 | 179 | | |
---|
178 | | - | @Callable(p) |
---|
179 | | - | func transferWaves (C,A) = if (if (!(e)) |
---|
180 | | - | then r(p) |
---|
| 180 | + | @Callable(q) |
---|
| 181 | + | func transferWaves (D,B) = if (if (!(f)) |
---|
| 182 | + | then s(q) |
---|
181 | 183 | | else false) |
---|
182 | | - | then $Tuple2([ScriptTransfer(Address(C), A, unit)], A) |
---|
183 | | - | else h("not allowed") |
---|
| 184 | + | then $Tuple2([ScriptTransfer(Address(D), B, unit)], B) |
---|
| 185 | + | else i("not allowed") |
---|
184 | 186 | | |
---|
185 | 187 | | |
---|
186 | 188 | | |
---|
187 | | - | @Callable(p) |
---|
188 | | - | func call (X,Y) = { |
---|
189 | | - | let Z = if ((p.callerPublicKey == base58'11111111111111111111111111111111')) |
---|
| 189 | + | @Callable(q) |
---|
| 190 | + | func call (Y,Z) = { |
---|
| 191 | + | let aa = if ((q.callerPublicKey == base58'11111111111111111111111111111111')) |
---|
190 | 192 | | then nil |
---|
191 | | - | else p.payments |
---|
192 | | - | let aa = reentrantInvoke(n, X, [p.callerPublicKey, Y], Z) |
---|
193 | | - | $Tuple2(nil, aa) |
---|
| 193 | + | else q.payments |
---|
| 194 | + | let ab = reentrantInvoke(o, Y, [q.callerPublicKey, Z], aa) |
---|
| 195 | + | $Tuple2(nil, ab) |
---|
194 | 196 | | } |
---|
195 | 197 | | |
---|
196 | 198 | | |
---|