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