tx · Bp2ucuWSx5Ze19CY2ywZaTwHNPqkVophepFgRi9X2gTU

3MxN27tyS9DuFsab1QSfM5Q2BfauiyVCr4M:  -0.03400000 Waves

2022.09.13 17:16 [2227437] smart account 3MxN27tyS9DuFsab1QSfM5Q2BfauiyVCr4M > SELF 0.00000000 Waves

{ "type": 13, "id": "Bp2ucuWSx5Ze19CY2ywZaTwHNPqkVophepFgRi9X2gTU", "fee": 3400000, "feeAssetId": null, "timestamp": 1663078586214, "version": 2, "chainId": 84, "sender": "3MxN27tyS9DuFsab1QSfM5Q2BfauiyVCr4M", "senderPublicKey": "6PjNBLx8VTTNLWTS5y6zecyVfYCUC9ZCrAULFnLQU4XM", "proofs": [ "4XniBB3xXd9Us1aNhfXm5XtXm5Y3MmwjcL6Us1JLAMTLRMmQfCb9JrRSsMej3foWekChPMEgwcz2B1A27HKvyJpq" ], "script": "base64:BgIXCAISABIECgIICBIDCgEIEgASBAoCCAEuABBrX3JlZl9saW5rX293bmVyAhBrX3JlZl9saW5rX293bmVyAAprX3JlZmVycmVyAgprX3JlZmVycmVyAAhrX2FjdGl2ZQIIa19hY3RpdmUADGtfZGVmYXVsdEZlZQIMa19kZWZhdWx0RmVlABRrX3JlZmVycmVyX3JlZl9jb3VudAIUa19yZWZlcnJlcl9yZWZfY291bnQAEWtfcmVmZXJyZXJfZWFybmVkAhFrX3JlZmVycmVyX2Vhcm5lZAASa19yZWZlcnJlcl9jbGFpbWVkAhJrX3JlZmVycmVyX2NsYWltZWQADWtfaW5pdGlhbGl6ZWQCDWtfaW5pdGlhbGl6ZWQAFGtfY29vcmRpbmF0b3JBZGRyZXNzAhRrX2Nvb3JkaW5hdG9yQWRkcmVzcwASa19nb3Zlcm5hbmNlX2Fzc2V0AgtrX2dvdl9hc3NldAANa19xdW90ZV9hc3NldAINa19xdW90ZV9hc3NldAASa19hZG1pbl9wdWJsaWNfa2V5AhJrX2FkbWluX3B1YmxpY19rZXkABWtfYW1tAgVrX2FtbQEOdG9Db21wb3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pxdW90ZUFzc2V0AAUDbmlsCQACAQIQTm90aGluZyB0byBjbGFpbQFpAQppbml0aWFsaXplAgxfY29vcmRpbmF0b3ILX2RlZmF1bHRGZWUDCQELaW5pdGlhbGl6ZWQACQACAQITQWxyZWFkeSBpbml0aWFsaXplZAkAzAgCCQELU3RyaW5nRW50cnkCBRRrX2Nvb3JkaW5hdG9yQWRkcmVzcwUMX2Nvb3JkaW5hdG9yCQDMCAIJAQxJbnRlZ2VyRW50cnkCBQxrX2RlZmF1bHRGZWUFC19kZWZhdWx0RmVlCQDMCAIJAQxCb29sZWFuRW50cnkCBQ1rX2luaXRpYWxpemVkBgUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAkBDmFkbWluUHVibGljS2V5AFe87c0=", "height": 2227437, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 7zoigKNpgR81ZhNZoqPtu4AUtrP4y4VoGP85qgPjn8Wi Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "k_ref_link_owner"
5+
6+let b = "k_referrer"
7+
8+let c = "k_active"
9+
10+let d = "k_defaultFee"
11+
12+let e = "k_referrer_ref_count"
13+
14+let f = "k_referrer_earned"
15+
16+let g = "k_referrer_claimed"
17+
18+let h = "k_initialized"
19+
20+let i = "k_coordinatorAddress"
21+
22+let j = "k_gov_asset"
23+
24+let k = "k_quote_asset"
25+
26+let l = "k_admin_public_key"
27+
28+let m = "k_amm"
29+
30+func n (o,p) = ((o + "_") + p)
31+
32+
33+func q (r) = ((a + "_") + r)
34+
35+
36+func s (t) = ((b + "_") + t)
37+
38+
39+func u (v) = ((e + "_") + v)
40+
41+
42+func w (v) = ((f + "_") + v)
43+
44+
45+func x (v) = ((g + "_") + v)
46+
47+
48+func y (t) = ((c + "_") + t)
49+
50+
51+func z () = valueOrErrorMessage(addressFromString(getStringValue(this, i)), "Coordinator not set")
52+
53+
54+func A () = fromBase58String(getStringValue(z(), l))
55+
56+
57+func B () = fromBase58String(getStringValue(z(), j))
58+
59+
60+func C () = fromBase58String(getStringValue(z(), k))
61+
62+
63+func D (p) = valueOrElse(getBoolean(z(), n(m, p)), false)
64+
65+
66+let E = (1 * (((((10 * 10) * 10) * 10) * 10) * 10))
67+
68+let F = ((60 * 60) * 24)
69+
70+let G = ""
71+
72+let H = 0
73+
74+func I (J) = (J / 100)
75+
76+
77+func K (J) = (J * 100)
78+
79+
80+func L (M,N) = fraction(M, E, N, HALFEVEN)
81+
82+
83+func O (M,N) = fraction(M, N, E, HALFEVEN)
84+
85+
86+func P (M) = if ((M > 0))
87+ then M
88+ else -(M)
89+
90+
91+func Q (M,N) = if ((M > N))
92+ then N
93+ else M
94+
95+
96+func R (S) = valueOrErrorMessage(getInteger(this, S), ("no value for " + S))
97+
98+
99+func T (S) = valueOrElse(getInteger(this, S), 0)
100+
101+
102+func U () = valueOrElse(getBoolean(this, h), false)
103+
104+
105+func V (r) = valueOrElse(getString(this, q(r)), "")
106+
107+
108+func W (t) = valueOrElse(getString(this, s(t)), "")
109+
110+
111+func X (t) = (W(t) != "")
112+
113+
114+func Y (t) = (valueOrElse(getBoolean(this, y(t)), false) == false)
115+
116+
117+func Z () = R(d)
118+
119+
120+func aa (v) = valueOrElse(getInteger(this, u(v)), 0)
121+
122+
123+func ab (v) = valueOrElse(getInteger(this, w(v)), 0)
124+
125+
126+func ac (v) = valueOrElse(getInteger(this, x(v)), 0)
127+
128+
129+@Callable(ad)
130+func createReferralLink () = {
131+ let ae = (toBase58String(ad.transactionId) + toBase58String(ad.callerPublicKey))
132+ let af = toBytes(ae)
133+ let ag = toBase58String(sha256(af))
134+ let ah = take(ag, 10)
135+ let ai = q(ah)
136+ if (isDefined(getString(this, ai)))
137+ then throw("Short link exists, try generating it again")
138+ else [StringEntry(ai, toString(ad.caller))]
139+ }
140+
141+
142+
143+@Callable(ad)
144+func acceptPaymentWithLink (t,aj) = {
145+ let J = ad.payments[0].amount
146+ let ak = toString(ad.caller)
147+ if (if (!(D(ak)))
148+ then true
149+ else !(U()))
150+ then throw("Invalid acceptPaymentWithLink params")
151+ else {
152+ let al = X(t)
153+ let am = Y(t)
154+ if (if (X(t))
155+ then true
156+ else Y(t))
157+ then if (al)
158+ then {
159+ let an = W(t)
160+ let ao = Z()
161+ let ap = O(J, ao)
162+ $Tuple2([IntegerEntry(w(an), (ab(an) + ap)), ScriptTransfer(ad.caller, (ad.payments[0].amount - ap), ad.payments[0].assetId)], ap)
163+ }
164+ else {
165+ let an = V(aj)
166+ if ((an == ""))
167+ then $Tuple2([ScriptTransfer(ad.caller, ad.payments[0].amount, ad.payments[0].assetId), BooleanEntry(y(t), true)], 0)
168+ else {
169+ let ao = Z()
170+ let ap = O(J, ao)
171+ $Tuple2([IntegerEntry(u(an), (aa(an) + 1)), IntegerEntry(w(an), (ab(an) + ap)), StringEntry(s(t), an), BooleanEntry(y(t), true), ScriptTransfer(ad.caller, (ad.payments[0].amount - ap), ad.payments[0].assetId)], ap)
172+ }
173+ }
174+ else $Tuple2([ScriptTransfer(ad.caller, ad.payments[0].amount, ad.payments[0].assetId)], 0)
175+ }
176+ }
177+
178+
179+
180+@Callable(ad)
181+func acceptPayment (t) = {
182+ let J = ad.payments[0].amount
183+ let ak = toString(ad.caller)
184+ if (if (!(D(ak)))
185+ then true
186+ else !(U()))
187+ then throw("Invalid acceptPayment params")
188+ else {
189+ let al = X(t)
190+ if (al)
191+ then {
192+ let an = W(t)
193+ let ao = Z()
194+ let ap = O(J, ao)
195+ $Tuple2([IntegerEntry(w(an), (ab(an) + ap)), ScriptTransfer(ad.caller, (ad.payments[0].amount - ap), ad.payments[0].assetId)], ap)
196+ }
197+ else $Tuple2([ScriptTransfer(ad.caller, ad.payments[0].amount, ad.payments[0].assetId)], 0)
198+ }
199+ }
200+
201+
202+
203+@Callable(ad)
204+func claimRewards () = {
205+ let an = toString(ad.caller)
206+ let aq = ab(an)
207+ let ar = ac(an)
208+ let as = (aq - ar)
209+ if ((as > 0))
210+ then [IntegerEntry(x(an), (ac(an) + as)), ScriptTransfer(ad.caller, as, C())]
211+ else throw("Nothing to claim")
212+ }
213+
214+
215+
216+@Callable(ad)
217+func initialize (at,au) = if (U())
218+ then throw("Already initialized")
219+ else [StringEntry(i, at), IntegerEntry(d, au), BooleanEntry(h, true)]
220+
221+
222+@Verifier(av)
223+func aw () = sigVerify(av.bodyBytes, av.proofs[0], A())
224+

github/deemru/w8io/169f3d6 
48.00 ms