tx · HNAZjp4N6gzhHXAGGALQMBHMmVB7DdPFK7Wkkc7pC3En 3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp: -0.02200000 Waves 2022.12.06 09:10 [2348100] smart account 3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp > SELF 0.00000000 Waves
{ "type": 13, "id": "HNAZjp4N6gzhHXAGGALQMBHMmVB7DdPFK7Wkkc7pC3En", "fee": 2200000, "feeAssetId": null, "timestamp": 1670307053564, "version": 1, "sender": "3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp", "senderPublicKey": "bS6Cchmk25EdDcapkz8W5WkZgthTHHW6sSBbcidSrCb", "proofs": [ "5wqDcjKugCr8Pgg4bmiDWTCoCa1h1TnTUMngQimAaN7ChF8n6aPC5o2Hv41d6Roi6mgNddja3mjVgwT5kRcvPNx4" ], "script": "base64:BgKCIwgCEgkKBwEBAQEBCAESABIECgIICBIDCgEIEgQKAggIEgQKAggIEgMKAQgSACIPZ2V0U3RyaW5nT3JGYWlsIgNrZXkiA1NFUCIIQlVGU0NBTEUiBnNjYWxlOCIIdGhyb3dFcnIiA21zZyIIYXNTdHJpbmciA3ZhbCIHJG1hdGNoMCIGdmFsU3RyIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2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FAmNqCQDMCAIJAKQDAQUCY2sJAMwIAgkApAMBBQJkcQUDbmlsBQFjCQCUCgIFA25pbAUCZHICY3ABCnNldE1hbmFnZXIBAmR2BAJkdwkBAmNvAQUCY3ADCQAAAgUCZHcFAmR3BAJkeAkA2QQBBQJkdgMJAAACBQJkeAUCZHgJAMwIAgkBC1N0cmluZ0VudHJ5AgkBAmFJAAUCZHYFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgJjcAEOY29uZmlybU1hbmFnZXIABAJkeQkBAmNuAAQCZHoDCQEJaXNEZWZpbmVkAQUCZHkGCQACAQISTm8gcGVuZGluZyBtYW5hZ2VyAwkAAAIFAmR6BQJkegQCZEEDCQAAAggFAmNwD2NhbGxlclB1YmxpY0tleQkBBXZhbHVlAQUCZHkGCQACAQIbWW91IGFyZSBub3QgcGVuZGluZyBtYW5hZ2VyAwkAAAIFAmRBBQJkQQkAzAgCCQELU3RyaW5nRW50cnkCCQECYUgACQDYBAEJAQV2YWx1ZQEFAmR5CQDMCAIJAQtEZWxldGVFbnRyeQEJAQJhSQAFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECZEIBAmRDAAQCZEQEAWoJAQJjbAADCQABAgUBagIKQnl0ZVZlY3RvcgQCY3IFAWoFAmNyAwkAAQIFAWoCBFVuaXQIBQJkQg9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZEIJYm9keUJ5dGVzCQCRAwIIBQJkQgZwcm9vZnMAAAUCZETIO7RK", "chainId": 84, "height": 2348100, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9Nqkn9ZExoXmkirPixdcQu6XRKRtFKVJj1Jt2rzsirsp Next: 56SzMf9LWuB4o1CUSWaK3fpgpESzmVdRYBBiscuqq2yE Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = valueOrErrorMessage(getString(b), (("mandatory this." + b) + " is not defined")) | |
13 | 13 | func f (g) = throw(makeString(["ido.ride:", g], " ")) | |
14 | 14 | ||
15 | 15 | ||
16 | - | func h (i,j,k,l,m) = { | |
17 | - | let n = toBigInt(j) | |
18 | - | let o = toBigInt(m) | |
19 | - | let p = fraction(toBigInt(i), d, n) | |
20 | - | let q = fraction(p, toBigInt(l), toBigInt(k)) | |
21 | - | toInt(fraction(q, toBigInt(m), d)) | |
16 | + | func h (i) = { | |
17 | + | let j = i | |
18 | + | if ($isInstanceOf(j, "String")) | |
19 | + | then { | |
20 | + | let k = j | |
21 | + | k | |
22 | + | } | |
23 | + | else throw("fail to cast into String") | |
22 | 24 | } | |
23 | 25 | ||
24 | 26 | ||
25 | - | let r = 1 | |
26 | - | ||
27 | - | let s = 2 | |
28 | - | ||
29 | - | let t = 3 | |
30 | - | ||
31 | - | let u = 4 | |
32 | - | ||
33 | - | let v = 5 | |
34 | - | ||
35 | - | let w = 6 | |
36 | - | ||
37 | - | let x = 7 | |
38 | - | ||
39 | - | let y = 8 | |
40 | - | ||
41 | - | let z = 9 | |
42 | - | ||
43 | - | let A = 10 | |
44 | - | ||
45 | - | let B = 11 | |
46 | - | ||
47 | - | func C (D,E,F,G,k,H,I,J,K,L,M,N) = makeString(["%d%d%d%d%d%d%s%d%s%d%d%d", D, E, F, G, k, H, I, J, K, L, M, N], c) | |
48 | - | ||
49 | - | ||
50 | - | func O (D,E,F,G,k,H,I,J,K,L,M,N) = C(toString(D), toString(E), toString(F), toString(G), toString(k), toString(H), I, toString(J), K, toString(L), toString(M), toString(N)) | |
51 | - | ||
52 | - | ||
53 | - | let P = 1 | |
54 | - | ||
55 | - | let Q = 2 | |
56 | - | ||
57 | - | let R = 3 | |
58 | - | ||
59 | - | let S = 4 | |
60 | - | ||
61 | - | let T = 5 | |
62 | - | ||
63 | - | func U (V,W,X,Y,Z) = makeString(["%d%d%d%d%d", V, W, X, Y, Z], c) | |
64 | - | ||
65 | - | ||
66 | - | func aa (V,W,X,Y,Z) = U(toString(V), toString(W), toString(X), toString(Y), toString(Z)) | |
67 | - | ||
68 | - | ||
69 | - | func ab (i,ac) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(i), toString(ac)], c) | |
70 | - | ||
71 | - | ||
72 | - | func ad () = "%s__config" | |
73 | - | ||
74 | - | ||
75 | - | func ae (af) = ("%s__" + af) | |
76 | - | ||
77 | - | ||
78 | - | func ag () = "%s__totals" | |
79 | - | ||
80 | - | ||
81 | - | func ah (ai,af,aj) = makeString(["%s%s%s%s__history", ai, af, aj], c) | |
82 | - | ||
83 | - | ||
84 | - | func ak () = "%s__usdnClaimDisabled" | |
85 | - | ||
86 | - | ||
87 | - | func al () = "%s__usdnClaimEndHeight" | |
88 | - | ||
89 | - | ||
90 | - | func am () = makeString(["%s", "periodLength"], c) | |
91 | - | ||
92 | - | ||
93 | - | func an () = makeString(["%s", "currentPeriod"], c) | |
94 | - | ||
95 | - | ||
96 | - | func ao (ap) = makeString(["%s%s", "periodStartHeight", toString(ap)], c) | |
97 | - | ||
98 | - | ||
99 | - | func aq (ap) = makeString(["%s%s", "periodEndHeight", toString(ap)], c) | |
100 | - | ||
101 | - | ||
102 | - | func ar () = makeString(["%s", "usdtPriceAssetAllowableRatio"], c) | |
103 | - | ||
104 | - | ||
105 | - | func as (at) = makeString(["%s%s", "totalPeriodAllowance", at], c) | |
106 | - | ||
107 | - | ||
108 | - | func au (at) = makeString(["%s%s", "userPeriodAllowance", at], c) | |
109 | - | ||
110 | - | ||
111 | - | func av (at,ap) = makeString(["%s%s%s", "periodTotalAvailableToClaim", at, toString(ap)], c) | |
112 | - | ||
113 | - | ||
114 | - | func aw (at,ap,af) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", at, toString(ap), af], c) | |
115 | - | ||
116 | - | ||
117 | - | func ax () = makeString(["%s", "usdtPriceAssetStablePool"], c) | |
118 | - | ||
119 | - | ||
120 | - | func ay () = makeString(["%s", "usdtAssetId"], c) | |
121 | - | ||
122 | - | ||
123 | - | func az (aA) = makeString(["%s%s", "priceAssetBalance", aA], c) | |
124 | - | ||
125 | - | ||
126 | - | func aB () = "%s__managerPublicKey" | |
127 | - | ||
128 | - | ||
129 | - | func aC () = "%s__pendingManagerPublicKey" | |
130 | - | ||
131 | - | ||
132 | - | func aD () = split(a(ad()), c) | |
133 | - | ||
134 | - | ||
135 | - | func aE (aF) = split(valueOrElse(getString(aF), U("0", "0", "0", "0", "0")), c) | |
136 | - | ||
137 | - | ||
138 | - | func aG () = aE(ag()) | |
139 | - | ||
140 | - | ||
141 | - | func aH (af) = aE(ae(af)) | |
142 | - | ||
143 | - | ||
144 | - | func aI (af) = split(a(ae(af)), c) | |
145 | - | ||
146 | - | ||
147 | - | let aJ = 0 | |
148 | - | ||
149 | - | let aK = 1 | |
150 | - | ||
151 | - | let aL = 2 | |
152 | - | ||
153 | - | let aM = 3 | |
154 | - | ||
155 | - | func aN (b,aO,aP,aQ,aR) = { | |
156 | - | let V = parseIntValue(aO[P]) | |
157 | - | let W = parseIntValue(aO[Q]) | |
158 | - | let X = parseIntValue(aO[R]) | |
159 | - | let Y = parseIntValue(aO[S]) | |
160 | - | let Z = parseIntValue(aO[T]) | |
161 | - | let aS = (V + aP[aJ]) | |
162 | - | let aT = (W + aP[aK]) | |
163 | - | let aU = aD() | |
164 | - | let K = aU[z] | |
165 | - | let aV = value(assetInfo(fromBase58String(K))).decimals | |
166 | - | let aW = fraction(aR, e, pow(10, 0, aV, 0, 0, DOWN)) | |
167 | - | let aX = ((X + aP[aL]) - aR) | |
168 | - | let aY = ((Y + aP[aM]) + aW) | |
169 | - | if ((0 > aT)) | |
170 | - | then f(makeString(["invalid math", toString(W), toString(aP[aK]), toString(aT), toString(aP[aJ])], " ")) | |
171 | - | else StringEntry(b, aa(aS, aT, aX, aY, aQ)) | |
27 | + | func l (m,n,o,p,q) = { | |
28 | + | let r = toBigInt(n) | |
29 | + | let s = toBigInt(q) | |
30 | + | let t = fraction(toBigInt(m), d, r) | |
31 | + | let u = fraction(t, toBigInt(p), toBigInt(o)) | |
32 | + | toInt(fraction(u, toBigInt(q), d)) | |
172 | 33 | } | |
173 | 34 | ||
174 | 35 | ||
175 | - | func aZ (af,i,ac,ba) = StringEntry(ah("invest", af, toBase58String(ba)), ab(i, ac)) | |
36 | + | let v = 1 | |
37 | + | ||
38 | + | let w = 2 | |
39 | + | ||
40 | + | let x = 3 | |
41 | + | ||
42 | + | let y = 4 | |
43 | + | ||
44 | + | let z = 5 | |
45 | + | ||
46 | + | let A = 6 | |
47 | + | ||
48 | + | let B = 7 | |
49 | + | ||
50 | + | let C = 8 | |
51 | + | ||
52 | + | let D = 9 | |
53 | + | ||
54 | + | let E = 10 | |
55 | + | ||
56 | + | let F = 11 | |
57 | + | ||
58 | + | func G (H,I,J,K,o,L,M,N,O,P,Q,R) = makeString(["%d%d%d%d%d%d%s%d%s%d%d%d", H, I, J, K, o, L, M, N, O, P, Q, R], c) | |
176 | 59 | ||
177 | 60 | ||
178 | - | func | |
61 | + | func S (H,I,J,K,o,L,M,N,O,P,Q,R) = G(toString(H), toString(I), toString(J), toString(K), toString(o), toString(L), M, toString(N), O, toString(P), toString(Q), toString(R)) | |
179 | 62 | ||
180 | 63 | ||
181 | - | func bc (bd,af,ba) = { | |
182 | - | let aU = aD() | |
183 | - | let F = parseIntValue(aU[t]) | |
184 | - | let G = parseIntValue(aU[u]) | |
185 | - | let be = (F + G) | |
186 | - | let k = parseIntValue(aU[v]) | |
187 | - | let H = parseIntValue(aU[w]) | |
188 | - | let I = aU[x] | |
189 | - | let bf = fromBase58String(I) | |
190 | - | let J = parseIntValue(aU[y]) | |
191 | - | let K = aU[z] | |
192 | - | let bg = fromBase58String(K) | |
193 | - | let L = parseIntValue(aU[A]) | |
194 | - | let bh = toString(af) | |
195 | - | let bi = aI(bh) | |
196 | - | let bj = parseIntValue(bi[P]) | |
197 | - | let bk = parseIntValue(bi[T]) | |
198 | - | let bl = if ((F >= bk)) | |
199 | - | then F | |
200 | - | else bk | |
201 | - | let bm = if ((height > be)) | |
202 | - | then be | |
203 | - | else if ((F > height)) | |
204 | - | then F | |
64 | + | let T = 1 | |
65 | + | ||
66 | + | let U = 2 | |
67 | + | ||
68 | + | let V = 3 | |
69 | + | ||
70 | + | let W = 4 | |
71 | + | ||
72 | + | let X = 5 | |
73 | + | ||
74 | + | func Y (Z,aa,ab,ac,ad) = makeString(["%d%d%d%d%d", Z, aa, ab, ac, ad], c) | |
75 | + | ||
76 | + | ||
77 | + | func ae (Z,aa,ab,ac,ad) = Y(toString(Z), toString(aa), toString(ab), toString(ac), toString(ad)) | |
78 | + | ||
79 | + | ||
80 | + | func af (m,ag) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(m), toString(ag)], c) | |
81 | + | ||
82 | + | ||
83 | + | func ah () = "%s__config" | |
84 | + | ||
85 | + | ||
86 | + | func ai (aj) = ("%s__" + aj) | |
87 | + | ||
88 | + | ||
89 | + | func ak () = "%s__totals" | |
90 | + | ||
91 | + | ||
92 | + | func al (am,aj,an) = makeString(["%s%s%s%s__history", am, aj, an], c) | |
93 | + | ||
94 | + | ||
95 | + | func ao () = "%s__usdnClaimDisabled" | |
96 | + | ||
97 | + | ||
98 | + | func ap () = "%s__usdnClaimEndHeight" | |
99 | + | ||
100 | + | ||
101 | + | func aq () = makeString(["%s", "periodLength"], c) | |
102 | + | ||
103 | + | ||
104 | + | func ar () = makeString(["%s", "currentPeriod"], c) | |
105 | + | ||
106 | + | ||
107 | + | func as (at) = makeString(["%s%s", "periodStartHeight", toString(at)], c) | |
108 | + | ||
109 | + | ||
110 | + | func au (at) = makeString(["%s%s", "periodEndHeight", toString(at)], c) | |
111 | + | ||
112 | + | ||
113 | + | func av () = makeString(["%s", "usdtPriceAssetAllowableRatio"], c) | |
114 | + | ||
115 | + | ||
116 | + | func aw (ax) = makeString(["%s%s", "totalPeriodAllowance", ax], c) | |
117 | + | ||
118 | + | ||
119 | + | func ay (ax) = makeString(["%s%s", "userPeriodAllowance", ax], c) | |
120 | + | ||
121 | + | ||
122 | + | func az (ax,at) = makeString(["%s%s%s", "periodTotalAvailableToClaim", ax, toString(at)], c) | |
123 | + | ||
124 | + | ||
125 | + | func aA (ax,at,aj) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", ax, toString(at), aj], c) | |
126 | + | ||
127 | + | ||
128 | + | func aB () = makeString(["%s", "usdtPriceAssetStablePool"], c) | |
129 | + | ||
130 | + | ||
131 | + | func aC () = makeString(["%s", "usdtAssetId"], c) | |
132 | + | ||
133 | + | ||
134 | + | func aD (aE) = makeString(["%s%s", "priceAssetBalance", aE], c) | |
135 | + | ||
136 | + | ||
137 | + | func aF (aE) = makeString(["%s%s", "investorRemainingAmount", aE], c) | |
138 | + | ||
139 | + | ||
140 | + | func aG () = makeString(["%s", "totalRemainingAmount"], c) | |
141 | + | ||
142 | + | ||
143 | + | func aH () = "%s__managerPublicKey" | |
144 | + | ||
145 | + | ||
146 | + | func aI () = "%s__pendingManagerPublicKey" | |
147 | + | ||
148 | + | ||
149 | + | func aJ () = split(a(ah()), c) | |
150 | + | ||
151 | + | ||
152 | + | func aK (aL) = split(valueOrElse(getString(aL), Y("0", "0", "0", "0", "0")), c) | |
153 | + | ||
154 | + | ||
155 | + | func aM () = aK(ak()) | |
156 | + | ||
157 | + | ||
158 | + | func aN (aj) = aK(ai(aj)) | |
159 | + | ||
160 | + | ||
161 | + | func aO (aj) = split(a(ai(aj)), c) | |
162 | + | ||
163 | + | ||
164 | + | let aP = 0 | |
165 | + | ||
166 | + | let aQ = 1 | |
167 | + | ||
168 | + | let aR = 2 | |
169 | + | ||
170 | + | let aS = 3 | |
171 | + | ||
172 | + | func aT (b,aU,aV,aW,aX) = { | |
173 | + | let Z = parseIntValue(aU[T]) | |
174 | + | let aa = parseIntValue(aU[U]) | |
175 | + | let ab = parseIntValue(aU[V]) | |
176 | + | let ac = parseIntValue(aU[W]) | |
177 | + | let ad = parseIntValue(aU[X]) | |
178 | + | let aY = (Z + aV[aP]) | |
179 | + | let aZ = (aa + aV[aQ]) | |
180 | + | let ba = aJ() | |
181 | + | let O = ba[D] | |
182 | + | let bb = value(assetInfo(fromBase58String(O))).decimals | |
183 | + | let bc = fraction(aX, e, pow(10, 0, bb, 0, 0, DOWN)) | |
184 | + | let bd = ((ab + aV[aR]) - aX) | |
185 | + | let be = ((ac + aV[aS]) + bc) | |
186 | + | let bf = if ((0 > aZ)) | |
187 | + | then { | |
188 | + | let bg = ((aY - bd) - be) | |
189 | + | let bh = if ((0 > bg)) | |
190 | + | then 0 | |
191 | + | else bg | |
192 | + | StringEntry(b, ae(aY, bh, bd, be, aW)) | |
193 | + | } | |
194 | + | else StringEntry(b, ae(aY, aZ, bd, be, aW)) | |
195 | + | bf | |
196 | + | } | |
197 | + | ||
198 | + | ||
199 | + | func bi (aj,m,ag,bj) = StringEntry(al("invest", aj, toBase58String(bj)), af(m, ag)) | |
200 | + | ||
201 | + | ||
202 | + | func bk (aj,m,ag,bj) = StringEntry(al("claim", aj, toBase58String(bj)), af(m, ag)) | |
203 | + | ||
204 | + | ||
205 | + | func bl (bm,aj,bj) = { | |
206 | + | let ba = aJ() | |
207 | + | let J = parseIntValue(ba[x]) | |
208 | + | let K = parseIntValue(ba[y]) | |
209 | + | let bn = (J + K) | |
210 | + | let o = parseIntValue(ba[z]) | |
211 | + | let L = parseIntValue(ba[A]) | |
212 | + | let M = ba[B] | |
213 | + | let bo = fromBase58String(M) | |
214 | + | let N = parseIntValue(ba[C]) | |
215 | + | let O = ba[D] | |
216 | + | let bp = fromBase58String(O) | |
217 | + | let P = parseIntValue(ba[E]) | |
218 | + | let bq = toString(aj) | |
219 | + | let br = aO(bq) | |
220 | + | let bs = parseIntValue(br[T]) | |
221 | + | let bt = parseIntValue(br[X]) | |
222 | + | let bu = if ((J >= bt)) | |
223 | + | then J | |
224 | + | else bt | |
225 | + | let bv = if ((height > bn)) | |
226 | + | then bn | |
227 | + | else if ((J > height)) | |
228 | + | then J | |
205 | 229 | else height | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | - | then | |
230 | + | let bw = (bv - bu) | |
231 | + | let bx = fraction(bs, bw, K) | |
232 | + | let by = l(bx, P, o, L, N) | |
233 | + | let bz = (bm == O) | |
234 | + | let bA = valueOrElse(getBoolean(ao()), false) | |
235 | + | let bB = [if (!(if (bz) | |
236 | + | then bA | |
213 | 237 | else false)) | |
214 | 238 | then true | |
215 | 239 | else throw("USDN claim is disabled")] | |
216 | - | if (( | |
217 | - | then if (( | |
218 | - | then $Tuple6([0, -( | |
219 | - | else if (( | |
220 | - | then $Tuple6([0, -( | |
221 | - | else throw(("unsupported assetId: " + | |
240 | + | if ((bB == bB)) | |
241 | + | then if ((bm == O)) | |
242 | + | then $Tuple6([0, -(bx), bx, 0], bx, bp, br, bv, [bx, by]) | |
243 | + | else if ((bm == M)) | |
244 | + | then $Tuple6([0, -(bx), 0, by], by, bo, br, bv, [bx, by]) | |
245 | + | else throw(("unsupported assetId: " + bm)) | |
222 | 246 | else throw("Strict value is not equal to itself.") | |
223 | 247 | } | |
224 | 248 | ||
225 | 249 | ||
226 | - | func | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
250 | + | func bC (O,bq,bD,bE) = { | |
251 | + | let bF = value(getInteger(aw(O))) | |
252 | + | let bG = value(getInteger(ay(O))) | |
253 | + | let bH = value(getInteger(aq())) | |
254 | + | let bI = valueOrElse(getInteger(ar()), 0) | |
255 | + | let bJ = isDefined(getInteger(au(0))) | |
256 | + | let bK = if ((bI > 0)) | |
233 | 257 | then { | |
234 | - | let | |
235 | - | let | |
236 | - | let | |
258 | + | let bL = value(getInteger(as(bI))) | |
259 | + | let bM = value(getInteger(au(bI))) | |
260 | + | let bN = if ((height > bM)) | |
237 | 261 | then { | |
238 | - | let | |
239 | - | let | |
262 | + | let bO = (bI + 1) | |
263 | + | let bP = if ((height > (bM + bH))) | |
240 | 264 | then { | |
241 | - | let | |
242 | - | if (( | |
243 | - | then ((height - | |
244 | - | else (height - | |
265 | + | let bQ = ((height - bM) % bH) | |
266 | + | if ((bQ == 0)) | |
267 | + | then ((height - bH) + 1) | |
268 | + | else (height - bQ) | |
245 | 269 | } | |
246 | - | else ( | |
247 | - | let | |
248 | - | $Tuple3( | |
270 | + | else (bM + 1) | |
271 | + | let bR = ((bP + bH) - 1) | |
272 | + | $Tuple3(bO, bP, bR) | |
249 | 273 | } | |
250 | - | else $Tuple3( | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | $Tuple3( | |
274 | + | else $Tuple3(bI, bL, bM) | |
275 | + | let bO = bN._1 | |
276 | + | let bP = bN._2 | |
277 | + | let bR = bN._3 | |
278 | + | $Tuple3(bO, bP, bR) | |
255 | 279 | } | |
256 | - | else if ( | |
280 | + | else if (bJ) | |
257 | 281 | then { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
282 | + | let bS = value(getInteger(as(0))) | |
283 | + | let bT = value(getInteger(au(0))) | |
284 | + | let bU = if ((height > bT)) | |
261 | 285 | then { | |
262 | - | let | |
263 | - | let | |
264 | - | let | |
265 | - | $Tuple3( | |
286 | + | let bO = (bI + 1) | |
287 | + | let bP = (bT + 1) | |
288 | + | let bR = ((bP + bH) - 1) | |
289 | + | $Tuple3(bO, bP, bR) | |
266 | 290 | } | |
267 | - | else $Tuple3( | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | $Tuple3( | |
291 | + | else $Tuple3(bI, bS, bT) | |
292 | + | let bO = bU._1 | |
293 | + | let bP = bU._2 | |
294 | + | let bR = bU._3 | |
295 | + | $Tuple3(bO, bP, bR) | |
272 | 296 | } | |
273 | - | else $Tuple3( | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
285 | - | if ($isInstanceOf( | |
286 | - | then | |
287 | - | else throw(" | |
297 | + | else $Tuple3(bI, valueOrElse(getInteger(as(bI)), height), valueOrElse(getInteger(au(bI)), ((height + bH) - 1))) | |
298 | + | let bO = bK._1 | |
299 | + | let bP = bK._2 | |
300 | + | let bR = bK._3 | |
301 | + | let bV = valueOrElse(getInteger(az(O, bO)), bF) | |
302 | + | let bW = valueOrElse(getInteger(aA(O, bO, bq)), bG) | |
303 | + | let aX = valueOrElse(getInteger(aD(bq)), 0) | |
304 | + | let bX = min([(bD + aX), bV, bW]) | |
305 | + | let bY = value(getInteger(av())) | |
306 | + | let bZ = e | |
307 | + | let ca = { | |
308 | + | let cb = invoke(addressFromStringValue(value(getString(aB()))), "putOneTknV2WithoutTakeFeeREADONLY", [bZ, O], nil) | |
309 | + | if ($isInstanceOf(cb, "(Int, Int, Int)")) | |
310 | + | then cb | |
311 | + | else throw(($getType(cb) + " couldn't be cast to (Int, Int, Int)")) | |
288 | 312 | } | |
289 | - | if (( | |
313 | + | if ((ca == ca)) | |
290 | 314 | then { | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | if ($isInstanceOf( | |
298 | - | then | |
299 | - | else throw(" | |
315 | + | let cc = ca._3 | |
316 | + | let cd = ca._2 | |
317 | + | let ce = ca._1 | |
318 | + | let cf = value(getString(aC())) | |
319 | + | let cg = { | |
320 | + | let cb = invoke(addressFromStringValue(value(getString(aB()))), "getOneTknV2READONLY", [cf, ce], nil) | |
321 | + | if ($isInstanceOf(cb, "(Int, Int)")) | |
322 | + | then cb | |
323 | + | else throw(($getType(cb) + " couldn't be cast to (Int, Int)")) | |
300 | 324 | } | |
301 | - | if (( | |
325 | + | if ((cg == cg)) | |
302 | 326 | then { | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | $Tuple10( | |
327 | + | let ch = cg._2 | |
328 | + | let ci = cg._1 | |
329 | + | let cj = fraction(bZ, e, ci) | |
330 | + | let ck = (bR - height) | |
331 | + | $Tuple10(bX, bV, bW, bE, bY, cj, ck, bO, bP, bR) | |
308 | 332 | } | |
309 | 333 | else throw("Strict value is not equal to itself.") | |
310 | 334 | } | |
312 | 336 | } | |
313 | 337 | ||
314 | 338 | ||
315 | - | func | |
316 | - | let | |
317 | - | if ($isInstanceOf( | |
339 | + | func cl () = { | |
340 | + | let j = getString(aH()) | |
341 | + | if ($isInstanceOf(j, "String")) | |
318 | 342 | then { | |
319 | - | let | |
320 | - | fromBase58String( | |
343 | + | let cm = j | |
344 | + | fromBase58String(cm) | |
321 | 345 | } | |
322 | - | else if ($isInstanceOf( | |
346 | + | else if ($isInstanceOf(j, "Unit")) | |
323 | 347 | then unit | |
324 | 348 | else throw("Match error") | |
325 | 349 | } | |
326 | 350 | ||
327 | 351 | ||
328 | - | func | |
329 | - | let | |
330 | - | if ($isInstanceOf( | |
352 | + | func cn () = { | |
353 | + | let j = getString(aI()) | |
354 | + | if ($isInstanceOf(j, "String")) | |
331 | 355 | then { | |
332 | - | let | |
333 | - | fromBase58String( | |
356 | + | let cm = j | |
357 | + | fromBase58String(cm) | |
334 | 358 | } | |
335 | - | else if ($isInstanceOf( | |
359 | + | else if ($isInstanceOf(j, "Unit")) | |
336 | 360 | then unit | |
337 | 361 | else throw("Match error") | |
338 | 362 | } | |
339 | 363 | ||
340 | 364 | ||
341 | - | func | |
342 | - | let | |
343 | - | let | |
344 | - | if ($isInstanceOf( | |
365 | + | func co (cp) = { | |
366 | + | let cq = throw("Permission denied") | |
367 | + | let j = cl() | |
368 | + | if ($isInstanceOf(j, "ByteVector")) | |
345 | 369 | then { | |
346 | - | let | |
347 | - | if (( | |
370 | + | let cr = j | |
371 | + | if ((cp.callerPublicKey == cr)) | |
348 | 372 | then true | |
349 | - | else | |
373 | + | else cq | |
350 | 374 | } | |
351 | - | else if ($isInstanceOf( | |
352 | - | then if (( | |
375 | + | else if ($isInstanceOf(j, "Unit")) | |
376 | + | then if ((cp.caller == this)) | |
353 | 377 | then true | |
354 | - | else | |
378 | + | else cq | |
355 | 379 | else throw("Match error") | |
356 | 380 | } | |
357 | 381 | ||
358 | 382 | ||
359 | - | @Callable( | |
360 | - | func constructor ( | |
361 | - | let | |
362 | - | let | |
363 | - | if (isDefined(getString( | |
383 | + | @Callable(cp) | |
384 | + | func constructor (H,I,J,K,o,O,Q) = { | |
385 | + | let L = ((100 * 1000) * 1000) | |
386 | + | let cs = (H + I) | |
387 | + | if (isDefined(getString(ah()))) | |
364 | 388 | then throw("already initialized") | |
365 | - | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString( | |
389 | + | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(cp.caller))) | |
366 | 390 | then throw("not authorized") | |
367 | - | else if ((size( | |
391 | + | else if ((size(cp.payments) != 1)) | |
368 | 392 | then throw("exactly 1 payment must be attached") | |
369 | - | else if (( | |
393 | + | else if ((cs >= J)) | |
370 | 394 | then throw("claimStart must be greater than idoEnd") | |
371 | 395 | else { | |
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | [StringEntry( | |
396 | + | let ct = value(cp.payments[0]) | |
397 | + | let bo = value(ct.assetId) | |
398 | + | let cu = valueOrErrorMessage(assetInfo(bo), "fail to load ido asset info") | |
399 | + | let M = toBase58String(bo) | |
400 | + | let N = pow(10, 0, cu.decimals, 0, 0, DOWN) | |
401 | + | let bp = fromBase58String(O) | |
402 | + | let cv = valueOrErrorMessage(assetInfo(bp), "fail to load price asset info") | |
403 | + | let P = pow(10, 0, cv.decimals, 0, 0, DOWN) | |
404 | + | let cw = aM() | |
405 | + | let cx = [0, 0, 0, 0] | |
406 | + | [StringEntry(ah(), S(H, I, J, K, o, L, M, N, O, P, Q, ct.amount)), aT(ak(), cw, cx, J, 0)] | |
383 | 407 | } | |
384 | 408 | } | |
385 | 409 | ||
386 | 410 | ||
387 | 411 | ||
388 | - | @Callable( | |
412 | + | @Callable(cp) | |
389 | 413 | func invest () = { | |
390 | - | let | |
391 | - | let | |
392 | - | let | |
393 | - | let | |
394 | - | let | |
395 | - | let | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | if (( | |
414 | + | let ba = aJ() | |
415 | + | let H = parseIntValue(ba[v]) | |
416 | + | let I = parseIntValue(ba[w]) | |
417 | + | let cs = (H + I) | |
418 | + | let J = parseIntValue(ba[x]) | |
419 | + | let K = parseIntValue(ba[y]) | |
420 | + | let o = parseIntValue(ba[z]) | |
421 | + | let L = parseIntValue(ba[A]) | |
422 | + | let M = ba[B] | |
423 | + | let bo = fromBase58String(M) | |
424 | + | let N = parseIntValue(ba[C]) | |
425 | + | let O = ba[D] | |
426 | + | let bp = fromBase58String(O) | |
427 | + | let P = parseIntValue(ba[E]) | |
428 | + | let cy = parseIntValue(ba[F]) | |
429 | + | let aj = toString(cp.caller) | |
430 | + | if ((H > height)) | |
407 | 431 | then throw("ido has not been started yet") | |
408 | - | else if ((height > | |
432 | + | else if ((height > cs)) | |
409 | 433 | then throw("ido has been already ended") | |
410 | - | else if ((size( | |
434 | + | else if ((size(cp.payments) != 1)) | |
411 | 435 | then throw("exactly 1 payment is expected") | |
412 | 436 | else { | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | if (( | |
417 | - | then throw((("invalid payment asset id: " + toBase58String( | |
437 | + | let ct = value(cp.payments[0]) | |
438 | + | let cz = value(ct.assetId) | |
439 | + | let cA = ct.amount | |
440 | + | if ((cz != bp)) | |
441 | + | then throw((("invalid payment asset id: " + toBase58String(cz)) + " is expected")) | |
418 | 442 | else { | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
423 | - | if (( | |
443 | + | let cB = aN(aj) | |
444 | + | let cw = aM() | |
445 | + | let cC = (parseIntValue(cw[T]) + cA) | |
446 | + | let cD = (cC * 100) | |
447 | + | if ((cD > assetBalance(this, bo))) | |
424 | 448 | then throw("IDO asset has been - sold consider to use smaller payment") | |
425 | 449 | else { | |
426 | - | let | |
427 | - | [ | |
450 | + | let cx = [cA, cA, 0, 0] | |
451 | + | [aT(ai(aj), cB, cx, J, 0), aT(ak(), cw, cx, J, 0), bi(aj, cA, 0, cp.transactionId)] | |
428 | 452 | } | |
429 | 453 | } | |
430 | 454 | } | |
432 | 456 | ||
433 | 457 | ||
434 | 458 | ||
435 | - | @Callable( | |
436 | - | func claim ( | |
437 | - | let | |
438 | - | if (( | |
459 | + | @Callable(cp) | |
460 | + | func claim (bm,bq) = { | |
461 | + | let cE = toString(cp.caller) | |
462 | + | if ((bq != cE)) | |
439 | 463 | then throw("not authorized") | |
440 | 464 | else { | |
441 | - | let | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
465 | + | let ba = aJ() | |
466 | + | let O = ba[D] | |
467 | + | let cF = bl(bm, cp.caller, cp.transactionId) | |
468 | + | let cx = cF._1 | |
469 | + | let bD = cF._2 | |
470 | + | let cG = cF._3 | |
471 | + | let br = cF._4 | |
472 | + | let bv = cF._5 | |
473 | + | let cH = cx[aR] | |
474 | + | let cI = cx[aS] | |
475 | + | let aX = valueOrElse(getInteger(aD(bq)), 0) | |
476 | + | let bb = value(assetInfo(fromBase58String(O))).decimals | |
477 | + | let bf = if ((bm == O)) | |
454 | 478 | then { | |
455 | - | let | |
456 | - | let | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
466 | - | let | |
479 | + | let cJ = bC(O, bq, bD, cx[aR]) | |
480 | + | let bX = cJ._1 | |
481 | + | let bV = cJ._2 | |
482 | + | let bW = cJ._3 | |
483 | + | let bE = cJ._4 | |
484 | + | let bY = cJ._5 | |
485 | + | let cj = cJ._6 | |
486 | + | let ck = cJ._7 | |
487 | + | let bO = cJ._8 | |
488 | + | let bP = cJ._9 | |
489 | + | let bR = cJ._10 | |
490 | + | let bB = [if ((bW > 0)) | |
467 | 491 | then true | |
468 | - | else f("unavailable to claim because user period allowance reached"), if (( | |
492 | + | else f("unavailable to claim because user period allowance reached"), if ((bV > 0)) | |
469 | 493 | then true | |
470 | - | else f("unavailable to claim because total period allowance reached"), if (( | |
494 | + | else f("unavailable to claim because total period allowance reached"), if ((bX > 0)) | |
471 | 495 | then true | |
472 | - | else f("nothing to claim"), if (( | |
496 | + | else f("nothing to claim"), if ((bY > cj)) | |
473 | 497 | then true | |
474 | 498 | else f("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")] | |
475 | - | if (( | |
499 | + | if ((bB == bB)) | |
476 | 500 | then { | |
477 | - | let | |
478 | - | let | |
479 | - | let | |
480 | - | then [ScriptTransfer( | |
501 | + | let cK = (bV - bX) | |
502 | + | let cL = (bW - bX) | |
503 | + | let bf = if ((aX > bX)) | |
504 | + | then [ScriptTransfer(cp.caller, bX, cG), IntegerEntry(aD(bq), (aX - bX))] | |
481 | 505 | else { | |
482 | - | let cF = ((aR + bu) - bO) | |
483 | - | [ScriptTransfer(ch.caller, bO, cy), aN(ae(bh), bi, cp, bm, 0), aN(ag(), aG(), cp, bm, 0), IntegerEntry(az(bh), cF)] | |
506 | + | let cM = split(h(invoke(this, "claimREADONLY", [O, bq], nil)), c) | |
507 | + | if ((cM == cM)) | |
508 | + | then { | |
509 | + | let cN = parseIntValue(cM[3]) | |
510 | + | let cO = if ((cN == bX)) | |
511 | + | then { | |
512 | + | let cP = parseIntValue(br[T]) | |
513 | + | let cQ = parseIntValue(br[U]) | |
514 | + | let cR = parseIntValue(br[V]) | |
515 | + | let cS = parseIntValue(br[W]) | |
516 | + | let cT = parseIntValue(br[X]) | |
517 | + | let cU = [toString(cP), "0", toString(cR), toString(cS), toString(cT)] | |
518 | + | let cV = aM() | |
519 | + | let cW = parseIntValue(cV[T]) | |
520 | + | let cX = parseIntValue(cV[U]) | |
521 | + | let cY = parseIntValue(cV[V]) | |
522 | + | let cZ = parseIntValue(cV[W]) | |
523 | + | let da = parseIntValue(cV[X]) | |
524 | + | let db = (cX - cQ) | |
525 | + | let dc = [toString(cW), toString(db), toString(cY), toString(cZ), toString(da)] | |
526 | + | let dd = (valueOrElse(getInteger(aG()), 0) + cQ) | |
527 | + | [StringEntry(aF(bq), toString(cQ)), StringEntry(aG(), toString(dd)), aT(ai(bq), cU, cx, bv, 0), aT(ak(), dc, cx, bv, 0)] | |
528 | + | } | |
529 | + | else [aT(ai(bq), br, cx, bv, 0), aT(ak(), aM(), cx, bv, 0)] | |
530 | + | let de = ((aX + bD) - bX) | |
531 | + | ([ScriptTransfer(cp.caller, bX, cG), IntegerEntry(aD(bq), de)] ++ cO) | |
532 | + | } | |
533 | + | else throw("Strict value is not equal to itself.") | |
484 | 534 | } | |
485 | - | $Tuple2(([IntegerEntry( | |
535 | + | $Tuple2(([IntegerEntry(ar(), bO), IntegerEntry(as(bO), bP), IntegerEntry(au(bO), bR), IntegerEntry(az(O, bO), cK), IntegerEntry(aA(O, bO, bq), cL), bk(bq, bX, cI, cp.transactionId)] ++ bf), unit) | |
486 | 536 | } | |
487 | 537 | else throw("Strict value is not equal to itself.") | |
488 | 538 | } | |
489 | 539 | else { | |
490 | - | let | |
491 | - | $Tuple2([ScriptTransfer( | |
540 | + | let df = fraction(aX, e, pow(10, 0, bb, 0, 0, DOWN)) | |
541 | + | $Tuple2([ScriptTransfer(cp.caller, (bD + df), cG), IntegerEntry(aD(bq), 0), aT(ai(bq), br, cx, bv, aX), aT(ak(), aM(), cx, bv, aX), bk(bq, cH, (cI + df), cp.transactionId)], unit) | |
492 | 542 | } | |
493 | - | | |
543 | + | bf | |
494 | 544 | } | |
495 | 545 | } | |
496 | 546 | ||
497 | 547 | ||
498 | 548 | ||
499 | - | @Callable(ch) | |
500 | - | func claimREADONLY (bd,bh) = { | |
501 | - | let cx = bc(bd, addressFromStringValue(bh), fromBase58String("")) | |
502 | - | let cp = cx._1 | |
503 | - | let bu = cx._2 | |
504 | - | let cy = cx._3 | |
505 | - | let bi = cx._4 | |
506 | - | let bm = cx._5 | |
507 | - | let cH = cx._6 | |
508 | - | let cI = cH[0] | |
509 | - | let cJ = cH[1] | |
510 | - | $Tuple2(nil, makeString(["%s%d%d", bh, toString(cI), toString(cJ)], c)) | |
511 | - | } | |
512 | - | ||
513 | - | ||
514 | - | ||
515 | - | @Callable(ch) | |
516 | - | func claimV2READONLY (bd,bh) = { | |
517 | - | let cx = bc(bd, addressFromStringValue(bh), fromBase58String("")) | |
518 | - | let cp = cx._1 | |
519 | - | let bu = cx._2 | |
520 | - | let cy = cx._3 | |
521 | - | let bi = cx._4 | |
522 | - | let bm = cx._5 | |
523 | - | let cH = cx._6 | |
524 | - | let cI = cH[0] | |
525 | - | let cJ = cH[1] | |
526 | - | let aU = aD() | |
527 | - | let K = aU[z] | |
528 | - | let aR = valueOrElse(getInteger(az(bh)), 0) | |
529 | - | let cG = (aR * 100) | |
530 | - | let cK = (cJ + cG) | |
531 | - | let cL = bt(K, bh, bu, cp[aL]) | |
532 | - | let bO = cL._1 | |
533 | - | let bM = cL._2 | |
534 | - | let bN = cL._3 | |
535 | - | let bv = cL._4 | |
536 | - | let bP = cL._5 | |
537 | - | let ca = cL._6 | |
538 | - | let cb = cL._7 | |
539 | - | let bF = cL._8 | |
540 | - | let bG = cL._9 | |
541 | - | let bI = cL._10 | |
542 | - | let cM = valueOrElse(getInteger(aq(bF)), 0) | |
543 | - | let cN = (parseIntValue(aI(bh)[R]) - aR) | |
544 | - | let cO = if ((height > cM)) | |
549 | + | @Callable(cp) | |
550 | + | func cleanRemaingAmount (bq) = { | |
551 | + | let O = aJ()[D] | |
552 | + | let cM = split(h(invoke(this, "claimREADONLY", [O, bq], nil)), c) | |
553 | + | if ((cM == cM)) | |
545 | 554 | then { | |
546 | - | let cP = value(getInteger(am())) | |
547 | - | let cQ = value(getInteger(au(K))) | |
548 | - | let cR = value(getInteger(as(K))) | |
549 | - | makeString(["%d%d%d%d%d%d", toString(cK), toString(cQ), toString(cR), toString(bP), toString(ca), toString(cP), toString(cN)], c) | |
550 | - | } | |
551 | - | else makeString(["%d%d%d%d%d%d", toString(cK), toString(bO), toString(bM), toString(bP), toString(ca), toString(cb), toString(cN)], c) | |
552 | - | $Tuple2(nil, cO) | |
553 | - | } | |
554 | - | ||
555 | - | ||
556 | - | ||
557 | - | @Callable(ch) | |
558 | - | func setManager (cS) = { | |
559 | - | let cT = cg(ch) | |
560 | - | if ((cT == cT)) | |
561 | - | then { | |
562 | - | let cU = fromBase58String(cS) | |
563 | - | if ((cU == cU)) | |
564 | - | then [StringEntry(aC(), cS)] | |
555 | + | let cN = parseIntValue(cM[2]) | |
556 | + | let dg = if ((cN == 0)) | |
557 | + | then true | |
558 | + | else f("user have unclaimed assets") | |
559 | + | if ((dg == dg)) | |
560 | + | then { | |
561 | + | let dh = split(value(getString(ai(bq))), c) | |
562 | + | let cP = parseIntValue(dh[T]) | |
563 | + | let cQ = parseIntValue(dh[U]) | |
564 | + | let cR = parseIntValue(dh[V]) | |
565 | + | let cS = parseIntValue(dh[W]) | |
566 | + | let cT = parseIntValue(dh[X]) | |
567 | + | let di = if ((cQ != 0)) | |
568 | + | then true | |
569 | + | else f("investorRemainingAmount already zero") | |
570 | + | if ((di == di)) | |
571 | + | then { | |
572 | + | let dj = makeString(["%d%d%d%d%d", toString(cP), "0", toString(cR), toString(cS), toString(cT)], c) | |
573 | + | let cV = split(value(getString(ak())), c) | |
574 | + | let cW = parseIntValue(cV[T]) | |
575 | + | let cX = parseIntValue(cV[U]) | |
576 | + | let cY = parseIntValue(cV[V]) | |
577 | + | let cZ = parseIntValue(cV[W]) | |
578 | + | let da = parseIntValue(cV[X]) | |
579 | + | let dk = makeString(["%d%d%d%d%d", toString(cW), toString((cX - cQ)), toString(cY), toString(cZ), toString(da)], c) | |
580 | + | let dd = (valueOrElse(getInteger(aG()), 0) + cQ) | |
581 | + | [StringEntry(aF(bq), toString(cQ)), StringEntry(aG(), toString(dd)), StringEntry(ai(bq), dj), StringEntry(ak(), dk)] | |
582 | + | } | |
583 | + | else throw("Strict value is not equal to itself.") | |
584 | + | } | |
565 | 585 | else throw("Strict value is not equal to itself.") | |
566 | 586 | } | |
567 | 587 | else throw("Strict value is not equal to itself.") | |
569 | 589 | ||
570 | 590 | ||
571 | 591 | ||
572 | - | @Callable(ch) | |
573 | - | func confirmManager () = { | |
574 | - | let cV = cf() | |
575 | - | let cW = if (isDefined(cV)) | |
576 | - | then true | |
577 | - | else throw("No pending manager") | |
578 | - | if ((cW == cW)) | |
592 | + | @Callable(cp) | |
593 | + | func claimREADONLY (bm,bq) = { | |
594 | + | let cF = bl(bm, addressFromStringValue(bq), fromBase58String("")) | |
595 | + | let cx = cF._1 | |
596 | + | let bD = cF._2 | |
597 | + | let cG = cF._3 | |
598 | + | let br = cF._4 | |
599 | + | let bv = cF._5 | |
600 | + | let dl = cF._6 | |
601 | + | let cN = dl[0] | |
602 | + | let dm = dl[1] | |
603 | + | $Tuple2(nil, makeString(["%s%d%d", bq, toString(cN), toString(dm)], c)) | |
604 | + | } | |
605 | + | ||
606 | + | ||
607 | + | ||
608 | + | @Callable(cp) | |
609 | + | func claimV2READONLY (bm,bq) = { | |
610 | + | let cF = bl(bm, addressFromStringValue(bq), fromBase58String("")) | |
611 | + | let cx = cF._1 | |
612 | + | let bD = cF._2 | |
613 | + | let cG = cF._3 | |
614 | + | let br = cF._4 | |
615 | + | let bv = cF._5 | |
616 | + | let dl = cF._6 | |
617 | + | let cN = dl[0] | |
618 | + | let dm = dl[1] | |
619 | + | let ba = aJ() | |
620 | + | let O = ba[D] | |
621 | + | let aX = valueOrElse(getInteger(aD(bq)), 0) | |
622 | + | let df = (aX * 100) | |
623 | + | let dn = (dm + df) | |
624 | + | let do = bC(O, bq, bD, cx[aR]) | |
625 | + | let bX = do._1 | |
626 | + | let bV = do._2 | |
627 | + | let bW = do._3 | |
628 | + | let bE = do._4 | |
629 | + | let bY = do._5 | |
630 | + | let cj = do._6 | |
631 | + | let ck = do._7 | |
632 | + | let bO = do._8 | |
633 | + | let bP = do._9 | |
634 | + | let bR = do._10 | |
635 | + | let dp = valueOrElse(getInteger(au(bO)), 0) | |
636 | + | let dq = (parseIntValue(aO(bq)[V]) - aX) | |
637 | + | let dr = if ((height > dp)) | |
579 | 638 | then { | |
580 | - | let cX = if ((ch.callerPublicKey == value(cV))) | |
581 | - | then true | |
582 | - | else throw("You are not pending manager") | |
583 | - | if ((cX == cX)) | |
584 | - | then [StringEntry(aB(), toBase58String(value(cV))), DeleteEntry(aC())] | |
639 | + | let ds = value(getInteger(aq())) | |
640 | + | let dt = value(getInteger(ay(O))) | |
641 | + | let du = value(getInteger(aw(O))) | |
642 | + | makeString(["%d%d%d%d%d%d", toString(dn), toString(dt), toString(du), toString(bY), toString(cj), toString(ds), toString(dq)], c) | |
643 | + | } | |
644 | + | else makeString(["%d%d%d%d%d%d", toString(dn), toString(bX), toString(bV), toString(bY), toString(cj), toString(ck), toString(dq)], c) | |
645 | + | $Tuple2(nil, dr) | |
646 | + | } | |
647 | + | ||
648 | + | ||
649 | + | ||
650 | + | @Callable(cp) | |
651 | + | func setManager (dv) = { | |
652 | + | let dw = co(cp) | |
653 | + | if ((dw == dw)) | |
654 | + | then { | |
655 | + | let dx = fromBase58String(dv) | |
656 | + | if ((dx == dx)) | |
657 | + | then [StringEntry(aI(), dv)] | |
585 | 658 | else throw("Strict value is not equal to itself.") | |
586 | 659 | } | |
587 | 660 | else throw("Strict value is not equal to itself.") | |
588 | 661 | } | |
589 | 662 | ||
590 | 663 | ||
591 | - | @Verifier(cY) | |
592 | - | func cZ () = { | |
593 | - | let da = { | |
594 | - | let cd = cc() | |
595 | - | if ($isInstanceOf(cd, "ByteVector")) | |
664 | + | ||
665 | + | @Callable(cp) | |
666 | + | func confirmManager () = { | |
667 | + | let dy = cn() | |
668 | + | let dz = if (isDefined(dy)) | |
669 | + | then true | |
670 | + | else throw("No pending manager") | |
671 | + | if ((dz == dz)) | |
672 | + | then { | |
673 | + | let dA = if ((cp.callerPublicKey == value(dy))) | |
674 | + | then true | |
675 | + | else throw("You are not pending manager") | |
676 | + | if ((dA == dA)) | |
677 | + | then [StringEntry(aH(), toBase58String(value(dy))), DeleteEntry(aI())] | |
678 | + | else throw("Strict value is not equal to itself.") | |
679 | + | } | |
680 | + | else throw("Strict value is not equal to itself.") | |
681 | + | } | |
682 | + | ||
683 | + | ||
684 | + | @Verifier(dB) | |
685 | + | func dC () = { | |
686 | + | let dD = { | |
687 | + | let j = cl() | |
688 | + | if ($isInstanceOf(j, "ByteVector")) | |
596 | 689 | then { | |
597 | - | let | |
598 | - | | |
690 | + | let cr = j | |
691 | + | cr | |
599 | 692 | } | |
600 | - | else if ($isInstanceOf( | |
601 | - | then | |
693 | + | else if ($isInstanceOf(j, "Unit")) | |
694 | + | then dB.senderPublicKey | |
602 | 695 | else throw("Match error") | |
603 | 696 | } | |
604 | - | sigVerify( | |
697 | + | sigVerify(dB.bodyBytes, dB.proofs[0], dD) | |
605 | 698 | } | |
606 | 699 |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = valueOrErrorMessage(getString(b), (("mandatory this." + b) + " is not defined")) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | let c = "__" | |
8 | 8 | ||
9 | 9 | let d = toBigInt(1000000000000000000) | |
10 | 10 | ||
11 | 11 | let e = 100000000 | |
12 | 12 | ||
13 | 13 | func f (g) = throw(makeString(["ido.ride:", g], " ")) | |
14 | 14 | ||
15 | 15 | ||
16 | - | func h (i,j,k,l,m) = { | |
17 | - | let n = toBigInt(j) | |
18 | - | let o = toBigInt(m) | |
19 | - | let p = fraction(toBigInt(i), d, n) | |
20 | - | let q = fraction(p, toBigInt(l), toBigInt(k)) | |
21 | - | toInt(fraction(q, toBigInt(m), d)) | |
16 | + | func h (i) = { | |
17 | + | let j = i | |
18 | + | if ($isInstanceOf(j, "String")) | |
19 | + | then { | |
20 | + | let k = j | |
21 | + | k | |
22 | + | } | |
23 | + | else throw("fail to cast into String") | |
22 | 24 | } | |
23 | 25 | ||
24 | 26 | ||
25 | - | let r = 1 | |
26 | - | ||
27 | - | let s = 2 | |
28 | - | ||
29 | - | let t = 3 | |
30 | - | ||
31 | - | let u = 4 | |
32 | - | ||
33 | - | let v = 5 | |
34 | - | ||
35 | - | let w = 6 | |
36 | - | ||
37 | - | let x = 7 | |
38 | - | ||
39 | - | let y = 8 | |
40 | - | ||
41 | - | let z = 9 | |
42 | - | ||
43 | - | let A = 10 | |
44 | - | ||
45 | - | let B = 11 | |
46 | - | ||
47 | - | func C (D,E,F,G,k,H,I,J,K,L,M,N) = makeString(["%d%d%d%d%d%d%s%d%s%d%d%d", D, E, F, G, k, H, I, J, K, L, M, N], c) | |
48 | - | ||
49 | - | ||
50 | - | func O (D,E,F,G,k,H,I,J,K,L,M,N) = C(toString(D), toString(E), toString(F), toString(G), toString(k), toString(H), I, toString(J), K, toString(L), toString(M), toString(N)) | |
51 | - | ||
52 | - | ||
53 | - | let P = 1 | |
54 | - | ||
55 | - | let Q = 2 | |
56 | - | ||
57 | - | let R = 3 | |
58 | - | ||
59 | - | let S = 4 | |
60 | - | ||
61 | - | let T = 5 | |
62 | - | ||
63 | - | func U (V,W,X,Y,Z) = makeString(["%d%d%d%d%d", V, W, X, Y, Z], c) | |
64 | - | ||
65 | - | ||
66 | - | func aa (V,W,X,Y,Z) = U(toString(V), toString(W), toString(X), toString(Y), toString(Z)) | |
67 | - | ||
68 | - | ||
69 | - | func ab (i,ac) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(i), toString(ac)], c) | |
70 | - | ||
71 | - | ||
72 | - | func ad () = "%s__config" | |
73 | - | ||
74 | - | ||
75 | - | func ae (af) = ("%s__" + af) | |
76 | - | ||
77 | - | ||
78 | - | func ag () = "%s__totals" | |
79 | - | ||
80 | - | ||
81 | - | func ah (ai,af,aj) = makeString(["%s%s%s%s__history", ai, af, aj], c) | |
82 | - | ||
83 | - | ||
84 | - | func ak () = "%s__usdnClaimDisabled" | |
85 | - | ||
86 | - | ||
87 | - | func al () = "%s__usdnClaimEndHeight" | |
88 | - | ||
89 | - | ||
90 | - | func am () = makeString(["%s", "periodLength"], c) | |
91 | - | ||
92 | - | ||
93 | - | func an () = makeString(["%s", "currentPeriod"], c) | |
94 | - | ||
95 | - | ||
96 | - | func ao (ap) = makeString(["%s%s", "periodStartHeight", toString(ap)], c) | |
97 | - | ||
98 | - | ||
99 | - | func aq (ap) = makeString(["%s%s", "periodEndHeight", toString(ap)], c) | |
100 | - | ||
101 | - | ||
102 | - | func ar () = makeString(["%s", "usdtPriceAssetAllowableRatio"], c) | |
103 | - | ||
104 | - | ||
105 | - | func as (at) = makeString(["%s%s", "totalPeriodAllowance", at], c) | |
106 | - | ||
107 | - | ||
108 | - | func au (at) = makeString(["%s%s", "userPeriodAllowance", at], c) | |
109 | - | ||
110 | - | ||
111 | - | func av (at,ap) = makeString(["%s%s%s", "periodTotalAvailableToClaim", at, toString(ap)], c) | |
112 | - | ||
113 | - | ||
114 | - | func aw (at,ap,af) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", at, toString(ap), af], c) | |
115 | - | ||
116 | - | ||
117 | - | func ax () = makeString(["%s", "usdtPriceAssetStablePool"], c) | |
118 | - | ||
119 | - | ||
120 | - | func ay () = makeString(["%s", "usdtAssetId"], c) | |
121 | - | ||
122 | - | ||
123 | - | func az (aA) = makeString(["%s%s", "priceAssetBalance", aA], c) | |
124 | - | ||
125 | - | ||
126 | - | func aB () = "%s__managerPublicKey" | |
127 | - | ||
128 | - | ||
129 | - | func aC () = "%s__pendingManagerPublicKey" | |
130 | - | ||
131 | - | ||
132 | - | func aD () = split(a(ad()), c) | |
133 | - | ||
134 | - | ||
135 | - | func aE (aF) = split(valueOrElse(getString(aF), U("0", "0", "0", "0", "0")), c) | |
136 | - | ||
137 | - | ||
138 | - | func aG () = aE(ag()) | |
139 | - | ||
140 | - | ||
141 | - | func aH (af) = aE(ae(af)) | |
142 | - | ||
143 | - | ||
144 | - | func aI (af) = split(a(ae(af)), c) | |
145 | - | ||
146 | - | ||
147 | - | let aJ = 0 | |
148 | - | ||
149 | - | let aK = 1 | |
150 | - | ||
151 | - | let aL = 2 | |
152 | - | ||
153 | - | let aM = 3 | |
154 | - | ||
155 | - | func aN (b,aO,aP,aQ,aR) = { | |
156 | - | let V = parseIntValue(aO[P]) | |
157 | - | let W = parseIntValue(aO[Q]) | |
158 | - | let X = parseIntValue(aO[R]) | |
159 | - | let Y = parseIntValue(aO[S]) | |
160 | - | let Z = parseIntValue(aO[T]) | |
161 | - | let aS = (V + aP[aJ]) | |
162 | - | let aT = (W + aP[aK]) | |
163 | - | let aU = aD() | |
164 | - | let K = aU[z] | |
165 | - | let aV = value(assetInfo(fromBase58String(K))).decimals | |
166 | - | let aW = fraction(aR, e, pow(10, 0, aV, 0, 0, DOWN)) | |
167 | - | let aX = ((X + aP[aL]) - aR) | |
168 | - | let aY = ((Y + aP[aM]) + aW) | |
169 | - | if ((0 > aT)) | |
170 | - | then f(makeString(["invalid math", toString(W), toString(aP[aK]), toString(aT), toString(aP[aJ])], " ")) | |
171 | - | else StringEntry(b, aa(aS, aT, aX, aY, aQ)) | |
27 | + | func l (m,n,o,p,q) = { | |
28 | + | let r = toBigInt(n) | |
29 | + | let s = toBigInt(q) | |
30 | + | let t = fraction(toBigInt(m), d, r) | |
31 | + | let u = fraction(t, toBigInt(p), toBigInt(o)) | |
32 | + | toInt(fraction(u, toBigInt(q), d)) | |
172 | 33 | } | |
173 | 34 | ||
174 | 35 | ||
175 | - | func aZ (af,i,ac,ba) = StringEntry(ah("invest", af, toBase58String(ba)), ab(i, ac)) | |
36 | + | let v = 1 | |
37 | + | ||
38 | + | let w = 2 | |
39 | + | ||
40 | + | let x = 3 | |
41 | + | ||
42 | + | let y = 4 | |
43 | + | ||
44 | + | let z = 5 | |
45 | + | ||
46 | + | let A = 6 | |
47 | + | ||
48 | + | let B = 7 | |
49 | + | ||
50 | + | let C = 8 | |
51 | + | ||
52 | + | let D = 9 | |
53 | + | ||
54 | + | let E = 10 | |
55 | + | ||
56 | + | let F = 11 | |
57 | + | ||
58 | + | func G (H,I,J,K,o,L,M,N,O,P,Q,R) = makeString(["%d%d%d%d%d%d%s%d%s%d%d%d", H, I, J, K, o, L, M, N, O, P, Q, R], c) | |
176 | 59 | ||
177 | 60 | ||
178 | - | func | |
61 | + | func S (H,I,J,K,o,L,M,N,O,P,Q,R) = G(toString(H), toString(I), toString(J), toString(K), toString(o), toString(L), M, toString(N), O, toString(P), toString(Q), toString(R)) | |
179 | 62 | ||
180 | 63 | ||
181 | - | func bc (bd,af,ba) = { | |
182 | - | let aU = aD() | |
183 | - | let F = parseIntValue(aU[t]) | |
184 | - | let G = parseIntValue(aU[u]) | |
185 | - | let be = (F + G) | |
186 | - | let k = parseIntValue(aU[v]) | |
187 | - | let H = parseIntValue(aU[w]) | |
188 | - | let I = aU[x] | |
189 | - | let bf = fromBase58String(I) | |
190 | - | let J = parseIntValue(aU[y]) | |
191 | - | let K = aU[z] | |
192 | - | let bg = fromBase58String(K) | |
193 | - | let L = parseIntValue(aU[A]) | |
194 | - | let bh = toString(af) | |
195 | - | let bi = aI(bh) | |
196 | - | let bj = parseIntValue(bi[P]) | |
197 | - | let bk = parseIntValue(bi[T]) | |
198 | - | let bl = if ((F >= bk)) | |
199 | - | then F | |
200 | - | else bk | |
201 | - | let bm = if ((height > be)) | |
202 | - | then be | |
203 | - | else if ((F > height)) | |
204 | - | then F | |
64 | + | let T = 1 | |
65 | + | ||
66 | + | let U = 2 | |
67 | + | ||
68 | + | let V = 3 | |
69 | + | ||
70 | + | let W = 4 | |
71 | + | ||
72 | + | let X = 5 | |
73 | + | ||
74 | + | func Y (Z,aa,ab,ac,ad) = makeString(["%d%d%d%d%d", Z, aa, ab, ac, ad], c) | |
75 | + | ||
76 | + | ||
77 | + | func ae (Z,aa,ab,ac,ad) = Y(toString(Z), toString(aa), toString(ab), toString(ac), toString(ad)) | |
78 | + | ||
79 | + | ||
80 | + | func af (m,ag) = makeString(["%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(m), toString(ag)], c) | |
81 | + | ||
82 | + | ||
83 | + | func ah () = "%s__config" | |
84 | + | ||
85 | + | ||
86 | + | func ai (aj) = ("%s__" + aj) | |
87 | + | ||
88 | + | ||
89 | + | func ak () = "%s__totals" | |
90 | + | ||
91 | + | ||
92 | + | func al (am,aj,an) = makeString(["%s%s%s%s__history", am, aj, an], c) | |
93 | + | ||
94 | + | ||
95 | + | func ao () = "%s__usdnClaimDisabled" | |
96 | + | ||
97 | + | ||
98 | + | func ap () = "%s__usdnClaimEndHeight" | |
99 | + | ||
100 | + | ||
101 | + | func aq () = makeString(["%s", "periodLength"], c) | |
102 | + | ||
103 | + | ||
104 | + | func ar () = makeString(["%s", "currentPeriod"], c) | |
105 | + | ||
106 | + | ||
107 | + | func as (at) = makeString(["%s%s", "periodStartHeight", toString(at)], c) | |
108 | + | ||
109 | + | ||
110 | + | func au (at) = makeString(["%s%s", "periodEndHeight", toString(at)], c) | |
111 | + | ||
112 | + | ||
113 | + | func av () = makeString(["%s", "usdtPriceAssetAllowableRatio"], c) | |
114 | + | ||
115 | + | ||
116 | + | func aw (ax) = makeString(["%s%s", "totalPeriodAllowance", ax], c) | |
117 | + | ||
118 | + | ||
119 | + | func ay (ax) = makeString(["%s%s", "userPeriodAllowance", ax], c) | |
120 | + | ||
121 | + | ||
122 | + | func az (ax,at) = makeString(["%s%s%s", "periodTotalAvailableToClaim", ax, toString(at)], c) | |
123 | + | ||
124 | + | ||
125 | + | func aA (ax,at,aj) = makeString(["%s%s%s%s", "periodUserAvailableToClaim", ax, toString(at), aj], c) | |
126 | + | ||
127 | + | ||
128 | + | func aB () = makeString(["%s", "usdtPriceAssetStablePool"], c) | |
129 | + | ||
130 | + | ||
131 | + | func aC () = makeString(["%s", "usdtAssetId"], c) | |
132 | + | ||
133 | + | ||
134 | + | func aD (aE) = makeString(["%s%s", "priceAssetBalance", aE], c) | |
135 | + | ||
136 | + | ||
137 | + | func aF (aE) = makeString(["%s%s", "investorRemainingAmount", aE], c) | |
138 | + | ||
139 | + | ||
140 | + | func aG () = makeString(["%s", "totalRemainingAmount"], c) | |
141 | + | ||
142 | + | ||
143 | + | func aH () = "%s__managerPublicKey" | |
144 | + | ||
145 | + | ||
146 | + | func aI () = "%s__pendingManagerPublicKey" | |
147 | + | ||
148 | + | ||
149 | + | func aJ () = split(a(ah()), c) | |
150 | + | ||
151 | + | ||
152 | + | func aK (aL) = split(valueOrElse(getString(aL), Y("0", "0", "0", "0", "0")), c) | |
153 | + | ||
154 | + | ||
155 | + | func aM () = aK(ak()) | |
156 | + | ||
157 | + | ||
158 | + | func aN (aj) = aK(ai(aj)) | |
159 | + | ||
160 | + | ||
161 | + | func aO (aj) = split(a(ai(aj)), c) | |
162 | + | ||
163 | + | ||
164 | + | let aP = 0 | |
165 | + | ||
166 | + | let aQ = 1 | |
167 | + | ||
168 | + | let aR = 2 | |
169 | + | ||
170 | + | let aS = 3 | |
171 | + | ||
172 | + | func aT (b,aU,aV,aW,aX) = { | |
173 | + | let Z = parseIntValue(aU[T]) | |
174 | + | let aa = parseIntValue(aU[U]) | |
175 | + | let ab = parseIntValue(aU[V]) | |
176 | + | let ac = parseIntValue(aU[W]) | |
177 | + | let ad = parseIntValue(aU[X]) | |
178 | + | let aY = (Z + aV[aP]) | |
179 | + | let aZ = (aa + aV[aQ]) | |
180 | + | let ba = aJ() | |
181 | + | let O = ba[D] | |
182 | + | let bb = value(assetInfo(fromBase58String(O))).decimals | |
183 | + | let bc = fraction(aX, e, pow(10, 0, bb, 0, 0, DOWN)) | |
184 | + | let bd = ((ab + aV[aR]) - aX) | |
185 | + | let be = ((ac + aV[aS]) + bc) | |
186 | + | let bf = if ((0 > aZ)) | |
187 | + | then { | |
188 | + | let bg = ((aY - bd) - be) | |
189 | + | let bh = if ((0 > bg)) | |
190 | + | then 0 | |
191 | + | else bg | |
192 | + | StringEntry(b, ae(aY, bh, bd, be, aW)) | |
193 | + | } | |
194 | + | else StringEntry(b, ae(aY, aZ, bd, be, aW)) | |
195 | + | bf | |
196 | + | } | |
197 | + | ||
198 | + | ||
199 | + | func bi (aj,m,ag,bj) = StringEntry(al("invest", aj, toBase58String(bj)), af(m, ag)) | |
200 | + | ||
201 | + | ||
202 | + | func bk (aj,m,ag,bj) = StringEntry(al("claim", aj, toBase58String(bj)), af(m, ag)) | |
203 | + | ||
204 | + | ||
205 | + | func bl (bm,aj,bj) = { | |
206 | + | let ba = aJ() | |
207 | + | let J = parseIntValue(ba[x]) | |
208 | + | let K = parseIntValue(ba[y]) | |
209 | + | let bn = (J + K) | |
210 | + | let o = parseIntValue(ba[z]) | |
211 | + | let L = parseIntValue(ba[A]) | |
212 | + | let M = ba[B] | |
213 | + | let bo = fromBase58String(M) | |
214 | + | let N = parseIntValue(ba[C]) | |
215 | + | let O = ba[D] | |
216 | + | let bp = fromBase58String(O) | |
217 | + | let P = parseIntValue(ba[E]) | |
218 | + | let bq = toString(aj) | |
219 | + | let br = aO(bq) | |
220 | + | let bs = parseIntValue(br[T]) | |
221 | + | let bt = parseIntValue(br[X]) | |
222 | + | let bu = if ((J >= bt)) | |
223 | + | then J | |
224 | + | else bt | |
225 | + | let bv = if ((height > bn)) | |
226 | + | then bn | |
227 | + | else if ((J > height)) | |
228 | + | then J | |
205 | 229 | else height | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | - | then | |
230 | + | let bw = (bv - bu) | |
231 | + | let bx = fraction(bs, bw, K) | |
232 | + | let by = l(bx, P, o, L, N) | |
233 | + | let bz = (bm == O) | |
234 | + | let bA = valueOrElse(getBoolean(ao()), false) | |
235 | + | let bB = [if (!(if (bz) | |
236 | + | then bA | |
213 | 237 | else false)) | |
214 | 238 | then true | |
215 | 239 | else throw("USDN claim is disabled")] | |
216 | - | if (( | |
217 | - | then if (( | |
218 | - | then $Tuple6([0, -( | |
219 | - | else if (( | |
220 | - | then $Tuple6([0, -( | |
221 | - | else throw(("unsupported assetId: " + | |
240 | + | if ((bB == bB)) | |
241 | + | then if ((bm == O)) | |
242 | + | then $Tuple6([0, -(bx), bx, 0], bx, bp, br, bv, [bx, by]) | |
243 | + | else if ((bm == M)) | |
244 | + | then $Tuple6([0, -(bx), 0, by], by, bo, br, bv, [bx, by]) | |
245 | + | else throw(("unsupported assetId: " + bm)) | |
222 | 246 | else throw("Strict value is not equal to itself.") | |
223 | 247 | } | |
224 | 248 | ||
225 | 249 | ||
226 | - | func | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
250 | + | func bC (O,bq,bD,bE) = { | |
251 | + | let bF = value(getInteger(aw(O))) | |
252 | + | let bG = value(getInteger(ay(O))) | |
253 | + | let bH = value(getInteger(aq())) | |
254 | + | let bI = valueOrElse(getInteger(ar()), 0) | |
255 | + | let bJ = isDefined(getInteger(au(0))) | |
256 | + | let bK = if ((bI > 0)) | |
233 | 257 | then { | |
234 | - | let | |
235 | - | let | |
236 | - | let | |
258 | + | let bL = value(getInteger(as(bI))) | |
259 | + | let bM = value(getInteger(au(bI))) | |
260 | + | let bN = if ((height > bM)) | |
237 | 261 | then { | |
238 | - | let | |
239 | - | let | |
262 | + | let bO = (bI + 1) | |
263 | + | let bP = if ((height > (bM + bH))) | |
240 | 264 | then { | |
241 | - | let | |
242 | - | if (( | |
243 | - | then ((height - | |
244 | - | else (height - | |
265 | + | let bQ = ((height - bM) % bH) | |
266 | + | if ((bQ == 0)) | |
267 | + | then ((height - bH) + 1) | |
268 | + | else (height - bQ) | |
245 | 269 | } | |
246 | - | else ( | |
247 | - | let | |
248 | - | $Tuple3( | |
270 | + | else (bM + 1) | |
271 | + | let bR = ((bP + bH) - 1) | |
272 | + | $Tuple3(bO, bP, bR) | |
249 | 273 | } | |
250 | - | else $Tuple3( | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | $Tuple3( | |
274 | + | else $Tuple3(bI, bL, bM) | |
275 | + | let bO = bN._1 | |
276 | + | let bP = bN._2 | |
277 | + | let bR = bN._3 | |
278 | + | $Tuple3(bO, bP, bR) | |
255 | 279 | } | |
256 | - | else if ( | |
280 | + | else if (bJ) | |
257 | 281 | then { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
282 | + | let bS = value(getInteger(as(0))) | |
283 | + | let bT = value(getInteger(au(0))) | |
284 | + | let bU = if ((height > bT)) | |
261 | 285 | then { | |
262 | - | let | |
263 | - | let | |
264 | - | let | |
265 | - | $Tuple3( | |
286 | + | let bO = (bI + 1) | |
287 | + | let bP = (bT + 1) | |
288 | + | let bR = ((bP + bH) - 1) | |
289 | + | $Tuple3(bO, bP, bR) | |
266 | 290 | } | |
267 | - | else $Tuple3( | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | $Tuple3( | |
291 | + | else $Tuple3(bI, bS, bT) | |
292 | + | let bO = bU._1 | |
293 | + | let bP = bU._2 | |
294 | + | let bR = bU._3 | |
295 | + | $Tuple3(bO, bP, bR) | |
272 | 296 | } | |
273 | - | else $Tuple3( | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
285 | - | if ($isInstanceOf( | |
286 | - | then | |
287 | - | else throw(" | |
297 | + | else $Tuple3(bI, valueOrElse(getInteger(as(bI)), height), valueOrElse(getInteger(au(bI)), ((height + bH) - 1))) | |
298 | + | let bO = bK._1 | |
299 | + | let bP = bK._2 | |
300 | + | let bR = bK._3 | |
301 | + | let bV = valueOrElse(getInteger(az(O, bO)), bF) | |
302 | + | let bW = valueOrElse(getInteger(aA(O, bO, bq)), bG) | |
303 | + | let aX = valueOrElse(getInteger(aD(bq)), 0) | |
304 | + | let bX = min([(bD + aX), bV, bW]) | |
305 | + | let bY = value(getInteger(av())) | |
306 | + | let bZ = e | |
307 | + | let ca = { | |
308 | + | let cb = invoke(addressFromStringValue(value(getString(aB()))), "putOneTknV2WithoutTakeFeeREADONLY", [bZ, O], nil) | |
309 | + | if ($isInstanceOf(cb, "(Int, Int, Int)")) | |
310 | + | then cb | |
311 | + | else throw(($getType(cb) + " couldn't be cast to (Int, Int, Int)")) | |
288 | 312 | } | |
289 | - | if (( | |
313 | + | if ((ca == ca)) | |
290 | 314 | then { | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | if ($isInstanceOf( | |
298 | - | then | |
299 | - | else throw(" | |
315 | + | let cc = ca._3 | |
316 | + | let cd = ca._2 | |
317 | + | let ce = ca._1 | |
318 | + | let cf = value(getString(aC())) | |
319 | + | let cg = { | |
320 | + | let cb = invoke(addressFromStringValue(value(getString(aB()))), "getOneTknV2READONLY", [cf, ce], nil) | |
321 | + | if ($isInstanceOf(cb, "(Int, Int)")) | |
322 | + | then cb | |
323 | + | else throw(($getType(cb) + " couldn't be cast to (Int, Int)")) | |
300 | 324 | } | |
301 | - | if (( | |
325 | + | if ((cg == cg)) | |
302 | 326 | then { | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | $Tuple10( | |
327 | + | let ch = cg._2 | |
328 | + | let ci = cg._1 | |
329 | + | let cj = fraction(bZ, e, ci) | |
330 | + | let ck = (bR - height) | |
331 | + | $Tuple10(bX, bV, bW, bE, bY, cj, ck, bO, bP, bR) | |
308 | 332 | } | |
309 | 333 | else throw("Strict value is not equal to itself.") | |
310 | 334 | } | |
311 | 335 | else throw("Strict value is not equal to itself.") | |
312 | 336 | } | |
313 | 337 | ||
314 | 338 | ||
315 | - | func | |
316 | - | let | |
317 | - | if ($isInstanceOf( | |
339 | + | func cl () = { | |
340 | + | let j = getString(aH()) | |
341 | + | if ($isInstanceOf(j, "String")) | |
318 | 342 | then { | |
319 | - | let | |
320 | - | fromBase58String( | |
343 | + | let cm = j | |
344 | + | fromBase58String(cm) | |
321 | 345 | } | |
322 | - | else if ($isInstanceOf( | |
346 | + | else if ($isInstanceOf(j, "Unit")) | |
323 | 347 | then unit | |
324 | 348 | else throw("Match error") | |
325 | 349 | } | |
326 | 350 | ||
327 | 351 | ||
328 | - | func | |
329 | - | let | |
330 | - | if ($isInstanceOf( | |
352 | + | func cn () = { | |
353 | + | let j = getString(aI()) | |
354 | + | if ($isInstanceOf(j, "String")) | |
331 | 355 | then { | |
332 | - | let | |
333 | - | fromBase58String( | |
356 | + | let cm = j | |
357 | + | fromBase58String(cm) | |
334 | 358 | } | |
335 | - | else if ($isInstanceOf( | |
359 | + | else if ($isInstanceOf(j, "Unit")) | |
336 | 360 | then unit | |
337 | 361 | else throw("Match error") | |
338 | 362 | } | |
339 | 363 | ||
340 | 364 | ||
341 | - | func | |
342 | - | let | |
343 | - | let | |
344 | - | if ($isInstanceOf( | |
365 | + | func co (cp) = { | |
366 | + | let cq = throw("Permission denied") | |
367 | + | let j = cl() | |
368 | + | if ($isInstanceOf(j, "ByteVector")) | |
345 | 369 | then { | |
346 | - | let | |
347 | - | if (( | |
370 | + | let cr = j | |
371 | + | if ((cp.callerPublicKey == cr)) | |
348 | 372 | then true | |
349 | - | else | |
373 | + | else cq | |
350 | 374 | } | |
351 | - | else if ($isInstanceOf( | |
352 | - | then if (( | |
375 | + | else if ($isInstanceOf(j, "Unit")) | |
376 | + | then if ((cp.caller == this)) | |
353 | 377 | then true | |
354 | - | else | |
378 | + | else cq | |
355 | 379 | else throw("Match error") | |
356 | 380 | } | |
357 | 381 | ||
358 | 382 | ||
359 | - | @Callable( | |
360 | - | func constructor ( | |
361 | - | let | |
362 | - | let | |
363 | - | if (isDefined(getString( | |
383 | + | @Callable(cp) | |
384 | + | func constructor (H,I,J,K,o,O,Q) = { | |
385 | + | let L = ((100 * 1000) * 1000) | |
386 | + | let cs = (H + I) | |
387 | + | if (isDefined(getString(ah()))) | |
364 | 388 | then throw("already initialized") | |
365 | - | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString( | |
389 | + | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(cp.caller))) | |
366 | 390 | then throw("not authorized") | |
367 | - | else if ((size( | |
391 | + | else if ((size(cp.payments) != 1)) | |
368 | 392 | then throw("exactly 1 payment must be attached") | |
369 | - | else if (( | |
393 | + | else if ((cs >= J)) | |
370 | 394 | then throw("claimStart must be greater than idoEnd") | |
371 | 395 | else { | |
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | [StringEntry( | |
396 | + | let ct = value(cp.payments[0]) | |
397 | + | let bo = value(ct.assetId) | |
398 | + | let cu = valueOrErrorMessage(assetInfo(bo), "fail to load ido asset info") | |
399 | + | let M = toBase58String(bo) | |
400 | + | let N = pow(10, 0, cu.decimals, 0, 0, DOWN) | |
401 | + | let bp = fromBase58String(O) | |
402 | + | let cv = valueOrErrorMessage(assetInfo(bp), "fail to load price asset info") | |
403 | + | let P = pow(10, 0, cv.decimals, 0, 0, DOWN) | |
404 | + | let cw = aM() | |
405 | + | let cx = [0, 0, 0, 0] | |
406 | + | [StringEntry(ah(), S(H, I, J, K, o, L, M, N, O, P, Q, ct.amount)), aT(ak(), cw, cx, J, 0)] | |
383 | 407 | } | |
384 | 408 | } | |
385 | 409 | ||
386 | 410 | ||
387 | 411 | ||
388 | - | @Callable( | |
412 | + | @Callable(cp) | |
389 | 413 | func invest () = { | |
390 | - | let | |
391 | - | let | |
392 | - | let | |
393 | - | let | |
394 | - | let | |
395 | - | let | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | if (( | |
414 | + | let ba = aJ() | |
415 | + | let H = parseIntValue(ba[v]) | |
416 | + | let I = parseIntValue(ba[w]) | |
417 | + | let cs = (H + I) | |
418 | + | let J = parseIntValue(ba[x]) | |
419 | + | let K = parseIntValue(ba[y]) | |
420 | + | let o = parseIntValue(ba[z]) | |
421 | + | let L = parseIntValue(ba[A]) | |
422 | + | let M = ba[B] | |
423 | + | let bo = fromBase58String(M) | |
424 | + | let N = parseIntValue(ba[C]) | |
425 | + | let O = ba[D] | |
426 | + | let bp = fromBase58String(O) | |
427 | + | let P = parseIntValue(ba[E]) | |
428 | + | let cy = parseIntValue(ba[F]) | |
429 | + | let aj = toString(cp.caller) | |
430 | + | if ((H > height)) | |
407 | 431 | then throw("ido has not been started yet") | |
408 | - | else if ((height > | |
432 | + | else if ((height > cs)) | |
409 | 433 | then throw("ido has been already ended") | |
410 | - | else if ((size( | |
434 | + | else if ((size(cp.payments) != 1)) | |
411 | 435 | then throw("exactly 1 payment is expected") | |
412 | 436 | else { | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | if (( | |
417 | - | then throw((("invalid payment asset id: " + toBase58String( | |
437 | + | let ct = value(cp.payments[0]) | |
438 | + | let cz = value(ct.assetId) | |
439 | + | let cA = ct.amount | |
440 | + | if ((cz != bp)) | |
441 | + | then throw((("invalid payment asset id: " + toBase58String(cz)) + " is expected")) | |
418 | 442 | else { | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
423 | - | if (( | |
443 | + | let cB = aN(aj) | |
444 | + | let cw = aM() | |
445 | + | let cC = (parseIntValue(cw[T]) + cA) | |
446 | + | let cD = (cC * 100) | |
447 | + | if ((cD > assetBalance(this, bo))) | |
424 | 448 | then throw("IDO asset has been - sold consider to use smaller payment") | |
425 | 449 | else { | |
426 | - | let | |
427 | - | [ | |
450 | + | let cx = [cA, cA, 0, 0] | |
451 | + | [aT(ai(aj), cB, cx, J, 0), aT(ak(), cw, cx, J, 0), bi(aj, cA, 0, cp.transactionId)] | |
428 | 452 | } | |
429 | 453 | } | |
430 | 454 | } | |
431 | 455 | } | |
432 | 456 | ||
433 | 457 | ||
434 | 458 | ||
435 | - | @Callable( | |
436 | - | func claim ( | |
437 | - | let | |
438 | - | if (( | |
459 | + | @Callable(cp) | |
460 | + | func claim (bm,bq) = { | |
461 | + | let cE = toString(cp.caller) | |
462 | + | if ((bq != cE)) | |
439 | 463 | then throw("not authorized") | |
440 | 464 | else { | |
441 | - | let | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
465 | + | let ba = aJ() | |
466 | + | let O = ba[D] | |
467 | + | let cF = bl(bm, cp.caller, cp.transactionId) | |
468 | + | let cx = cF._1 | |
469 | + | let bD = cF._2 | |
470 | + | let cG = cF._3 | |
471 | + | let br = cF._4 | |
472 | + | let bv = cF._5 | |
473 | + | let cH = cx[aR] | |
474 | + | let cI = cx[aS] | |
475 | + | let aX = valueOrElse(getInteger(aD(bq)), 0) | |
476 | + | let bb = value(assetInfo(fromBase58String(O))).decimals | |
477 | + | let bf = if ((bm == O)) | |
454 | 478 | then { | |
455 | - | let | |
456 | - | let | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
466 | - | let | |
479 | + | let cJ = bC(O, bq, bD, cx[aR]) | |
480 | + | let bX = cJ._1 | |
481 | + | let bV = cJ._2 | |
482 | + | let bW = cJ._3 | |
483 | + | let bE = cJ._4 | |
484 | + | let bY = cJ._5 | |
485 | + | let cj = cJ._6 | |
486 | + | let ck = cJ._7 | |
487 | + | let bO = cJ._8 | |
488 | + | let bP = cJ._9 | |
489 | + | let bR = cJ._10 | |
490 | + | let bB = [if ((bW > 0)) | |
467 | 491 | then true | |
468 | - | else f("unavailable to claim because user period allowance reached"), if (( | |
492 | + | else f("unavailable to claim because user period allowance reached"), if ((bV > 0)) | |
469 | 493 | then true | |
470 | - | else f("unavailable to claim because total period allowance reached"), if (( | |
494 | + | else f("unavailable to claim because total period allowance reached"), if ((bX > 0)) | |
471 | 495 | then true | |
472 | - | else f("nothing to claim"), if (( | |
496 | + | else f("nothing to claim"), if ((bY > cj)) | |
473 | 497 | then true | |
474 | 498 | else f("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")] | |
475 | - | if (( | |
499 | + | if ((bB == bB)) | |
476 | 500 | then { | |
477 | - | let | |
478 | - | let | |
479 | - | let | |
480 | - | then [ScriptTransfer( | |
501 | + | let cK = (bV - bX) | |
502 | + | let cL = (bW - bX) | |
503 | + | let bf = if ((aX > bX)) | |
504 | + | then [ScriptTransfer(cp.caller, bX, cG), IntegerEntry(aD(bq), (aX - bX))] | |
481 | 505 | else { | |
482 | - | let cF = ((aR + bu) - bO) | |
483 | - | [ScriptTransfer(ch.caller, bO, cy), aN(ae(bh), bi, cp, bm, 0), aN(ag(), aG(), cp, bm, 0), IntegerEntry(az(bh), cF)] | |
506 | + | let cM = split(h(invoke(this, "claimREADONLY", [O, bq], nil)), c) | |
507 | + | if ((cM == cM)) | |
508 | + | then { | |
509 | + | let cN = parseIntValue(cM[3]) | |
510 | + | let cO = if ((cN == bX)) | |
511 | + | then { | |
512 | + | let cP = parseIntValue(br[T]) | |
513 | + | let cQ = parseIntValue(br[U]) | |
514 | + | let cR = parseIntValue(br[V]) | |
515 | + | let cS = parseIntValue(br[W]) | |
516 | + | let cT = parseIntValue(br[X]) | |
517 | + | let cU = [toString(cP), "0", toString(cR), toString(cS), toString(cT)] | |
518 | + | let cV = aM() | |
519 | + | let cW = parseIntValue(cV[T]) | |
520 | + | let cX = parseIntValue(cV[U]) | |
521 | + | let cY = parseIntValue(cV[V]) | |
522 | + | let cZ = parseIntValue(cV[W]) | |
523 | + | let da = parseIntValue(cV[X]) | |
524 | + | let db = (cX - cQ) | |
525 | + | let dc = [toString(cW), toString(db), toString(cY), toString(cZ), toString(da)] | |
526 | + | let dd = (valueOrElse(getInteger(aG()), 0) + cQ) | |
527 | + | [StringEntry(aF(bq), toString(cQ)), StringEntry(aG(), toString(dd)), aT(ai(bq), cU, cx, bv, 0), aT(ak(), dc, cx, bv, 0)] | |
528 | + | } | |
529 | + | else [aT(ai(bq), br, cx, bv, 0), aT(ak(), aM(), cx, bv, 0)] | |
530 | + | let de = ((aX + bD) - bX) | |
531 | + | ([ScriptTransfer(cp.caller, bX, cG), IntegerEntry(aD(bq), de)] ++ cO) | |
532 | + | } | |
533 | + | else throw("Strict value is not equal to itself.") | |
484 | 534 | } | |
485 | - | $Tuple2(([IntegerEntry( | |
535 | + | $Tuple2(([IntegerEntry(ar(), bO), IntegerEntry(as(bO), bP), IntegerEntry(au(bO), bR), IntegerEntry(az(O, bO), cK), IntegerEntry(aA(O, bO, bq), cL), bk(bq, bX, cI, cp.transactionId)] ++ bf), unit) | |
486 | 536 | } | |
487 | 537 | else throw("Strict value is not equal to itself.") | |
488 | 538 | } | |
489 | 539 | else { | |
490 | - | let | |
491 | - | $Tuple2([ScriptTransfer( | |
540 | + | let df = fraction(aX, e, pow(10, 0, bb, 0, 0, DOWN)) | |
541 | + | $Tuple2([ScriptTransfer(cp.caller, (bD + df), cG), IntegerEntry(aD(bq), 0), aT(ai(bq), br, cx, bv, aX), aT(ak(), aM(), cx, bv, aX), bk(bq, cH, (cI + df), cp.transactionId)], unit) | |
492 | 542 | } | |
493 | - | | |
543 | + | bf | |
494 | 544 | } | |
495 | 545 | } | |
496 | 546 | ||
497 | 547 | ||
498 | 548 | ||
499 | - | @Callable(ch) | |
500 | - | func claimREADONLY (bd,bh) = { | |
501 | - | let cx = bc(bd, addressFromStringValue(bh), fromBase58String("")) | |
502 | - | let cp = cx._1 | |
503 | - | let bu = cx._2 | |
504 | - | let cy = cx._3 | |
505 | - | let bi = cx._4 | |
506 | - | let bm = cx._5 | |
507 | - | let cH = cx._6 | |
508 | - | let cI = cH[0] | |
509 | - | let cJ = cH[1] | |
510 | - | $Tuple2(nil, makeString(["%s%d%d", bh, toString(cI), toString(cJ)], c)) | |
511 | - | } | |
512 | - | ||
513 | - | ||
514 | - | ||
515 | - | @Callable(ch) | |
516 | - | func claimV2READONLY (bd,bh) = { | |
517 | - | let cx = bc(bd, addressFromStringValue(bh), fromBase58String("")) | |
518 | - | let cp = cx._1 | |
519 | - | let bu = cx._2 | |
520 | - | let cy = cx._3 | |
521 | - | let bi = cx._4 | |
522 | - | let bm = cx._5 | |
523 | - | let cH = cx._6 | |
524 | - | let cI = cH[0] | |
525 | - | let cJ = cH[1] | |
526 | - | let aU = aD() | |
527 | - | let K = aU[z] | |
528 | - | let aR = valueOrElse(getInteger(az(bh)), 0) | |
529 | - | let cG = (aR * 100) | |
530 | - | let cK = (cJ + cG) | |
531 | - | let cL = bt(K, bh, bu, cp[aL]) | |
532 | - | let bO = cL._1 | |
533 | - | let bM = cL._2 | |
534 | - | let bN = cL._3 | |
535 | - | let bv = cL._4 | |
536 | - | let bP = cL._5 | |
537 | - | let ca = cL._6 | |
538 | - | let cb = cL._7 | |
539 | - | let bF = cL._8 | |
540 | - | let bG = cL._9 | |
541 | - | let bI = cL._10 | |
542 | - | let cM = valueOrElse(getInteger(aq(bF)), 0) | |
543 | - | let cN = (parseIntValue(aI(bh)[R]) - aR) | |
544 | - | let cO = if ((height > cM)) | |
549 | + | @Callable(cp) | |
550 | + | func cleanRemaingAmount (bq) = { | |
551 | + | let O = aJ()[D] | |
552 | + | let cM = split(h(invoke(this, "claimREADONLY", [O, bq], nil)), c) | |
553 | + | if ((cM == cM)) | |
545 | 554 | then { | |
546 | - | let cP = value(getInteger(am())) | |
547 | - | let cQ = value(getInteger(au(K))) | |
548 | - | let cR = value(getInteger(as(K))) | |
549 | - | makeString(["%d%d%d%d%d%d", toString(cK), toString(cQ), toString(cR), toString(bP), toString(ca), toString(cP), toString(cN)], c) | |
550 | - | } | |
551 | - | else makeString(["%d%d%d%d%d%d", toString(cK), toString(bO), toString(bM), toString(bP), toString(ca), toString(cb), toString(cN)], c) | |
552 | - | $Tuple2(nil, cO) | |
553 | - | } | |
554 | - | ||
555 | - | ||
556 | - | ||
557 | - | @Callable(ch) | |
558 | - | func setManager (cS) = { | |
559 | - | let cT = cg(ch) | |
560 | - | if ((cT == cT)) | |
561 | - | then { | |
562 | - | let cU = fromBase58String(cS) | |
563 | - | if ((cU == cU)) | |
564 | - | then [StringEntry(aC(), cS)] | |
555 | + | let cN = parseIntValue(cM[2]) | |
556 | + | let dg = if ((cN == 0)) | |
557 | + | then true | |
558 | + | else f("user have unclaimed assets") | |
559 | + | if ((dg == dg)) | |
560 | + | then { | |
561 | + | let dh = split(value(getString(ai(bq))), c) | |
562 | + | let cP = parseIntValue(dh[T]) | |
563 | + | let cQ = parseIntValue(dh[U]) | |
564 | + | let cR = parseIntValue(dh[V]) | |
565 | + | let cS = parseIntValue(dh[W]) | |
566 | + | let cT = parseIntValue(dh[X]) | |
567 | + | let di = if ((cQ != 0)) | |
568 | + | then true | |
569 | + | else f("investorRemainingAmount already zero") | |
570 | + | if ((di == di)) | |
571 | + | then { | |
572 | + | let dj = makeString(["%d%d%d%d%d", toString(cP), "0", toString(cR), toString(cS), toString(cT)], c) | |
573 | + | let cV = split(value(getString(ak())), c) | |
574 | + | let cW = parseIntValue(cV[T]) | |
575 | + | let cX = parseIntValue(cV[U]) | |
576 | + | let cY = parseIntValue(cV[V]) | |
577 | + | let cZ = parseIntValue(cV[W]) | |
578 | + | let da = parseIntValue(cV[X]) | |
579 | + | let dk = makeString(["%d%d%d%d%d", toString(cW), toString((cX - cQ)), toString(cY), toString(cZ), toString(da)], c) | |
580 | + | let dd = (valueOrElse(getInteger(aG()), 0) + cQ) | |
581 | + | [StringEntry(aF(bq), toString(cQ)), StringEntry(aG(), toString(dd)), StringEntry(ai(bq), dj), StringEntry(ak(), dk)] | |
582 | + | } | |
583 | + | else throw("Strict value is not equal to itself.") | |
584 | + | } | |
565 | 585 | else throw("Strict value is not equal to itself.") | |
566 | 586 | } | |
567 | 587 | else throw("Strict value is not equal to itself.") | |
568 | 588 | } | |
569 | 589 | ||
570 | 590 | ||
571 | 591 | ||
572 | - | @Callable(ch) | |
573 | - | func confirmManager () = { | |
574 | - | let cV = cf() | |
575 | - | let cW = if (isDefined(cV)) | |
576 | - | then true | |
577 | - | else throw("No pending manager") | |
578 | - | if ((cW == cW)) | |
592 | + | @Callable(cp) | |
593 | + | func claimREADONLY (bm,bq) = { | |
594 | + | let cF = bl(bm, addressFromStringValue(bq), fromBase58String("")) | |
595 | + | let cx = cF._1 | |
596 | + | let bD = cF._2 | |
597 | + | let cG = cF._3 | |
598 | + | let br = cF._4 | |
599 | + | let bv = cF._5 | |
600 | + | let dl = cF._6 | |
601 | + | let cN = dl[0] | |
602 | + | let dm = dl[1] | |
603 | + | $Tuple2(nil, makeString(["%s%d%d", bq, toString(cN), toString(dm)], c)) | |
604 | + | } | |
605 | + | ||
606 | + | ||
607 | + | ||
608 | + | @Callable(cp) | |
609 | + | func claimV2READONLY (bm,bq) = { | |
610 | + | let cF = bl(bm, addressFromStringValue(bq), fromBase58String("")) | |
611 | + | let cx = cF._1 | |
612 | + | let bD = cF._2 | |
613 | + | let cG = cF._3 | |
614 | + | let br = cF._4 | |
615 | + | let bv = cF._5 | |
616 | + | let dl = cF._6 | |
617 | + | let cN = dl[0] | |
618 | + | let dm = dl[1] | |
619 | + | let ba = aJ() | |
620 | + | let O = ba[D] | |
621 | + | let aX = valueOrElse(getInteger(aD(bq)), 0) | |
622 | + | let df = (aX * 100) | |
623 | + | let dn = (dm + df) | |
624 | + | let do = bC(O, bq, bD, cx[aR]) | |
625 | + | let bX = do._1 | |
626 | + | let bV = do._2 | |
627 | + | let bW = do._3 | |
628 | + | let bE = do._4 | |
629 | + | let bY = do._5 | |
630 | + | let cj = do._6 | |
631 | + | let ck = do._7 | |
632 | + | let bO = do._8 | |
633 | + | let bP = do._9 | |
634 | + | let bR = do._10 | |
635 | + | let dp = valueOrElse(getInteger(au(bO)), 0) | |
636 | + | let dq = (parseIntValue(aO(bq)[V]) - aX) | |
637 | + | let dr = if ((height > dp)) | |
579 | 638 | then { | |
580 | - | let cX = if ((ch.callerPublicKey == value(cV))) | |
581 | - | then true | |
582 | - | else throw("You are not pending manager") | |
583 | - | if ((cX == cX)) | |
584 | - | then [StringEntry(aB(), toBase58String(value(cV))), DeleteEntry(aC())] | |
639 | + | let ds = value(getInteger(aq())) | |
640 | + | let dt = value(getInteger(ay(O))) | |
641 | + | let du = value(getInteger(aw(O))) | |
642 | + | makeString(["%d%d%d%d%d%d", toString(dn), toString(dt), toString(du), toString(bY), toString(cj), toString(ds), toString(dq)], c) | |
643 | + | } | |
644 | + | else makeString(["%d%d%d%d%d%d", toString(dn), toString(bX), toString(bV), toString(bY), toString(cj), toString(ck), toString(dq)], c) | |
645 | + | $Tuple2(nil, dr) | |
646 | + | } | |
647 | + | ||
648 | + | ||
649 | + | ||
650 | + | @Callable(cp) | |
651 | + | func setManager (dv) = { | |
652 | + | let dw = co(cp) | |
653 | + | if ((dw == dw)) | |
654 | + | then { | |
655 | + | let dx = fromBase58String(dv) | |
656 | + | if ((dx == dx)) | |
657 | + | then [StringEntry(aI(), dv)] | |
585 | 658 | else throw("Strict value is not equal to itself.") | |
586 | 659 | } | |
587 | 660 | else throw("Strict value is not equal to itself.") | |
588 | 661 | } | |
589 | 662 | ||
590 | 663 | ||
591 | - | @Verifier(cY) | |
592 | - | func cZ () = { | |
593 | - | let da = { | |
594 | - | let cd = cc() | |
595 | - | if ($isInstanceOf(cd, "ByteVector")) | |
664 | + | ||
665 | + | @Callable(cp) | |
666 | + | func confirmManager () = { | |
667 | + | let dy = cn() | |
668 | + | let dz = if (isDefined(dy)) | |
669 | + | then true | |
670 | + | else throw("No pending manager") | |
671 | + | if ((dz == dz)) | |
672 | + | then { | |
673 | + | let dA = if ((cp.callerPublicKey == value(dy))) | |
674 | + | then true | |
675 | + | else throw("You are not pending manager") | |
676 | + | if ((dA == dA)) | |
677 | + | then [StringEntry(aH(), toBase58String(value(dy))), DeleteEntry(aI())] | |
678 | + | else throw("Strict value is not equal to itself.") | |
679 | + | } | |
680 | + | else throw("Strict value is not equal to itself.") | |
681 | + | } | |
682 | + | ||
683 | + | ||
684 | + | @Verifier(dB) | |
685 | + | func dC () = { | |
686 | + | let dD = { | |
687 | + | let j = cl() | |
688 | + | if ($isInstanceOf(j, "ByteVector")) | |
596 | 689 | then { | |
597 | - | let | |
598 | - | | |
690 | + | let cr = j | |
691 | + | cr | |
599 | 692 | } | |
600 | - | else if ($isInstanceOf( | |
601 | - | then | |
693 | + | else if ($isInstanceOf(j, "Unit")) | |
694 | + | then dB.senderPublicKey | |
602 | 695 | else throw("Match error") | |
603 | 696 | } | |
604 | - | sigVerify( | |
697 | + | sigVerify(dB.bodyBytes, dB.proofs[0], dD) | |
605 | 698 | } | |
606 | 699 |
github/deemru/w8io/169f3d6 190.68 ms ◑