tx · 9WA53dYhMo8abNYSBSwUrCkdBbMjbk8LkVPrdeeGrnYK

3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh:  -0.01800000 Waves

2022.10.27 10:23 [2290524] smart account 3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh > SELF 0.00000000 Waves

{ "type": 13, "id": "9WA53dYhMo8abNYSBSwUrCkdBbMjbk8LkVPrdeeGrnYK", "fee": 1800000, "feeAssetId": null, "timestamp": 1666855364820, "version": 1, "sender": "3NAsFvuLwxz1iUtZ9fmhfmSN16r9NEsPqsh", "senderPublicKey": "33fpjdpM9FMu87RZKePniPardKqQXM96sm7VhAk3JEVQ", "proofs": [ "5dD13guaNhsEL58Ahtm7bqqWrVkvwJqrSSLN61FVMZGpdYo8b5Xrvprr1ugwGidEbR2tcbDUxtfoL5hU7hsgCYdV" ], "script": "base64:BgLnEwgCEgUKAwgIBBIFCgMIGAESBwoFEQgYAQESBgoECAgICBIGCgQICAgCEgUKAwgIBBIGCgQICAEBEgQKAggYEgMKAQgSABIECgIICBIDCgEIEgQKAggIEgMKAQgSACIJc2VwYXJhdG9yIgxrZXlXeEFzc2V0SWQiE2tleUJhY2tlbmRQdWJsaWNLZXkiG2tleUV4aXN0c1JlZmVycmVyVG9SZWZlcnJhbCILcHJvZ3JhbU5hbWUiD3JlZmVycmVyQWRkcmVzcyIPcmVmZXJyYWxBZGRyZXNzIhJrZXlDbGFpbWVkUmVmZXJyZXIiDmNsYWltZXJBZGRyZXNzIhJrZXlDbGFpbWVkUmVmZXJyYWwiFGtleVVuY2xhaW1lZFJlZmVycmVyIhRrZXlVbmNsYWltZWRSZWZlcnJhbCILa2V5UmVmZXJyZXIiDmtleVByb2dyYW1OYW1lIhVrZXlUb3RhbFJlZmVycmFsQ291bnQiFmtleUFjdGl2ZVJlZmVycmFsQ291bnQiE2tleUlzUmVmZXJyYWxBY3RpdmUiFmtleUNsYWltZWRUb3RhbEFkZHJlc3MiB2FkZHJlc3MiGGtle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iUAkA2QQBBQJiTwMJAAACBQJiUAUCYlAJAMwIAgkBC1N0cmluZ0VudHJ5AgkBAUMABQJiTwUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAVEBDmNvbmZpcm1NYW5hZ2VyAAQCYlEJAQFPAAQCYlIDCQEJaXNEZWZpbmVkAQUCYlEGCQEBSgECEm5vIHBlbmRpbmcgbWFuYWdlcgMJAAACBQJiUgUCYlIEAmJTAwkAAAIIBQFRD2NhbGxlclB1YmxpY0tleQkBBXZhbHVlAQUCYlEGCQEBSgECG3lvdSBhcmUgbm90IHBlbmRpbmcgbWFuYWdlcgMJAAACBQJiUwUCYlMJAMwIAgkBC1N0cmluZ0VudHJ5AgkBAUIACQDYBAEJAQV2YWx1ZQEFAmJRCQDMCAIJAQtEZWxldGVFbnRyeQEJAQFDAAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJiVAECYlUABAJiVgQBTQkBAUwAAwkAAQIFAU0CCkJ5dGVWZWN0b3IEAVMFAU0FAVMDCQABAgUBTQIEVW5pdAgFAmJUD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJiVAlib2R5Qnl0ZXMJAJEDAggFAmJUBnByb29mcwAABQJiVpTNQYA=", "chainId": 84, "height": 2290524, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F85abB5RAhaDewZHwtxKQE7YZRptbphgTcgBMJcqZbKX Next: EPiqXdrakwq5NydtB98s9ydE91rgp4i8zkvyUeRVvp8v Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
6-let b = makeString(["%s", "backendPublicKey"], a)
7-
8-func c (d,e,f) = makeString(["%s%s%s%s", "existsReferrerToReferral", d, e, f], a)
6+func b () = makeString(["%s", "wxAssetId"], a)
97
108
11-func g (d,h) = makeString(["%s%s%s%s", "claimedReferrer", d, h], a)
9+let c = makeString(["%s", "backendPublicKey"], a)
10+
11+func d (e,f,g) = makeString(["%s%s%s%s", "existsReferrerToReferral", e, f, g], a)
1212
1313
14-func i (d,h) = makeString(["%s%s%s%s", "claimedReferral", d, h], a)
14+func h (e,i) = makeString(["%s%s%s", "claimedReferrer", e, i], a)
1515
1616
17-func j (d,h) = makeString(["%s%s%s%s", "unclaimedReferrer", d, h], a)
17+func j (e,i) = makeString(["%s%s%s", "claimedReferral", e, i], a)
1818
1919
20-func k (d,h) = makeString(["%s%s%s%s", "unclaimedReferral", d, h], a)
20+func k (e,i) = makeString(["%s%s%s", "unclaimedReferrer", e, i], a)
2121
2222
23-func l (d,f) = makeString(["%s%s%s", "referrer", d, f], a)
23+func l (e,i) = makeString(["%s%s%s", "unclaimedReferral", e, i], a)
2424
2525
26-func m (d) = makeString(["%s%s", "programName", d], a)
26+func m (e,g) = makeString(["%s%s%s", "referrer", e, g], a)
2727
2828
29-func n (d,e) = makeString(["%s%s%s", "totalReferralCount", d, e], a)
29+func n (e) = makeString(["%s%s", "programName", e], a)
3030
3131
32-func o (d,e) = makeString(["%s%s%s", "activeReferralCount", d, e], a)
32+func o (e,f) = makeString(["%s%s%s", "totalReferralCount", e, f], a)
3333
3434
35-func p (d,f) = makeString(["%s%s%s", "activeReferral", d, f], a)
35+func p (e,f) = makeString(["%s%s%s", "activeReferralCount", e, f], a)
3636
3737
38-func q (d) = makeString(["%s%s", "claimedTotal", d], a)
38+func q (e,g) = makeString(["%s%s%s", "activeReferral", e, g], a)
3939
4040
41-func r (d) = makeString(["%s%s", "rewardsTotal", d], a)
41+func r (s) = makeString(["%s%s", "claimedTotalAddress", s], a)
4242
4343
44-func s (d) = makeString(["%s%s", "rewardAssetId", d], a)
44+func t (s) = makeString(["%s%s", "unclaimedTotalAddress", s], a)
4545
4646
47-func t (d) = makeString(["%s%s", "treasuryContract", d], a)
47+func u (e) = makeString(["%s%s", "claimedTotal", e], a)
4848
4949
50-func u (d) = makeString(["%s%s", "implementationContract", d], a)
50+func v (e) = makeString(["%s%s", "rewardsTotal", e], a)
5151
5252
53-func v () = "%s__managerPublicKey"
53+func w (e) = makeString(["%s%s", "rewardAssetId", e], a)
5454
5555
56-func w () = "%s__pendingManagerPublicKey"
56+func x (e) = makeString(["%s%s", "treasuryContract", e], a)
5757
5858
59-func x (d,y,z,A) = makeString(["%s%s%s%s%s", "history", A, d, y, z], a)
59+func y (e) = makeString(["%s%s", "implementationContract", e], a)
6060
6161
62-func B (C) = makeString(["%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(C)], a)
62+func z (s) = makeString(["%s%s", "allReferralPrograms", s], a)
6363
6464
65-func D (E) = throw(makeString(["referral.ride:", E], " "))
65+func A (s) = makeString(["%s%s", "lastIncUnclaimedWithPaymentCallBlock", s], a)
6666
6767
68-func F () = {
69- let G = getString(v())
70- if ($isInstanceOf(G, "String"))
68+func B () = "%s__managerPublicKey"
69+
70+
71+func C () = "%s__pendingManagerPublicKey"
72+
73+
74+func D (e,E,F,G) = makeString(["%s%s%s%s%s", "history", G, e, E, F], a)
75+
76+
77+func H (I) = makeString(["%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(I)], a)
78+
79+
80+func J (K) = throw(makeString(["referral.ride:", K], " "))
81+
82+
83+func L () = {
84+ let M = getString(B())
85+ if ($isInstanceOf(M, "String"))
7186 then {
72- let H = G
73- fromBase58String(H)
87+ let N = M
88+ fromBase58String(N)
7489 }
75- else if ($isInstanceOf(G, "Unit"))
90+ else if ($isInstanceOf(M, "Unit"))
7691 then unit
7792 else throw("Match error")
7893 }
7994
8095
81-func I () = {
82- let G = getString(w())
83- if ($isInstanceOf(G, "String"))
96+func O () = {
97+ let M = getString(C())
98+ if ($isInstanceOf(M, "String"))
8499 then {
85- let H = G
86- fromBase58String(H)
100+ let N = M
101+ fromBase58String(N)
87102 }
88- else if ($isInstanceOf(G, "Unit"))
103+ else if ($isInstanceOf(M, "Unit"))
89104 then unit
90105 else throw("Match error")
91106 }
92107
93108
94-func J (K) = {
95- let L = D("permission denied")
96- let G = F()
97- if ($isInstanceOf(G, "ByteVector"))
109+func P (Q) = {
110+ let R = J("permission denied")
111+ let M = L()
112+ if ($isInstanceOf(M, "ByteVector"))
98113 then {
99- let M = G
100- if ((K.callerPublicKey == M))
114+ let S = M
115+ if ((Q.callerPublicKey == S))
101116 then true
102- else L
117+ else R
103118 }
104- else if ($isInstanceOf(G, "Unit"))
105- then if ((K.caller == this))
119+ else if ($isInstanceOf(M, "Unit"))
120+ then if ((Q.caller == this))
106121 then true
107- else L
122+ else R
108123 else throw("Match error")
109124 }
110125
111126
112-@Callable(K)
113-func createReferralProgram (d,N,O,P) = {
114- let Q = J(K)
115- if ((Q == Q))
116- then {
117- let R = if ((getBoolean(m(d)) == unit))
118- then true
119- else D("program name already exists")
120- if ((R == R))
121- then {
122- let S = if (!(contains(d, a)))
123- then !(contains(d, " "))
124- else false
125- let T = if (S)
126- then true
127- else D("invalid program name")
128- if ((T == T))
129- then {
130- let U = if ((assetInfo(fromBase58String(P)) != unit))
131- then true
132- else D("invalid reward asset id")
133- if ((U == U))
134- then $Tuple2([BooleanEntry(m(d), true), StringEntry(t(d), N), StringEntry(u(d), O), StringEntry(s(d), P), IntegerEntry(r(d), 0)], unit)
135- else throw("Strict value is not equal to itself.")
136- }
137- else throw("Strict value is not equal to itself.")
138- }
139- else throw("Strict value is not equal to itself.")
127+func T (s,e) = {
128+ let U = valueOrElse(getString(z(s)), "")
129+ let V = if (contains(U, e))
130+ then nil
131+ else {
132+ let W = if ((U == ""))
133+ then e
134+ else makeString([U, e], a)
135+[StringEntry(z(s), W)]
140136 }
141- else throw("Strict value is not equal to itself.")
137+ V
142138 }
143139
144140
145-
146-@Callable(K)
147-func createPair (d,e,f,V) = {
148- let T = if (valueOrElse(getBoolean(m(d)), false))
141+@Callable(Q)
142+func claimInternal (e,i,X) = {
143+ let Y = if (valueOrElse(getBoolean(n(e)), false))
149144 then true
150- else D("program does not exist")
151- if ((T == T))
145+ else J("program does not exist")
146+ if ((Y == Y))
152147 then {
153- let W = if ((getBoolean(c(d, e, f)) == unit))
154- then true
155- else D("pair already exists")
156- if ((W == W))
157- then {
158- let X = if ((e != f))
159- then true
160- else D("cannot refer to self")
161- if ((X == X))
162- then {
163- let Y = toBytes(makeString([d, e, f], ":"))
164- let Z = fromBase58String(value(getString(b)))
165- let aa = if (sigVerify(Y, V, Z))
166- then true
167- else D("bad signature")
168- if ((aa == aa))
169- then {
170- let ab = valueOrElse(getInteger(n(d, e)), 0)
171- let ac = (ab + 1)
172- $Tuple2([BooleanEntry(c(d, e, f), true), IntegerEntry(n(d, e), ac), StringEntry(l(d, f), e)], unit)
173- }
174- else throw("Strict value is not equal to itself.")
175- }
176- else throw("Strict value is not equal to itself.")
177- }
178- else throw("Strict value is not equal to itself.")
179- }
180- else throw("Strict value is not equal to itself.")
181- }
182-
183-
184-
185-@Callable(K)
186-func updateReferralActivity (d,f,ad) = {
187- let O = value(getString(u(d)))
188- let ae = (getBoolean(p(d, f)) != unit)
189- let e = value(getString(l(d, f)))
190- let Q = if ((toString(K.caller) == O))
191- then true
192- else D("permission denied")
193- if ((Q == Q))
194- then {
195- let af = if ((ae == ad))
196- then $Tuple2(nil, unit)
197- else {
198- let af = if ((ad == true))
199- then {
200- let ag = (valueOrElse(getInteger(o(d, e)), 0) + 1)
201- $Tuple2([BooleanEntry(p(d, f), true), IntegerEntry(o(d, e), ag)], unit)
202- }
203- else {
204- let ag = (valueOrElse(getInteger(o(d, e)), 0) - 1)
205- $Tuple2([DeleteEntry(p(d, f)), IntegerEntry(o(d, e), ag)], unit)
206- }
207- af
208- }
209- af
210- }
211- else throw("Strict value is not equal to itself.")
212- }
213-
214-
215-
216-@Callable(K)
217-func incUnclaimed (d,f,ah,ai) = {
218- let O = value(getString(u(d)))
219- let Q = if ((toString(K.caller) == O))
220- then true
221- else D("permission denied")
222- if ((Q == Q))
223- then {
224- let e = value(getString(l(d, f)))
225- let aj = valueOrElse(getInteger(j(d, e)), 0)
226- let ak = valueOrElse(getInteger(k(d, f)), 0)
227- let al = valueOrElse(getInteger(r(d)), 0)
228- let am = (aj + ah)
229- let an = (ak + ai)
230- $Tuple2([IntegerEntry(j(d, e), am), IntegerEntry(k(d, f), an), IntegerEntry(r(d), ((al + ah) + ai))], unit)
231- }
232- else throw("Strict value is not equal to itself.")
233- }
234-
235-
236-
237-@Callable(K)
238-func claim (d) = {
239- let T = if (valueOrElse(getBoolean(m(d)), false))
240- then true
241- else D("program does not exist")
242- if ((T == T))
243- then {
244- let ao = (toString(K.caller) == value(getString(u(d))))
245- let ap = if (ao)
246- then {
247- let aq = toString(K.originCaller)
248- $Tuple6(aq, valueOrElse(getInteger(i(d, aq)), 0), valueOrElse(getInteger(k(d, aq)), 0), i(d, aq), k(d, aq), x(d, aq, toBase58String(K.transactionId), "claimReferral"))
249- }
250- else {
251- let aq = toString(K.caller)
252- $Tuple6(aq, valueOrElse(getInteger(g(d, aq)), 0), valueOrElse(getInteger(j(d, aq)), 0), g(d, aq), j(d, aq), x(d, aq, toBase58String(K.transactionId), "claimReferrer"))
253- }
254- let ar = ap._1
255- let as = ap._2
256- let at = ap._3
257- let au = ap._4
258- let av = ap._5
259- let aw = ap._6
260- let ax = valueOrElse(getInteger(q(d)), 0)
261- let N = value(addressFromString(value(getString(t(d)))))
262- let P = fromBase58String(value(getString(s(d))))
263- if (if (ao)
264- then (at == 0)
148+ let Z = if (X)
149+ then $Tuple5(valueOrElse(getInteger(j(e, i)), 0), valueOrElse(getInteger(l(e, i)), 0), j(e, i), l(e, i), D(e, i, toBase58String(Q.transactionId), "claimReferral"))
150+ else $Tuple5(valueOrElse(getInteger(h(e, i)), 0), valueOrElse(getInteger(k(e, i)), 0), h(e, i), k(e, i), D(e, i, toBase58String(Q.transactionId), "claimReferrer"))
151+ let aa = Z._1
152+ let ab = Z._2
153+ let ac = Z._3
154+ let ad = Z._4
155+ let ae = Z._5
156+ let af = valueOrElse(getInteger(u(e)), 0)
157+ let ag = value(addressFromString(value(getString(x(e)))))
158+ let ah = fromBase58String(value(getString(w(e))))
159+ let ai = valueOrElse(getInteger(r(i)), 0)
160+ let aj = valueOrElse(getInteger(t(i)), 0)
161+ if (if (X)
162+ then (ab == 0)
265163 else false)
266164 then $Tuple2(nil, 0)
267165 else {
268- let ay = if ((at > 0))
166+ let ak = if ((ab > 0))
269167 then true
270- else D("nothing to claim")
271- if ((ay == ay))
168+ else J("nothing to claim")
169+ if ((ak == ak))
272170 then {
273- let az = (as + at)
274- let aA = (ax + at)
275- let aB = value(assetBalance(this, P))
276- if ((aB == aB))
171+ let al = (aa + ab)
172+ let am = (af + ab)
173+ let an = (ai + ab)
174+ let ao = (aj - ab)
175+ let ap = value(assetBalance(this, ah))
176+ if ((ap == ap))
277177 then {
278- let aC = invoke(N, "withdrawReferralReward", [at], nil)
279- if ((aC == aC))
178+ let aq = invoke(ag, "withdrawReferralReward", [ab], nil)
179+ if ((aq == aq))
280180 then {
281- let aD = value(assetBalance(this, P))
282- if ((aD == aD))
181+ let ar = value(assetBalance(this, ah))
182+ if ((ar == ar))
283183 then {
284- let aE = (aD - aB)
285- if ((aE == aE))
184+ let as = (ar - ap)
185+ if ((as == as))
286186 then {
287- let aF = if ((aE == at))
187+ let at = if ((as == ab))
288188 then true
289- else D("insufficient balance on referral contract")
290- if ((aF == aF))
291- then $Tuple2([IntegerEntry(au, az), IntegerEntry(q(d), aA), IntegerEntry(av, 0), ScriptTransfer(addressFromStringValue(ar), at, P), StringEntry(aw, B(at))], at)
189+ else J("insufficient balance on referral contract")
190+ if ((at == at))
191+ then $Tuple2([IntegerEntry(ac, al), IntegerEntry(ad, 0), IntegerEntry(u(e), am), IntegerEntry(r(i), an), IntegerEntry(t(i), ao), ScriptTransfer(addressFromStringValue(i), ab, ah), StringEntry(ae, H(ab))], ab)
292192 else throw("Strict value is not equal to itself.")
293193 }
294194 else throw("Strict value is not equal to itself.")
307207
308208
309209
310-@Callable(K)
311-func claimREADONLY (d,y) = {
312- let as = valueOrElse(getInteger(g(d, y)), 0)
313- let at = valueOrElse(getInteger(j(d, y)), 0)
314- $Tuple2(nil, [at, as])
210+@Callable(Q)
211+func claimBulkInternal (au,av,aw) = {
212+ let ax = if ((Q.caller == this))
213+ then true
214+ else J("permission denied")
215+ if ((ax == ax))
216+ then if ((aw == size(av)))
217+ then nil
218+ else {
219+ let e = av[aw]
220+ let ay = valueOrElse(getInteger(k(e, au)), 0)
221+ let ae = D(e, au, toBase58String(Q.transactionId), "claimBulk")
222+ let az = invoke(this, "claimBulkInternal", [au, av, (aw + 1)], nil)
223+ if ((az == az))
224+ then {
225+ let aA = valueOrElse(getInteger(k(e, au)), 0)
226+ let aB = if ((aA > 0))
227+ then invoke(this, "claimInternal", [e, au, false], nil)
228+ else unit
229+ if ((aB == aB))
230+ then $Tuple2(nil, [az, aB])
231+ else throw("Strict value is not equal to itself.")
232+ }
233+ else throw("Strict value is not equal to itself.")
234+ }
235+ else throw("Strict value is not equal to itself.")
315236 }
316237
317238
318239
319-@Callable(K)
320-func setManager (aG) = {
321- let Q = J(K)
322- if ((Q == Q))
240+@Callable(Q)
241+func incUnclaimedWithPaymentInternal (aC,e,aD,aw,aE) = {
242+ let ax = if ((Q.caller == this))
243+ then true
244+ else J("permission denied")
245+ if ((ax == ax))
323246 then {
324- let aH = fromBase58String(aG)
325- if ((aH == aH))
326- then [StringEntry(w(), aG)]
247+ let aF = (size(aC) == size(aD))
248+ let aG = if (aF)
249+ then true
250+ else J("lists in args must be same size")
251+ if ((aG == aG))
252+ then if ((aw == size(aC)))
253+ then $Tuple2(nil, aE)
254+ else {
255+ let f = aD[aw]
256+ let aj = valueOrElse(getInteger(t(f)), 0)
257+ let aH = valueOrElse(getInteger(k(e, f)), 0)
258+ let aI = valueOrElse(getInteger(v(e)), 0)
259+ let ao = (aj + aC[aw])
260+ let aJ = (aH + aC[aw])
261+ let aK = (aE + aC[aw])
262+ let aL = invoke(this, "incUnclaimedWithPaymentInternal", [aC, e, aD, (aw + 1), aK], nil)
263+ if ((aL == aL))
264+ then {
265+ let aM = T(f, e)
266+ $Tuple2(([IntegerEntry(t(f), ao), IntegerEntry(k(e, f), aJ), IntegerEntry(v(e), (aI + aC[aw]))] ++ aM), aL)
267+ }
268+ else throw("Strict value is not equal to itself.")
269+ }
327270 else throw("Strict value is not equal to itself.")
328271 }
329272 else throw("Strict value is not equal to itself.")
331274
332275
333276
334-@Callable(K)
335-func confirmManager () = {
336- let aI = I()
337- let aJ = if (isDefined(aI))
338- then true
339- else D("no pending manager")
340- if ((aJ == aJ))
277+@Callable(Q)
278+func createReferralProgram (e,ag,aN,ah) = {
279+ let ax = P(Q)
280+ if ((ax == ax))
341281 then {
342- let aK = if ((K.callerPublicKey == value(aI)))
282+ let aO = if ((getBoolean(n(e)) == unit))
343283 then true
344- else D("you are not pending manager")
345- if ((aK == aK))
346- then [StringEntry(v(), toBase58String(value(aI))), DeleteEntry(w())]
284+ else J("program name already exists")
285+ if ((aO == aO))
286+ then {
287+ let aP = if (!(contains(e, a)))
288+ then !(contains(e, " "))
289+ else false
290+ let Y = if (aP)
291+ then true
292+ else J("invalid program name")
293+ if ((Y == Y))
294+ then {
295+ let aQ = if ((assetInfo(fromBase58String(ah)) != unit))
296+ then true
297+ else J("invalid reward asset id")
298+ if ((aQ == aQ))
299+ then $Tuple2([BooleanEntry(n(e), true), StringEntry(x(e), ag), StringEntry(y(e), aN), StringEntry(w(e), ah), IntegerEntry(v(e), 0)], unit)
300+ else throw("Strict value is not equal to itself.")
301+ }
302+ else throw("Strict value is not equal to itself.")
303+ }
347304 else throw("Strict value is not equal to itself.")
348305 }
349306 else throw("Strict value is not equal to itself.")
350307 }
351308
352309
353-@Verifier(aL)
354-func aM () = {
355- let aN = {
356- let G = F()
357- if ($isInstanceOf(G, "ByteVector"))
310+
311+@Callable(Q)
312+func createPair (e,f,g,aR) = {
313+ let Y = if (valueOrElse(getBoolean(n(e)), false))
314+ then true
315+ else J("program does not exist")
316+ if ((Y == Y))
317+ then {
318+ let aS = if ((getBoolean(d(e, f, g)) == unit))
319+ then true
320+ else J("pair already exists")
321+ if ((aS == aS))
322+ then {
323+ let aT = if ((f != g))
324+ then true
325+ else J("cannot refer to self")
326+ if ((aT == aT))
327+ then {
328+ let aU = toBytes(makeString([e, f, g], ":"))
329+ let aV = fromBase58String(value(getString(c)))
330+ let aW = if (sigVerify(aU, aR, aV))
331+ then true
332+ else J("bad signature")
333+ if ((aW == aW))
334+ then {
335+ let aX = valueOrElse(getInteger(o(e, f)), 0)
336+ let aY = (aX + 1)
337+ let aM = T(f, e)
338+ let V = T(g, e)
339+ $Tuple2((([BooleanEntry(d(e, f, g), true), IntegerEntry(o(e, f), aY), StringEntry(m(e, g), f)] ++ aM) ++ V), unit)
340+ }
341+ else throw("Strict value is not equal to itself.")
342+ }
343+ else throw("Strict value is not equal to itself.")
344+ }
345+ else throw("Strict value is not equal to itself.")
346+ }
347+ else throw("Strict value is not equal to itself.")
348+ }
349+
350+
351+
352+@Callable(Q)
353+func updateReferralActivity (e,g,aZ) = {
354+ let aN = value(getString(y(e)))
355+ let ba = (getBoolean(q(e, g)) != unit)
356+ let f = value(getString(m(e, g)))
357+ let ax = if ((toString(Q.caller) == aN))
358+ then true
359+ else J("permission denied")
360+ if ((ax == ax))
361+ then {
362+ let bb = if ((ba == aZ))
363+ then $Tuple2(nil, unit)
364+ else {
365+ let bb = if ((aZ == true))
366+ then {
367+ let bc = (valueOrElse(getInteger(p(e, f)), 0) + 1)
368+ $Tuple2([BooleanEntry(q(e, g), true), IntegerEntry(p(e, f), bc)], unit)
369+ }
370+ else {
371+ let bc = (valueOrElse(getInteger(p(e, f)), 0) - 1)
372+ $Tuple2([DeleteEntry(q(e, g)), IntegerEntry(p(e, f), bc)], unit)
373+ }
374+ bb
375+ }
376+ bb
377+ }
378+ else throw("Strict value is not equal to itself.")
379+ }
380+
381+
382+
383+@Callable(Q)
384+func incUnclaimed (e,g,bd,be) = {
385+ let aN = value(getString(y(e)))
386+ let f = value(getString(m(e, g)))
387+ let ax = if ((toString(Q.caller) == aN))
388+ then true
389+ else J("permission denied")
390+ if ((ax == ax))
391+ then {
392+ let bf = if ((e == "wxlock"))
393+ then true
394+ else J("invalid program")
395+ if ((bf == bf))
396+ then {
397+ let bg = if (contains(valueOrElse(getString(z(f)), ""), e))
398+ then true
399+ else J("referrer not in program")
400+ if ((bg == bg))
401+ then {
402+ let bh = if (contains(valueOrElse(getString(z(g)), ""), e))
403+ then true
404+ else J("referral not in program")
405+ if ((bh == bh))
406+ then {
407+ let bi = valueOrElse(getInteger(t(f)), 0)
408+ let aH = valueOrElse(getInteger(k(e, f)), 0)
409+ let bj = valueOrElse(getInteger(t(g)), 0)
410+ let bk = valueOrElse(getInteger(l(e, g)), 0)
411+ let aI = valueOrElse(getInteger(v(e)), 0)
412+ let bl = (bi + bd)
413+ let aJ = (aH + bd)
414+ let bm = (bj + be)
415+ let bn = (bk + be)
416+ $Tuple2([IntegerEntry(t(f), bl), IntegerEntry(t(g), bm), IntegerEntry(k(e, f), aJ), IntegerEntry(l(e, g), bn), IntegerEntry(v(e), ((aI + bd) + be))], unit)
417+ }
418+ else throw("Strict value is not equal to itself.")
419+ }
420+ else throw("Strict value is not equal to itself.")
421+ }
422+ else throw("Strict value is not equal to itself.")
423+ }
424+ else throw("Strict value is not equal to itself.")
425+ }
426+
427+
428+
429+@Callable(Q)
430+func incUnclaimedWithPayment (e,aD) = {
431+ let bf = if ((e == "wxSpotFee"))
432+ then true
433+ else J("invalid program")
434+ if ((bf == bf))
435+ then {
436+ let bo = toString(Q.caller)
437+ let bp = valueOrElse(getInteger(A(bo)), 0)
438+ let bq = ((bp - height) + 3)
439+ let br = if (((height - 3) > bp))
440+ then true
441+ else J(makeString(["wait", toString(bq), "blocks"], " "))
442+ if ((br == br))
443+ then {
444+ func bs (bt,bu) = {
445+ let bv = (toBase58String(value(bu.assetId)) == value(getString(w(e))))
446+ let bw = if (bv)
447+ then true
448+ else J("invalid asset id")
449+ if ((bw == bw))
450+ then (bt :+ bu.amount)
451+ else throw("Strict value is not equal to itself.")
452+ }
453+
454+ let bx = {
455+ let by = Q.payments
456+ let bz = size(by)
457+ let bA = nil
458+ func bB (bC,bD) = if ((bD >= bz))
459+ then bC
460+ else bs(bC, by[bD])
461+
462+ func bE (bC,bD) = if ((bD >= bz))
463+ then bC
464+ else throw("List size exceeds 10")
465+
466+ bE(bB(bB(bB(bB(bB(bB(bB(bB(bB(bB(bA, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
467+ }
468+ let aE = {
469+ let bF = invoke(this, "incUnclaimedWithPaymentInternal", [bx, e, aD, 0, 0], nil)
470+ if ($isInstanceOf(bF, "Int"))
471+ then bF
472+ else throw(($getType(bF) + " couldn't be cast to Int"))
473+ }
474+ if ((aE == aE))
475+ then {
476+ let ag = addressFromStringValue(value(getString(x(e))))
477+ let ah = fromBase58String(value(getString(w(e))))
478+[ScriptTransfer(ag, aE, ah), IntegerEntry(A(bo), height)]
479+ }
480+ else throw("Strict value is not equal to itself.")
481+ }
482+ else throw("Strict value is not equal to itself.")
483+ }
484+ else throw("Strict value is not equal to itself.")
485+ }
486+
487+
488+
489+@Callable(Q)
490+func claim (e) = {
491+ let Y = if (valueOrElse(getBoolean(n(e)), false))
492+ then true
493+ else J("program does not exist")
494+ if ((Y == Y))
495+ then {
496+ let X = (toString(Q.caller) == value(getString(y(e))))
497+ let i = if (X)
498+ then toString(Q.originCaller)
499+ else toString(Q.caller)
500+ let bG = invoke(this, "claimInternal", [e, i, X], nil)
501+ if ((bG == bG))
502+ then $Tuple2(nil, bG)
503+ else throw("Strict value is not equal to itself.")
504+ }
505+ else throw("Strict value is not equal to itself.")
506+ }
507+
508+
509+
510+@Callable(Q)
511+func claimBulk () = {
512+ let bo = toString(Q.caller)
513+ let bH = getString(z(toString(Q.caller)))
514+ let bI = if (isDefined(bH))
515+ then true
516+ else J("no referral programs")
517+ if ((bI == bI))
518+ then {
519+ let bJ = split(value(bH), "__")
520+ let bK = invoke(this, "claimBulkInternal", [bo, bJ, 0], nil)
521+ if ((bK == bK))
522+ then $Tuple2(nil, bK)
523+ else throw("Strict value is not equal to itself.")
524+ }
525+ else throw("Strict value is not equal to itself.")
526+ }
527+
528+
529+
530+@Callable(Q)
531+func claimREADONLY (e,E) = {
532+ let aa = valueOrElse(getInteger(h(e, E)), 0)
533+ let ab = valueOrElse(getInteger(k(e, E)), 0)
534+ $Tuple2(nil, [ab, aa])
535+ }
536+
537+
538+
539+@Callable(Q)
540+func claimBulkREADONLY (au) = {
541+ let ai = valueOrElse(getInteger(r(au)), 0)
542+ let aj = valueOrElse(getInteger(t(au)), 0)
543+ $Tuple2(nil, [aj, ai])
544+ }
545+
546+
547+
548+@Callable(Q)
549+func setTotalKeys (e,s) = {
550+ let bL = valueOrElse(getInteger(h(e, s)), 0)
551+ let bM = valueOrElse(getInteger(j(e, s)), 0)
552+ let aA = valueOrElse(getInteger(k(e, s)), 0)
553+ let bN = valueOrElse(getInteger(l(e, s)), 0)
554+ let ai = (bL + bM)
555+ let aj = (aA + bN)
556+ $Tuple2([IntegerEntry(r(s), ai), IntegerEntry(t(s), aj)], unit)
557+ }
558+
559+
560+
561+@Callable(Q)
562+func setManager (bO) = {
563+ let ax = P(Q)
564+ if ((ax == ax))
565+ then {
566+ let bP = fromBase58String(bO)
567+ if ((bP == bP))
568+ then [StringEntry(C(), bO)]
569+ else throw("Strict value is not equal to itself.")
570+ }
571+ else throw("Strict value is not equal to itself.")
572+ }
573+
574+
575+
576+@Callable(Q)
577+func confirmManager () = {
578+ let bQ = O()
579+ let bR = if (isDefined(bQ))
580+ then true
581+ else J("no pending manager")
582+ if ((bR == bR))
583+ then {
584+ let bS = if ((Q.callerPublicKey == value(bQ)))
585+ then true
586+ else J("you are not pending manager")
587+ if ((bS == bS))
588+ then [StringEntry(B(), toBase58String(value(bQ))), DeleteEntry(C())]
589+ else throw("Strict value is not equal to itself.")
590+ }
591+ else throw("Strict value is not equal to itself.")
592+ }
593+
594+
595+@Verifier(bT)
596+func bU () = {
597+ let bV = {
598+ let M = L()
599+ if ($isInstanceOf(M, "ByteVector"))
358600 then {
359- let M = G
360- M
601+ let S = M
602+ S
361603 }
362- else if ($isInstanceOf(G, "Unit"))
363- then aL.senderPublicKey
604+ else if ($isInstanceOf(M, "Unit"))
605+ then bT.senderPublicKey
364606 else throw("Match error")
365607 }
366- sigVerify(aL.bodyBytes, aL.proofs[0], aN)
608+ sigVerify(bT.bodyBytes, bT.proofs[0], bV)
367609 }
368610
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
6-let b = makeString(["%s", "backendPublicKey"], a)
7-
8-func c (d,e,f) = makeString(["%s%s%s%s", "existsReferrerToReferral", d, e, f], a)
6+func b () = makeString(["%s", "wxAssetId"], a)
97
108
11-func g (d,h) = makeString(["%s%s%s%s", "claimedReferrer", d, h], a)
9+let c = makeString(["%s", "backendPublicKey"], a)
10+
11+func d (e,f,g) = makeString(["%s%s%s%s", "existsReferrerToReferral", e, f, g], a)
1212
1313
14-func i (d,h) = makeString(["%s%s%s%s", "claimedReferral", d, h], a)
14+func h (e,i) = makeString(["%s%s%s", "claimedReferrer", e, i], a)
1515
1616
17-func j (d,h) = makeString(["%s%s%s%s", "unclaimedReferrer", d, h], a)
17+func j (e,i) = makeString(["%s%s%s", "claimedReferral", e, i], a)
1818
1919
20-func k (d,h) = makeString(["%s%s%s%s", "unclaimedReferral", d, h], a)
20+func k (e,i) = makeString(["%s%s%s", "unclaimedReferrer", e, i], a)
2121
2222
23-func l (d,f) = makeString(["%s%s%s", "referrer", d, f], a)
23+func l (e,i) = makeString(["%s%s%s", "unclaimedReferral", e, i], a)
2424
2525
26-func m (d) = makeString(["%s%s", "programName", d], a)
26+func m (e,g) = makeString(["%s%s%s", "referrer", e, g], a)
2727
2828
29-func n (d,e) = makeString(["%s%s%s", "totalReferralCount", d, e], a)
29+func n (e) = makeString(["%s%s", "programName", e], a)
3030
3131
32-func o (d,e) = makeString(["%s%s%s", "activeReferralCount", d, e], a)
32+func o (e,f) = makeString(["%s%s%s", "totalReferralCount", e, f], a)
3333
3434
35-func p (d,f) = makeString(["%s%s%s", "activeReferral", d, f], a)
35+func p (e,f) = makeString(["%s%s%s", "activeReferralCount", e, f], a)
3636
3737
38-func q (d) = makeString(["%s%s", "claimedTotal", d], a)
38+func q (e,g) = makeString(["%s%s%s", "activeReferral", e, g], a)
3939
4040
41-func r (d) = makeString(["%s%s", "rewardsTotal", d], a)
41+func r (s) = makeString(["%s%s", "claimedTotalAddress", s], a)
4242
4343
44-func s (d) = makeString(["%s%s", "rewardAssetId", d], a)
44+func t (s) = makeString(["%s%s", "unclaimedTotalAddress", s], a)
4545
4646
47-func t (d) = makeString(["%s%s", "treasuryContract", d], a)
47+func u (e) = makeString(["%s%s", "claimedTotal", e], a)
4848
4949
50-func u (d) = makeString(["%s%s", "implementationContract", d], a)
50+func v (e) = makeString(["%s%s", "rewardsTotal", e], a)
5151
5252
53-func v () = "%s__managerPublicKey"
53+func w (e) = makeString(["%s%s", "rewardAssetId", e], a)
5454
5555
56-func w () = "%s__pendingManagerPublicKey"
56+func x (e) = makeString(["%s%s", "treasuryContract", e], a)
5757
5858
59-func x (d,y,z,A) = makeString(["%s%s%s%s%s", "history", A, d, y, z], a)
59+func y (e) = makeString(["%s%s", "implementationContract", e], a)
6060
6161
62-func B (C) = makeString(["%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(C)], a)
62+func z (s) = makeString(["%s%s", "allReferralPrograms", s], a)
6363
6464
65-func D (E) = throw(makeString(["referral.ride:", E], " "))
65+func A (s) = makeString(["%s%s", "lastIncUnclaimedWithPaymentCallBlock", s], a)
6666
6767
68-func F () = {
69- let G = getString(v())
70- if ($isInstanceOf(G, "String"))
68+func B () = "%s__managerPublicKey"
69+
70+
71+func C () = "%s__pendingManagerPublicKey"
72+
73+
74+func D (e,E,F,G) = makeString(["%s%s%s%s%s", "history", G, e, E, F], a)
75+
76+
77+func H (I) = makeString(["%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(I)], a)
78+
79+
80+func J (K) = throw(makeString(["referral.ride:", K], " "))
81+
82+
83+func L () = {
84+ let M = getString(B())
85+ if ($isInstanceOf(M, "String"))
7186 then {
72- let H = G
73- fromBase58String(H)
87+ let N = M
88+ fromBase58String(N)
7489 }
75- else if ($isInstanceOf(G, "Unit"))
90+ else if ($isInstanceOf(M, "Unit"))
7691 then unit
7792 else throw("Match error")
7893 }
7994
8095
81-func I () = {
82- let G = getString(w())
83- if ($isInstanceOf(G, "String"))
96+func O () = {
97+ let M = getString(C())
98+ if ($isInstanceOf(M, "String"))
8499 then {
85- let H = G
86- fromBase58String(H)
100+ let N = M
101+ fromBase58String(N)
87102 }
88- else if ($isInstanceOf(G, "Unit"))
103+ else if ($isInstanceOf(M, "Unit"))
89104 then unit
90105 else throw("Match error")
91106 }
92107
93108
94-func J (K) = {
95- let L = D("permission denied")
96- let G = F()
97- if ($isInstanceOf(G, "ByteVector"))
109+func P (Q) = {
110+ let R = J("permission denied")
111+ let M = L()
112+ if ($isInstanceOf(M, "ByteVector"))
98113 then {
99- let M = G
100- if ((K.callerPublicKey == M))
114+ let S = M
115+ if ((Q.callerPublicKey == S))
101116 then true
102- else L
117+ else R
103118 }
104- else if ($isInstanceOf(G, "Unit"))
105- then if ((K.caller == this))
119+ else if ($isInstanceOf(M, "Unit"))
120+ then if ((Q.caller == this))
106121 then true
107- else L
122+ else R
108123 else throw("Match error")
109124 }
110125
111126
112-@Callable(K)
113-func createReferralProgram (d,N,O,P) = {
114- let Q = J(K)
115- if ((Q == Q))
116- then {
117- let R = if ((getBoolean(m(d)) == unit))
118- then true
119- else D("program name already exists")
120- if ((R == R))
121- then {
122- let S = if (!(contains(d, a)))
123- then !(contains(d, " "))
124- else false
125- let T = if (S)
126- then true
127- else D("invalid program name")
128- if ((T == T))
129- then {
130- let U = if ((assetInfo(fromBase58String(P)) != unit))
131- then true
132- else D("invalid reward asset id")
133- if ((U == U))
134- then $Tuple2([BooleanEntry(m(d), true), StringEntry(t(d), N), StringEntry(u(d), O), StringEntry(s(d), P), IntegerEntry(r(d), 0)], unit)
135- else throw("Strict value is not equal to itself.")
136- }
137- else throw("Strict value is not equal to itself.")
138- }
139- else throw("Strict value is not equal to itself.")
127+func T (s,e) = {
128+ let U = valueOrElse(getString(z(s)), "")
129+ let V = if (contains(U, e))
130+ then nil
131+ else {
132+ let W = if ((U == ""))
133+ then e
134+ else makeString([U, e], a)
135+[StringEntry(z(s), W)]
140136 }
141- else throw("Strict value is not equal to itself.")
137+ V
142138 }
143139
144140
145-
146-@Callable(K)
147-func createPair (d,e,f,V) = {
148- let T = if (valueOrElse(getBoolean(m(d)), false))
141+@Callable(Q)
142+func claimInternal (e,i,X) = {
143+ let Y = if (valueOrElse(getBoolean(n(e)), false))
149144 then true
150- else D("program does not exist")
151- if ((T == T))
145+ else J("program does not exist")
146+ if ((Y == Y))
152147 then {
153- let W = if ((getBoolean(c(d, e, f)) == unit))
154- then true
155- else D("pair already exists")
156- if ((W == W))
157- then {
158- let X = if ((e != f))
159- then true
160- else D("cannot refer to self")
161- if ((X == X))
162- then {
163- let Y = toBytes(makeString([d, e, f], ":"))
164- let Z = fromBase58String(value(getString(b)))
165- let aa = if (sigVerify(Y, V, Z))
166- then true
167- else D("bad signature")
168- if ((aa == aa))
169- then {
170- let ab = valueOrElse(getInteger(n(d, e)), 0)
171- let ac = (ab + 1)
172- $Tuple2([BooleanEntry(c(d, e, f), true), IntegerEntry(n(d, e), ac), StringEntry(l(d, f), e)], unit)
173- }
174- else throw("Strict value is not equal to itself.")
175- }
176- else throw("Strict value is not equal to itself.")
177- }
178- else throw("Strict value is not equal to itself.")
179- }
180- else throw("Strict value is not equal to itself.")
181- }
182-
183-
184-
185-@Callable(K)
186-func updateReferralActivity (d,f,ad) = {
187- let O = value(getString(u(d)))
188- let ae = (getBoolean(p(d, f)) != unit)
189- let e = value(getString(l(d, f)))
190- let Q = if ((toString(K.caller) == O))
191- then true
192- else D("permission denied")
193- if ((Q == Q))
194- then {
195- let af = if ((ae == ad))
196- then $Tuple2(nil, unit)
197- else {
198- let af = if ((ad == true))
199- then {
200- let ag = (valueOrElse(getInteger(o(d, e)), 0) + 1)
201- $Tuple2([BooleanEntry(p(d, f), true), IntegerEntry(o(d, e), ag)], unit)
202- }
203- else {
204- let ag = (valueOrElse(getInteger(o(d, e)), 0) - 1)
205- $Tuple2([DeleteEntry(p(d, f)), IntegerEntry(o(d, e), ag)], unit)
206- }
207- af
208- }
209- af
210- }
211- else throw("Strict value is not equal to itself.")
212- }
213-
214-
215-
216-@Callable(K)
217-func incUnclaimed (d,f,ah,ai) = {
218- let O = value(getString(u(d)))
219- let Q = if ((toString(K.caller) == O))
220- then true
221- else D("permission denied")
222- if ((Q == Q))
223- then {
224- let e = value(getString(l(d, f)))
225- let aj = valueOrElse(getInteger(j(d, e)), 0)
226- let ak = valueOrElse(getInteger(k(d, f)), 0)
227- let al = valueOrElse(getInteger(r(d)), 0)
228- let am = (aj + ah)
229- let an = (ak + ai)
230- $Tuple2([IntegerEntry(j(d, e), am), IntegerEntry(k(d, f), an), IntegerEntry(r(d), ((al + ah) + ai))], unit)
231- }
232- else throw("Strict value is not equal to itself.")
233- }
234-
235-
236-
237-@Callable(K)
238-func claim (d) = {
239- let T = if (valueOrElse(getBoolean(m(d)), false))
240- then true
241- else D("program does not exist")
242- if ((T == T))
243- then {
244- let ao = (toString(K.caller) == value(getString(u(d))))
245- let ap = if (ao)
246- then {
247- let aq = toString(K.originCaller)
248- $Tuple6(aq, valueOrElse(getInteger(i(d, aq)), 0), valueOrElse(getInteger(k(d, aq)), 0), i(d, aq), k(d, aq), x(d, aq, toBase58String(K.transactionId), "claimReferral"))
249- }
250- else {
251- let aq = toString(K.caller)
252- $Tuple6(aq, valueOrElse(getInteger(g(d, aq)), 0), valueOrElse(getInteger(j(d, aq)), 0), g(d, aq), j(d, aq), x(d, aq, toBase58String(K.transactionId), "claimReferrer"))
253- }
254- let ar = ap._1
255- let as = ap._2
256- let at = ap._3
257- let au = ap._4
258- let av = ap._5
259- let aw = ap._6
260- let ax = valueOrElse(getInteger(q(d)), 0)
261- let N = value(addressFromString(value(getString(t(d)))))
262- let P = fromBase58String(value(getString(s(d))))
263- if (if (ao)
264- then (at == 0)
148+ let Z = if (X)
149+ then $Tuple5(valueOrElse(getInteger(j(e, i)), 0), valueOrElse(getInteger(l(e, i)), 0), j(e, i), l(e, i), D(e, i, toBase58String(Q.transactionId), "claimReferral"))
150+ else $Tuple5(valueOrElse(getInteger(h(e, i)), 0), valueOrElse(getInteger(k(e, i)), 0), h(e, i), k(e, i), D(e, i, toBase58String(Q.transactionId), "claimReferrer"))
151+ let aa = Z._1
152+ let ab = Z._2
153+ let ac = Z._3
154+ let ad = Z._4
155+ let ae = Z._5
156+ let af = valueOrElse(getInteger(u(e)), 0)
157+ let ag = value(addressFromString(value(getString(x(e)))))
158+ let ah = fromBase58String(value(getString(w(e))))
159+ let ai = valueOrElse(getInteger(r(i)), 0)
160+ let aj = valueOrElse(getInteger(t(i)), 0)
161+ if (if (X)
162+ then (ab == 0)
265163 else false)
266164 then $Tuple2(nil, 0)
267165 else {
268- let ay = if ((at > 0))
166+ let ak = if ((ab > 0))
269167 then true
270- else D("nothing to claim")
271- if ((ay == ay))
168+ else J("nothing to claim")
169+ if ((ak == ak))
272170 then {
273- let az = (as + at)
274- let aA = (ax + at)
275- let aB = value(assetBalance(this, P))
276- if ((aB == aB))
171+ let al = (aa + ab)
172+ let am = (af + ab)
173+ let an = (ai + ab)
174+ let ao = (aj - ab)
175+ let ap = value(assetBalance(this, ah))
176+ if ((ap == ap))
277177 then {
278- let aC = invoke(N, "withdrawReferralReward", [at], nil)
279- if ((aC == aC))
178+ let aq = invoke(ag, "withdrawReferralReward", [ab], nil)
179+ if ((aq == aq))
280180 then {
281- let aD = value(assetBalance(this, P))
282- if ((aD == aD))
181+ let ar = value(assetBalance(this, ah))
182+ if ((ar == ar))
283183 then {
284- let aE = (aD - aB)
285- if ((aE == aE))
184+ let as = (ar - ap)
185+ if ((as == as))
286186 then {
287- let aF = if ((aE == at))
187+ let at = if ((as == ab))
288188 then true
289- else D("insufficient balance on referral contract")
290- if ((aF == aF))
291- then $Tuple2([IntegerEntry(au, az), IntegerEntry(q(d), aA), IntegerEntry(av, 0), ScriptTransfer(addressFromStringValue(ar), at, P), StringEntry(aw, B(at))], at)
189+ else J("insufficient balance on referral contract")
190+ if ((at == at))
191+ then $Tuple2([IntegerEntry(ac, al), IntegerEntry(ad, 0), IntegerEntry(u(e), am), IntegerEntry(r(i), an), IntegerEntry(t(i), ao), ScriptTransfer(addressFromStringValue(i), ab, ah), StringEntry(ae, H(ab))], ab)
292192 else throw("Strict value is not equal to itself.")
293193 }
294194 else throw("Strict value is not equal to itself.")
295195 }
296196 else throw("Strict value is not equal to itself.")
297197 }
298198 else throw("Strict value is not equal to itself.")
299199 }
300200 else throw("Strict value is not equal to itself.")
301201 }
302202 else throw("Strict value is not equal to itself.")
303203 }
304204 }
305205 else throw("Strict value is not equal to itself.")
306206 }
307207
308208
309209
310-@Callable(K)
311-func claimREADONLY (d,y) = {
312- let as = valueOrElse(getInteger(g(d, y)), 0)
313- let at = valueOrElse(getInteger(j(d, y)), 0)
314- $Tuple2(nil, [at, as])
210+@Callable(Q)
211+func claimBulkInternal (au,av,aw) = {
212+ let ax = if ((Q.caller == this))
213+ then true
214+ else J("permission denied")
215+ if ((ax == ax))
216+ then if ((aw == size(av)))
217+ then nil
218+ else {
219+ let e = av[aw]
220+ let ay = valueOrElse(getInteger(k(e, au)), 0)
221+ let ae = D(e, au, toBase58String(Q.transactionId), "claimBulk")
222+ let az = invoke(this, "claimBulkInternal", [au, av, (aw + 1)], nil)
223+ if ((az == az))
224+ then {
225+ let aA = valueOrElse(getInteger(k(e, au)), 0)
226+ let aB = if ((aA > 0))
227+ then invoke(this, "claimInternal", [e, au, false], nil)
228+ else unit
229+ if ((aB == aB))
230+ then $Tuple2(nil, [az, aB])
231+ else throw("Strict value is not equal to itself.")
232+ }
233+ else throw("Strict value is not equal to itself.")
234+ }
235+ else throw("Strict value is not equal to itself.")
315236 }
316237
317238
318239
319-@Callable(K)
320-func setManager (aG) = {
321- let Q = J(K)
322- if ((Q == Q))
240+@Callable(Q)
241+func incUnclaimedWithPaymentInternal (aC,e,aD,aw,aE) = {
242+ let ax = if ((Q.caller == this))
243+ then true
244+ else J("permission denied")
245+ if ((ax == ax))
323246 then {
324- let aH = fromBase58String(aG)
325- if ((aH == aH))
326- then [StringEntry(w(), aG)]
247+ let aF = (size(aC) == size(aD))
248+ let aG = if (aF)
249+ then true
250+ else J("lists in args must be same size")
251+ if ((aG == aG))
252+ then if ((aw == size(aC)))
253+ then $Tuple2(nil, aE)
254+ else {
255+ let f = aD[aw]
256+ let aj = valueOrElse(getInteger(t(f)), 0)
257+ let aH = valueOrElse(getInteger(k(e, f)), 0)
258+ let aI = valueOrElse(getInteger(v(e)), 0)
259+ let ao = (aj + aC[aw])
260+ let aJ = (aH + aC[aw])
261+ let aK = (aE + aC[aw])
262+ let aL = invoke(this, "incUnclaimedWithPaymentInternal", [aC, e, aD, (aw + 1), aK], nil)
263+ if ((aL == aL))
264+ then {
265+ let aM = T(f, e)
266+ $Tuple2(([IntegerEntry(t(f), ao), IntegerEntry(k(e, f), aJ), IntegerEntry(v(e), (aI + aC[aw]))] ++ aM), aL)
267+ }
268+ else throw("Strict value is not equal to itself.")
269+ }
327270 else throw("Strict value is not equal to itself.")
328271 }
329272 else throw("Strict value is not equal to itself.")
330273 }
331274
332275
333276
334-@Callable(K)
335-func confirmManager () = {
336- let aI = I()
337- let aJ = if (isDefined(aI))
338- then true
339- else D("no pending manager")
340- if ((aJ == aJ))
277+@Callable(Q)
278+func createReferralProgram (e,ag,aN,ah) = {
279+ let ax = P(Q)
280+ if ((ax == ax))
341281 then {
342- let aK = if ((K.callerPublicKey == value(aI)))
282+ let aO = if ((getBoolean(n(e)) == unit))
343283 then true
344- else D("you are not pending manager")
345- if ((aK == aK))
346- then [StringEntry(v(), toBase58String(value(aI))), DeleteEntry(w())]
284+ else J("program name already exists")
285+ if ((aO == aO))
286+ then {
287+ let aP = if (!(contains(e, a)))
288+ then !(contains(e, " "))
289+ else false
290+ let Y = if (aP)
291+ then true
292+ else J("invalid program name")
293+ if ((Y == Y))
294+ then {
295+ let aQ = if ((assetInfo(fromBase58String(ah)) != unit))
296+ then true
297+ else J("invalid reward asset id")
298+ if ((aQ == aQ))
299+ then $Tuple2([BooleanEntry(n(e), true), StringEntry(x(e), ag), StringEntry(y(e), aN), StringEntry(w(e), ah), IntegerEntry(v(e), 0)], unit)
300+ else throw("Strict value is not equal to itself.")
301+ }
302+ else throw("Strict value is not equal to itself.")
303+ }
347304 else throw("Strict value is not equal to itself.")
348305 }
349306 else throw("Strict value is not equal to itself.")
350307 }
351308
352309
353-@Verifier(aL)
354-func aM () = {
355- let aN = {
356- let G = F()
357- if ($isInstanceOf(G, "ByteVector"))
310+
311+@Callable(Q)
312+func createPair (e,f,g,aR) = {
313+ let Y = if (valueOrElse(getBoolean(n(e)), false))
314+ then true
315+ else J("program does not exist")
316+ if ((Y == Y))
317+ then {
318+ let aS = if ((getBoolean(d(e, f, g)) == unit))
319+ then true
320+ else J("pair already exists")
321+ if ((aS == aS))
322+ then {
323+ let aT = if ((f != g))
324+ then true
325+ else J("cannot refer to self")
326+ if ((aT == aT))
327+ then {
328+ let aU = toBytes(makeString([e, f, g], ":"))
329+ let aV = fromBase58String(value(getString(c)))
330+ let aW = if (sigVerify(aU, aR, aV))
331+ then true
332+ else J("bad signature")
333+ if ((aW == aW))
334+ then {
335+ let aX = valueOrElse(getInteger(o(e, f)), 0)
336+ let aY = (aX + 1)
337+ let aM = T(f, e)
338+ let V = T(g, e)
339+ $Tuple2((([BooleanEntry(d(e, f, g), true), IntegerEntry(o(e, f), aY), StringEntry(m(e, g), f)] ++ aM) ++ V), unit)
340+ }
341+ else throw("Strict value is not equal to itself.")
342+ }
343+ else throw("Strict value is not equal to itself.")
344+ }
345+ else throw("Strict value is not equal to itself.")
346+ }
347+ else throw("Strict value is not equal to itself.")
348+ }
349+
350+
351+
352+@Callable(Q)
353+func updateReferralActivity (e,g,aZ) = {
354+ let aN = value(getString(y(e)))
355+ let ba = (getBoolean(q(e, g)) != unit)
356+ let f = value(getString(m(e, g)))
357+ let ax = if ((toString(Q.caller) == aN))
358+ then true
359+ else J("permission denied")
360+ if ((ax == ax))
361+ then {
362+ let bb = if ((ba == aZ))
363+ then $Tuple2(nil, unit)
364+ else {
365+ let bb = if ((aZ == true))
366+ then {
367+ let bc = (valueOrElse(getInteger(p(e, f)), 0) + 1)
368+ $Tuple2([BooleanEntry(q(e, g), true), IntegerEntry(p(e, f), bc)], unit)
369+ }
370+ else {
371+ let bc = (valueOrElse(getInteger(p(e, f)), 0) - 1)
372+ $Tuple2([DeleteEntry(q(e, g)), IntegerEntry(p(e, f), bc)], unit)
373+ }
374+ bb
375+ }
376+ bb
377+ }
378+ else throw("Strict value is not equal to itself.")
379+ }
380+
381+
382+
383+@Callable(Q)
384+func incUnclaimed (e,g,bd,be) = {
385+ let aN = value(getString(y(e)))
386+ let f = value(getString(m(e, g)))
387+ let ax = if ((toString(Q.caller) == aN))
388+ then true
389+ else J("permission denied")
390+ if ((ax == ax))
391+ then {
392+ let bf = if ((e == "wxlock"))
393+ then true
394+ else J("invalid program")
395+ if ((bf == bf))
396+ then {
397+ let bg = if (contains(valueOrElse(getString(z(f)), ""), e))
398+ then true
399+ else J("referrer not in program")
400+ if ((bg == bg))
401+ then {
402+ let bh = if (contains(valueOrElse(getString(z(g)), ""), e))
403+ then true
404+ else J("referral not in program")
405+ if ((bh == bh))
406+ then {
407+ let bi = valueOrElse(getInteger(t(f)), 0)
408+ let aH = valueOrElse(getInteger(k(e, f)), 0)
409+ let bj = valueOrElse(getInteger(t(g)), 0)
410+ let bk = valueOrElse(getInteger(l(e, g)), 0)
411+ let aI = valueOrElse(getInteger(v(e)), 0)
412+ let bl = (bi + bd)
413+ let aJ = (aH + bd)
414+ let bm = (bj + be)
415+ let bn = (bk + be)
416+ $Tuple2([IntegerEntry(t(f), bl), IntegerEntry(t(g), bm), IntegerEntry(k(e, f), aJ), IntegerEntry(l(e, g), bn), IntegerEntry(v(e), ((aI + bd) + be))], unit)
417+ }
418+ else throw("Strict value is not equal to itself.")
419+ }
420+ else throw("Strict value is not equal to itself.")
421+ }
422+ else throw("Strict value is not equal to itself.")
423+ }
424+ else throw("Strict value is not equal to itself.")
425+ }
426+
427+
428+
429+@Callable(Q)
430+func incUnclaimedWithPayment (e,aD) = {
431+ let bf = if ((e == "wxSpotFee"))
432+ then true
433+ else J("invalid program")
434+ if ((bf == bf))
435+ then {
436+ let bo = toString(Q.caller)
437+ let bp = valueOrElse(getInteger(A(bo)), 0)
438+ let bq = ((bp - height) + 3)
439+ let br = if (((height - 3) > bp))
440+ then true
441+ else J(makeString(["wait", toString(bq), "blocks"], " "))
442+ if ((br == br))
443+ then {
444+ func bs (bt,bu) = {
445+ let bv = (toBase58String(value(bu.assetId)) == value(getString(w(e))))
446+ let bw = if (bv)
447+ then true
448+ else J("invalid asset id")
449+ if ((bw == bw))
450+ then (bt :+ bu.amount)
451+ else throw("Strict value is not equal to itself.")
452+ }
453+
454+ let bx = {
455+ let by = Q.payments
456+ let bz = size(by)
457+ let bA = nil
458+ func bB (bC,bD) = if ((bD >= bz))
459+ then bC
460+ else bs(bC, by[bD])
461+
462+ func bE (bC,bD) = if ((bD >= bz))
463+ then bC
464+ else throw("List size exceeds 10")
465+
466+ bE(bB(bB(bB(bB(bB(bB(bB(bB(bB(bB(bA, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
467+ }
468+ let aE = {
469+ let bF = invoke(this, "incUnclaimedWithPaymentInternal", [bx, e, aD, 0, 0], nil)
470+ if ($isInstanceOf(bF, "Int"))
471+ then bF
472+ else throw(($getType(bF) + " couldn't be cast to Int"))
473+ }
474+ if ((aE == aE))
475+ then {
476+ let ag = addressFromStringValue(value(getString(x(e))))
477+ let ah = fromBase58String(value(getString(w(e))))
478+[ScriptTransfer(ag, aE, ah), IntegerEntry(A(bo), height)]
479+ }
480+ else throw("Strict value is not equal to itself.")
481+ }
482+ else throw("Strict value is not equal to itself.")
483+ }
484+ else throw("Strict value is not equal to itself.")
485+ }
486+
487+
488+
489+@Callable(Q)
490+func claim (e) = {
491+ let Y = if (valueOrElse(getBoolean(n(e)), false))
492+ then true
493+ else J("program does not exist")
494+ if ((Y == Y))
495+ then {
496+ let X = (toString(Q.caller) == value(getString(y(e))))
497+ let i = if (X)
498+ then toString(Q.originCaller)
499+ else toString(Q.caller)
500+ let bG = invoke(this, "claimInternal", [e, i, X], nil)
501+ if ((bG == bG))
502+ then $Tuple2(nil, bG)
503+ else throw("Strict value is not equal to itself.")
504+ }
505+ else throw("Strict value is not equal to itself.")
506+ }
507+
508+
509+
510+@Callable(Q)
511+func claimBulk () = {
512+ let bo = toString(Q.caller)
513+ let bH = getString(z(toString(Q.caller)))
514+ let bI = if (isDefined(bH))
515+ then true
516+ else J("no referral programs")
517+ if ((bI == bI))
518+ then {
519+ let bJ = split(value(bH), "__")
520+ let bK = invoke(this, "claimBulkInternal", [bo, bJ, 0], nil)
521+ if ((bK == bK))
522+ then $Tuple2(nil, bK)
523+ else throw("Strict value is not equal to itself.")
524+ }
525+ else throw("Strict value is not equal to itself.")
526+ }
527+
528+
529+
530+@Callable(Q)
531+func claimREADONLY (e,E) = {
532+ let aa = valueOrElse(getInteger(h(e, E)), 0)
533+ let ab = valueOrElse(getInteger(k(e, E)), 0)
534+ $Tuple2(nil, [ab, aa])
535+ }
536+
537+
538+
539+@Callable(Q)
540+func claimBulkREADONLY (au) = {
541+ let ai = valueOrElse(getInteger(r(au)), 0)
542+ let aj = valueOrElse(getInteger(t(au)), 0)
543+ $Tuple2(nil, [aj, ai])
544+ }
545+
546+
547+
548+@Callable(Q)
549+func setTotalKeys (e,s) = {
550+ let bL = valueOrElse(getInteger(h(e, s)), 0)
551+ let bM = valueOrElse(getInteger(j(e, s)), 0)
552+ let aA = valueOrElse(getInteger(k(e, s)), 0)
553+ let bN = valueOrElse(getInteger(l(e, s)), 0)
554+ let ai = (bL + bM)
555+ let aj = (aA + bN)
556+ $Tuple2([IntegerEntry(r(s), ai), IntegerEntry(t(s), aj)], unit)
557+ }
558+
559+
560+
561+@Callable(Q)
562+func setManager (bO) = {
563+ let ax = P(Q)
564+ if ((ax == ax))
565+ then {
566+ let bP = fromBase58String(bO)
567+ if ((bP == bP))
568+ then [StringEntry(C(), bO)]
569+ else throw("Strict value is not equal to itself.")
570+ }
571+ else throw("Strict value is not equal to itself.")
572+ }
573+
574+
575+
576+@Callable(Q)
577+func confirmManager () = {
578+ let bQ = O()
579+ let bR = if (isDefined(bQ))
580+ then true
581+ else J("no pending manager")
582+ if ((bR == bR))
583+ then {
584+ let bS = if ((Q.callerPublicKey == value(bQ)))
585+ then true
586+ else J("you are not pending manager")
587+ if ((bS == bS))
588+ then [StringEntry(B(), toBase58String(value(bQ))), DeleteEntry(C())]
589+ else throw("Strict value is not equal to itself.")
590+ }
591+ else throw("Strict value is not equal to itself.")
592+ }
593+
594+
595+@Verifier(bT)
596+func bU () = {
597+ let bV = {
598+ let M = L()
599+ if ($isInstanceOf(M, "ByteVector"))
358600 then {
359- let M = G
360- M
601+ let S = M
602+ S
361603 }
362- else if ($isInstanceOf(G, "Unit"))
363- then aL.senderPublicKey
604+ else if ($isInstanceOf(M, "Unit"))
605+ then bT.senderPublicKey
364606 else throw("Match error")
365607 }
366- sigVerify(aL.bodyBytes, aL.proofs[0], aN)
608+ sigVerify(bT.bodyBytes, bT.proofs[0], bV)
367609 }
368610

github/deemru/w8io/026f985 
96.49 ms