tx · DLxWEvxiwsUidWEArdj6diuL3GM88UxGnfEoHdM4jDsh

3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL:  -0.01400000 Waves

2019.08.23 18:20 [643952] smart account 3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL > SELF 0.00000000 Waves

{ "type": 13, "id": "DLxWEvxiwsUidWEArdj6diuL3GM88UxGnfEoHdM4jDsh", "fee": 1400000, "feeAssetId": null, "timestamp": 1566573607315, "version": 1, "sender": "3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL", "senderPublicKey": "FbEMepLNcZb6VBpsH5JJg4j43UEV27dMRqv1Pq6JFLgy", "proofs": [ "43PxVPkNRuTMeVNBfXq5y528FCMZCurWXznB48HeS1kMnCJmmW4iy36zkmV8x6AGNcSiwPUyKg3LvkndB5eXVWaS" ], "script": "base64:AAIDAAAAAAAAAAAAAAAUAAAAAApiZXRBc3NldElkAQAAACAea7QCZF/XAXMBPEnDQ5kqHUHyOfWmXu9KHDHL6zcNNwAAAAAGbWF4RmVlAAAAAAAATEtAAAAAAAZtaW5CZXQAAAAAAABMS0AAAAAAD21pbk1hdGNoTm9taW5hbAAAAAAAAExLQAAAAAAGbGV2ZWwxAAAAAAAAAAD6AAAAAAZsZXZlbDIAAAAAAAAAAJYAAAAABmxldmVsMwAAAAAAAAAAZAAAAAAIY2FzaEJhY2sAAAAAAAAAAfQAAAAACHRvdGFsUmVmAAAAAAAAAAAKAAAAAA1jaGFuZ2VBZGRyZXNzAgAAACMzTkF4c2JIeFM2M2F6ZEFpY1Z2TEdzeGpBUTlEc0s2TDROTAAAAAALbWluV2l0aGRyYXcAAAAAAAAPQkABAAAAE2dldENhbGxlckJ5RGVsZWdhdGUAAAACAAAAAWkAAAAIZnVuY3Rpb24EAAAABmNhbGxlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAxjYWxsZXJQcmVmaXgJAAEsAAAAAgIAAAAJZGVsZWdhdGVf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next: 65XvzpAzJNNnLF7vxdtD65GvYvbM7CoHtzzBqvJSGHJe Diff:
OldNewDifferences
99
1010 let d = 5000000
1111
12-let e = 3
12+let e = 250
1313
14-let f = 1
14+let f = 150
1515
16-let g = 1
16+let g = 100
1717
18-let h = 5
18+let h = 500
1919
20-let i = "3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL"
20+let i = 10
2121
22-let j = 1000000
22+let j = "3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL"
2323
24-func k (l,m) = {
25- let n = toBase58String(l.caller.bytes)
26- let o = ("delegate_" + n)
27- if ((getBoolean(this, ((o + "_") + m)) == true))
24+let k = 1000000
25+
26+func l (m,n) = {
27+ let o = toBase58String(m.caller.bytes)
28+ let p = ("delegate_" + o)
29+ if ((getBoolean(this, ((p + "_") + n)) == true))
2830 then {
29- let p = getString(this, (o + "_address"))
30- if ($isInstanceOf(p, "String"))
31+ let q = getString(this, (p + "_address"))
32+ if ($isInstanceOf(q, "String"))
3133 then {
32- let q = p
33- q
34+ let r = q
35+ r
3436 }
35- else n
37+ else o
3638 }
37- else n
39+ else o
3840 }
3941
4042
41-func r (l) = if ((l.fee > b))
43+func s (m) = if ((m.fee > b))
4244 then throw("unreasonable large fee")
43- else if ((l.feeAssetId != unit))
45+ else if ((m.feeAssetId != unit))
4446 then throw("fee must be in WAVES")
4547 else true
4648
4749
48-func s (l,t,u,v) = if (r(l))
49- then if (if ((u > 0))
50- then isDefined(v)
50+func t (m,u,v,w) = if (s(m))
51+ then if (if ((v > 0))
52+ then isDefined(w)
5153 else false)
52- then ScriptResult(t, TransferSet([ScriptTransfer(l.caller, l.fee, unit), ScriptTransfer(extract(v), u, a)]))
53- else ScriptResult(t, TransferSet([ScriptTransfer(l.caller, l.fee, unit)]))
54+ then ScriptResult(u, TransferSet([ScriptTransfer(m.caller, m.fee, unit), ScriptTransfer(extract(w), v, a)]))
55+ else ScriptResult(u, TransferSet([ScriptTransfer(m.caller, m.fee, unit)]))
5456 else throw("error")
5557
5658
57-func w (l,x) = (getString(this, (x + "_owner")) == toBase58String(l.caller.bytes))
59+func x (m,y) = (getString(this, (y + "_owner")) == toBase58String(m.caller.bytes))
5860
5961
60-func y (x) = (extract(getInteger(this, (x + "_amount"))) - extract(getInteger(this, (x + "_spent"))))
62+func z (y) = (extract(getInteger(this, (y + "_amount"))) - extract(getInteger(this, (y + "_spent"))))
6163
6264
63-func z (x) = {
64- let A = getInteger(this, (x + "_defeat"))
65- if ((A == 1))
65+func A (y) = {
66+ let B = getInteger(this, (y + "_defeat"))
67+ if ((B == 1))
6668 then true
67- else (A == 3)
69+ else (B == 3)
6870 }
6971
7072
71-func B (C) = getString(this, (C + "_referer"))
73+func C (D) = getString(this, (D + "_referer"))
7274
7375
74-func D (E,F) = {
75- let G = (E + "_balance")
76- DataEntry(G, (F + {
77- let p = getInteger(this, G)
78- if ($isInstanceOf(p, "Int"))
76+func E (F,G) = {
77+ let H = (F + "_balance")
78+ DataEntry(H, (G + {
79+ let q = getInteger(this, H)
80+ if ($isInstanceOf(q, "Int"))
7981 then {
80- let H = p
81- H
82+ let I = q
83+ I
8284 }
8385 else 0
8486 }))
8587 }
8688
8789
88-func I (E,J,F,K,L,M) = DataEntry(((("fund_" + E) + "_") + L), ((((((J + ":") + toString(F)) + ":") + K) + ":") + M))
90+func J (F,K,G,L,M,N) = DataEntry(((("fund_" + F) + "_") + M), ((((((K + ":") + toString(G)) + ":") + L) + ":") + N))
8991
9092
91-@Callable(l)
92-func bet (N,O,P,Q) = {
93- let J = toBase58String(l.caller.bytes)
94- let R = extract(l.payment)
95- if ((R.assetId != a))
93+@Callable(m)
94+func bet (O,P,Q,R) = {
95+ let K = toBase58String(m.caller.bytes)
96+ let S = extract(m.payment)
97+ if ((S.assetId != a))
9698 then throw(("bet must be in asset " + toBase58String(a)))
97- else if ((c > R.amount))
99+ else if ((c > S.amount))
98100 then throw(("minimum allowed bet is " + toString(c)))
99- else if (if ((P != "for"))
100- then (P != "against")
101+ else if (if ((Q != "for"))
102+ then (Q != "against")
101103 else false)
102104 then throw("unexpected side")
103105 else {
104- let x = (((((("bet_" + N) + "_") + toBase58String(l.caller.bytes)) + "_") + take(toBase58String(l.transactionId), 15)) + "_")
105- let S = ((("seq_" + N) + "_") + O)
106- let T = {
107- let p = getInteger(this, S)
108- if ($isInstanceOf(p, "Int"))
106+ let y = (((((("bet_" + O) + "_") + toBase58String(m.caller.bytes)) + "_") + take(toBase58String(m.transactionId), 15)) + "_")
107+ let T = ((("seq_" + O) + "_") + P)
108+ let U = {
109+ let q = getInteger(this, T)
110+ if ($isInstanceOf(q, "Int"))
109111 then {
110- let U = p
111- (U + 1)
112+ let V = q
113+ (V + 1)
112114 }
113115 else 1
114116 }
115- s(l, WriteSet([DataEntry((x + "owner"), J), DataEntry((x + "event"), N), DataEntry((x + "subevent"), O), DataEntry((x + "side"), P), DataEntry((x + "odds"), Q), DataEntry((x + "amount"), R.amount), DataEntry((x + "spent"), 0), DataEntry((x + "timestamp"), lastBlock.timestamp), DataEntry((x + "sequence"), T), DataEntry(S, T)]), 0, unit)
117+ t(m, WriteSet([DataEntry((y + "owner"), K), DataEntry((y + "event"), O), DataEntry((y + "subevent"), P), DataEntry((y + "side"), Q), DataEntry((y + "odds"), R), DataEntry((y + "amount"), S.amount), DataEntry((y + "spent"), 0), DataEntry((y + "timestamp"), lastBlock.timestamp), DataEntry((y + "sequence"), U), DataEntry(T, U)]), 0, unit)
116118 }
117119 }
118120
119121
120122
121-@Callable(l)
122-func cancel (x) = if ((getString(this, (x + "_owner")) != k(l, "autocancel")))
123+@Callable(m)
124+func cancel (y) = if ((getString(this, (y + "_owner")) != l(m, "autocancel")))
123125 then throw("must be owner or its delegate to cancel")
124126 else {
125- let u = extract(getInteger(this, (x + "_amount")))
126- let V = extract(getInteger(this, (x + "_spent")))
127- let W = (u - V)
128- s(l, WriteSet([DataEntry((x + "_spent"), u), DataEntry((x + "_cancel_amount"), W), DataEntry((x + "_cancel_tx"), toBase58String(l.transactionId))]), W, l.caller)
127+ let v = extract(getInteger(this, (y + "_amount")))
128+ let W = extract(getInteger(this, (y + "_spent")))
129+ let X = (v - W)
130+ t(m, WriteSet([DataEntry((y + "_spent"), v), DataEntry((y + "_cancel_amount"), X), DataEntry((y + "_cancel_tx"), toBase58String(m.transactionId))]), X, m.caller)
129131 }
130132
131133
132134
133-@Callable(l)
134-func betMatch (X,Y) = if ((getString(this, (X + "_event")) != getString(this, (Y + "_event"))))
135+@Callable(m)
136+func betMatch (Y,Z) = if ((getString(this, (Y + "_event")) != getString(this, (Z + "_event"))))
135137 then throw("event id must match")
136- else if ((getString(this, (X + "_subevent")) != getString(this, (Y + "_subevent"))))
138+ else if ((getString(this, (Y + "_subevent")) != getString(this, (Z + "_subevent"))))
137139 then throw("subevent id must match")
138- else if ((getString(this, (X + "_side")) != "for"))
140+ else if ((getString(this, (Y + "_side")) != "for"))
139141 then throw("invalid *for* bet")
140- else if ((getString(this, (Y + "_side")) != "against"))
142+ else if ((getString(this, (Z + "_side")) != "against"))
141143 then throw("invalid *against* bet")
142144 else {
143- let Z = getStringValue(this, (X + "_owner"))
144145 let aa = getStringValue(this, (Y + "_owner"))
145- let ab = extract(getString(this, (X + "_event")))
146- let ac = (((((((("match_" + ab) + "_") + takeRight(Z, 10)) + "_") + takeRight(aa, 10)) + "_") + toBase58String(l.transactionId)) + "_")
147- let Q = extract(getInteger(this, (X + "_odds")))
148- let ad = y(X)
149- let ae = y(Y)
150- let af = ad
151- let ag = ((ae * 100) / (Q - 100))
152- let ah = if ((af > ag))
153- then ag
154- else af
155- if ((d > ah))
146+ let ab = getStringValue(this, (Z + "_owner"))
147+ let ac = extract(getString(this, (Y + "_event")))
148+ let ad = (((((((("match_" + ac) + "_") + takeRight(aa, 10)) + "_") + takeRight(ab, 10)) + "_") + toBase58String(m.transactionId)) + "_")
149+ let R = extract(getInteger(this, (Y + "_odds")))
150+ let ae = z(Y)
151+ let af = z(Z)
152+ let ag = ae
153+ let ah = ((af * 100) / (R - 100))
154+ let ai = if ((ag > ah))
155+ then ah
156+ else ag
157+ if ((d > ai))
156158 then throw("match nominal too low")
157159 else {
158- let ai = ah
159- let aj = ((ah * (Q - 100)) / 100)
160- let ak = (ai + extract(getInteger(this, (X + "_spent"))))
160+ let aj = ai
161+ let ak = ((ai * (R - 100)) / 100)
161162 let al = (aj + extract(getInteger(this, (Y + "_spent"))))
162- if ((ak > extract(getInteger(this, (X + "_amount")))))
163+ let am = (ak + extract(getInteger(this, (Z + "_spent"))))
164+ if ((al > extract(getInteger(this, (Y + "_amount")))))
163165 then throw("invalid match")
164- else if ((al > extract(getInteger(this, (Y + "_amount")))))
166+ else if ((am > extract(getInteger(this, (Z + "_amount")))))
165167 then throw("invalid match")
166- else s(l, WriteSet([DataEntry((ac + "amount"), (ai + aj)), DataEntry((ac + "for"), X), DataEntry((ac + "against"), Y), DataEntry((X + "_spent"), ak), DataEntry((Y + "_spent"), al)]), 0, unit)
168+ else t(m, WriteSet([DataEntry((ad + "amount"), (aj + ak)), DataEntry((ad + "for"), Y), DataEntry((ad + "against"), Z), DataEntry((Y + "_spent"), al), DataEntry((Z + "_spent"), am)]), 0, unit)
167169 }
168170 }
169171
170172
171173
172-@Callable(l)
173-func approveDefeat (am,an) = if (if (isDefined(getInteger(this, (am + "_defeat"))))
174- then (an == 2)
174+@Callable(m)
175+func approveDefeat (an,ao) = if (if (isDefined(getInteger(this, (an + "_defeat"))))
176+ then (ao == 2)
175177 else false)
176178 then throw("can't dispute after approve")
177- else if ((getString(this, (am + "_owner")) != k(l, "autoapprove")))
179+ else if ((getString(this, (an + "_owner")) != l(m, "autoapprove")))
178180 then throw("must be owner or its delegate to approve")
179- else s(l, WriteSet([DataEntry((am + "_defeat"), an)]), 0, unit)
181+ else t(m, WriteSet([DataEntry((an + "_defeat"), ao)]), 0, unit)
180182
181183
182184
183-@Callable(l)
184-func payWinner (ao) = if (!(r(l)))
185+@Callable(m)
186+func payWinner (ap) = if (!(s(m)))
185187 then throw("error")
186- else if (isDefined(getInteger(this, (ao + "_paid"))))
188+ else if (isDefined(getInteger(this, (ap + "_paid"))))
187189 then throw("already paid")
188190 else {
189- let ap = extract(getString(this, (ao + "_for")))
190- let aq = extract(getString(this, (ao + "_against")))
191- let ar = z(ap)
192- let as = z(aq)
193- if (if (!(ar))
194- then !(as)
191+ let aq = extract(getString(this, (ap + "_for")))
192+ let ar = extract(getString(this, (ap + "_against")))
193+ let as = A(aq)
194+ let at = A(ar)
195+ if (if (!(as))
196+ then !(at)
195197 else false)
196198 then throw("no side approved defeat")
197199 else {
198- let at = if (ar)
199- then aq
200- else ap
201- let au = getStringValue(this, (at + "_owner"))
202- let u = extract(getInteger(this, (ao + "_amount")))
203- let av = toBase58String(l.transactionId)
204- let M = toString(lastBlock.timestamp)
200+ let au = if (as)
201+ then ar
202+ else aq
203+ let av = getStringValue(this, (au + "_owner"))
204+ let v = extract(getInteger(this, (ap + "_amount")))
205+ let aw = toBase58String(m.transactionId)
206+ let N = toString(lastBlock.timestamp)
207+ let ax = ((v * i) / 1000)
205208 ScriptResult(WriteSet({
206- let p = B(au)
207- if ($isInstanceOf(p, "String"))
209+ let q = C(av)
210+ if ($isInstanceOf(q, "String"))
208211 then {
209- let aw = p
210- let ax = ((u * e) / 1000)
211- let ay = ((u * h) / 1000)
212-[DataEntry((ao + "_paid"), toBase58String(l.transactionId)), D(au, ay), I(au, au, ay, "cashback", av, M), D(aw, ax), I(aw, au, ax, "l1", av, M), {
213- let az = B(aw)
214- if ($isInstanceOf(az, "String"))
212+ let ay = q
213+ let az = ((ax * e) / 1000)
214+ let aA = ((ax * h) / 1000)
215+[DataEntry((ap + "_paid"), toBase58String(m.transactionId)), E(av, aA), J(av, av, aA, "cashback", aw, N), E(ay, az), J(ay, av, az, "l1", aw, N), {
216+ let aB = C(ay)
217+ if ($isInstanceOf(aB, "String"))
215218 then {
216- let aA = az
217- let aB = ((u * f) / 1000)
218-[D(aA, aB), I(aA, au, aB, "l2", av, M), {
219- let aC = B(aA)
220- if ($isInstanceOf(aC, "String"))
219+ let aC = aB
220+ let aD = ((ax * f) / 1000)
221+[E(aC, aD), J(aC, av, aD, "l2", aw, N), {
222+ let aE = C(aC)
223+ if ($isInstanceOf(aE, "String"))
221224 then {
222- let aD = aC
223- let aE = ((u * g) / 1000)
224-[D(aD, aE), I(aD, au, aE, "l3", av, M), D(i, (((u - ax) - aB) - aE)), I(i, au, (((u - ax) - aB) - aE), "change", av, M)]
225+ let aF = aE
226+ let aG = ((ax * g) / 1000)
227+[E(aF, aG), J(aF, av, aG, "l3", aw, N), E(j, (((ax - az) - aD) - aG)), J(j, av, (((ax - az) - aD) - aG), "change", aw, N)]
225228 }
226- else [D(i, ((u - ax) - aB)), I(i, au, ((u - ax) - aB), "change", av, M)]
229+ else [E(j, ((ax - az) - aD)), J(j, av, ((ax - az) - aD), "change", aw, N)]
227230 }]
228231 }
229- else [D(i, (u - ax)), I(i, au, (u - ax), "change", av, M)]
232+ else [E(j, (ax - az)), J(j, av, (ax - az), "change", aw, N)]
230233 }]
231234 }
232- else [D(i, u), I(i, au, u, "change", av, M)]
233- }), TransferSet([ScriptTransfer(l.caller, l.fee, unit), ScriptTransfer(addressFromStringValue(au), u, a)]))
235+ else [E(j, ax), J(j, av, ax, "change", aw, N)]
236+ }), TransferSet([ScriptTransfer(m.caller, m.fee, unit), ScriptTransfer(addressFromStringValue(av), (v - ax), a)]))
234237 }
235238 }
236239
237240
238241
239-@Callable(l)
240-func delegate (aF,aG,aH) = s(l, WriteSet([DataEntry((("delegate_" + aF) + "_address"), toBase58String(l.caller.bytes)), DataEntry((("delegate_" + aF) + "_autoapprove"), aG), DataEntry((("delegate_" + aF) + "_autocancel"), aH)]), 0, unit)
242+@Callable(m)
243+func delegate (aH,aI,aJ) = t(m, WriteSet([DataEntry((("delegate_" + aH) + "_address"), toBase58String(m.caller.bytes)), DataEntry((("delegate_" + aH) + "_autoapprove"), aI), DataEntry((("delegate_" + aH) + "_autocancel"), aJ)]), 0, unit)
241244
242245
243246
244-@Callable(l)
245-func withdraw () = if (!(r(l)))
247+@Callable(m)
248+func withdraw () = if (!(s(m)))
246249 then throw("error")
247250 else {
248- let J = toBase58String(l.caller.bytes)
249- let av = toBase58String(l.transactionId)
250- let G = (J + "_balance")
251- let u = {
252- let p = getInteger(this, G)
253- if ($isInstanceOf(p, "Int"))
251+ let K = toBase58String(m.caller.bytes)
252+ let aw = toBase58String(m.transactionId)
253+ let H = (K + "_balance")
254+ let v = {
255+ let q = getInteger(this, H)
256+ if ($isInstanceOf(q, "Int"))
254257 then {
255- let H = p
256- H
258+ let I = q
259+ I
257260 }
258261 else 0
259262 }
260- if ((j > u))
261- then throw(("Min withdraw amount is" + toString(j)))
262- else ScriptResult(WriteSet([DataEntry(G, 0), DataEntry(((("withdraw_" + J) + "_") + av), ((toString(u) + ":") + toString(lastBlock.timestamp)))]), TransferSet([ScriptTransfer(l.caller, (u + l.fee), unit)]))
263+ if ((k > v))
264+ then throw(("Min withdraw amount is" + toString(k)))
265+ else ScriptResult(WriteSet([DataEntry(H, 0), DataEntry(((("withdraw_" + K) + "_") + aw), ((toString(v) + ":") + toString(lastBlock.timestamp)))]), TransferSet([ScriptTransfer(m.caller, (v + m.fee), unit)]))
263266 }
264267
265268
266269
267-@Callable(l)
268-func register (aI,aJ) = if (!(r(l)))
270+@Callable(m)
271+func register (aK,aL) = if (!(s(m)))
269272 then throw("error")
270- else if ((take(toBase58String(l.transactionId), 3) != "123"))
273+ else if ((take(toBase58String(m.transactionId), 3) != "123"))
271274 then throw("proof of work failed")
272275 else {
273- let J = toBase58String(l.caller.bytes)
274- if (isDefined(B(J)))
276+ let K = toBase58String(m.caller.bytes)
277+ if (isDefined(C(K)))
275278 then throw("Already registered")
276- else ScriptResult(WriteSet([DataEntry((J + "_referer"), aI), DataEntry(((aI + "_referral_") + J), J)]), TransferSet([ScriptTransfer(l.caller, l.fee, unit)]))
279+ else ScriptResult(WriteSet([DataEntry((K + "_referer"), aK), DataEntry(((aK + "_referral_") + K), K)]), TransferSet([ScriptTransfer(m.caller, m.fee, unit)]))
277280 }
278281
279282
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'33kV5hRVtgEGpYqhp9wQn2g9hP1fNWSYGCzzYk1T9Hyg'
55
66 let b = 5000000
77
88 let c = 5000000
99
1010 let d = 5000000
1111
12-let e = 3
12+let e = 250
1313
14-let f = 1
14+let f = 150
1515
16-let g = 1
16+let g = 100
1717
18-let h = 5
18+let h = 500
1919
20-let i = "3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL"
20+let i = 10
2121
22-let j = 1000000
22+let j = "3NAxsbHxS63azdAicVvLGsxjAQ9DsK6L4NL"
2323
24-func k (l,m) = {
25- let n = toBase58String(l.caller.bytes)
26- let o = ("delegate_" + n)
27- if ((getBoolean(this, ((o + "_") + m)) == true))
24+let k = 1000000
25+
26+func l (m,n) = {
27+ let o = toBase58String(m.caller.bytes)
28+ let p = ("delegate_" + o)
29+ if ((getBoolean(this, ((p + "_") + n)) == true))
2830 then {
29- let p = getString(this, (o + "_address"))
30- if ($isInstanceOf(p, "String"))
31+ let q = getString(this, (p + "_address"))
32+ if ($isInstanceOf(q, "String"))
3133 then {
32- let q = p
33- q
34+ let r = q
35+ r
3436 }
35- else n
37+ else o
3638 }
37- else n
39+ else o
3840 }
3941
4042
41-func r (l) = if ((l.fee > b))
43+func s (m) = if ((m.fee > b))
4244 then throw("unreasonable large fee")
43- else if ((l.feeAssetId != unit))
45+ else if ((m.feeAssetId != unit))
4446 then throw("fee must be in WAVES")
4547 else true
4648
4749
48-func s (l,t,u,v) = if (r(l))
49- then if (if ((u > 0))
50- then isDefined(v)
50+func t (m,u,v,w) = if (s(m))
51+ then if (if ((v > 0))
52+ then isDefined(w)
5153 else false)
52- then ScriptResult(t, TransferSet([ScriptTransfer(l.caller, l.fee, unit), ScriptTransfer(extract(v), u, a)]))
53- else ScriptResult(t, TransferSet([ScriptTransfer(l.caller, l.fee, unit)]))
54+ then ScriptResult(u, TransferSet([ScriptTransfer(m.caller, m.fee, unit), ScriptTransfer(extract(w), v, a)]))
55+ else ScriptResult(u, TransferSet([ScriptTransfer(m.caller, m.fee, unit)]))
5456 else throw("error")
5557
5658
57-func w (l,x) = (getString(this, (x + "_owner")) == toBase58String(l.caller.bytes))
59+func x (m,y) = (getString(this, (y + "_owner")) == toBase58String(m.caller.bytes))
5860
5961
60-func y (x) = (extract(getInteger(this, (x + "_amount"))) - extract(getInteger(this, (x + "_spent"))))
62+func z (y) = (extract(getInteger(this, (y + "_amount"))) - extract(getInteger(this, (y + "_spent"))))
6163
6264
63-func z (x) = {
64- let A = getInteger(this, (x + "_defeat"))
65- if ((A == 1))
65+func A (y) = {
66+ let B = getInteger(this, (y + "_defeat"))
67+ if ((B == 1))
6668 then true
67- else (A == 3)
69+ else (B == 3)
6870 }
6971
7072
71-func B (C) = getString(this, (C + "_referer"))
73+func C (D) = getString(this, (D + "_referer"))
7274
7375
74-func D (E,F) = {
75- let G = (E + "_balance")
76- DataEntry(G, (F + {
77- let p = getInteger(this, G)
78- if ($isInstanceOf(p, "Int"))
76+func E (F,G) = {
77+ let H = (F + "_balance")
78+ DataEntry(H, (G + {
79+ let q = getInteger(this, H)
80+ if ($isInstanceOf(q, "Int"))
7981 then {
80- let H = p
81- H
82+ let I = q
83+ I
8284 }
8385 else 0
8486 }))
8587 }
8688
8789
88-func I (E,J,F,K,L,M) = DataEntry(((("fund_" + E) + "_") + L), ((((((J + ":") + toString(F)) + ":") + K) + ":") + M))
90+func J (F,K,G,L,M,N) = DataEntry(((("fund_" + F) + "_") + M), ((((((K + ":") + toString(G)) + ":") + L) + ":") + N))
8991
9092
91-@Callable(l)
92-func bet (N,O,P,Q) = {
93- let J = toBase58String(l.caller.bytes)
94- let R = extract(l.payment)
95- if ((R.assetId != a))
93+@Callable(m)
94+func bet (O,P,Q,R) = {
95+ let K = toBase58String(m.caller.bytes)
96+ let S = extract(m.payment)
97+ if ((S.assetId != a))
9698 then throw(("bet must be in asset " + toBase58String(a)))
97- else if ((c > R.amount))
99+ else if ((c > S.amount))
98100 then throw(("minimum allowed bet is " + toString(c)))
99- else if (if ((P != "for"))
100- then (P != "against")
101+ else if (if ((Q != "for"))
102+ then (Q != "against")
101103 else false)
102104 then throw("unexpected side")
103105 else {
104- let x = (((((("bet_" + N) + "_") + toBase58String(l.caller.bytes)) + "_") + take(toBase58String(l.transactionId), 15)) + "_")
105- let S = ((("seq_" + N) + "_") + O)
106- let T = {
107- let p = getInteger(this, S)
108- if ($isInstanceOf(p, "Int"))
106+ let y = (((((("bet_" + O) + "_") + toBase58String(m.caller.bytes)) + "_") + take(toBase58String(m.transactionId), 15)) + "_")
107+ let T = ((("seq_" + O) + "_") + P)
108+ let U = {
109+ let q = getInteger(this, T)
110+ if ($isInstanceOf(q, "Int"))
109111 then {
110- let U = p
111- (U + 1)
112+ let V = q
113+ (V + 1)
112114 }
113115 else 1
114116 }
115- s(l, WriteSet([DataEntry((x + "owner"), J), DataEntry((x + "event"), N), DataEntry((x + "subevent"), O), DataEntry((x + "side"), P), DataEntry((x + "odds"), Q), DataEntry((x + "amount"), R.amount), DataEntry((x + "spent"), 0), DataEntry((x + "timestamp"), lastBlock.timestamp), DataEntry((x + "sequence"), T), DataEntry(S, T)]), 0, unit)
117+ t(m, WriteSet([DataEntry((y + "owner"), K), DataEntry((y + "event"), O), DataEntry((y + "subevent"), P), DataEntry((y + "side"), Q), DataEntry((y + "odds"), R), DataEntry((y + "amount"), S.amount), DataEntry((y + "spent"), 0), DataEntry((y + "timestamp"), lastBlock.timestamp), DataEntry((y + "sequence"), U), DataEntry(T, U)]), 0, unit)
116118 }
117119 }
118120
119121
120122
121-@Callable(l)
122-func cancel (x) = if ((getString(this, (x + "_owner")) != k(l, "autocancel")))
123+@Callable(m)
124+func cancel (y) = if ((getString(this, (y + "_owner")) != l(m, "autocancel")))
123125 then throw("must be owner or its delegate to cancel")
124126 else {
125- let u = extract(getInteger(this, (x + "_amount")))
126- let V = extract(getInteger(this, (x + "_spent")))
127- let W = (u - V)
128- s(l, WriteSet([DataEntry((x + "_spent"), u), DataEntry((x + "_cancel_amount"), W), DataEntry((x + "_cancel_tx"), toBase58String(l.transactionId))]), W, l.caller)
127+ let v = extract(getInteger(this, (y + "_amount")))
128+ let W = extract(getInteger(this, (y + "_spent")))
129+ let X = (v - W)
130+ t(m, WriteSet([DataEntry((y + "_spent"), v), DataEntry((y + "_cancel_amount"), X), DataEntry((y + "_cancel_tx"), toBase58String(m.transactionId))]), X, m.caller)
129131 }
130132
131133
132134
133-@Callable(l)
134-func betMatch (X,Y) = if ((getString(this, (X + "_event")) != getString(this, (Y + "_event"))))
135+@Callable(m)
136+func betMatch (Y,Z) = if ((getString(this, (Y + "_event")) != getString(this, (Z + "_event"))))
135137 then throw("event id must match")
136- else if ((getString(this, (X + "_subevent")) != getString(this, (Y + "_subevent"))))
138+ else if ((getString(this, (Y + "_subevent")) != getString(this, (Z + "_subevent"))))
137139 then throw("subevent id must match")
138- else if ((getString(this, (X + "_side")) != "for"))
140+ else if ((getString(this, (Y + "_side")) != "for"))
139141 then throw("invalid *for* bet")
140- else if ((getString(this, (Y + "_side")) != "against"))
142+ else if ((getString(this, (Z + "_side")) != "against"))
141143 then throw("invalid *against* bet")
142144 else {
143- let Z = getStringValue(this, (X + "_owner"))
144145 let aa = getStringValue(this, (Y + "_owner"))
145- let ab = extract(getString(this, (X + "_event")))
146- let ac = (((((((("match_" + ab) + "_") + takeRight(Z, 10)) + "_") + takeRight(aa, 10)) + "_") + toBase58String(l.transactionId)) + "_")
147- let Q = extract(getInteger(this, (X + "_odds")))
148- let ad = y(X)
149- let ae = y(Y)
150- let af = ad
151- let ag = ((ae * 100) / (Q - 100))
152- let ah = if ((af > ag))
153- then ag
154- else af
155- if ((d > ah))
146+ let ab = getStringValue(this, (Z + "_owner"))
147+ let ac = extract(getString(this, (Y + "_event")))
148+ let ad = (((((((("match_" + ac) + "_") + takeRight(aa, 10)) + "_") + takeRight(ab, 10)) + "_") + toBase58String(m.transactionId)) + "_")
149+ let R = extract(getInteger(this, (Y + "_odds")))
150+ let ae = z(Y)
151+ let af = z(Z)
152+ let ag = ae
153+ let ah = ((af * 100) / (R - 100))
154+ let ai = if ((ag > ah))
155+ then ah
156+ else ag
157+ if ((d > ai))
156158 then throw("match nominal too low")
157159 else {
158- let ai = ah
159- let aj = ((ah * (Q - 100)) / 100)
160- let ak = (ai + extract(getInteger(this, (X + "_spent"))))
160+ let aj = ai
161+ let ak = ((ai * (R - 100)) / 100)
161162 let al = (aj + extract(getInteger(this, (Y + "_spent"))))
162- if ((ak > extract(getInteger(this, (X + "_amount")))))
163+ let am = (ak + extract(getInteger(this, (Z + "_spent"))))
164+ if ((al > extract(getInteger(this, (Y + "_amount")))))
163165 then throw("invalid match")
164- else if ((al > extract(getInteger(this, (Y + "_amount")))))
166+ else if ((am > extract(getInteger(this, (Z + "_amount")))))
165167 then throw("invalid match")
166- else s(l, WriteSet([DataEntry((ac + "amount"), (ai + aj)), DataEntry((ac + "for"), X), DataEntry((ac + "against"), Y), DataEntry((X + "_spent"), ak), DataEntry((Y + "_spent"), al)]), 0, unit)
168+ else t(m, WriteSet([DataEntry((ad + "amount"), (aj + ak)), DataEntry((ad + "for"), Y), DataEntry((ad + "against"), Z), DataEntry((Y + "_spent"), al), DataEntry((Z + "_spent"), am)]), 0, unit)
167169 }
168170 }
169171
170172
171173
172-@Callable(l)
173-func approveDefeat (am,an) = if (if (isDefined(getInteger(this, (am + "_defeat"))))
174- then (an == 2)
174+@Callable(m)
175+func approveDefeat (an,ao) = if (if (isDefined(getInteger(this, (an + "_defeat"))))
176+ then (ao == 2)
175177 else false)
176178 then throw("can't dispute after approve")
177- else if ((getString(this, (am + "_owner")) != k(l, "autoapprove")))
179+ else if ((getString(this, (an + "_owner")) != l(m, "autoapprove")))
178180 then throw("must be owner or its delegate to approve")
179- else s(l, WriteSet([DataEntry((am + "_defeat"), an)]), 0, unit)
181+ else t(m, WriteSet([DataEntry((an + "_defeat"), ao)]), 0, unit)
180182
181183
182184
183-@Callable(l)
184-func payWinner (ao) = if (!(r(l)))
185+@Callable(m)
186+func payWinner (ap) = if (!(s(m)))
185187 then throw("error")
186- else if (isDefined(getInteger(this, (ao + "_paid"))))
188+ else if (isDefined(getInteger(this, (ap + "_paid"))))
187189 then throw("already paid")
188190 else {
189- let ap = extract(getString(this, (ao + "_for")))
190- let aq = extract(getString(this, (ao + "_against")))
191- let ar = z(ap)
192- let as = z(aq)
193- if (if (!(ar))
194- then !(as)
191+ let aq = extract(getString(this, (ap + "_for")))
192+ let ar = extract(getString(this, (ap + "_against")))
193+ let as = A(aq)
194+ let at = A(ar)
195+ if (if (!(as))
196+ then !(at)
195197 else false)
196198 then throw("no side approved defeat")
197199 else {
198- let at = if (ar)
199- then aq
200- else ap
201- let au = getStringValue(this, (at + "_owner"))
202- let u = extract(getInteger(this, (ao + "_amount")))
203- let av = toBase58String(l.transactionId)
204- let M = toString(lastBlock.timestamp)
200+ let au = if (as)
201+ then ar
202+ else aq
203+ let av = getStringValue(this, (au + "_owner"))
204+ let v = extract(getInteger(this, (ap + "_amount")))
205+ let aw = toBase58String(m.transactionId)
206+ let N = toString(lastBlock.timestamp)
207+ let ax = ((v * i) / 1000)
205208 ScriptResult(WriteSet({
206- let p = B(au)
207- if ($isInstanceOf(p, "String"))
209+ let q = C(av)
210+ if ($isInstanceOf(q, "String"))
208211 then {
209- let aw = p
210- let ax = ((u * e) / 1000)
211- let ay = ((u * h) / 1000)
212-[DataEntry((ao + "_paid"), toBase58String(l.transactionId)), D(au, ay), I(au, au, ay, "cashback", av, M), D(aw, ax), I(aw, au, ax, "l1", av, M), {
213- let az = B(aw)
214- if ($isInstanceOf(az, "String"))
212+ let ay = q
213+ let az = ((ax * e) / 1000)
214+ let aA = ((ax * h) / 1000)
215+[DataEntry((ap + "_paid"), toBase58String(m.transactionId)), E(av, aA), J(av, av, aA, "cashback", aw, N), E(ay, az), J(ay, av, az, "l1", aw, N), {
216+ let aB = C(ay)
217+ if ($isInstanceOf(aB, "String"))
215218 then {
216- let aA = az
217- let aB = ((u * f) / 1000)
218-[D(aA, aB), I(aA, au, aB, "l2", av, M), {
219- let aC = B(aA)
220- if ($isInstanceOf(aC, "String"))
219+ let aC = aB
220+ let aD = ((ax * f) / 1000)
221+[E(aC, aD), J(aC, av, aD, "l2", aw, N), {
222+ let aE = C(aC)
223+ if ($isInstanceOf(aE, "String"))
221224 then {
222- let aD = aC
223- let aE = ((u * g) / 1000)
224-[D(aD, aE), I(aD, au, aE, "l3", av, M), D(i, (((u - ax) - aB) - aE)), I(i, au, (((u - ax) - aB) - aE), "change", av, M)]
225+ let aF = aE
226+ let aG = ((ax * g) / 1000)
227+[E(aF, aG), J(aF, av, aG, "l3", aw, N), E(j, (((ax - az) - aD) - aG)), J(j, av, (((ax - az) - aD) - aG), "change", aw, N)]
225228 }
226- else [D(i, ((u - ax) - aB)), I(i, au, ((u - ax) - aB), "change", av, M)]
229+ else [E(j, ((ax - az) - aD)), J(j, av, ((ax - az) - aD), "change", aw, N)]
227230 }]
228231 }
229- else [D(i, (u - ax)), I(i, au, (u - ax), "change", av, M)]
232+ else [E(j, (ax - az)), J(j, av, (ax - az), "change", aw, N)]
230233 }]
231234 }
232- else [D(i, u), I(i, au, u, "change", av, M)]
233- }), TransferSet([ScriptTransfer(l.caller, l.fee, unit), ScriptTransfer(addressFromStringValue(au), u, a)]))
235+ else [E(j, ax), J(j, av, ax, "change", aw, N)]
236+ }), TransferSet([ScriptTransfer(m.caller, m.fee, unit), ScriptTransfer(addressFromStringValue(av), (v - ax), a)]))
234237 }
235238 }
236239
237240
238241
239-@Callable(l)
240-func delegate (aF,aG,aH) = s(l, WriteSet([DataEntry((("delegate_" + aF) + "_address"), toBase58String(l.caller.bytes)), DataEntry((("delegate_" + aF) + "_autoapprove"), aG), DataEntry((("delegate_" + aF) + "_autocancel"), aH)]), 0, unit)
242+@Callable(m)
243+func delegate (aH,aI,aJ) = t(m, WriteSet([DataEntry((("delegate_" + aH) + "_address"), toBase58String(m.caller.bytes)), DataEntry((("delegate_" + aH) + "_autoapprove"), aI), DataEntry((("delegate_" + aH) + "_autocancel"), aJ)]), 0, unit)
241244
242245
243246
244-@Callable(l)
245-func withdraw () = if (!(r(l)))
247+@Callable(m)
248+func withdraw () = if (!(s(m)))
246249 then throw("error")
247250 else {
248- let J = toBase58String(l.caller.bytes)
249- let av = toBase58String(l.transactionId)
250- let G = (J + "_balance")
251- let u = {
252- let p = getInteger(this, G)
253- if ($isInstanceOf(p, "Int"))
251+ let K = toBase58String(m.caller.bytes)
252+ let aw = toBase58String(m.transactionId)
253+ let H = (K + "_balance")
254+ let v = {
255+ let q = getInteger(this, H)
256+ if ($isInstanceOf(q, "Int"))
254257 then {
255- let H = p
256- H
258+ let I = q
259+ I
257260 }
258261 else 0
259262 }
260- if ((j > u))
261- then throw(("Min withdraw amount is" + toString(j)))
262- else ScriptResult(WriteSet([DataEntry(G, 0), DataEntry(((("withdraw_" + J) + "_") + av), ((toString(u) + ":") + toString(lastBlock.timestamp)))]), TransferSet([ScriptTransfer(l.caller, (u + l.fee), unit)]))
263+ if ((k > v))
264+ then throw(("Min withdraw amount is" + toString(k)))
265+ else ScriptResult(WriteSet([DataEntry(H, 0), DataEntry(((("withdraw_" + K) + "_") + aw), ((toString(v) + ":") + toString(lastBlock.timestamp)))]), TransferSet([ScriptTransfer(m.caller, (v + m.fee), unit)]))
263266 }
264267
265268
266269
267-@Callable(l)
268-func register (aI,aJ) = if (!(r(l)))
270+@Callable(m)
271+func register (aK,aL) = if (!(s(m)))
269272 then throw("error")
270- else if ((take(toBase58String(l.transactionId), 3) != "123"))
273+ else if ((take(toBase58String(m.transactionId), 3) != "123"))
271274 then throw("proof of work failed")
272275 else {
273- let J = toBase58String(l.caller.bytes)
274- if (isDefined(B(J)))
276+ let K = toBase58String(m.caller.bytes)
277+ if (isDefined(C(K)))
275278 then throw("Already registered")
276- else ScriptResult(WriteSet([DataEntry((J + "_referer"), aI), DataEntry(((aI + "_referral_") + J), J)]), TransferSet([ScriptTransfer(l.caller, l.fee, unit)]))
279+ else ScriptResult(WriteSet([DataEntry((K + "_referer"), aK), DataEntry(((aK + "_referral_") + K), K)]), TransferSet([ScriptTransfer(m.caller, m.fee, unit)]))
277280 }
278281
279282

github/deemru/w8io/169f3d6 
130.81 ms