tx · 9Nqkn9ZExoXmkirPixdcQu6XRKRtFKVJj1Jt2rzsirsp 3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp: -0.02700000 Waves 2022.12.05 09:29 [2346704] smart account 3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp > SELF 0.00000000 Waves
{ "type": 13, "id": "9Nqkn9ZExoXmkirPixdcQu6XRKRtFKVJj1Jt2rzsirsp", "fee": 2700000, "feeAssetId": null, "timestamp": 1670221781031, "version": 1, "sender": "3MqzKJcjfKxqGWSA84WR4kQwZksM5vjxiFp", "senderPublicKey": "bS6Cchmk25EdDcapkz8W5WkZgthTHHW6sSBbcidSrCb", "proofs": [ "2oDcfyHrkUc6Nnpkyr7F1TU99NhCCVZjgKiPByzg33vQEckKiNdc8PkBMEZEUZoUh38EXMTcEx9dBgpfnbHB3HBL" ], "script": "base64:AAIFAAAAAAAAD0QIAhIJCgcBAQEBAQgBEgASBAoCCAgSBAoCCAgSBAoCCAgSAwoBCBIAIg9nZXRTdHJpbmdPckZhaWwiA2tleSIDU0VQIghCVUZTQ0FMRSIGc2NhbGU4Igh0aHJvd0VyciIDbXNnIh1jb252ZXJ0UHJpY2VBc3NldEludG9JZG9Bc3NldCIQcHJpY2VBc3NldEFtb3VudCIOcHJpY2VBc3NldE1VTFQiBXByaWNlIglwcmljZU1VTFQiDGlkb0Fzc2V0TVVMVCIPYlByaWNlQXNzZXRNVUxUIg1iSWRvQXNzZXRNVUxUIg5iUHJpY2VBc3NldEJVRiIPYkFtb3VudEFzc2V0QlVGIg5JZHhDZmdJZG9TdGFydCIRSWR4Q2ZnSWRvRHVyYXRpb24iEElkeENmZ0NsYWltU3RhcnQiE0lkeENmZ0NsYWltRHVyYXRpb24iC0lkeENmZ1ByaWNlIg9JZHhDZmdQcmljZU11bHQiEElkeENmZ0lkb0Fzc2V0SWQiEklkeENmZ0lkb0Fzc2V0TXVsdCISSWR4Q2ZnUHJpY2VBc3NldElkIhRJZHhDZmdQcmljZUFzc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29uZmlybU1hbmFnZXIAAAAABAAAAAJjVgkBAAAAAmNmAAAAAAQAAAACY1cDCQEAAAAJaXNEZWZpbmVkAAAAAQUAAAACY1YGCQAAAgAAAAECAAAAEk5vIHBlbmRpbmcgbWFuYWdlcgMJAAAAAAAAAgUAAAACY1cFAAAAAmNXBAAAAAJjWAMJAAAAAAAAAggFAAAAAmNoAAAAD2NhbGxlclB1YmxpY0tleQkBAAAABXZhbHVlAAAAAQUAAAACY1YGCQAAAgAAAAECAAAAG1lvdSBhcmUgbm90IHBlbmRpbmcgbWFuYWdlcgMJAAAAAAAAAgUAAAACY1gFAAAAAmNYCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAJhQgAAAAAJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQUAAAACY1YJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkBAAAAAmFDAAAAAAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAmNZAQAAAAJjWgAAAAAEAAAAAmRhBAAAAAJjZAkBAAAAAmNjAAAAAAMJAAABAAAAAgUAAAACY2QCAAAACkJ5dGVWZWN0b3IEAAAAAmNqBQAAAAJjZAUAAAACY2oDCQAAAQAAAAIFAAAAAmNkAgAAAARVbml0CAUAAAACY1kAAAAPc2VuZGVyUHVibGljS2V5CQAAAgAAAAECAAAAC01hdGNoIGVycm9yCQAB9AAAAAMIBQAAAAJjWQAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAmNZAAAABnByb29mcwAAAAAAAAAAAAUAAAACZGFs7YUH", "chainId": 84, "height": 2346704, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FUwBGt91eaTzwrgxUkcWTd8iuxQBXJRNxDR58JGuire9 Next: HNAZjp4N6gzhHXAGGALQMBHMmVB7DdPFK7Wkkc7pC3En Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
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) = { | |
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") | |
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)) | |
24 | 22 | } | |
25 | 23 | ||
26 | 24 | ||
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)) | |
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)) | |
33 | 172 | } | |
34 | 173 | ||
35 | 174 | ||
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) | |
175 | + | func aZ (af,i,ac,ba) = StringEntry(ah("invest", af, toBase58String(ba)), ab(i, ac)) | |
59 | 176 | ||
60 | 177 | ||
61 | - | func | |
178 | + | func bb (af,i,ac,ba) = StringEntry(ah("claim", af, toBase58String(ba)), ab(i, ac)) | |
62 | 179 | ||
63 | 180 | ||
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 | |
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 | |
229 | 205 | else height | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | let | |
236 | - | then | |
206 | + | let bn = (bm - bl) | |
207 | + | let bo = fraction(bj, bn, G) | |
208 | + | let bp = h(bo, L, k, H, J) | |
209 | + | let bq = (bd == K) | |
210 | + | let br = valueOrElse(getBoolean(ak()), false) | |
211 | + | let bs = [if (!(if (bq) | |
212 | + | then br | |
237 | 213 | else false)) | |
238 | 214 | then true | |
239 | 215 | else throw("USDN claim is disabled")] | |
240 | - | if (( | |
241 | - | then if (( | |
242 | - | then $Tuple6([0, -( | |
243 | - | else if (( | |
244 | - | then $Tuple6([0, -( | |
245 | - | else throw(("unsupported assetId: " + | |
216 | + | if ((bs == bs)) | |
217 | + | then if ((bd == K)) | |
218 | + | then $Tuple6([0, -(bo), bo, 0], bo, bg, bi, bm, [bo, bp]) | |
219 | + | else if ((bd == I)) | |
220 | + | then $Tuple6([0, -(bo), 0, bp], bp, bf, bi, bm, [bo, bp]) | |
221 | + | else throw(("unsupported assetId: " + bd)) | |
246 | 222 | else throw("Strict value is not equal to itself.") | |
247 | 223 | } | |
248 | 224 | ||
249 | 225 | ||
250 | - | func | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
226 | + | func bt (K,bh,bu,bv) = { | |
227 | + | let bw = value(getInteger(as(K))) | |
228 | + | let bx = value(getInteger(au(K))) | |
229 | + | let by = value(getInteger(am())) | |
230 | + | let bz = valueOrElse(getInteger(an()), 0) | |
231 | + | let bA = isDefined(getInteger(aq(0))) | |
232 | + | let bB = if ((bz > 0)) | |
257 | 233 | then { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
234 | + | let bC = value(getInteger(ao(bz))) | |
235 | + | let bD = value(getInteger(aq(bz))) | |
236 | + | let bE = if ((height > bD)) | |
261 | 237 | then { | |
262 | - | let | |
263 | - | let | |
238 | + | let bF = (bz + 1) | |
239 | + | let bG = if ((height > (bD + by))) | |
264 | 240 | then { | |
265 | - | let | |
266 | - | if (( | |
267 | - | then ((height - | |
268 | - | else (height - | |
241 | + | let bH = ((height - bD) % by) | |
242 | + | if ((bH == 0)) | |
243 | + | then ((height - by) + 1) | |
244 | + | else (height - bH) | |
269 | 245 | } | |
270 | - | else ( | |
271 | - | let | |
272 | - | $Tuple3( | |
246 | + | else (bD + 1) | |
247 | + | let bI = ((bG + by) - 1) | |
248 | + | $Tuple3(bF, bG, bI) | |
273 | 249 | } | |
274 | - | else $Tuple3( | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | $Tuple3( | |
250 | + | else $Tuple3(bz, bC, bD) | |
251 | + | let bF = bE._1 | |
252 | + | let bG = bE._2 | |
253 | + | let bI = bE._3 | |
254 | + | $Tuple3(bF, bG, bI) | |
279 | 255 | } | |
280 | - | else if ( | |
256 | + | else if (bA) | |
281 | 257 | then { | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
258 | + | let bJ = value(getInteger(ao(0))) | |
259 | + | let bK = value(getInteger(aq(0))) | |
260 | + | let bL = if ((height > bK)) | |
285 | 261 | then { | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | $Tuple3( | |
262 | + | let bF = (bz + 1) | |
263 | + | let bG = (bK + 1) | |
264 | + | let bI = ((bG + by) - 1) | |
265 | + | $Tuple3(bF, bG, bI) | |
290 | 266 | } | |
291 | - | else $Tuple3( | |
292 | - | let | |
293 | - | let | |
294 | - | let | |
295 | - | $Tuple3( | |
267 | + | else $Tuple3(bz, bJ, bK) | |
268 | + | let bF = bL._1 | |
269 | + | let bG = bL._2 | |
270 | + | let bI = bL._3 | |
271 | + | $Tuple3(bF, bG, bI) | |
296 | 272 | } | |
297 | - | else $Tuple3( | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | if ($isInstanceOf( | |
310 | - | then | |
311 | - | else throw( | |
273 | + | else $Tuple3(bz, valueOrElse(getInteger(ao(bz)), height), valueOrElse(getInteger(aq(bz)), ((height + by) - 1))) | |
274 | + | let bF = bB._1 | |
275 | + | let bG = bB._2 | |
276 | + | let bI = bB._3 | |
277 | + | let bM = valueOrElse(getInteger(av(K, bF)), bw) | |
278 | + | let bN = valueOrElse(getInteger(aw(K, bF, bh)), bx) | |
279 | + | let aR = valueOrElse(getInteger(az(bh)), 0) | |
280 | + | let bO = min([(bu + aR), bM, bN]) | |
281 | + | let bP = value(getInteger(ar())) | |
282 | + | let bQ = e | |
283 | + | let bR = { | |
284 | + | let bS = invoke(addressFromStringValue(value(getString(ax()))), "putOneTknV2WithoutTakeFeeREADONLY", [bQ, K], nil) | |
285 | + | if ($isInstanceOf(bS, "(Int, Int, Int)")) | |
286 | + | then bS | |
287 | + | else throw("Couldn't cast Any to (Int, Int, Int)") | |
312 | 288 | } | |
313 | - | if (( | |
289 | + | if ((bR == bR)) | |
314 | 290 | then { | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | if ($isInstanceOf( | |
322 | - | then | |
323 | - | else throw( | |
291 | + | let bT = bR._3 | |
292 | + | let bU = bR._2 | |
293 | + | let bV = bR._1 | |
294 | + | let bW = value(getString(ay())) | |
295 | + | let bX = { | |
296 | + | let bS = invoke(addressFromStringValue(value(getString(ax()))), "getOneTknV2READONLY", [bW, bV], nil) | |
297 | + | if ($isInstanceOf(bS, "(Int, Int)")) | |
298 | + | then bS | |
299 | + | else throw("Couldn't cast Any to (Int, Int)") | |
324 | 300 | } | |
325 | - | if (( | |
301 | + | if ((bX == bX)) | |
326 | 302 | then { | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | $Tuple10( | |
303 | + | let bY = bX._2 | |
304 | + | let bZ = bX._1 | |
305 | + | let ca = fraction(bQ, e, bZ) | |
306 | + | let cb = (bI - height) | |
307 | + | $Tuple10(bO, bM, bN, bv, bP, ca, cb, bF, bG, bI) | |
332 | 308 | } | |
333 | 309 | else throw("Strict value is not equal to itself.") | |
334 | 310 | } | |
336 | 312 | } | |
337 | 313 | ||
338 | 314 | ||
339 | - | func | |
340 | - | let | |
341 | - | if ($isInstanceOf( | |
315 | + | func cc () = { | |
316 | + | let cd = getString(aB()) | |
317 | + | if ($isInstanceOf(cd, "String")) | |
342 | 318 | then { | |
343 | - | let | |
344 | - | fromBase58String( | |
319 | + | let ce = cd | |
320 | + | fromBase58String(ce) | |
345 | 321 | } | |
346 | - | else if ($isInstanceOf( | |
322 | + | else if ($isInstanceOf(cd, "Unit")) | |
347 | 323 | then unit | |
348 | 324 | else throw("Match error") | |
349 | 325 | } | |
350 | 326 | ||
351 | 327 | ||
352 | - | func | |
353 | - | let | |
354 | - | if ($isInstanceOf( | |
328 | + | func cf () = { | |
329 | + | let cd = getString(aC()) | |
330 | + | if ($isInstanceOf(cd, "String")) | |
355 | 331 | then { | |
356 | - | let | |
357 | - | fromBase58String( | |
332 | + | let ce = cd | |
333 | + | fromBase58String(ce) | |
358 | 334 | } | |
359 | - | else if ($isInstanceOf( | |
335 | + | else if ($isInstanceOf(cd, "Unit")) | |
360 | 336 | then unit | |
361 | 337 | else throw("Match error") | |
362 | 338 | } | |
363 | 339 | ||
364 | 340 | ||
365 | - | func | |
366 | - | let | |
367 | - | let | |
368 | - | if ($isInstanceOf( | |
341 | + | func cg (ch) = { | |
342 | + | let ci = throw("Permission denied") | |
343 | + | let cd = cc() | |
344 | + | if ($isInstanceOf(cd, "ByteVector")) | |
369 | 345 | then { | |
370 | - | let | |
371 | - | if (( | |
346 | + | let cj = cd | |
347 | + | if ((ch.callerPublicKey == cj)) | |
372 | 348 | then true | |
373 | - | else | |
349 | + | else ci | |
374 | 350 | } | |
375 | - | else if ($isInstanceOf( | |
376 | - | then if (( | |
351 | + | else if ($isInstanceOf(cd, "Unit")) | |
352 | + | then if ((ch.caller == this)) | |
377 | 353 | then true | |
378 | - | else | |
354 | + | else ci | |
379 | 355 | else throw("Match error") | |
380 | 356 | } | |
381 | 357 | ||
382 | 358 | ||
383 | - | @Callable( | |
384 | - | func constructor ( | |
385 | - | let | |
386 | - | let | |
387 | - | if (isDefined(getString( | |
359 | + | @Callable(ch) | |
360 | + | func constructor (D,E,F,G,k,K,M) = { | |
361 | + | let H = ((100 * 1000) * 1000) | |
362 | + | let ck = (D + E) | |
363 | + | if (isDefined(getString(ad()))) | |
388 | 364 | then throw("already initialized") | |
389 | - | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString( | |
365 | + | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(ch.caller))) | |
390 | 366 | then throw("not authorized") | |
391 | - | else if ((size( | |
367 | + | else if ((size(ch.payments) != 1)) | |
392 | 368 | then throw("exactly 1 payment must be attached") | |
393 | - | else if (( | |
369 | + | else if ((ck >= F)) | |
394 | 370 | then throw("claimStart must be greater than idoEnd") | |
395 | 371 | else { | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | [StringEntry( | |
372 | + | let cl = value(ch.payments[0]) | |
373 | + | let bf = value(cl.assetId) | |
374 | + | let cm = valueOrErrorMessage(assetInfo(bf), "fail to load ido asset info") | |
375 | + | let I = toBase58String(bf) | |
376 | + | let J = pow(10, 0, cm.decimals, 0, 0, DOWN) | |
377 | + | let bg = fromBase58String(K) | |
378 | + | let cn = valueOrErrorMessage(assetInfo(bg), "fail to load price asset info") | |
379 | + | let L = pow(10, 0, cn.decimals, 0, 0, DOWN) | |
380 | + | let co = aG() | |
381 | + | let cp = [0, 0, 0, 0] | |
382 | + | [StringEntry(ad(), O(D, E, F, G, k, H, I, J, K, L, M, cl.amount)), aN(ag(), co, cp, F, 0)] | |
407 | 383 | } | |
408 | 384 | } | |
409 | 385 | ||
410 | 386 | ||
411 | 387 | ||
412 | - | @Callable( | |
388 | + | @Callable(ch) | |
413 | 389 | func invest () = { | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
423 | - | let | |
424 | - | let | |
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | if (( | |
390 | + | let aU = aD() | |
391 | + | let D = parseIntValue(aU[r]) | |
392 | + | let E = parseIntValue(aU[s]) | |
393 | + | let ck = (D + E) | |
394 | + | let F = parseIntValue(aU[t]) | |
395 | + | let G = parseIntValue(aU[u]) | |
396 | + | let k = parseIntValue(aU[v]) | |
397 | + | let H = parseIntValue(aU[w]) | |
398 | + | let I = aU[x] | |
399 | + | let bf = fromBase58String(I) | |
400 | + | let J = parseIntValue(aU[y]) | |
401 | + | let K = aU[z] | |
402 | + | let bg = fromBase58String(K) | |
403 | + | let L = parseIntValue(aU[A]) | |
404 | + | let cq = parseIntValue(aU[B]) | |
405 | + | let af = toString(ch.caller) | |
406 | + | if ((D > height)) | |
431 | 407 | then throw("ido has not been started yet") | |
432 | - | else if ((height > | |
408 | + | else if ((height > ck)) | |
433 | 409 | then throw("ido has been already ended") | |
434 | - | else if ((size( | |
410 | + | else if ((size(ch.payments) != 1)) | |
435 | 411 | then throw("exactly 1 payment is expected") | |
436 | 412 | else { | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | if (( | |
441 | - | then throw((("invalid payment asset id: " + toBase58String( | |
413 | + | let cl = value(ch.payments[0]) | |
414 | + | let cr = value(cl.assetId) | |
415 | + | let cs = cl.amount | |
416 | + | if ((cr != bg)) | |
417 | + | then throw((("invalid payment asset id: " + toBase58String(cr)) + " is expected")) | |
442 | 418 | else { | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | if (( | |
419 | + | let ct = aH(af) | |
420 | + | let co = aG() | |
421 | + | let cu = (parseIntValue(co[P]) + cs) | |
422 | + | let cv = (cu * 100) | |
423 | + | if ((cv > assetBalance(this, bf))) | |
448 | 424 | then throw("IDO asset has been - sold consider to use smaller payment") | |
449 | 425 | else { | |
450 | - | let | |
451 | - | [ | |
426 | + | let cp = [cs, cs, 0, 0] | |
427 | + | [aN(ae(af), ct, cp, F, 0), aN(ag(), co, cp, F, 0), aZ(af, cs, 0, ch.transactionId)] | |
452 | 428 | } | |
453 | 429 | } | |
454 | 430 | } | |
456 | 432 | ||
457 | 433 | ||
458 | 434 | ||
459 | - | @Callable( | |
460 | - | func claim ( | |
461 | - | let | |
462 | - | if (( | |
435 | + | @Callable(ch) | |
436 | + | func claim (bd,bh) = { | |
437 | + | let cw = toString(ch.caller) | |
438 | + | if ((bh != cw)) | |
463 | 439 | then throw("not authorized") | |
464 | 440 | else { | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | let | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
441 | + | let aU = aD() | |
442 | + | let K = aU[z] | |
443 | + | let cx = bc(bd, ch.caller, ch.transactionId) | |
444 | + | let cp = cx._1 | |
445 | + | let bu = cx._2 | |
446 | + | let cy = cx._3 | |
447 | + | let bi = cx._4 | |
448 | + | let bm = cx._5 | |
449 | + | let cz = cp[aL] | |
450 | + | let cA = cp[aM] | |
451 | + | let aR = valueOrElse(getInteger(az(bh)), 0) | |
452 | + | let aV = value(assetInfo(fromBase58String(K))).decimals | |
453 | + | let cB = if ((bd == K)) | |
478 | 454 | then { | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | let | |
489 | - | let | |
490 | - | let | |
455 | + | let cC = bt(K, bh, bu, cp[aL]) | |
456 | + | let bO = cC._1 | |
457 | + | let bM = cC._2 | |
458 | + | let bN = cC._3 | |
459 | + | let bv = cC._4 | |
460 | + | let bP = cC._5 | |
461 | + | let ca = cC._6 | |
462 | + | let cb = cC._7 | |
463 | + | let bF = cC._8 | |
464 | + | let bG = cC._9 | |
465 | + | let bI = cC._10 | |
466 | + | let bs = [if ((bN > 0)) | |
491 | 467 | then true | |
492 | - | else f("unavailable to claim because user period allowance reached"), if (( | |
468 | + | else f("unavailable to claim because user period allowance reached"), if ((bM > 0)) | |
493 | 469 | then true | |
494 | - | else f("unavailable to claim because total period allowance reached"), if (( | |
470 | + | else f("unavailable to claim because total period allowance reached"), if ((bO > 0)) | |
495 | 471 | then true | |
496 | - | else f("nothing to claim"), if (( | |
472 | + | else f("nothing to claim"), if ((bP > ca)) | |
497 | 473 | then true | |
498 | 474 | else f("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")] | |
499 | - | if (( | |
475 | + | if ((bs == bs)) | |
500 | 476 | then { | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | then [ScriptTransfer( | |
477 | + | let cD = (bM - bO) | |
478 | + | let cE = (bN - bO) | |
479 | + | let cB = if ((aR >= bO)) | |
480 | + | then [ScriptTransfer(ch.caller, bO, cy), IntegerEntry(az(bh), (aR - bO))] | |
505 | 481 | else { | |
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[U]) | |
522 | - | let cZ = parseIntValue(cV[V]) | |
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.") | |
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)] | |
534 | 484 | } | |
535 | - | $Tuple2(([IntegerEntry( | |
485 | + | $Tuple2(([IntegerEntry(an(), bF), IntegerEntry(ao(bF), bG), IntegerEntry(aq(bF), bI), IntegerEntry(av(K, bF), cD), IntegerEntry(aw(K, bF, bh), cE), bb(bh, bO, cA, ch.transactionId)] ++ cB), unit) | |
536 | 486 | } | |
537 | 487 | else throw("Strict value is not equal to itself.") | |
538 | 488 | } | |
539 | 489 | else { | |
540 | - | let | |
541 | - | $Tuple2([ScriptTransfer( | |
490 | + | let cG = fraction(aR, e, pow(10, 0, aV, 0, 0, DOWN)) | |
491 | + | $Tuple2([ScriptTransfer(ch.caller, (bu + cG), cy), IntegerEntry(az(bh), 0), aN(ae(bh), bi, cp, bm, aR), aN(ag(), aG(), cp, bm, aR), bb(bh, cz, (cA + cG), ch.transactionId)], unit) | |
542 | 492 | } | |
543 | - | | |
493 | + | cB | |
544 | 494 | } | |
545 | 495 | } | |
546 | 496 | ||
547 | 497 | ||
548 | 498 | ||
549 | - | @Callable( | |
550 | - | func claimREADONLY ( | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | let | |
559 | - | let | |
560 | - | $Tuple2(nil, makeString(["%s%d%d", | |
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)) | |
561 | 511 | } | |
562 | 512 | ||
563 | 513 | ||
564 | 514 | ||
565 | - | @Callable( | |
566 | - | func claimV2READONLY ( | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
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)) | |
595 | 545 | then { | |
596 | - | let | |
597 | - | let | |
598 | - | let | |
599 | - | makeString(["%d%d%d%d%d%d", toString( | |
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) | |
600 | 550 | } | |
601 | - | else makeString(["%d%d%d%d%d%d", toString( | |
602 | - | $Tuple2(nil, | |
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) | |
603 | 553 | } | |
604 | 554 | ||
605 | 555 | ||
606 | 556 | ||
607 | - | @Callable( | |
608 | - | func setManager ( | |
609 | - | let | |
610 | - | if (( | |
557 | + | @Callable(ch) | |
558 | + | func setManager (cS) = { | |
559 | + | let cT = cg(ch) | |
560 | + | if ((cT == cT)) | |
611 | 561 | then { | |
612 | - | let | |
613 | - | if (( | |
614 | - | then [StringEntry( | |
562 | + | let cU = fromBase58String(cS) | |
563 | + | if ((cU == cU)) | |
564 | + | then [StringEntry(aC(), cS)] | |
615 | 565 | else throw("Strict value is not equal to itself.") | |
616 | 566 | } | |
617 | 567 | else throw("Strict value is not equal to itself.") | |
619 | 569 | ||
620 | 570 | ||
621 | 571 | ||
622 | - | @Callable( | |
572 | + | @Callable(ch) | |
623 | 573 | func confirmManager () = { | |
624 | - | let | |
625 | - | let | |
574 | + | let cV = cf() | |
575 | + | let cW = if (isDefined(cV)) | |
626 | 576 | then true | |
627 | 577 | else throw("No pending manager") | |
628 | - | if (( | |
578 | + | if ((cW == cW)) | |
629 | 579 | then { | |
630 | - | let | |
580 | + | let cX = if ((ch.callerPublicKey == value(cV))) | |
631 | 581 | then true | |
632 | 582 | else throw("You are not pending manager") | |
633 | - | if (( | |
634 | - | then [StringEntry( | |
583 | + | if ((cX == cX)) | |
584 | + | then [StringEntry(aB(), toBase58String(value(cV))), DeleteEntry(aC())] | |
635 | 585 | else throw("Strict value is not equal to itself.") | |
636 | 586 | } | |
637 | 587 | else throw("Strict value is not equal to itself.") | |
638 | 588 | } | |
639 | 589 | ||
640 | 590 | ||
641 | - | @Verifier( | |
642 | - | func | |
643 | - | let | |
644 | - | let | |
645 | - | if ($isInstanceOf( | |
591 | + | @Verifier(cY) | |
592 | + | func cZ () = { | |
593 | + | let da = { | |
594 | + | let cd = cc() | |
595 | + | if ($isInstanceOf(cd, "ByteVector")) | |
646 | 596 | then { | |
647 | - | let | |
648 | - | | |
597 | + | let cj = cd | |
598 | + | cj | |
649 | 599 | } | |
650 | - | else if ($isInstanceOf( | |
651 | - | then | |
600 | + | else if ($isInstanceOf(cd, "Unit")) | |
601 | + | then cY.senderPublicKey | |
652 | 602 | else throw("Match error") | |
653 | 603 | } | |
654 | - | sigVerify( | |
604 | + | sigVerify(cY.bodyBytes, cY.proofs[0], da) | |
655 | 605 | } | |
656 | 606 |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
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) = { | |
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") | |
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)) | |
24 | 22 | } | |
25 | 23 | ||
26 | 24 | ||
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)) | |
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)) | |
33 | 172 | } | |
34 | 173 | ||
35 | 174 | ||
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) | |
175 | + | func aZ (af,i,ac,ba) = StringEntry(ah("invest", af, toBase58String(ba)), ab(i, ac)) | |
59 | 176 | ||
60 | 177 | ||
61 | - | func | |
178 | + | func bb (af,i,ac,ba) = StringEntry(ah("claim", af, toBase58String(ba)), ab(i, ac)) | |
62 | 179 | ||
63 | 180 | ||
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 | |
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 | |
229 | 205 | else height | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | let | |
236 | - | then | |
206 | + | let bn = (bm - bl) | |
207 | + | let bo = fraction(bj, bn, G) | |
208 | + | let bp = h(bo, L, k, H, J) | |
209 | + | let bq = (bd == K) | |
210 | + | let br = valueOrElse(getBoolean(ak()), false) | |
211 | + | let bs = [if (!(if (bq) | |
212 | + | then br | |
237 | 213 | else false)) | |
238 | 214 | then true | |
239 | 215 | else throw("USDN claim is disabled")] | |
240 | - | if (( | |
241 | - | then if (( | |
242 | - | then $Tuple6([0, -( | |
243 | - | else if (( | |
244 | - | then $Tuple6([0, -( | |
245 | - | else throw(("unsupported assetId: " + | |
216 | + | if ((bs == bs)) | |
217 | + | then if ((bd == K)) | |
218 | + | then $Tuple6([0, -(bo), bo, 0], bo, bg, bi, bm, [bo, bp]) | |
219 | + | else if ((bd == I)) | |
220 | + | then $Tuple6([0, -(bo), 0, bp], bp, bf, bi, bm, [bo, bp]) | |
221 | + | else throw(("unsupported assetId: " + bd)) | |
246 | 222 | else throw("Strict value is not equal to itself.") | |
247 | 223 | } | |
248 | 224 | ||
249 | 225 | ||
250 | - | func | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
226 | + | func bt (K,bh,bu,bv) = { | |
227 | + | let bw = value(getInteger(as(K))) | |
228 | + | let bx = value(getInteger(au(K))) | |
229 | + | let by = value(getInteger(am())) | |
230 | + | let bz = valueOrElse(getInteger(an()), 0) | |
231 | + | let bA = isDefined(getInteger(aq(0))) | |
232 | + | let bB = if ((bz > 0)) | |
257 | 233 | then { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
234 | + | let bC = value(getInteger(ao(bz))) | |
235 | + | let bD = value(getInteger(aq(bz))) | |
236 | + | let bE = if ((height > bD)) | |
261 | 237 | then { | |
262 | - | let | |
263 | - | let | |
238 | + | let bF = (bz + 1) | |
239 | + | let bG = if ((height > (bD + by))) | |
264 | 240 | then { | |
265 | - | let | |
266 | - | if (( | |
267 | - | then ((height - | |
268 | - | else (height - | |
241 | + | let bH = ((height - bD) % by) | |
242 | + | if ((bH == 0)) | |
243 | + | then ((height - by) + 1) | |
244 | + | else (height - bH) | |
269 | 245 | } | |
270 | - | else ( | |
271 | - | let | |
272 | - | $Tuple3( | |
246 | + | else (bD + 1) | |
247 | + | let bI = ((bG + by) - 1) | |
248 | + | $Tuple3(bF, bG, bI) | |
273 | 249 | } | |
274 | - | else $Tuple3( | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | $Tuple3( | |
250 | + | else $Tuple3(bz, bC, bD) | |
251 | + | let bF = bE._1 | |
252 | + | let bG = bE._2 | |
253 | + | let bI = bE._3 | |
254 | + | $Tuple3(bF, bG, bI) | |
279 | 255 | } | |
280 | - | else if ( | |
256 | + | else if (bA) | |
281 | 257 | then { | |
282 | - | let | |
283 | - | let | |
284 | - | let | |
258 | + | let bJ = value(getInteger(ao(0))) | |
259 | + | let bK = value(getInteger(aq(0))) | |
260 | + | let bL = if ((height > bK)) | |
285 | 261 | then { | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | $Tuple3( | |
262 | + | let bF = (bz + 1) | |
263 | + | let bG = (bK + 1) | |
264 | + | let bI = ((bG + by) - 1) | |
265 | + | $Tuple3(bF, bG, bI) | |
290 | 266 | } | |
291 | - | else $Tuple3( | |
292 | - | let | |
293 | - | let | |
294 | - | let | |
295 | - | $Tuple3( | |
267 | + | else $Tuple3(bz, bJ, bK) | |
268 | + | let bF = bL._1 | |
269 | + | let bG = bL._2 | |
270 | + | let bI = bL._3 | |
271 | + | $Tuple3(bF, bG, bI) | |
296 | 272 | } | |
297 | - | else $Tuple3( | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | if ($isInstanceOf( | |
310 | - | then | |
311 | - | else throw( | |
273 | + | else $Tuple3(bz, valueOrElse(getInteger(ao(bz)), height), valueOrElse(getInteger(aq(bz)), ((height + by) - 1))) | |
274 | + | let bF = bB._1 | |
275 | + | let bG = bB._2 | |
276 | + | let bI = bB._3 | |
277 | + | let bM = valueOrElse(getInteger(av(K, bF)), bw) | |
278 | + | let bN = valueOrElse(getInteger(aw(K, bF, bh)), bx) | |
279 | + | let aR = valueOrElse(getInteger(az(bh)), 0) | |
280 | + | let bO = min([(bu + aR), bM, bN]) | |
281 | + | let bP = value(getInteger(ar())) | |
282 | + | let bQ = e | |
283 | + | let bR = { | |
284 | + | let bS = invoke(addressFromStringValue(value(getString(ax()))), "putOneTknV2WithoutTakeFeeREADONLY", [bQ, K], nil) | |
285 | + | if ($isInstanceOf(bS, "(Int, Int, Int)")) | |
286 | + | then bS | |
287 | + | else throw("Couldn't cast Any to (Int, Int, Int)") | |
312 | 288 | } | |
313 | - | if (( | |
289 | + | if ((bR == bR)) | |
314 | 290 | then { | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | if ($isInstanceOf( | |
322 | - | then | |
323 | - | else throw( | |
291 | + | let bT = bR._3 | |
292 | + | let bU = bR._2 | |
293 | + | let bV = bR._1 | |
294 | + | let bW = value(getString(ay())) | |
295 | + | let bX = { | |
296 | + | let bS = invoke(addressFromStringValue(value(getString(ax()))), "getOneTknV2READONLY", [bW, bV], nil) | |
297 | + | if ($isInstanceOf(bS, "(Int, Int)")) | |
298 | + | then bS | |
299 | + | else throw("Couldn't cast Any to (Int, Int)") | |
324 | 300 | } | |
325 | - | if (( | |
301 | + | if ((bX == bX)) | |
326 | 302 | then { | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | $Tuple10( | |
303 | + | let bY = bX._2 | |
304 | + | let bZ = bX._1 | |
305 | + | let ca = fraction(bQ, e, bZ) | |
306 | + | let cb = (bI - height) | |
307 | + | $Tuple10(bO, bM, bN, bv, bP, ca, cb, bF, bG, bI) | |
332 | 308 | } | |
333 | 309 | else throw("Strict value is not equal to itself.") | |
334 | 310 | } | |
335 | 311 | else throw("Strict value is not equal to itself.") | |
336 | 312 | } | |
337 | 313 | ||
338 | 314 | ||
339 | - | func | |
340 | - | let | |
341 | - | if ($isInstanceOf( | |
315 | + | func cc () = { | |
316 | + | let cd = getString(aB()) | |
317 | + | if ($isInstanceOf(cd, "String")) | |
342 | 318 | then { | |
343 | - | let | |
344 | - | fromBase58String( | |
319 | + | let ce = cd | |
320 | + | fromBase58String(ce) | |
345 | 321 | } | |
346 | - | else if ($isInstanceOf( | |
322 | + | else if ($isInstanceOf(cd, "Unit")) | |
347 | 323 | then unit | |
348 | 324 | else throw("Match error") | |
349 | 325 | } | |
350 | 326 | ||
351 | 327 | ||
352 | - | func | |
353 | - | let | |
354 | - | if ($isInstanceOf( | |
328 | + | func cf () = { | |
329 | + | let cd = getString(aC()) | |
330 | + | if ($isInstanceOf(cd, "String")) | |
355 | 331 | then { | |
356 | - | let | |
357 | - | fromBase58String( | |
332 | + | let ce = cd | |
333 | + | fromBase58String(ce) | |
358 | 334 | } | |
359 | - | else if ($isInstanceOf( | |
335 | + | else if ($isInstanceOf(cd, "Unit")) | |
360 | 336 | then unit | |
361 | 337 | else throw("Match error") | |
362 | 338 | } | |
363 | 339 | ||
364 | 340 | ||
365 | - | func | |
366 | - | let | |
367 | - | let | |
368 | - | if ($isInstanceOf( | |
341 | + | func cg (ch) = { | |
342 | + | let ci = throw("Permission denied") | |
343 | + | let cd = cc() | |
344 | + | if ($isInstanceOf(cd, "ByteVector")) | |
369 | 345 | then { | |
370 | - | let | |
371 | - | if (( | |
346 | + | let cj = cd | |
347 | + | if ((ch.callerPublicKey == cj)) | |
372 | 348 | then true | |
373 | - | else | |
349 | + | else ci | |
374 | 350 | } | |
375 | - | else if ($isInstanceOf( | |
376 | - | then if (( | |
351 | + | else if ($isInstanceOf(cd, "Unit")) | |
352 | + | then if ((ch.caller == this)) | |
377 | 353 | then true | |
378 | - | else | |
354 | + | else ci | |
379 | 355 | else throw("Match error") | |
380 | 356 | } | |
381 | 357 | ||
382 | 358 | ||
383 | - | @Callable( | |
384 | - | func constructor ( | |
385 | - | let | |
386 | - | let | |
387 | - | if (isDefined(getString( | |
359 | + | @Callable(ch) | |
360 | + | func constructor (D,E,F,G,k,K,M) = { | |
361 | + | let H = ((100 * 1000) * 1000) | |
362 | + | let ck = (D + E) | |
363 | + | if (isDefined(getString(ad()))) | |
388 | 364 | then throw("already initialized") | |
389 | - | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString( | |
365 | + | else if (("3PMEHLx1j6zerarZTYfsGqDeeZqQoMpxq5S" != toString(ch.caller))) | |
390 | 366 | then throw("not authorized") | |
391 | - | else if ((size( | |
367 | + | else if ((size(ch.payments) != 1)) | |
392 | 368 | then throw("exactly 1 payment must be attached") | |
393 | - | else if (( | |
369 | + | else if ((ck >= F)) | |
394 | 370 | then throw("claimStart must be greater than idoEnd") | |
395 | 371 | else { | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | [StringEntry( | |
372 | + | let cl = value(ch.payments[0]) | |
373 | + | let bf = value(cl.assetId) | |
374 | + | let cm = valueOrErrorMessage(assetInfo(bf), "fail to load ido asset info") | |
375 | + | let I = toBase58String(bf) | |
376 | + | let J = pow(10, 0, cm.decimals, 0, 0, DOWN) | |
377 | + | let bg = fromBase58String(K) | |
378 | + | let cn = valueOrErrorMessage(assetInfo(bg), "fail to load price asset info") | |
379 | + | let L = pow(10, 0, cn.decimals, 0, 0, DOWN) | |
380 | + | let co = aG() | |
381 | + | let cp = [0, 0, 0, 0] | |
382 | + | [StringEntry(ad(), O(D, E, F, G, k, H, I, J, K, L, M, cl.amount)), aN(ag(), co, cp, F, 0)] | |
407 | 383 | } | |
408 | 384 | } | |
409 | 385 | ||
410 | 386 | ||
411 | 387 | ||
412 | - | @Callable( | |
388 | + | @Callable(ch) | |
413 | 389 | func invest () = { | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
423 | - | let | |
424 | - | let | |
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | if (( | |
390 | + | let aU = aD() | |
391 | + | let D = parseIntValue(aU[r]) | |
392 | + | let E = parseIntValue(aU[s]) | |
393 | + | let ck = (D + E) | |
394 | + | let F = parseIntValue(aU[t]) | |
395 | + | let G = parseIntValue(aU[u]) | |
396 | + | let k = parseIntValue(aU[v]) | |
397 | + | let H = parseIntValue(aU[w]) | |
398 | + | let I = aU[x] | |
399 | + | let bf = fromBase58String(I) | |
400 | + | let J = parseIntValue(aU[y]) | |
401 | + | let K = aU[z] | |
402 | + | let bg = fromBase58String(K) | |
403 | + | let L = parseIntValue(aU[A]) | |
404 | + | let cq = parseIntValue(aU[B]) | |
405 | + | let af = toString(ch.caller) | |
406 | + | if ((D > height)) | |
431 | 407 | then throw("ido has not been started yet") | |
432 | - | else if ((height > | |
408 | + | else if ((height > ck)) | |
433 | 409 | then throw("ido has been already ended") | |
434 | - | else if ((size( | |
410 | + | else if ((size(ch.payments) != 1)) | |
435 | 411 | then throw("exactly 1 payment is expected") | |
436 | 412 | else { | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | if (( | |
441 | - | then throw((("invalid payment asset id: " + toBase58String( | |
413 | + | let cl = value(ch.payments[0]) | |
414 | + | let cr = value(cl.assetId) | |
415 | + | let cs = cl.amount | |
416 | + | if ((cr != bg)) | |
417 | + | then throw((("invalid payment asset id: " + toBase58String(cr)) + " is expected")) | |
442 | 418 | else { | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | if (( | |
419 | + | let ct = aH(af) | |
420 | + | let co = aG() | |
421 | + | let cu = (parseIntValue(co[P]) + cs) | |
422 | + | let cv = (cu * 100) | |
423 | + | if ((cv > assetBalance(this, bf))) | |
448 | 424 | then throw("IDO asset has been - sold consider to use smaller payment") | |
449 | 425 | else { | |
450 | - | let | |
451 | - | [ | |
426 | + | let cp = [cs, cs, 0, 0] | |
427 | + | [aN(ae(af), ct, cp, F, 0), aN(ag(), co, cp, F, 0), aZ(af, cs, 0, ch.transactionId)] | |
452 | 428 | } | |
453 | 429 | } | |
454 | 430 | } | |
455 | 431 | } | |
456 | 432 | ||
457 | 433 | ||
458 | 434 | ||
459 | - | @Callable( | |
460 | - | func claim ( | |
461 | - | let | |
462 | - | if (( | |
435 | + | @Callable(ch) | |
436 | + | func claim (bd,bh) = { | |
437 | + | let cw = toString(ch.caller) | |
438 | + | if ((bh != cw)) | |
463 | 439 | then throw("not authorized") | |
464 | 440 | else { | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | let | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
441 | + | let aU = aD() | |
442 | + | let K = aU[z] | |
443 | + | let cx = bc(bd, ch.caller, ch.transactionId) | |
444 | + | let cp = cx._1 | |
445 | + | let bu = cx._2 | |
446 | + | let cy = cx._3 | |
447 | + | let bi = cx._4 | |
448 | + | let bm = cx._5 | |
449 | + | let cz = cp[aL] | |
450 | + | let cA = cp[aM] | |
451 | + | let aR = valueOrElse(getInteger(az(bh)), 0) | |
452 | + | let aV = value(assetInfo(fromBase58String(K))).decimals | |
453 | + | let cB = if ((bd == K)) | |
478 | 454 | then { | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | let | |
489 | - | let | |
490 | - | let | |
455 | + | let cC = bt(K, bh, bu, cp[aL]) | |
456 | + | let bO = cC._1 | |
457 | + | let bM = cC._2 | |
458 | + | let bN = cC._3 | |
459 | + | let bv = cC._4 | |
460 | + | let bP = cC._5 | |
461 | + | let ca = cC._6 | |
462 | + | let cb = cC._7 | |
463 | + | let bF = cC._8 | |
464 | + | let bG = cC._9 | |
465 | + | let bI = cC._10 | |
466 | + | let bs = [if ((bN > 0)) | |
491 | 467 | then true | |
492 | - | else f("unavailable to claim because user period allowance reached"), if (( | |
468 | + | else f("unavailable to claim because user period allowance reached"), if ((bM > 0)) | |
493 | 469 | then true | |
494 | - | else f("unavailable to claim because total period allowance reached"), if (( | |
470 | + | else f("unavailable to claim because total period allowance reached"), if ((bO > 0)) | |
495 | 471 | then true | |
496 | - | else f("nothing to claim"), if (( | |
472 | + | else f("nothing to claim"), if ((bP > ca)) | |
497 | 473 | then true | |
498 | 474 | else f("unavailable to claim because usdn price lower than usdtPriceAssetAllowableRatio")] | |
499 | - | if (( | |
475 | + | if ((bs == bs)) | |
500 | 476 | then { | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | then [ScriptTransfer( | |
477 | + | let cD = (bM - bO) | |
478 | + | let cE = (bN - bO) | |
479 | + | let cB = if ((aR >= bO)) | |
480 | + | then [ScriptTransfer(ch.caller, bO, cy), IntegerEntry(az(bh), (aR - bO))] | |
505 | 481 | else { | |
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[U]) | |
522 | - | let cZ = parseIntValue(cV[V]) | |
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.") | |
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)] | |
534 | 484 | } | |
535 | - | $Tuple2(([IntegerEntry( | |
485 | + | $Tuple2(([IntegerEntry(an(), bF), IntegerEntry(ao(bF), bG), IntegerEntry(aq(bF), bI), IntegerEntry(av(K, bF), cD), IntegerEntry(aw(K, bF, bh), cE), bb(bh, bO, cA, ch.transactionId)] ++ cB), unit) | |
536 | 486 | } | |
537 | 487 | else throw("Strict value is not equal to itself.") | |
538 | 488 | } | |
539 | 489 | else { | |
540 | - | let | |
541 | - | $Tuple2([ScriptTransfer( | |
490 | + | let cG = fraction(aR, e, pow(10, 0, aV, 0, 0, DOWN)) | |
491 | + | $Tuple2([ScriptTransfer(ch.caller, (bu + cG), cy), IntegerEntry(az(bh), 0), aN(ae(bh), bi, cp, bm, aR), aN(ag(), aG(), cp, bm, aR), bb(bh, cz, (cA + cG), ch.transactionId)], unit) | |
542 | 492 | } | |
543 | - | | |
493 | + | cB | |
544 | 494 | } | |
545 | 495 | } | |
546 | 496 | ||
547 | 497 | ||
548 | 498 | ||
549 | - | @Callable( | |
550 | - | func claimREADONLY ( | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | let | |
559 | - | let | |
560 | - | $Tuple2(nil, makeString(["%s%d%d", | |
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)) | |
561 | 511 | } | |
562 | 512 | ||
563 | 513 | ||
564 | 514 | ||
565 | - | @Callable( | |
566 | - | func claimV2READONLY ( | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | let | |
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)) | |
595 | 545 | then { | |
596 | - | let | |
597 | - | let | |
598 | - | let | |
599 | - | makeString(["%d%d%d%d%d%d", toString( | |
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) | |
600 | 550 | } | |
601 | - | else makeString(["%d%d%d%d%d%d", toString( | |
602 | - | $Tuple2(nil, | |
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) | |
603 | 553 | } | |
604 | 554 | ||
605 | 555 | ||
606 | 556 | ||
607 | - | @Callable( | |
608 | - | func setManager ( | |
609 | - | let | |
610 | - | if (( | |
557 | + | @Callable(ch) | |
558 | + | func setManager (cS) = { | |
559 | + | let cT = cg(ch) | |
560 | + | if ((cT == cT)) | |
611 | 561 | then { | |
612 | - | let | |
613 | - | if (( | |
614 | - | then [StringEntry( | |
562 | + | let cU = fromBase58String(cS) | |
563 | + | if ((cU == cU)) | |
564 | + | then [StringEntry(aC(), cS)] | |
615 | 565 | else throw("Strict value is not equal to itself.") | |
616 | 566 | } | |
617 | 567 | else throw("Strict value is not equal to itself.") | |
618 | 568 | } | |
619 | 569 | ||
620 | 570 | ||
621 | 571 | ||
622 | - | @Callable( | |
572 | + | @Callable(ch) | |
623 | 573 | func confirmManager () = { | |
624 | - | let | |
625 | - | let | |
574 | + | let cV = cf() | |
575 | + | let cW = if (isDefined(cV)) | |
626 | 576 | then true | |
627 | 577 | else throw("No pending manager") | |
628 | - | if (( | |
578 | + | if ((cW == cW)) | |
629 | 579 | then { | |
630 | - | let | |
580 | + | let cX = if ((ch.callerPublicKey == value(cV))) | |
631 | 581 | then true | |
632 | 582 | else throw("You are not pending manager") | |
633 | - | if (( | |
634 | - | then [StringEntry( | |
583 | + | if ((cX == cX)) | |
584 | + | then [StringEntry(aB(), toBase58String(value(cV))), DeleteEntry(aC())] | |
635 | 585 | else throw("Strict value is not equal to itself.") | |
636 | 586 | } | |
637 | 587 | else throw("Strict value is not equal to itself.") | |
638 | 588 | } | |
639 | 589 | ||
640 | 590 | ||
641 | - | @Verifier( | |
642 | - | func | |
643 | - | let | |
644 | - | let | |
645 | - | if ($isInstanceOf( | |
591 | + | @Verifier(cY) | |
592 | + | func cZ () = { | |
593 | + | let da = { | |
594 | + | let cd = cc() | |
595 | + | if ($isInstanceOf(cd, "ByteVector")) | |
646 | 596 | then { | |
647 | - | let | |
648 | - | | |
597 | + | let cj = cd | |
598 | + | cj | |
649 | 599 | } | |
650 | - | else if ($isInstanceOf( | |
651 | - | then | |
600 | + | else if ($isInstanceOf(cd, "Unit")) | |
601 | + | then cY.senderPublicKey | |
652 | 602 | else throw("Match error") | |
653 | 603 | } | |
654 | - | sigVerify( | |
604 | + | sigVerify(cY.bodyBytes, cY.proofs[0], da) | |
655 | 605 | } | |
656 | 606 |
github/deemru/w8io/169f3d6 190.17 ms ◑