tx · DymBmzh2M1L5H9jT1HDagRBfP92KBRLJtd4hujZ6JwnK 3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph: -0.01400000 Waves 2021.11.07 21:46 [1780970] smart account 3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph > SELF 0.00000000 Waves
{ "type": 13, "id": "DymBmzh2M1L5H9jT1HDagRBfP92KBRLJtd4hujZ6JwnK", "fee": 1400000, "feeAssetId": null, "timestamp": 1636310831156, "version": 2, "chainId": 84, "sender": "3N61Cvq5XcnPk9rxpy2Rnp3bSr4syNGUJph", "senderPublicKey": "G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD", "proofs": [ "39RYmG36qvYxgiDCoBX4SUDHaSvz3yUq1aWRiAmQj8yZfZ4Ket6QuagJGrro7FjRKo5mvKXjKtQi7bKALXXH6e8o" ], "script": "base64:AAIFAAAAAAAAACEIAhIAEgYKBBgYGBESBgoECAgBARIAEgMKAQgSBAoCCAEAAAAGAAAAAApkZXBvc2l0RmVlAAAAAAAAAAPoAAAAAA1jb250cm9sbGVyRmVlAAAAAAAAACcQAAAAAAtwbGF0Zm9ybUZlZQAAAAAAAAAnEAAAAAAMYWRtaW5QdWJLZXkxAQAAACDvKr/fUaQ4hMSae4iyf4kFpz6rnnDsFuW6KC6s3wMfQQAAAAAMYWRtaW5QdWJLZXkyAQAAACDgkMh3M2mpU305XK7y5b9J+9C9m7ycRhB7Y2h8D+QzGgAAAAAMYWRtaW5QdWJLZXkzAQAAACDgkMh3M2mpU305XK7y5b9J+9C9m7ycRhB7Y2h8D+QzGgAAAAYAAAACYTgBAAAABGluaXQAAAAACQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAADEzUFBIN3g3aXFvYlc1eml5aVJDaWMxOXJRcUtyNm5QWWFLMV9hc3NldF9iYWxhbmNlAAAAAAAAbdStBQAAAANuaWwAAAABaQEAAAAIYWRkUG9vbHMAAAAEAAAABXBvb2xzAAAAD2x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NgAAAA9zZW5kZXJQdWJsaWNLZXmt6kvY", "height": 1780970, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3TcKfYhbq3uMgf8NuW71biaCCZ56uzE5ZH6gSQ3q2zoK Next: 8SmbJrz5LnovNbwHYWWhYqYoD7xpbueH2vg83GHXRsS1 Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = 10000 | |
9 | 9 | ||
10 | - | @Callable(d) | |
10 | + | let d = base58'H6cFN4f92Tqmvpuuvii5LhcBHugkttZ7QNJ3tmqYLzuE' | |
11 | + | ||
12 | + | let e = base58'G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD' | |
13 | + | ||
14 | + | let f = base58'G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD' | |
15 | + | ||
16 | + | @Callable(g) | |
11 | 17 | func init () = [IntegerEntry("3PPH7x7iqobW5ziyiRCic19rQqKr6nPYaK1_asset_balance", 7197869)] | |
12 | 18 | ||
13 | 19 | ||
14 | 20 | ||
15 | - | @Callable( | |
16 | - | func addPools ( | |
17 | - | func | |
21 | + | @Callable(h) | |
22 | + | func addPools (i,j,k,l) = { | |
23 | + | func m (n,o) = IntegerEntry((o + "_asset_balance"), 0) :: n | |
18 | 24 | ||
19 | - | func | |
20 | - | let | |
21 | - | let | |
22 | - | StringEntry(( | |
25 | + | func p (n,o) = { | |
26 | + | let q = value(indexOf(i, o)) | |
27 | + | let r = j[q] | |
28 | + | StringEntry((o + "_liquidity_token"), r) :: n | |
23 | 29 | } | |
24 | 30 | ||
25 | - | func | |
26 | - | let | |
27 | - | let | |
28 | - | StringEntry(( | |
31 | + | func s (n,o) = { | |
32 | + | let q = value(indexOf(i, o)) | |
33 | + | let r = k[q] | |
34 | + | StringEntry((o + "_service_token"), r) :: n | |
29 | 35 | } | |
30 | 36 | ||
31 | - | func | |
32 | - | let | |
33 | - | let | |
34 | - | IntegerEntry(( | |
37 | + | func t (n,o) = { | |
38 | + | let q = value(indexOf(i, o)) | |
39 | + | let r = l[q] | |
40 | + | IntegerEntry((o + "_service_token"), r) :: n | |
35 | 41 | } | |
36 | 42 | ||
37 | - | func | |
43 | + | func u (n,o) = BooleanEntry((o + "_active"), true) :: n | |
38 | 44 | ||
39 | - | let | |
40 | - | let | |
41 | - | let | |
42 | - | let | |
43 | - | func | |
44 | - | then | |
45 | - | else | |
45 | + | let v = { | |
46 | + | let w = i | |
47 | + | let x = size(w) | |
48 | + | let y = nil | |
49 | + | func z (A,B) = if ((B >= x)) | |
50 | + | then A | |
51 | + | else m(A, w[B]) | |
46 | 52 | ||
47 | - | func | |
48 | - | then | |
53 | + | func C (A,B) = if ((B >= x)) | |
54 | + | then A | |
49 | 55 | else throw("List size exceeds 20") | |
50 | 56 | ||
51 | - | z( | |
57 | + | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
52 | 58 | } | |
53 | - | let | |
54 | - | let | |
55 | - | let | |
56 | - | let | |
57 | - | func | |
58 | - | then | |
59 | - | else | |
59 | + | let D = { | |
60 | + | let w = i | |
61 | + | let x = size(w) | |
62 | + | let y = nil | |
63 | + | func z (A,B) = if ((B >= x)) | |
64 | + | then A | |
65 | + | else p(A, w[B]) | |
60 | 66 | ||
61 | - | func | |
62 | - | then | |
67 | + | func C (A,B) = if ((B >= x)) | |
68 | + | then A | |
63 | 69 | else throw("List size exceeds 20") | |
64 | 70 | ||
65 | - | z( | |
71 | + | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
66 | 72 | } | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | let | |
71 | - | func | |
72 | - | then | |
73 | - | else | |
73 | + | let E = { | |
74 | + | let w = i | |
75 | + | let x = size(w) | |
76 | + | let y = nil | |
77 | + | func z (A,B) = if ((B >= x)) | |
78 | + | then A | |
79 | + | else s(A, w[B]) | |
74 | 80 | ||
75 | - | func | |
76 | - | then | |
81 | + | func C (A,B) = if ((B >= x)) | |
82 | + | then A | |
77 | 83 | else throw("List size exceeds 20") | |
78 | 84 | ||
79 | - | z( | |
85 | + | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
80 | 86 | } | |
81 | - | let | |
82 | - | let | |
83 | - | let | |
84 | - | let | |
85 | - | func | |
86 | - | then | |
87 | - | else | |
87 | + | let F = { | |
88 | + | let w = i | |
89 | + | let x = size(w) | |
90 | + | let y = nil | |
91 | + | func z (A,B) = if ((B >= x)) | |
92 | + | then A | |
93 | + | else t(A, w[B]) | |
88 | 94 | ||
89 | - | func | |
90 | - | then | |
95 | + | func C (A,B) = if ((B >= x)) | |
96 | + | then A | |
91 | 97 | else throw("List size exceeds 20") | |
92 | 98 | ||
93 | - | z( | |
99 | + | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
94 | 100 | } | |
95 | - | let | |
96 | - | let | |
97 | - | let | |
98 | - | let | |
99 | - | func | |
100 | - | then | |
101 | - | else | |
101 | + | let G = { | |
102 | + | let w = i | |
103 | + | let x = size(w) | |
104 | + | let y = nil | |
105 | + | func z (A,B) = if ((B >= x)) | |
106 | + | then A | |
107 | + | else u(A, w[B]) | |
102 | 108 | ||
103 | - | func | |
104 | - | then | |
109 | + | func C (A,B) = if ((B >= x)) | |
110 | + | then A | |
105 | 111 | else throw("List size exceeds 20") | |
106 | 112 | ||
107 | - | z( | |
113 | + | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
108 | 114 | } | |
109 | - | (((( | |
115 | + | ((((v ++ D) ++ E) ++ F) ++ G) | |
110 | 116 | } | |
111 | 117 | ||
112 | 118 | ||
113 | 119 | ||
114 | - | @Callable(d) | |
120 | + | @Callable(h) | |
121 | + | func issueToken (H,I,J,K) = if (!(containsElement([d, e, f], h.callerPublicKey))) | |
122 | + | then throw("Only admin can call this function") | |
123 | + | else [Issue(H, I, J, K, true, unit, 0)] | |
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | @Callable(g) | |
115 | 128 | func call () = { | |
116 | - | let | |
117 | - | let | |
118 | - | [ | |
129 | + | let L = Issue("Asset107112021", "Asset from dApp 1", 100000, 2, true, unit, 0) | |
130 | + | let M = Issue("Asset207112021", "Asset from dApp 2", 100000, 2, true, unit, 0) | |
131 | + | [M, L] | |
119 | 132 | } | |
120 | 133 | ||
121 | 134 | ||
122 | 135 | ||
123 | - | @Callable( | |
124 | - | func deposit ( | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | let | |
131 | - | let | |
132 | - | let | |
133 | - | let | |
134 | - | if ($isInstanceOf( | |
136 | + | @Callable(h) | |
137 | + | func deposit (o) = { | |
138 | + | let N = h.payments[0].amount | |
139 | + | let O = h.payments[0].assetId | |
140 | + | let P = (o + "_asset_balance") | |
141 | + | let Q = toString(h.caller) | |
142 | + | let R = (((o + "_") + Q) + "_asset_balance") | |
143 | + | let S = getStringValue(this, (o + "_service_token")) | |
144 | + | let T = getIntegerValue(this, P) | |
145 | + | let U = { | |
146 | + | let V = getInteger(R) | |
147 | + | if ($isInstanceOf(V, "Int")) | |
135 | 148 | then { | |
136 | - | let | |
137 | - | | |
149 | + | let W = V | |
150 | + | W | |
138 | 151 | } | |
139 | 152 | else { | |
140 | - | let | |
153 | + | let X = V | |
141 | 154 | 0 | |
142 | 155 | } | |
143 | 156 | } | |
144 | - | let | |
145 | - | let | |
146 | - | let | |
147 | - | [Reissue(fromBase58String( | |
157 | + | let Y = (T + N) | |
158 | + | let Z = ((N - fraction(N, 1, a, HALFUP)) - fraction(N, 1, b, HALFUP)) | |
159 | + | let aa = (U + Z) | |
160 | + | [Reissue(fromBase58String(S), Z, true), ScriptTransfer(h.caller, Z, fromBase58String(S)), IntegerEntry(P, Y), IntegerEntry(R, aa)] | |
148 | 161 | } | |
149 | 162 | ||
150 | 163 | ||
151 | 164 | ||
152 | - | @Callable( | |
153 | - | func withdraw ( | |
154 | - | let | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
163 | - | if ($isInstanceOf( | |
165 | + | @Callable(h) | |
166 | + | func withdraw (o,ab) = { | |
167 | + | let N = h.payments[0].amount | |
168 | + | let O = h.payments[0].assetId | |
169 | + | let P = (o + "_asset_balance") | |
170 | + | let Q = toString(h.caller) | |
171 | + | let R = (((o + "_") + Q) + "_asset_balance") | |
172 | + | let ac = (((o + "_") + Q) + "_earned") | |
173 | + | let T = getIntegerValue(this, P) | |
174 | + | let U = { | |
175 | + | let V = getInteger(R) | |
176 | + | if ($isInstanceOf(V, "Int")) | |
164 | 177 | then { | |
165 | - | let | |
166 | - | | |
178 | + | let W = V | |
179 | + | W | |
167 | 180 | } | |
168 | 181 | else { | |
169 | - | let | |
182 | + | let X = V | |
170 | 183 | 0 | |
171 | 184 | } | |
172 | 185 | } | |
173 | - | let | |
174 | - | let | |
175 | - | if ($isInstanceOf( | |
186 | + | let ad = { | |
187 | + | let V = getInteger(ac) | |
188 | + | if ($isInstanceOf(V, "Int")) | |
176 | 189 | then { | |
177 | - | let | |
178 | - | | |
190 | + | let W = V | |
191 | + | W | |
179 | 192 | } | |
180 | 193 | else { | |
181 | - | let | |
194 | + | let X = V | |
182 | 195 | 0 | |
183 | 196 | } | |
184 | 197 | } | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | if ($isInstanceOf( | |
198 | + | let ae = getStringValue(this, (o + "_liquidity_token")) | |
199 | + | let af = { | |
200 | + | let V = assetInfo(fromBase58String(ae)) | |
201 | + | if ($isInstanceOf(V, "Asset")) | |
189 | 202 | then { | |
190 | - | let | |
191 | - | | |
203 | + | let ag = V | |
204 | + | ag.decimals | |
192 | 205 | } | |
193 | 206 | else throw("Can't find asset") | |
194 | 207 | } | |
195 | - | let | |
196 | - | let | |
197 | - | let | |
198 | - | let | |
199 | - | if (( | |
208 | + | let S = getStringValue(this, (o + "_service_token")) | |
209 | + | let ah = (ab + ad) | |
210 | + | let ai = ((N - fraction(N, 1, c, HALFUP)) - fraction(N, 1, b, HALFUP)) | |
211 | + | let Y = (T - ai) | |
212 | + | if ((U >= N)) | |
200 | 213 | then { | |
201 | - | let | |
202 | - | [Burn(fromBase58String( | |
214 | + | let aa = (U - ai) | |
215 | + | [Burn(fromBase58String(S), ai), ScriptTransfer(h.caller, ai, fromBase58String(ae)), IntegerEntry(P, Y), IntegerEntry(R, aa), IntegerEntry(ac, ah)] | |
203 | 216 | } | |
204 | 217 | else throw("You have not such balance for withdraw") | |
205 | 218 | } | |
206 | 219 | ||
207 | 220 | ||
208 | - | @Verifier( | |
209 | - | func | |
221 | + | @Verifier(aj) | |
222 | + | func ak () = sigVerify(aj.bodyBytes, aj.proofs[0], aj.senderPublicKey) | |
210 | 223 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1000 | |
5 | 5 | ||
6 | 6 | let b = 10000 | |
7 | 7 | ||
8 | 8 | let c = 10000 | |
9 | 9 | ||
10 | - | @Callable(d) | |
10 | + | let d = base58'H6cFN4f92Tqmvpuuvii5LhcBHugkttZ7QNJ3tmqYLzuE' | |
11 | + | ||
12 | + | let e = base58'G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD' | |
13 | + | ||
14 | + | let f = base58'G7cNXePvAHUHmZfXa1eHnvFeH6DuykPC5wm9v9djTKgD' | |
15 | + | ||
16 | + | @Callable(g) | |
11 | 17 | func init () = [IntegerEntry("3PPH7x7iqobW5ziyiRCic19rQqKr6nPYaK1_asset_balance", 7197869)] | |
12 | 18 | ||
13 | 19 | ||
14 | 20 | ||
15 | - | @Callable( | |
16 | - | func addPools ( | |
17 | - | func | |
21 | + | @Callable(h) | |
22 | + | func addPools (i,j,k,l) = { | |
23 | + | func m (n,o) = IntegerEntry((o + "_asset_balance"), 0) :: n | |
18 | 24 | ||
19 | - | func | |
20 | - | let | |
21 | - | let | |
22 | - | StringEntry(( | |
25 | + | func p (n,o) = { | |
26 | + | let q = value(indexOf(i, o)) | |
27 | + | let r = j[q] | |
28 | + | StringEntry((o + "_liquidity_token"), r) :: n | |
23 | 29 | } | |
24 | 30 | ||
25 | - | func | |
26 | - | let | |
27 | - | let | |
28 | - | StringEntry(( | |
31 | + | func s (n,o) = { | |
32 | + | let q = value(indexOf(i, o)) | |
33 | + | let r = k[q] | |
34 | + | StringEntry((o + "_service_token"), r) :: n | |
29 | 35 | } | |
30 | 36 | ||
31 | - | func | |
32 | - | let | |
33 | - | let | |
34 | - | IntegerEntry(( | |
37 | + | func t (n,o) = { | |
38 | + | let q = value(indexOf(i, o)) | |
39 | + | let r = l[q] | |
40 | + | IntegerEntry((o + "_service_token"), r) :: n | |
35 | 41 | } | |
36 | 42 | ||
37 | - | func | |
43 | + | func u (n,o) = BooleanEntry((o + "_active"), true) :: n | |
38 | 44 | ||
39 | - | let | |
40 | - | let | |
41 | - | let | |
42 | - | let | |
43 | - | func | |
44 | - | then | |
45 | - | else | |
45 | + | let v = { | |
46 | + | let w = i | |
47 | + | let x = size(w) | |
48 | + | let y = nil | |
49 | + | func z (A,B) = if ((B >= x)) | |
50 | + | then A | |
51 | + | else m(A, w[B]) | |
46 | 52 | ||
47 | - | func | |
48 | - | then | |
53 | + | func C (A,B) = if ((B >= x)) | |
54 | + | then A | |
49 | 55 | else throw("List size exceeds 20") | |
50 | 56 | ||
51 | - | z( | |
57 | + | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
52 | 58 | } | |
53 | - | let | |
54 | - | let | |
55 | - | let | |
56 | - | let | |
57 | - | func | |
58 | - | then | |
59 | - | else | |
59 | + | let D = { | |
60 | + | let w = i | |
61 | + | let x = size(w) | |
62 | + | let y = nil | |
63 | + | func z (A,B) = if ((B >= x)) | |
64 | + | then A | |
65 | + | else p(A, w[B]) | |
60 | 66 | ||
61 | - | func | |
62 | - | then | |
67 | + | func C (A,B) = if ((B >= x)) | |
68 | + | then A | |
63 | 69 | else throw("List size exceeds 20") | |
64 | 70 | ||
65 | - | z( | |
71 | + | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
66 | 72 | } | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | let | |
71 | - | func | |
72 | - | then | |
73 | - | else | |
73 | + | let E = { | |
74 | + | let w = i | |
75 | + | let x = size(w) | |
76 | + | let y = nil | |
77 | + | func z (A,B) = if ((B >= x)) | |
78 | + | then A | |
79 | + | else s(A, w[B]) | |
74 | 80 | ||
75 | - | func | |
76 | - | then | |
81 | + | func C (A,B) = if ((B >= x)) | |
82 | + | then A | |
77 | 83 | else throw("List size exceeds 20") | |
78 | 84 | ||
79 | - | z( | |
85 | + | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
80 | 86 | } | |
81 | - | let | |
82 | - | let | |
83 | - | let | |
84 | - | let | |
85 | - | func | |
86 | - | then | |
87 | - | else | |
87 | + | let F = { | |
88 | + | let w = i | |
89 | + | let x = size(w) | |
90 | + | let y = nil | |
91 | + | func z (A,B) = if ((B >= x)) | |
92 | + | then A | |
93 | + | else t(A, w[B]) | |
88 | 94 | ||
89 | - | func | |
90 | - | then | |
95 | + | func C (A,B) = if ((B >= x)) | |
96 | + | then A | |
91 | 97 | else throw("List size exceeds 20") | |
92 | 98 | ||
93 | - | z( | |
99 | + | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
94 | 100 | } | |
95 | - | let | |
96 | - | let | |
97 | - | let | |
98 | - | let | |
99 | - | func | |
100 | - | then | |
101 | - | else | |
101 | + | let G = { | |
102 | + | let w = i | |
103 | + | let x = size(w) | |
104 | + | let y = nil | |
105 | + | func z (A,B) = if ((B >= x)) | |
106 | + | then A | |
107 | + | else u(A, w[B]) | |
102 | 108 | ||
103 | - | func | |
104 | - | then | |
109 | + | func C (A,B) = if ((B >= x)) | |
110 | + | then A | |
105 | 111 | else throw("List size exceeds 20") | |
106 | 112 | ||
107 | - | z( | |
113 | + | C(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(z(y, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
108 | 114 | } | |
109 | - | (((( | |
115 | + | ((((v ++ D) ++ E) ++ F) ++ G) | |
110 | 116 | } | |
111 | 117 | ||
112 | 118 | ||
113 | 119 | ||
114 | - | @Callable(d) | |
120 | + | @Callable(h) | |
121 | + | func issueToken (H,I,J,K) = if (!(containsElement([d, e, f], h.callerPublicKey))) | |
122 | + | then throw("Only admin can call this function") | |
123 | + | else [Issue(H, I, J, K, true, unit, 0)] | |
124 | + | ||
125 | + | ||
126 | + | ||
127 | + | @Callable(g) | |
115 | 128 | func call () = { | |
116 | - | let | |
117 | - | let | |
118 | - | [ | |
129 | + | let L = Issue("Asset107112021", "Asset from dApp 1", 100000, 2, true, unit, 0) | |
130 | + | let M = Issue("Asset207112021", "Asset from dApp 2", 100000, 2, true, unit, 0) | |
131 | + | [M, L] | |
119 | 132 | } | |
120 | 133 | ||
121 | 134 | ||
122 | 135 | ||
123 | - | @Callable( | |
124 | - | func deposit ( | |
125 | - | let | |
126 | - | let | |
127 | - | let | |
128 | - | let | |
129 | - | let | |
130 | - | let | |
131 | - | let | |
132 | - | let | |
133 | - | let | |
134 | - | if ($isInstanceOf( | |
136 | + | @Callable(h) | |
137 | + | func deposit (o) = { | |
138 | + | let N = h.payments[0].amount | |
139 | + | let O = h.payments[0].assetId | |
140 | + | let P = (o + "_asset_balance") | |
141 | + | let Q = toString(h.caller) | |
142 | + | let R = (((o + "_") + Q) + "_asset_balance") | |
143 | + | let S = getStringValue(this, (o + "_service_token")) | |
144 | + | let T = getIntegerValue(this, P) | |
145 | + | let U = { | |
146 | + | let V = getInteger(R) | |
147 | + | if ($isInstanceOf(V, "Int")) | |
135 | 148 | then { | |
136 | - | let | |
137 | - | | |
149 | + | let W = V | |
150 | + | W | |
138 | 151 | } | |
139 | 152 | else { | |
140 | - | let | |
153 | + | let X = V | |
141 | 154 | 0 | |
142 | 155 | } | |
143 | 156 | } | |
144 | - | let | |
145 | - | let | |
146 | - | let | |
147 | - | [Reissue(fromBase58String( | |
157 | + | let Y = (T + N) | |
158 | + | let Z = ((N - fraction(N, 1, a, HALFUP)) - fraction(N, 1, b, HALFUP)) | |
159 | + | let aa = (U + Z) | |
160 | + | [Reissue(fromBase58String(S), Z, true), ScriptTransfer(h.caller, Z, fromBase58String(S)), IntegerEntry(P, Y), IntegerEntry(R, aa)] | |
148 | 161 | } | |
149 | 162 | ||
150 | 163 | ||
151 | 164 | ||
152 | - | @Callable( | |
153 | - | func withdraw ( | |
154 | - | let | |
155 | - | let | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | let | |
161 | - | let | |
162 | - | let | |
163 | - | if ($isInstanceOf( | |
165 | + | @Callable(h) | |
166 | + | func withdraw (o,ab) = { | |
167 | + | let N = h.payments[0].amount | |
168 | + | let O = h.payments[0].assetId | |
169 | + | let P = (o + "_asset_balance") | |
170 | + | let Q = toString(h.caller) | |
171 | + | let R = (((o + "_") + Q) + "_asset_balance") | |
172 | + | let ac = (((o + "_") + Q) + "_earned") | |
173 | + | let T = getIntegerValue(this, P) | |
174 | + | let U = { | |
175 | + | let V = getInteger(R) | |
176 | + | if ($isInstanceOf(V, "Int")) | |
164 | 177 | then { | |
165 | - | let | |
166 | - | | |
178 | + | let W = V | |
179 | + | W | |
167 | 180 | } | |
168 | 181 | else { | |
169 | - | let | |
182 | + | let X = V | |
170 | 183 | 0 | |
171 | 184 | } | |
172 | 185 | } | |
173 | - | let | |
174 | - | let | |
175 | - | if ($isInstanceOf( | |
186 | + | let ad = { | |
187 | + | let V = getInteger(ac) | |
188 | + | if ($isInstanceOf(V, "Int")) | |
176 | 189 | then { | |
177 | - | let | |
178 | - | | |
190 | + | let W = V | |
191 | + | W | |
179 | 192 | } | |
180 | 193 | else { | |
181 | - | let | |
194 | + | let X = V | |
182 | 195 | 0 | |
183 | 196 | } | |
184 | 197 | } | |
185 | - | let | |
186 | - | let | |
187 | - | let | |
188 | - | if ($isInstanceOf( | |
198 | + | let ae = getStringValue(this, (o + "_liquidity_token")) | |
199 | + | let af = { | |
200 | + | let V = assetInfo(fromBase58String(ae)) | |
201 | + | if ($isInstanceOf(V, "Asset")) | |
189 | 202 | then { | |
190 | - | let | |
191 | - | | |
203 | + | let ag = V | |
204 | + | ag.decimals | |
192 | 205 | } | |
193 | 206 | else throw("Can't find asset") | |
194 | 207 | } | |
195 | - | let | |
196 | - | let | |
197 | - | let | |
198 | - | let | |
199 | - | if (( | |
208 | + | let S = getStringValue(this, (o + "_service_token")) | |
209 | + | let ah = (ab + ad) | |
210 | + | let ai = ((N - fraction(N, 1, c, HALFUP)) - fraction(N, 1, b, HALFUP)) | |
211 | + | let Y = (T - ai) | |
212 | + | if ((U >= N)) | |
200 | 213 | then { | |
201 | - | let | |
202 | - | [Burn(fromBase58String( | |
214 | + | let aa = (U - ai) | |
215 | + | [Burn(fromBase58String(S), ai), ScriptTransfer(h.caller, ai, fromBase58String(ae)), IntegerEntry(P, Y), IntegerEntry(R, aa), IntegerEntry(ac, ah)] | |
203 | 216 | } | |
204 | 217 | else throw("You have not such balance for withdraw") | |
205 | 218 | } | |
206 | 219 | ||
207 | 220 | ||
208 | - | @Verifier( | |
209 | - | func | |
221 | + | @Verifier(aj) | |
222 | + | func ak () = sigVerify(aj.bodyBytes, aj.proofs[0], aj.senderPublicKey) | |
210 | 223 |
github/deemru/w8io/169f3d6 105.50 ms ◑