tx · GsS7t7aBcAqRaMLwTKj3TdyDCzqF3Suqix8h4bMpN1LZ 3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh: -0.01700000 Waves 2022.08.03 12:46 [2168143] smart account 3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh > SELF 0.00000000 Waves
{ "type": 13, "id": "GsS7t7aBcAqRaMLwTKj3TdyDCzqF3Suqix8h4bMpN1LZ", "fee": 1700000, "feeAssetId": null, "timestamp": 1659520018820, "version": 1, "sender": "3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh", "senderPublicKey": "33fpjdpM9FMu87RZKePniPardKqQXM96sm7VhAk3JEVQ", "proofs": [ "4TWGVrUGxfd2QPbdi7rxxTyrfaff5FkSWQREbrHRskCVoL9sPpM7J3Xg2rDD9Re2f2WPJchAMmutEd5m7F6hbmG1" ], "script": "base64:BgIzCAISBgoECAgICBIGCgQICAgCEgUKAwgIBBIGCgQICAEBEgMKAQgSBAoCCAgSAwoBCBIAGQAJc2VwYXJhdG9yAgJfXwATa2V5QmFja2VuZFB1YmxpY0tleQkAuQkCCQDMCAICAiVzCQDMCAICEGJhY2tlbmRQdWJsaWNLZXkFA25pbAUJc2VwYXJhdG9yARtrZXlFeGlzdHNSZWZlcnJlclRvUmVmZXJyYWwDC3Byb2dyYW1OYW1lD3JlZmVycmVyQWRkcmVzcw9yZWZlcnJhbEFkZHJlc3MJALkJAgkAzAgCAgglcyVzJXMlcwkAzAgCAhhleGlzdHNSZWZlcnJlclRvUmVmZXJyYWwJAMwIAgULcHJvZ3JhbU5hbWUJAMwIAgUPcmVmZXJyZXJBZGRyZXNzCQDMCAIFD3JlZmVycmFsQWRkcmVzcwUDbmlsBQlzZXBhcmF0b3IBEmtleUNsYWltZWRSZWZlcnJlcgILcHJvZ3JhbU5hbWUOY2xhaW1lckFkZHJlc3MJALkJAgkAzAgCAgglcyVzJXMlcwkAzAgCAg9jbGFpbWVkUmVmZXJyZXIJAMwIAgULcHJvZ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saWNLZXkJAQV2YWx1ZQEFAnBtBgkBCHRocm93RXJyAQIbeW91IGFyZSBub3QgcGVuZGluZyBtYW5hZ2VyAwkAAAIFB2NoZWNrUE0FB2NoZWNrUE0JAMwIAgkBC1N0cmluZ0VudHJ5AgkBE2tleU1hbmFnZXJQdWJsaWNLZXkACQDYBAEJAQV2YWx1ZQEFAnBtCQDMCAIJAQtEZWxldGVFbnRyeQEJARprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleVt9SxI=", "chainId": 84, "height": 2168143, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3YzZr6vnD6D7LZ1t4ih11zb7Q8h7BMZRAea5C9Rs68PJ Next: 42MY5jDK7rB1bFkLEwFHS96wAWDxMhKMpqEfGZKLS7BT Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | func c (d,e,f) = makeString(["%s%s%s%s", "existsReferrerToReferral", d, e, f], a) | |
9 | 9 | ||
10 | 10 | ||
11 | - | func g (d,h) = makeString(["%s%s%s%s", " | |
11 | + | func g (d,h) = makeString(["%s%s%s%s", "claimedReferrer", d, h], a) | |
12 | 12 | ||
13 | 13 | ||
14 | - | func i (d,h) = makeString(["%s%s%s%s", " | |
14 | + | func i (d,h) = makeString(["%s%s%s%s", "claimedReferral", d, h], a) | |
15 | 15 | ||
16 | 16 | ||
17 | - | func j (d, | |
17 | + | func j (d,h) = makeString(["%s%s%s%s", "unclaimedReferrer", d, h], a) | |
18 | 18 | ||
19 | 19 | ||
20 | - | func k (d) = makeString(["%s%s", " | |
20 | + | func k (d,h) = makeString(["%s%s%s%s", "unclaimedReferral", d, h], a) | |
21 | 21 | ||
22 | 22 | ||
23 | - | func l (d, | |
23 | + | func l (d,f) = makeString(["%s%s%s", "referrer", d, f], a) | |
24 | 24 | ||
25 | 25 | ||
26 | - | func m (d | |
26 | + | func m (d) = makeString(["%s%s", "programName", d], a) | |
27 | 27 | ||
28 | 28 | ||
29 | - | func n (d, | |
29 | + | func n (d,e) = makeString(["%s%s%s", "totalReferralCount", d, e], a) | |
30 | 30 | ||
31 | 31 | ||
32 | - | func o (d) = makeString(["%s%s", " | |
32 | + | func o (d,e) = makeString(["%s%s%s", "activeReferralCount", d, e], a) | |
33 | 33 | ||
34 | 34 | ||
35 | - | func p (d) = makeString(["%s%s", " | |
35 | + | func p (d,f) = makeString(["%s%s%s", "activeReferral", d, f], a) | |
36 | 36 | ||
37 | 37 | ||
38 | - | func q (d) = makeString(["%s%s", " | |
38 | + | func q (d) = makeString(["%s%s", "claimedTotal", d], a) | |
39 | 39 | ||
40 | 40 | ||
41 | - | func r (d) = makeString(["%s%s", " | |
41 | + | func r (d) = makeString(["%s%s", "rewardsTotal", d], a) | |
42 | 42 | ||
43 | 43 | ||
44 | - | func s (d) = makeString(["%s%s", " | |
44 | + | func s (d) = makeString(["%s%s", "rewardAssetId", d], a) | |
45 | 45 | ||
46 | 46 | ||
47 | - | func t () = "%s | |
47 | + | func t (d) = makeString(["%s%s", "treasuryContract", d], a) | |
48 | 48 | ||
49 | 49 | ||
50 | - | func u () = "%s | |
50 | + | func u (d) = makeString(["%s%s", "implementationContract", d], a) | |
51 | 51 | ||
52 | 52 | ||
53 | - | func v ( | |
53 | + | func v () = "%s__managerPublicKey" | |
54 | 54 | ||
55 | 55 | ||
56 | - | func | |
56 | + | func w () = "%s__pendingManagerPublicKey" | |
57 | 57 | ||
58 | 58 | ||
59 | - | func | |
59 | + | func x (d,y,z) = makeString(["%s%s%s%s%s", "history", "claim", d, y, z], a) | |
60 | 60 | ||
61 | 61 | ||
62 | - | func C () = { | |
63 | - | let D = getString(t()) | |
64 | - | if ($isInstanceOf(D, "String")) | |
62 | + | func A (B) = makeString(["%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(B)], a) | |
63 | + | ||
64 | + | ||
65 | + | func C (D) = throw(makeString(["referral.ride:", D], " ")) | |
66 | + | ||
67 | + | ||
68 | + | func E () = { | |
69 | + | let F = getString(v()) | |
70 | + | if ($isInstanceOf(F, "String")) | |
65 | 71 | then { | |
66 | - | let | |
67 | - | fromBase58String( | |
72 | + | let G = F | |
73 | + | fromBase58String(G) | |
68 | 74 | } | |
69 | - | else if ($isInstanceOf( | |
75 | + | else if ($isInstanceOf(F, "Unit")) | |
70 | 76 | then unit | |
71 | 77 | else throw("Match error") | |
72 | 78 | } | |
73 | 79 | ||
74 | 80 | ||
75 | - | func | |
76 | - | let | |
77 | - | if ($isInstanceOf( | |
81 | + | func H () = { | |
82 | + | let F = getString(w()) | |
83 | + | if ($isInstanceOf(F, "String")) | |
78 | 84 | then { | |
79 | - | let | |
80 | - | fromBase58String( | |
85 | + | let G = F | |
86 | + | fromBase58String(G) | |
81 | 87 | } | |
82 | - | else if ($isInstanceOf( | |
88 | + | else if ($isInstanceOf(F, "Unit")) | |
83 | 89 | then unit | |
84 | 90 | else throw("Match error") | |
85 | 91 | } | |
86 | 92 | ||
87 | 93 | ||
88 | - | func | |
89 | - | let | |
90 | - | let | |
91 | - | if ($isInstanceOf( | |
94 | + | func I (J) = { | |
95 | + | let K = C("permission denied") | |
96 | + | let F = E() | |
97 | + | if ($isInstanceOf(F, "ByteVector")) | |
92 | 98 | then { | |
93 | - | let | |
94 | - | if (( | |
99 | + | let L = F | |
100 | + | if ((J.callerPublicKey == L)) | |
95 | 101 | then true | |
96 | - | else | |
102 | + | else K | |
97 | 103 | } | |
98 | - | else if ($isInstanceOf( | |
99 | - | then if (( | |
104 | + | else if ($isInstanceOf(F, "Unit")) | |
105 | + | then if ((J.caller == this)) | |
100 | 106 | then true | |
101 | - | else | |
107 | + | else K | |
102 | 108 | else throw("Match error") | |
103 | 109 | } | |
104 | 110 | ||
105 | 111 | ||
106 | - | @Callable( | |
107 | - | func createReferralProgram (d, | |
108 | - | let | |
109 | - | if (( | |
112 | + | @Callable(J) | |
113 | + | func createReferralProgram (d,M,N,O) = { | |
114 | + | let P = I(J) | |
115 | + | if ((P == P)) | |
110 | 116 | then { | |
111 | - | let | |
117 | + | let Q = if ((getBoolean(m(d)) == unit)) | |
112 | 118 | then true | |
113 | - | else | |
114 | - | if (( | |
119 | + | else C("program name already exists") | |
120 | + | if ((Q == Q)) | |
115 | 121 | then { | |
116 | - | let | |
122 | + | let R = if (!(contains(d, a))) | |
117 | 123 | then !(contains(d, " ")) | |
118 | 124 | else false | |
119 | - | let | |
125 | + | let S = if (R) | |
120 | 126 | then true | |
121 | - | else | |
122 | - | if (( | |
127 | + | else C("invalid program name") | |
128 | + | if ((S == S)) | |
123 | 129 | then { | |
124 | - | let | |
130 | + | let T = if ((assetInfo(fromBase58String(O)) != unit)) | |
125 | 131 | then true | |
126 | - | else | |
127 | - | if (( | |
128 | - | then $Tuple2([BooleanEntry( | |
132 | + | else C("invalid reward asset id") | |
133 | + | if ((T == T)) | |
134 | + | then $Tuple2([BooleanEntry(m(d), true), StringEntry(t(d), M), StringEntry(u(d), N), StringEntry(s(d), O), IntegerEntry(r(d), 0)], unit) | |
129 | 135 | else throw("Strict value is not equal to itself.") | |
130 | 136 | } | |
131 | 137 | else throw("Strict value is not equal to itself.") | |
137 | 143 | ||
138 | 144 | ||
139 | 145 | ||
140 | - | @Callable( | |
141 | - | func createPair (d,e,f, | |
142 | - | let | |
146 | + | @Callable(J) | |
147 | + | func createPair (d,e,f,U) = { | |
148 | + | let S = if (valueOrElse(getBoolean(m(d)), false)) | |
143 | 149 | then true | |
144 | - | else | |
145 | - | if (( | |
150 | + | else C("program does not exist") | |
151 | + | if ((S == S)) | |
146 | 152 | then { | |
147 | - | let | |
153 | + | let V = if ((getBoolean(c(d, e, f)) == unit)) | |
148 | 154 | then true | |
149 | - | else | |
150 | - | if (( | |
155 | + | else C("pair already exists") | |
156 | + | if ((V == V)) | |
151 | 157 | then { | |
152 | - | let | |
158 | + | let W = if ((e != f)) | |
153 | 159 | then true | |
154 | - | else | |
155 | - | if (( | |
160 | + | else C("cannot refer to self") | |
161 | + | if ((W == W)) | |
156 | 162 | then { | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
163 | + | let X = toBytes(makeString([d, e, f], ":")) | |
164 | + | let Y = fromBase58String(value(getString(b))) | |
165 | + | let Z = if (sigVerify(X, U, Y)) | |
160 | 166 | then true | |
161 | - | else | |
162 | - | if (( | |
167 | + | else C("bad signature") | |
168 | + | if ((Z == Z)) | |
163 | 169 | then { | |
164 | - | let | |
165 | - | let | |
166 | - | $Tuple2([BooleanEntry(c(d, e, f), true), IntegerEntry( | |
170 | + | let aa = valueOrElse(getInteger(n(d, e)), 0) | |
171 | + | let ab = (aa + 1) | |
172 | + | $Tuple2([BooleanEntry(c(d, e, f), true), IntegerEntry(n(d, e), ab), StringEntry(l(d, f), e)], unit) | |
167 | 173 | } | |
168 | 174 | else throw("Strict value is not equal to itself.") | |
169 | 175 | } | |
176 | 182 | ||
177 | 183 | ||
178 | 184 | ||
179 | - | @Callable( | |
180 | - | func updateReferralActivity (d,f, | |
181 | - | let | |
182 | - | let | |
183 | - | let e = value(getString( | |
184 | - | let | |
185 | + | @Callable(J) | |
186 | + | func updateReferralActivity (d,f,ac) = { | |
187 | + | let N = value(getString(u(d))) | |
188 | + | let ad = (getBoolean(p(d, f)) != unit) | |
189 | + | let e = value(getString(l(d, f))) | |
190 | + | let P = if ((toString(J.caller) == N)) | |
185 | 191 | then true | |
186 | - | else | |
187 | - | if (( | |
192 | + | else C("permission denied") | |
193 | + | if ((P == P)) | |
188 | 194 | then { | |
189 | - | let | |
195 | + | let ae = if ((ad == ac)) | |
190 | 196 | then $Tuple2(nil, unit) | |
191 | 197 | else { | |
192 | - | let | |
198 | + | let ae = if ((ac == true)) | |
193 | 199 | then { | |
194 | - | let | |
195 | - | $Tuple2([BooleanEntry( | |
200 | + | let af = (valueOrElse(getInteger(o(d, e)), 0) + 1) | |
201 | + | $Tuple2([BooleanEntry(p(d, f), true), IntegerEntry(o(d, e), af)], unit) | |
196 | 202 | } | |
197 | 203 | else { | |
198 | - | let | |
199 | - | $Tuple2([DeleteEntry( | |
204 | + | let af = (valueOrElse(getInteger(o(d, e)), 0) - 1) | |
205 | + | $Tuple2([DeleteEntry(p(d, f)), IntegerEntry(o(d, e), af)], unit) | |
200 | 206 | } | |
201 | - | | |
207 | + | ae | |
202 | 208 | } | |
203 | - | | |
209 | + | ae | |
204 | 210 | } | |
205 | 211 | else throw("Strict value is not equal to itself.") | |
206 | 212 | } | |
207 | 213 | ||
208 | 214 | ||
209 | 215 | ||
210 | - | @Callable( | |
211 | - | func incUnclaimed (d,f, | |
212 | - | let | |
213 | - | let | |
216 | + | @Callable(J) | |
217 | + | func incUnclaimed (d,f,ag,ah) = { | |
218 | + | let N = value(getString(u(d))) | |
219 | + | let P = if ((toString(J.caller) == N)) | |
214 | 220 | then true | |
215 | - | else | |
216 | - | if (( | |
221 | + | else C("permission denied") | |
222 | + | if ((P == P)) | |
217 | 223 | then { | |
218 | - | let e = value(getString( | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | $Tuple2([IntegerEntry( | |
224 | + | let e = value(getString(l(d, f))) | |
225 | + | let ai = valueOrElse(getInteger(j(d, e)), 0) | |
226 | + | let aj = valueOrElse(getInteger(k(d, f)), 0) | |
227 | + | let ak = valueOrElse(getInteger(r(d)), 0) | |
228 | + | let al = (ai + ag) | |
229 | + | let am = (aj + ah) | |
230 | + | $Tuple2([IntegerEntry(j(d, e), al), IntegerEntry(k(d, f), am), IntegerEntry(r(d), ((ak + ag) + ah))], unit) | |
225 | 231 | } | |
226 | 232 | else throw("Strict value is not equal to itself.") | |
227 | 233 | } | |
228 | 234 | ||
229 | 235 | ||
230 | 236 | ||
231 | - | @Callable( | |
237 | + | @Callable(J) | |
232 | 238 | func claim (d) = { | |
233 | - | let | |
239 | + | let S = if (valueOrElse(getBoolean(m(d)), false)) | |
234 | 240 | then true | |
235 | - | else | |
236 | - | if (( | |
241 | + | else C("program does not exist") | |
242 | + | if ((S == S)) | |
237 | 243 | then { | |
238 | - | let al = toString(H.caller) | |
239 | - | let am = valueOrElse(getInteger(o(d)), 0) | |
240 | - | let an = valueOrElse(getInteger(g(d, al)), 0) | |
241 | - | let ao = valueOrElse(getInteger(i(d, al)), 0) | |
242 | - | let K = value(addressFromString(value(getString(r(d))))) | |
243 | - | let M = fromBase58String(value(getString(q(d)))) | |
244 | - | let ap = if ((ao > 0)) | |
245 | - | then true | |
246 | - | else A("nothing to claim") | |
247 | - | if ((ap == ap)) | |
244 | + | let an = (toString(J.caller) == value(getString(u(d)))) | |
245 | + | let ao = if (an) | |
248 | 246 | then { | |
249 | - | let aq = (an + ao) | |
250 | - | let ar = (am + ao) | |
251 | - | let as = value(assetBalance(this, M)) | |
252 | - | if ((as == as)) | |
247 | + | let ap = toString(J.originCaller) | |
248 | + | $Tuple5(ap, valueOrElse(getInteger(i(d, ap)), 0), valueOrElse(getInteger(k(d, ap)), 0), i(d, ap), k(d, ap)) | |
249 | + | } | |
250 | + | else { | |
251 | + | let ap = toString(J.caller) | |
252 | + | $Tuple5(ap, valueOrElse(getInteger(g(d, ap)), 0), valueOrElse(getInteger(j(d, ap)), 0), i(d, ap), k(d, ap)) | |
253 | + | } | |
254 | + | let aq = ao._1 | |
255 | + | let ar = ao._2 | |
256 | + | let as = ao._3 | |
257 | + | let at = ao._4 | |
258 | + | let au = ao._5 | |
259 | + | let av = valueOrElse(getInteger(q(d)), 0) | |
260 | + | let M = value(addressFromString(value(getString(t(d))))) | |
261 | + | let O = fromBase58String(value(getString(s(d)))) | |
262 | + | if (if (an) | |
263 | + | then (as == 0) | |
264 | + | else false) | |
265 | + | then $Tuple2(nil, 0) | |
266 | + | else { | |
267 | + | let aw = if ((as > 0)) | |
268 | + | then true | |
269 | + | else C("nothing to claim") | |
270 | + | if ((aw == aw)) | |
253 | 271 | then { | |
254 | - | let at = invoke(K, "withdrawReferralReward", [ao], nil) | |
255 | - | if ((at == at)) | |
272 | + | let ax = (ar + as) | |
273 | + | let ay = (av + as) | |
274 | + | let az = value(assetBalance(this, O)) | |
275 | + | if ((az == az)) | |
256 | 276 | then { | |
257 | - | let | |
258 | - | if (( | |
277 | + | let aA = invoke(M, "withdrawReferralReward", [as], nil) | |
278 | + | if ((aA == aA)) | |
259 | 279 | then { | |
260 | - | let | |
261 | - | if (( | |
280 | + | let aB = value(assetBalance(this, O)) | |
281 | + | if ((aB == aB)) | |
262 | 282 | then { | |
263 | - | let aw = if ((av == ao)) | |
264 | - | then true | |
265 | - | else A("insufficient balance on referral contract") | |
266 | - | if ((aw == aw)) | |
267 | - | then $Tuple2([IntegerEntry(g(d, al), aq), IntegerEntry(o(d), ar), IntegerEntry(i(d, al), 0), ScriptTransfer(H.caller, ao, M), StringEntry(v(d, al, toBase58String(H.transactionId)), y(ao))], unit) | |
283 | + | let aC = (aB - az) | |
284 | + | if ((aC == aC)) | |
285 | + | then { | |
286 | + | let aD = if ((aC == as)) | |
287 | + | then true | |
288 | + | else C("insufficient balance on referral contract") | |
289 | + | if ((aD == aD)) | |
290 | + | then $Tuple2([IntegerEntry(at, ax), IntegerEntry(q(d), ay), IntegerEntry(au, 0), ScriptTransfer(addressFromStringValue(aq), as, O), StringEntry(x(d, aq, toBase58String(J.transactionId)), A(as))], as) | |
291 | + | else throw("Strict value is not equal to itself.") | |
292 | + | } | |
268 | 293 | else throw("Strict value is not equal to itself.") | |
269 | 294 | } | |
270 | 295 | else throw("Strict value is not equal to itself.") | |
275 | 300 | } | |
276 | 301 | else throw("Strict value is not equal to itself.") | |
277 | 302 | } | |
303 | + | } | |
304 | + | else throw("Strict value is not equal to itself.") | |
305 | + | } | |
306 | + | ||
307 | + | ||
308 | + | ||
309 | + | @Callable(J) | |
310 | + | func claimREADONLY (d,y) = { | |
311 | + | let ar = valueOrElse(getInteger(g(d, y)), 0) | |
312 | + | let as = valueOrElse(getInteger(j(d, y)), 0) | |
313 | + | $Tuple2(nil, [as, ar]) | |
314 | + | } | |
315 | + | ||
316 | + | ||
317 | + | ||
318 | + | @Callable(J) | |
319 | + | func setManager (aE) = { | |
320 | + | let P = I(J) | |
321 | + | if ((P == P)) | |
322 | + | then { | |
323 | + | let aF = fromBase58String(aE) | |
324 | + | if ((aF == aF)) | |
325 | + | then [StringEntry(w(), aE)] | |
278 | 326 | else throw("Strict value is not equal to itself.") | |
279 | 327 | } | |
280 | 328 | else throw("Strict value is not equal to itself.") | |
282 | 330 | ||
283 | 331 | ||
284 | 332 | ||
285 | - | @Callable(H) | |
286 | - | func claimREADONLY (d,w) = { | |
287 | - | let an = valueOrElse(getInteger(g(d, w)), 0) | |
288 | - | let ao = valueOrElse(getInteger(i(d, w)), 0) | |
289 | - | $Tuple2(nil, [ao, an]) | |
290 | - | } | |
291 | - | ||
292 | - | ||
293 | - | ||
294 | - | @Callable(H) | |
295 | - | func setManager (ax) = { | |
296 | - | let N = G(H) | |
297 | - | if ((N == N)) | |
333 | + | @Callable(J) | |
334 | + | func confirmManager () = { | |
335 | + | let aG = H() | |
336 | + | let aH = if (isDefined(aG)) | |
337 | + | then true | |
338 | + | else C("no pending manager") | |
339 | + | if ((aH == aH)) | |
298 | 340 | then { | |
299 | - | let ay = fromBase58String(ax) | |
300 | - | if ((ay == ay)) | |
301 | - | then [StringEntry(u(), ax)] | |
341 | + | let aI = if ((J.callerPublicKey == value(aG))) | |
342 | + | then true | |
343 | + | else C("you are not pending manager") | |
344 | + | if ((aI == aI)) | |
345 | + | then [StringEntry(v(), toBase58String(value(aG))), DeleteEntry(w())] | |
302 | 346 | else throw("Strict value is not equal to itself.") | |
303 | 347 | } | |
304 | 348 | else throw("Strict value is not equal to itself.") | |
305 | 349 | } | |
306 | 350 | ||
307 | 351 | ||
308 | - | ||
309 | - | @Callable(H) | |
310 | - | func confirmManager () = { | |
311 | - | let az = F() | |
312 | - | let aA = if (isDefined(az)) | |
313 | - | then true | |
314 | - | else A("no pending manager") | |
315 | - | if ((aA == aA)) | |
316 | - | then { | |
317 | - | let aB = if ((H.callerPublicKey == value(az))) | |
318 | - | then true | |
319 | - | else A("you are not pending manager") | |
320 | - | if ((aB == aB)) | |
321 | - | then [StringEntry(t(), toBase58String(value(az))), DeleteEntry(u())] | |
322 | - | else throw("Strict value is not equal to itself.") | |
323 | - | } | |
324 | - | else throw("Strict value is not equal to itself.") | |
325 | - | } | |
326 | - | ||
327 | - | ||
328 | - | @Verifier(aC) | |
329 | - | func aD () = { | |
330 | - | let aE = { | |
331 | - | let D = C() | |
332 | - | if ($isInstanceOf(D, "ByteVector")) | |
352 | + | @Verifier(aJ) | |
353 | + | func aK () = { | |
354 | + | let aL = { | |
355 | + | let F = E() | |
356 | + | if ($isInstanceOf(F, "ByteVector")) | |
333 | 357 | then { | |
334 | - | let | |
335 | - | | |
358 | + | let L = F | |
359 | + | L | |
336 | 360 | } | |
337 | - | else if ($isInstanceOf( | |
338 | - | then | |
361 | + | else if ($isInstanceOf(F, "Unit")) | |
362 | + | then aJ.senderPublicKey | |
339 | 363 | else throw("Match error") | |
340 | 364 | } | |
341 | - | sigVerify( | |
365 | + | sigVerify(aJ.bodyBytes, aJ.proofs[0], aL) | |
342 | 366 | } | |
343 | 367 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = makeString(["%s", "backendPublicKey"], a) | |
7 | 7 | ||
8 | 8 | func c (d,e,f) = makeString(["%s%s%s%s", "existsReferrerToReferral", d, e, f], a) | |
9 | 9 | ||
10 | 10 | ||
11 | - | func g (d,h) = makeString(["%s%s%s%s", " | |
11 | + | func g (d,h) = makeString(["%s%s%s%s", "claimedReferrer", d, h], a) | |
12 | 12 | ||
13 | 13 | ||
14 | - | func i (d,h) = makeString(["%s%s%s%s", " | |
14 | + | func i (d,h) = makeString(["%s%s%s%s", "claimedReferral", d, h], a) | |
15 | 15 | ||
16 | 16 | ||
17 | - | func j (d, | |
17 | + | func j (d,h) = makeString(["%s%s%s%s", "unclaimedReferrer", d, h], a) | |
18 | 18 | ||
19 | 19 | ||
20 | - | func k (d) = makeString(["%s%s", " | |
20 | + | func k (d,h) = makeString(["%s%s%s%s", "unclaimedReferral", d, h], a) | |
21 | 21 | ||
22 | 22 | ||
23 | - | func l (d, | |
23 | + | func l (d,f) = makeString(["%s%s%s", "referrer", d, f], a) | |
24 | 24 | ||
25 | 25 | ||
26 | - | func m (d | |
26 | + | func m (d) = makeString(["%s%s", "programName", d], a) | |
27 | 27 | ||
28 | 28 | ||
29 | - | func n (d, | |
29 | + | func n (d,e) = makeString(["%s%s%s", "totalReferralCount", d, e], a) | |
30 | 30 | ||
31 | 31 | ||
32 | - | func o (d) = makeString(["%s%s", " | |
32 | + | func o (d,e) = makeString(["%s%s%s", "activeReferralCount", d, e], a) | |
33 | 33 | ||
34 | 34 | ||
35 | - | func p (d) = makeString(["%s%s", " | |
35 | + | func p (d,f) = makeString(["%s%s%s", "activeReferral", d, f], a) | |
36 | 36 | ||
37 | 37 | ||
38 | - | func q (d) = makeString(["%s%s", " | |
38 | + | func q (d) = makeString(["%s%s", "claimedTotal", d], a) | |
39 | 39 | ||
40 | 40 | ||
41 | - | func r (d) = makeString(["%s%s", " | |
41 | + | func r (d) = makeString(["%s%s", "rewardsTotal", d], a) | |
42 | 42 | ||
43 | 43 | ||
44 | - | func s (d) = makeString(["%s%s", " | |
44 | + | func s (d) = makeString(["%s%s", "rewardAssetId", d], a) | |
45 | 45 | ||
46 | 46 | ||
47 | - | func t () = "%s | |
47 | + | func t (d) = makeString(["%s%s", "treasuryContract", d], a) | |
48 | 48 | ||
49 | 49 | ||
50 | - | func u () = "%s | |
50 | + | func u (d) = makeString(["%s%s", "implementationContract", d], a) | |
51 | 51 | ||
52 | 52 | ||
53 | - | func v ( | |
53 | + | func v () = "%s__managerPublicKey" | |
54 | 54 | ||
55 | 55 | ||
56 | - | func | |
56 | + | func w () = "%s__pendingManagerPublicKey" | |
57 | 57 | ||
58 | 58 | ||
59 | - | func | |
59 | + | func x (d,y,z) = makeString(["%s%s%s%s%s", "history", "claim", d, y, z], a) | |
60 | 60 | ||
61 | 61 | ||
62 | - | func C () = { | |
63 | - | let D = getString(t()) | |
64 | - | if ($isInstanceOf(D, "String")) | |
62 | + | func A (B) = makeString(["%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(B)], a) | |
63 | + | ||
64 | + | ||
65 | + | func C (D) = throw(makeString(["referral.ride:", D], " ")) | |
66 | + | ||
67 | + | ||
68 | + | func E () = { | |
69 | + | let F = getString(v()) | |
70 | + | if ($isInstanceOf(F, "String")) | |
65 | 71 | then { | |
66 | - | let | |
67 | - | fromBase58String( | |
72 | + | let G = F | |
73 | + | fromBase58String(G) | |
68 | 74 | } | |
69 | - | else if ($isInstanceOf( | |
75 | + | else if ($isInstanceOf(F, "Unit")) | |
70 | 76 | then unit | |
71 | 77 | else throw("Match error") | |
72 | 78 | } | |
73 | 79 | ||
74 | 80 | ||
75 | - | func | |
76 | - | let | |
77 | - | if ($isInstanceOf( | |
81 | + | func H () = { | |
82 | + | let F = getString(w()) | |
83 | + | if ($isInstanceOf(F, "String")) | |
78 | 84 | then { | |
79 | - | let | |
80 | - | fromBase58String( | |
85 | + | let G = F | |
86 | + | fromBase58String(G) | |
81 | 87 | } | |
82 | - | else if ($isInstanceOf( | |
88 | + | else if ($isInstanceOf(F, "Unit")) | |
83 | 89 | then unit | |
84 | 90 | else throw("Match error") | |
85 | 91 | } | |
86 | 92 | ||
87 | 93 | ||
88 | - | func | |
89 | - | let | |
90 | - | let | |
91 | - | if ($isInstanceOf( | |
94 | + | func I (J) = { | |
95 | + | let K = C("permission denied") | |
96 | + | let F = E() | |
97 | + | if ($isInstanceOf(F, "ByteVector")) | |
92 | 98 | then { | |
93 | - | let | |
94 | - | if (( | |
99 | + | let L = F | |
100 | + | if ((J.callerPublicKey == L)) | |
95 | 101 | then true | |
96 | - | else | |
102 | + | else K | |
97 | 103 | } | |
98 | - | else if ($isInstanceOf( | |
99 | - | then if (( | |
104 | + | else if ($isInstanceOf(F, "Unit")) | |
105 | + | then if ((J.caller == this)) | |
100 | 106 | then true | |
101 | - | else | |
107 | + | else K | |
102 | 108 | else throw("Match error") | |
103 | 109 | } | |
104 | 110 | ||
105 | 111 | ||
106 | - | @Callable( | |
107 | - | func createReferralProgram (d, | |
108 | - | let | |
109 | - | if (( | |
112 | + | @Callable(J) | |
113 | + | func createReferralProgram (d,M,N,O) = { | |
114 | + | let P = I(J) | |
115 | + | if ((P == P)) | |
110 | 116 | then { | |
111 | - | let | |
117 | + | let Q = if ((getBoolean(m(d)) == unit)) | |
112 | 118 | then true | |
113 | - | else | |
114 | - | if (( | |
119 | + | else C("program name already exists") | |
120 | + | if ((Q == Q)) | |
115 | 121 | then { | |
116 | - | let | |
122 | + | let R = if (!(contains(d, a))) | |
117 | 123 | then !(contains(d, " ")) | |
118 | 124 | else false | |
119 | - | let | |
125 | + | let S = if (R) | |
120 | 126 | then true | |
121 | - | else | |
122 | - | if (( | |
127 | + | else C("invalid program name") | |
128 | + | if ((S == S)) | |
123 | 129 | then { | |
124 | - | let | |
130 | + | let T = if ((assetInfo(fromBase58String(O)) != unit)) | |
125 | 131 | then true | |
126 | - | else | |
127 | - | if (( | |
128 | - | then $Tuple2([BooleanEntry( | |
132 | + | else C("invalid reward asset id") | |
133 | + | if ((T == T)) | |
134 | + | then $Tuple2([BooleanEntry(m(d), true), StringEntry(t(d), M), StringEntry(u(d), N), StringEntry(s(d), O), IntegerEntry(r(d), 0)], unit) | |
129 | 135 | else throw("Strict value is not equal to itself.") | |
130 | 136 | } | |
131 | 137 | else throw("Strict value is not equal to itself.") | |
132 | 138 | } | |
133 | 139 | else throw("Strict value is not equal to itself.") | |
134 | 140 | } | |
135 | 141 | else throw("Strict value is not equal to itself.") | |
136 | 142 | } | |
137 | 143 | ||
138 | 144 | ||
139 | 145 | ||
140 | - | @Callable( | |
141 | - | func createPair (d,e,f, | |
142 | - | let | |
146 | + | @Callable(J) | |
147 | + | func createPair (d,e,f,U) = { | |
148 | + | let S = if (valueOrElse(getBoolean(m(d)), false)) | |
143 | 149 | then true | |
144 | - | else | |
145 | - | if (( | |
150 | + | else C("program does not exist") | |
151 | + | if ((S == S)) | |
146 | 152 | then { | |
147 | - | let | |
153 | + | let V = if ((getBoolean(c(d, e, f)) == unit)) | |
148 | 154 | then true | |
149 | - | else | |
150 | - | if (( | |
155 | + | else C("pair already exists") | |
156 | + | if ((V == V)) | |
151 | 157 | then { | |
152 | - | let | |
158 | + | let W = if ((e != f)) | |
153 | 159 | then true | |
154 | - | else | |
155 | - | if (( | |
160 | + | else C("cannot refer to self") | |
161 | + | if ((W == W)) | |
156 | 162 | then { | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
163 | + | let X = toBytes(makeString([d, e, f], ":")) | |
164 | + | let Y = fromBase58String(value(getString(b))) | |
165 | + | let Z = if (sigVerify(X, U, Y)) | |
160 | 166 | then true | |
161 | - | else | |
162 | - | if (( | |
167 | + | else C("bad signature") | |
168 | + | if ((Z == Z)) | |
163 | 169 | then { | |
164 | - | let | |
165 | - | let | |
166 | - | $Tuple2([BooleanEntry(c(d, e, f), true), IntegerEntry( | |
170 | + | let aa = valueOrElse(getInteger(n(d, e)), 0) | |
171 | + | let ab = (aa + 1) | |
172 | + | $Tuple2([BooleanEntry(c(d, e, f), true), IntegerEntry(n(d, e), ab), StringEntry(l(d, f), e)], unit) | |
167 | 173 | } | |
168 | 174 | else throw("Strict value is not equal to itself.") | |
169 | 175 | } | |
170 | 176 | else throw("Strict value is not equal to itself.") | |
171 | 177 | } | |
172 | 178 | else throw("Strict value is not equal to itself.") | |
173 | 179 | } | |
174 | 180 | else throw("Strict value is not equal to itself.") | |
175 | 181 | } | |
176 | 182 | ||
177 | 183 | ||
178 | 184 | ||
179 | - | @Callable( | |
180 | - | func updateReferralActivity (d,f, | |
181 | - | let | |
182 | - | let | |
183 | - | let e = value(getString( | |
184 | - | let | |
185 | + | @Callable(J) | |
186 | + | func updateReferralActivity (d,f,ac) = { | |
187 | + | let N = value(getString(u(d))) | |
188 | + | let ad = (getBoolean(p(d, f)) != unit) | |
189 | + | let e = value(getString(l(d, f))) | |
190 | + | let P = if ((toString(J.caller) == N)) | |
185 | 191 | then true | |
186 | - | else | |
187 | - | if (( | |
192 | + | else C("permission denied") | |
193 | + | if ((P == P)) | |
188 | 194 | then { | |
189 | - | let | |
195 | + | let ae = if ((ad == ac)) | |
190 | 196 | then $Tuple2(nil, unit) | |
191 | 197 | else { | |
192 | - | let | |
198 | + | let ae = if ((ac == true)) | |
193 | 199 | then { | |
194 | - | let | |
195 | - | $Tuple2([BooleanEntry( | |
200 | + | let af = (valueOrElse(getInteger(o(d, e)), 0) + 1) | |
201 | + | $Tuple2([BooleanEntry(p(d, f), true), IntegerEntry(o(d, e), af)], unit) | |
196 | 202 | } | |
197 | 203 | else { | |
198 | - | let | |
199 | - | $Tuple2([DeleteEntry( | |
204 | + | let af = (valueOrElse(getInteger(o(d, e)), 0) - 1) | |
205 | + | $Tuple2([DeleteEntry(p(d, f)), IntegerEntry(o(d, e), af)], unit) | |
200 | 206 | } | |
201 | - | | |
207 | + | ae | |
202 | 208 | } | |
203 | - | | |
209 | + | ae | |
204 | 210 | } | |
205 | 211 | else throw("Strict value is not equal to itself.") | |
206 | 212 | } | |
207 | 213 | ||
208 | 214 | ||
209 | 215 | ||
210 | - | @Callable( | |
211 | - | func incUnclaimed (d,f, | |
212 | - | let | |
213 | - | let | |
216 | + | @Callable(J) | |
217 | + | func incUnclaimed (d,f,ag,ah) = { | |
218 | + | let N = value(getString(u(d))) | |
219 | + | let P = if ((toString(J.caller) == N)) | |
214 | 220 | then true | |
215 | - | else | |
216 | - | if (( | |
221 | + | else C("permission denied") | |
222 | + | if ((P == P)) | |
217 | 223 | then { | |
218 | - | let e = value(getString( | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | $Tuple2([IntegerEntry( | |
224 | + | let e = value(getString(l(d, f))) | |
225 | + | let ai = valueOrElse(getInteger(j(d, e)), 0) | |
226 | + | let aj = valueOrElse(getInteger(k(d, f)), 0) | |
227 | + | let ak = valueOrElse(getInteger(r(d)), 0) | |
228 | + | let al = (ai + ag) | |
229 | + | let am = (aj + ah) | |
230 | + | $Tuple2([IntegerEntry(j(d, e), al), IntegerEntry(k(d, f), am), IntegerEntry(r(d), ((ak + ag) + ah))], unit) | |
225 | 231 | } | |
226 | 232 | else throw("Strict value is not equal to itself.") | |
227 | 233 | } | |
228 | 234 | ||
229 | 235 | ||
230 | 236 | ||
231 | - | @Callable( | |
237 | + | @Callable(J) | |
232 | 238 | func claim (d) = { | |
233 | - | let | |
239 | + | let S = if (valueOrElse(getBoolean(m(d)), false)) | |
234 | 240 | then true | |
235 | - | else | |
236 | - | if (( | |
241 | + | else C("program does not exist") | |
242 | + | if ((S == S)) | |
237 | 243 | then { | |
238 | - | let al = toString(H.caller) | |
239 | - | let am = valueOrElse(getInteger(o(d)), 0) | |
240 | - | let an = valueOrElse(getInteger(g(d, al)), 0) | |
241 | - | let ao = valueOrElse(getInteger(i(d, al)), 0) | |
242 | - | let K = value(addressFromString(value(getString(r(d))))) | |
243 | - | let M = fromBase58String(value(getString(q(d)))) | |
244 | - | let ap = if ((ao > 0)) | |
245 | - | then true | |
246 | - | else A("nothing to claim") | |
247 | - | if ((ap == ap)) | |
244 | + | let an = (toString(J.caller) == value(getString(u(d)))) | |
245 | + | let ao = if (an) | |
248 | 246 | then { | |
249 | - | let aq = (an + ao) | |
250 | - | let ar = (am + ao) | |
251 | - | let as = value(assetBalance(this, M)) | |
252 | - | if ((as == as)) | |
247 | + | let ap = toString(J.originCaller) | |
248 | + | $Tuple5(ap, valueOrElse(getInteger(i(d, ap)), 0), valueOrElse(getInteger(k(d, ap)), 0), i(d, ap), k(d, ap)) | |
249 | + | } | |
250 | + | else { | |
251 | + | let ap = toString(J.caller) | |
252 | + | $Tuple5(ap, valueOrElse(getInteger(g(d, ap)), 0), valueOrElse(getInteger(j(d, ap)), 0), i(d, ap), k(d, ap)) | |
253 | + | } | |
254 | + | let aq = ao._1 | |
255 | + | let ar = ao._2 | |
256 | + | let as = ao._3 | |
257 | + | let at = ao._4 | |
258 | + | let au = ao._5 | |
259 | + | let av = valueOrElse(getInteger(q(d)), 0) | |
260 | + | let M = value(addressFromString(value(getString(t(d))))) | |
261 | + | let O = fromBase58String(value(getString(s(d)))) | |
262 | + | if (if (an) | |
263 | + | then (as == 0) | |
264 | + | else false) | |
265 | + | then $Tuple2(nil, 0) | |
266 | + | else { | |
267 | + | let aw = if ((as > 0)) | |
268 | + | then true | |
269 | + | else C("nothing to claim") | |
270 | + | if ((aw == aw)) | |
253 | 271 | then { | |
254 | - | let at = invoke(K, "withdrawReferralReward", [ao], nil) | |
255 | - | if ((at == at)) | |
272 | + | let ax = (ar + as) | |
273 | + | let ay = (av + as) | |
274 | + | let az = value(assetBalance(this, O)) | |
275 | + | if ((az == az)) | |
256 | 276 | then { | |
257 | - | let | |
258 | - | if (( | |
277 | + | let aA = invoke(M, "withdrawReferralReward", [as], nil) | |
278 | + | if ((aA == aA)) | |
259 | 279 | then { | |
260 | - | let | |
261 | - | if (( | |
280 | + | let aB = value(assetBalance(this, O)) | |
281 | + | if ((aB == aB)) | |
262 | 282 | then { | |
263 | - | let aw = if ((av == ao)) | |
264 | - | then true | |
265 | - | else A("insufficient balance on referral contract") | |
266 | - | if ((aw == aw)) | |
267 | - | then $Tuple2([IntegerEntry(g(d, al), aq), IntegerEntry(o(d), ar), IntegerEntry(i(d, al), 0), ScriptTransfer(H.caller, ao, M), StringEntry(v(d, al, toBase58String(H.transactionId)), y(ao))], unit) | |
283 | + | let aC = (aB - az) | |
284 | + | if ((aC == aC)) | |
285 | + | then { | |
286 | + | let aD = if ((aC == as)) | |
287 | + | then true | |
288 | + | else C("insufficient balance on referral contract") | |
289 | + | if ((aD == aD)) | |
290 | + | then $Tuple2([IntegerEntry(at, ax), IntegerEntry(q(d), ay), IntegerEntry(au, 0), ScriptTransfer(addressFromStringValue(aq), as, O), StringEntry(x(d, aq, toBase58String(J.transactionId)), A(as))], as) | |
291 | + | else throw("Strict value is not equal to itself.") | |
292 | + | } | |
268 | 293 | else throw("Strict value is not equal to itself.") | |
269 | 294 | } | |
270 | 295 | else throw("Strict value is not equal to itself.") | |
271 | 296 | } | |
272 | 297 | else throw("Strict value is not equal to itself.") | |
273 | 298 | } | |
274 | 299 | else throw("Strict value is not equal to itself.") | |
275 | 300 | } | |
276 | 301 | else throw("Strict value is not equal to itself.") | |
277 | 302 | } | |
303 | + | } | |
304 | + | else throw("Strict value is not equal to itself.") | |
305 | + | } | |
306 | + | ||
307 | + | ||
308 | + | ||
309 | + | @Callable(J) | |
310 | + | func claimREADONLY (d,y) = { | |
311 | + | let ar = valueOrElse(getInteger(g(d, y)), 0) | |
312 | + | let as = valueOrElse(getInteger(j(d, y)), 0) | |
313 | + | $Tuple2(nil, [as, ar]) | |
314 | + | } | |
315 | + | ||
316 | + | ||
317 | + | ||
318 | + | @Callable(J) | |
319 | + | func setManager (aE) = { | |
320 | + | let P = I(J) | |
321 | + | if ((P == P)) | |
322 | + | then { | |
323 | + | let aF = fromBase58String(aE) | |
324 | + | if ((aF == aF)) | |
325 | + | then [StringEntry(w(), aE)] | |
278 | 326 | else throw("Strict value is not equal to itself.") | |
279 | 327 | } | |
280 | 328 | else throw("Strict value is not equal to itself.") | |
281 | 329 | } | |
282 | 330 | ||
283 | 331 | ||
284 | 332 | ||
285 | - | @Callable(H) | |
286 | - | func claimREADONLY (d,w) = { | |
287 | - | let an = valueOrElse(getInteger(g(d, w)), 0) | |
288 | - | let ao = valueOrElse(getInteger(i(d, w)), 0) | |
289 | - | $Tuple2(nil, [ao, an]) | |
290 | - | } | |
291 | - | ||
292 | - | ||
293 | - | ||
294 | - | @Callable(H) | |
295 | - | func setManager (ax) = { | |
296 | - | let N = G(H) | |
297 | - | if ((N == N)) | |
333 | + | @Callable(J) | |
334 | + | func confirmManager () = { | |
335 | + | let aG = H() | |
336 | + | let aH = if (isDefined(aG)) | |
337 | + | then true | |
338 | + | else C("no pending manager") | |
339 | + | if ((aH == aH)) | |
298 | 340 | then { | |
299 | - | let ay = fromBase58String(ax) | |
300 | - | if ((ay == ay)) | |
301 | - | then [StringEntry(u(), ax)] | |
341 | + | let aI = if ((J.callerPublicKey == value(aG))) | |
342 | + | then true | |
343 | + | else C("you are not pending manager") | |
344 | + | if ((aI == aI)) | |
345 | + | then [StringEntry(v(), toBase58String(value(aG))), DeleteEntry(w())] | |
302 | 346 | else throw("Strict value is not equal to itself.") | |
303 | 347 | } | |
304 | 348 | else throw("Strict value is not equal to itself.") | |
305 | 349 | } | |
306 | 350 | ||
307 | 351 | ||
308 | - | ||
309 | - | @Callable(H) | |
310 | - | func confirmManager () = { | |
311 | - | let az = F() | |
312 | - | let aA = if (isDefined(az)) | |
313 | - | then true | |
314 | - | else A("no pending manager") | |
315 | - | if ((aA == aA)) | |
316 | - | then { | |
317 | - | let aB = if ((H.callerPublicKey == value(az))) | |
318 | - | then true | |
319 | - | else A("you are not pending manager") | |
320 | - | if ((aB == aB)) | |
321 | - | then [StringEntry(t(), toBase58String(value(az))), DeleteEntry(u())] | |
322 | - | else throw("Strict value is not equal to itself.") | |
323 | - | } | |
324 | - | else throw("Strict value is not equal to itself.") | |
325 | - | } | |
326 | - | ||
327 | - | ||
328 | - | @Verifier(aC) | |
329 | - | func aD () = { | |
330 | - | let aE = { | |
331 | - | let D = C() | |
332 | - | if ($isInstanceOf(D, "ByteVector")) | |
352 | + | @Verifier(aJ) | |
353 | + | func aK () = { | |
354 | + | let aL = { | |
355 | + | let F = E() | |
356 | + | if ($isInstanceOf(F, "ByteVector")) | |
333 | 357 | then { | |
334 | - | let | |
335 | - | | |
358 | + | let L = F | |
359 | + | L | |
336 | 360 | } | |
337 | - | else if ($isInstanceOf( | |
338 | - | then | |
361 | + | else if ($isInstanceOf(F, "Unit")) | |
362 | + | then aJ.senderPublicKey | |
339 | 363 | else throw("Match error") | |
340 | 364 | } | |
341 | - | sigVerify( | |
365 | + | sigVerify(aJ.bodyBytes, aJ.proofs[0], aL) | |
342 | 366 | } | |
343 | 367 |
github/deemru/w8io/169f3d6 93.66 ms ◑