tx · 4FmFGJwxneP5Jvrhq4XHJ4uHDpZaHcda9d74Yi4GXjUV 3MxFYk97QYdeHRMTu51rVyHqvFEVB4UtmBX: -0.01700000 Waves 2022.09.15 10:54 [2229937] smart account 3MxFYk97QYdeHRMTu51rVyHqvFEVB4UtmBX > SELF 0.00000000 Waves
{ "type": 13, "id": "4FmFGJwxneP5Jvrhq4XHJ4uHDpZaHcda9d74Yi4GXjUV", "fee": 1700000, "feeAssetId": null, "timestamp": 1663228473768, "version": 2, "chainId": 84, "sender": "3MxFYk97QYdeHRMTu51rVyHqvFEVB4UtmBX", "senderPublicKey": "2panvMtE3s1p1oCdVqRGMuBYaZJV3AZ6zpdmZ6vHkDaL", "proofs": [ "4Draif5HciyvK2KdkihHLiwDdknNcC3pVNxrrSQZqSJXBfJaHcyYFxEBWW4MpfZ54XmqmybCvEZuTWnKHAD59uur", "4dCVT35YjTjzBEnFW9cdxVqsJgVQwQnAtCBLuKHPnZAH7vPSiSZAvgAyup7o6FjxUyHCMzAeWwwW8keZe1ceeTyx" ], "script": "base64:BgITCAISABIECgIIARIDCgEIEgASACEAB2tBY3RpdmUCBmFjdGl2ZQAGa0NhdXNlAg5zaHV0ZG93bl9jYXVzZQAWa0xhc3RQb29sVG9rZW5JbnRlcmVzdAITX3Bvb2xfbGFzdF9pbnRlcmVzdAARa1VzZXJMYXN0SW50ZXJlc3QCE191c2VyX2xhc3RfaW50ZXJlc3QAE2tVc2VyQ2xhaW1BdmFpbGFibGUCGF91c2VyX2F2YWlsYWJsZV90b19jbGFpbQAWa1VzZXJTaGFyZVRva2Vuc0xvY2tlZAIUX3NoYXJlX3Rva2Vuc19sb2NrZWQAEmtTaGFyZVRva2Vuc0xvY2tlZAIaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAC2tPcmFjbGVQb29sAgVwb29sXwANa1Bvb2xBc3NldElkcwIJYXNzZXRfaWRzAA1rQWRtaW5QdWJLZXkxAgthZG1pbl9wdWJfMQANa0FkbWluUHViS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U2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkxAAEAAAQSYWRtaW5QdWJLZXkyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAQUMYWRtaW5QdWJLZXkyAAEAAAQSYWRtaW5QdWJLZXkzU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUMYWRtaW5QdWJLZXkzAAEAAAkAZwIJAGQCCQBkAgUSYWRtaW5QdWJLZXkxU2lnbmVkBRJhZG1pblB1YktleTJTaWduZWQFEmFkbWluUHViS2V5M1NpZ25lZAACVBme3g==", "height": 2229937, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 998GTpcEfvuZn33A2s39oMv81gypA2XgXt7ygiBjT6M5 Next: GtB9EvDXebCq1iVMMCGMpQZ7SAeHqJpDmb5qcBhr4MQZ Diff:
Old | New | Differences | |
---|---|---|---|
161 | 161 | ||
162 | 162 | ||
163 | 163 | @Callable(am) | |
164 | - | func updateUserInterest (as) = valueOrElse(z(), valueOrElse(C(am.caller), { | |
165 | - | let Y = | |
164 | + | func updateUserInterest (G,as) = valueOrElse(z(), valueOrElse(C(am.caller), { | |
165 | + | let Y = Address(fromBase58String(G)) | |
166 | 166 | let K = toString(am.originCaller) | |
167 | - | let G = toString(Y) | |
168 | 167 | let Z = split(valueOrErrorMessage(getString(Y, i), "Can't find pool assets"), ",") | |
169 | 168 | func at (ab,L) = { | |
170 | 169 | let au = R(G, L, K) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "active" | |
5 | 5 | ||
6 | 6 | let b = "shutdown_cause" | |
7 | 7 | ||
8 | 8 | let c = "_pool_last_interest" | |
9 | 9 | ||
10 | 10 | let d = "_user_last_interest" | |
11 | 11 | ||
12 | 12 | let e = "_user_available_to_claim" | |
13 | 13 | ||
14 | 14 | let f = "_share_tokens_locked" | |
15 | 15 | ||
16 | 16 | let g = "_total_share_tokens_locked" | |
17 | 17 | ||
18 | 18 | let h = "pool_" | |
19 | 19 | ||
20 | 20 | let i = "asset_ids" | |
21 | 21 | ||
22 | 22 | let j = "admin_pub_1" | |
23 | 23 | ||
24 | 24 | let k = "admin_pub_2" | |
25 | 25 | ||
26 | 26 | let l = "admin_pub_3" | |
27 | 27 | ||
28 | 28 | let m = "farming_address" | |
29 | 29 | ||
30 | 30 | let n = 100000000 | |
31 | 31 | ||
32 | 32 | let o = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
33 | 33 | ||
34 | 34 | func p (q) = { | |
35 | 35 | let r = getString(o, q) | |
36 | 36 | if ($isInstanceOf(r, "String")) | |
37 | 37 | then { | |
38 | 38 | let s = r | |
39 | 39 | fromBase58String(s) | |
40 | 40 | } | |
41 | 41 | else { | |
42 | 42 | let t = r | |
43 | 43 | throw((q + "is empty")) | |
44 | 44 | } | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let u = p(j) | |
49 | 49 | ||
50 | 50 | let v = p(k) | |
51 | 51 | ||
52 | 52 | let w = p(l) | |
53 | 53 | ||
54 | 54 | let x = Address(p(m)) | |
55 | 55 | ||
56 | 56 | let y = valueOrElse(getBoolean(this, a), true) | |
57 | 57 | ||
58 | 58 | func z () = if (y) | |
59 | 59 | then unit | |
60 | 60 | else throw("DApp is inactive at this moment") | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func A (B) = if (isDefined(getString(o, (h + toString(B))))) | |
64 | 64 | then unit | |
65 | 65 | else throw("Only pool can call this function") | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func C (B) = if ((B == x)) | |
69 | 69 | then unit | |
70 | 70 | else throw("Only farming can call this function") | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func D (E) = [BooleanEntry(a, false), StringEntry(b, E)] | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func F (G,H) = valueOrElse(getInteger(x, (((G + "_") + H) + f)), 0) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func I (G) = valueOrElse(getInteger(x, (G + g)), 0) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func J (K,G,L) = valueOrElse(getInteger(this, (((((K + "_") + G) + "_") + L) + d)), 0) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func M (G,L) = valueOrElse(getInteger(this, (((G + "_") + L) + c)), 0) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func N (K,G,L) = valueOrElse(getInteger(this, (((((K + "_") + G) + "_") + L) + e)), 0) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func O (L) = { | |
92 | 92 | let r = L | |
93 | 93 | if ($isInstanceOf(r, "ByteVector")) | |
94 | 94 | then { | |
95 | 95 | let P = r | |
96 | 96 | toBase58String(P) | |
97 | 97 | } | |
98 | 98 | else if ($isInstanceOf(r, "Unit")) | |
99 | 99 | then { | |
100 | 100 | let Q = r | |
101 | 101 | "WAVES" | |
102 | 102 | } | |
103 | 103 | else throw("Match error") | |
104 | 104 | } | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func R (G,L,K) = { | |
108 | 108 | let S = M(G, L) | |
109 | 109 | let T = J(K, G, L) | |
110 | 110 | let U = F(G, K) | |
111 | 111 | let V = N(K, G, L) | |
112 | 112 | let W = fraction(U, (S - T), n) | |
113 | 113 | $Tuple2((V + W), S) | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func X (G,K) = { | |
118 | 118 | let Y = Address(fromBase58String(G)) | |
119 | 119 | let Z = split(valueOrErrorMessage(getString(Y, i), "Can't find pool assets"), ",") | |
120 | 120 | func aa (ab,L) = { | |
121 | 121 | let ac = R(G, L, K) | |
122 | 122 | let ad = ac._1 | |
123 | 123 | let S = ac._2 | |
124 | 124 | (ab :+ [ad]) | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | let ae = { | |
128 | 128 | let af = Z | |
129 | 129 | let ag = size(af) | |
130 | 130 | let ah = nil | |
131 | 131 | func ai (aj,ak) = if ((ak >= ag)) | |
132 | 132 | then aj | |
133 | 133 | else aa(aj, af[ak]) | |
134 | 134 | ||
135 | 135 | func al (aj,ak) = if ((ak >= ag)) | |
136 | 136 | then aj | |
137 | 137 | else throw("List size exceeds 15") | |
138 | 138 | ||
139 | 139 | al(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ah, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
140 | 140 | } | |
141 | 141 | $Tuple2(Z, ae) | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | @Callable(am) | |
146 | 146 | func airDrop () = valueOrElse(z(), valueOrElse(A(am.caller), { | |
147 | 147 | let an = $Tuple2(am.payments[0].amount, am.payments[0].assetId) | |
148 | 148 | let ao = an._1 | |
149 | 149 | let ap = an._2 | |
150 | 150 | let G = toString(am.caller) | |
151 | 151 | let aq = I(G) | |
152 | 152 | let S = M(G, O(ap)) | |
153 | 153 | let ar = (S + (if (if ((aq > 0)) | |
154 | 154 | then (ao > 0) | |
155 | 155 | else false) | |
156 | 156 | then fraction(ao, n, aq) | |
157 | 157 | else 0)) | |
158 | 158 | [IntegerEntry((((G + "_") + O(ap)) + c), ar)] | |
159 | 159 | })) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | ||
163 | 163 | @Callable(am) | |
164 | - | func updateUserInterest (as) = valueOrElse(z(), valueOrElse(C(am.caller), { | |
165 | - | let Y = | |
164 | + | func updateUserInterest (G,as) = valueOrElse(z(), valueOrElse(C(am.caller), { | |
165 | + | let Y = Address(fromBase58String(G)) | |
166 | 166 | let K = toString(am.originCaller) | |
167 | - | let G = toString(Y) | |
168 | 167 | let Z = split(valueOrErrorMessage(getString(Y, i), "Can't find pool assets"), ",") | |
169 | 168 | func at (ab,L) = { | |
170 | 169 | let au = R(G, L, K) | |
171 | 170 | let ad = au._1 | |
172 | 171 | let S = au._2 | |
173 | 172 | (ab :+ [IntegerEntry((((((K + "_") + G) + "_") + L) + e), ad), IntegerEntry((((((K + "_") + G) + "_") + L) + d), S)]) | |
174 | 173 | } | |
175 | 174 | ||
176 | 175 | let af = Z | |
177 | 176 | let ag = size(af) | |
178 | 177 | let ah = nil | |
179 | 178 | func ai (aj,ak) = if ((ak >= ag)) | |
180 | 179 | then aj | |
181 | 180 | else at(aj, af[ak]) | |
182 | 181 | ||
183 | 182 | func al (aj,ak) = if ((ak >= ag)) | |
184 | 183 | then aj | |
185 | 184 | else throw("List size exceeds 15") | |
186 | 185 | ||
187 | 186 | al(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ah, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
188 | 187 | })) | |
189 | 188 | ||
190 | 189 | ||
191 | 190 | ||
192 | 191 | @Callable(am) | |
193 | 192 | func claim (G) = valueOrElse(z(), { | |
194 | 193 | let Y = Address(fromBase58String(G)) | |
195 | 194 | let K = toString(am.caller) | |
196 | 195 | let Z = split(valueOrErrorMessage(getString(Y, i), "Can't find pool assets"), ",") | |
197 | 196 | func av (ab,L) = { | |
198 | 197 | let aw = ab | |
199 | 198 | let ax = aw._1 | |
200 | 199 | let ay = aw._2 | |
201 | 200 | let az = R(G, L, K) | |
202 | 201 | let ad = az._1 | |
203 | 202 | let S = az._2 | |
204 | 203 | $Tuple2((ax :+ [ScriptTransfer(am.caller, ad, fromBase58String(L)), IntegerEntry((((((K + "_") + G) + "_") + L) + e), 0), IntegerEntry((((((K + "_") + G) + "_") + L) + d), S)]), ad) | |
205 | 204 | } | |
206 | 205 | ||
207 | 206 | let aA = { | |
208 | 207 | let af = Z | |
209 | 208 | let ag = size(af) | |
210 | 209 | let ah = $Tuple2(nil, 0) | |
211 | 210 | func ai (aj,ak) = if ((ak >= ag)) | |
212 | 211 | then aj | |
213 | 212 | else av(aj, af[ak]) | |
214 | 213 | ||
215 | 214 | func al (aj,ak) = if ((ak >= ag)) | |
216 | 215 | then aj | |
217 | 216 | else throw("List size exceeds 15") | |
218 | 217 | ||
219 | 218 | al(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ai(ah, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
220 | 219 | } | |
221 | 220 | let aB = aA._1 | |
222 | 221 | let aC = aA._2 | |
223 | 222 | if ((aC == 0)) | |
224 | 223 | then throw("You have no tokens for claim") | |
225 | 224 | else aB | |
226 | 225 | }) | |
227 | 226 | ||
228 | 227 | ||
229 | 228 | ||
230 | 229 | @Callable(am) | |
231 | 230 | func shutdown () = if (!(y)) | |
232 | 231 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified"))) | |
233 | 232 | else if (!(containsElement([u, v, w], am.callerPublicKey))) | |
234 | 233 | then throw("Only admin can call this function") | |
235 | 234 | else D("Paused by admin") | |
236 | 235 | ||
237 | 236 | ||
238 | 237 | ||
239 | 238 | @Callable(am) | |
240 | 239 | func activate () = if (y) | |
241 | 240 | then throw("DApp is already active") | |
242 | 241 | else if (!(containsElement([u, v, w], am.callerPublicKey))) | |
243 | 242 | then throw("Only admin can call this function") | |
244 | 243 | else [BooleanEntry(a, true), DeleteEntry(b)] | |
245 | 244 | ||
246 | 245 | ||
247 | 246 | @Verifier(aD) | |
248 | 247 | func aE () = { | |
249 | 248 | let aF = if (sigVerify(aD.bodyBytes, aD.proofs[0], u)) | |
250 | 249 | then 1 | |
251 | 250 | else 0 | |
252 | 251 | let aG = if (sigVerify(aD.bodyBytes, aD.proofs[1], v)) | |
253 | 252 | then 1 | |
254 | 253 | else 0 | |
255 | 254 | let aH = if (sigVerify(aD.bodyBytes, aD.proofs[2], w)) | |
256 | 255 | then 1 | |
257 | 256 | else 0 | |
258 | 257 | (((aF + aG) + aH) >= 2) | |
259 | 258 | } | |
260 | 259 |
github/deemru/w8io/03bedc9 57.97 ms ◑![]()