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