tx · Ecsur6jBzNHdsPLssBFXTxAxxPTJpBu28rZvq9fys884

3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs:  -0.01400000 Waves

2019.09.08 04:37 [666460] smart account 3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs > SELF 0.00000000 Waves

{ "type": 13, "id": "Ecsur6jBzNHdsPLssBFXTxAxxPTJpBu28rZvq9fys884", "fee": 1400000, "feeAssetId": null, "timestamp": 1567906610267, "version": 1, "sender": "3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs", "senderPublicKey": "HSTmdhPrJF81ozDBaqVn8QVtV76oD7gzDfcHPQRdxdwW", "proofs": [ "4jGjNZm2YZRz6aXumfE7S5BenWGk84J3A2iN7cpsjBCPE6hYfjFjLb72MC6iVeWa6ioUBGcA9rjhyMnvaWkkuHLF" ], "script": "base64:AAIDAAAAAAAAAAAAAAAPAAAAAAlXaW5TZXJ2ZXIJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM045WG55UHBXeFlvaEtIN3o1ZEV1cThycG5vYnB5elByekUAAAAAB1dBVkVMRVQJAABoAAAAAgkAAGgAAAACAAAAAAAAAABkAAAAAAAAAAPoAAAAAAAAAAPoAAAAAApDT01NSVNTSU9OCQAAaQAAAAIJAABoAAAAAgAAAAAAAAAABQUAAAAHV0FWRUxFVAAAAAAAAAAD6AAAAAAOVGlja2V0c1BlcldhdmUAAAAAAAAAAGQAAAAAC0NVUlJFTlRHQU1FAgAAAA0kQ1VSUkVOVF9HQU1FAAAAAA9HQU1FU0NPVU5URVJLRVkCAAAACSRHQU1FX05VTQAAAAAKTEFTVFRJQ0tFVAIAAAAMJExBU1RfVElDS0VUAQAAAA5nZXRQbGF5ZXJzTGlzdAAAAAIAAAAGZ2FtZUlkAAAADWN1cnJlbnRQbGF5ZXIEAAAAEHBsYXllcnNQcmVzZW50ZWQJAQAAAAlpc0RlZmluZWQAAAABCQAEHQA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EAAAAB2JldERhdGEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAC0NVUlJFTlRHQU1FBQAAAAZnYW1lSWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAD0dBTUVTQ09VTlRFUktFWQUAAAAHZ2FtZU51bQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAGZ2FtZUlkAgAAAAFfBQAAABBwbGF5ZXJBZGRyZXNzU3RyAgAAAAhfdGlja2V0cwkBAAAACmdldFRpY2tldHMAAAADBQAAAAZnYW1lSWQFAAAAEHBsYXllckFkZHJlc3NTdHIFAAAACnBheW1lbnRBbXQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAGZ2FtZUlkAgAAAAhfcGxheWVycwkBAAAADmdldFBsYXllcnNMaXN0AAAAAgUAAAAGZ2FtZUlkBQAAABBwbGF5ZXJBZGRyZXNzU3RyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAApMQVNUVElDS0VUCQEAAAANZ2V0TGFzdFRpY2tldAAAAAEFAAAACnBheW1lbnRBbXQFAAAAA25pbAQAAAALdG9XaW5TZXJ2ZXIJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAJV2luU2VydmVyBQAAAApwYXltZW50QW10BQAAAAR1bml0BQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACCQEAAAAIV3JpdGVTZXQAAAABBQAAAAdiZXREYXRhCQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAAt0b1dpblNlcnZlcgAAAABkW6FK", "chainId": 84, "height": 666460, "spentComplexity": 0 } View: original | compacted Prev: 2czEBKTtMuub4QwDAHRCcsaiBPthXX4RRisAKGqWYsUA Next: 9neFdVeU3ZQLqUkpaePwb1SPAfHXkGUhMeuUSV9Y8CTj Diff:
OldNewDifferences
3737 }
3838
3939
40-func o (i,p,q) = {
41- let r = getIntegerValue(this, g)
42- let s = (q / b)
43- let t = (r + 1)
44- let u = (t + (s * d))
45- let v = ((l(toString(t)) + "_") + l(toString(u)))
46- let w = isDefined(getString(this, (((i + "_") + p) + "_tickets")))
47- if (w)
48- then {
49- let x = getStringValue(this, (((i + "_") + p) + "_tickets"))
50- ((x + " ") + v)
51- }
52- else v
53- }
54-
55-
56-func y () = {
57- let z = isDefined(getString(this, g))
58- if (!(z))
40+func o () = {
41+ let p = isDefined(getString(this, g))
42+ if (!(p))
5943 then 0
6044 else getIntegerValue(this, g)
6145 }
6246
6347
64-func A (q) = {
65- let r = y()
66- let s = (q / b)
67- (r + (s * d))
48+func q (i,r,s) = {
49+ let t = o()
50+ let u = (s / b)
51+ let v = (t + 1)
52+ let w = (v + (u * d))
53+ let x = ((l(toString(v)) + "_") + l(toString(w)))
54+ let y = isDefined(getString(this, (((i + "_") + r) + "_tickets")))
55+ if (y)
56+ then {
57+ let z = getStringValue(this, (((i + "_") + r) + "_tickets"))
58+ ((z + " ") + x)
59+ }
60+ else x
61+ }
62+
63+
64+func A (s) = {
65+ let t = o()
66+ let u = (s / b)
67+ (t + (u * d))
6868 }
6969
7070
8585
8686
8787 func G (C) = {
88- let i = getStringValue(this, e)
89- let H = isDefined(getString(this, (i + "_result")))
90- if (H)
88+ let H = isDefined(getString(this, e))
89+ if (!(H))
90+ then C
91+ else getStringValue(this, e)
92+ }
93+
94+
95+func I (C) = {
96+ let i = G(C)
97+ let J = isDefined(getString(this, (i + "_result")))
98+ if (J)
9199 then i
92100 else C
93101 }
94102
95103
96-@Callable(I)
104+@Callable(K)
97105 func bet () = {
98- let C = toBase58String(I.transactionId)
99- let i = G(C)
106+ let C = toBase58String(K.transactionId)
107+ let i = I(C)
100108 let D = B(i, C)
101- let J = extract(I.payment)
102- let q = J.amount
103- let K = isDefined(J.assetId)
104- let L = isDefined(J.assetId)
105- let M = toBase58String(I.callerPublicKey)
106- let N = addressFromPublicKey(fromBase58String(M))
107- if (K)
109+ let L = extract(K.payment)
110+ let s = L.amount
111+ let M = isDefined(L.assetId)
112+ let N = isDefined(L.assetId)
113+ let O = toBase58String(K.callerPublicKey)
114+ let P = addressFromPublicKey(fromBase58String(O))
115+ if (M)
108116 then throw("Bet amount must be in Waves")
109- else if (L)
117+ else if (N)
110118 then throw("Transaction's fee must be in Waves")
111119 else {
112- let p = toString(N)
113- let O = [DataEntry(e, i), DataEntry(f, D), DataEntry((i + "_players"), h(i, p)), DataEntry(g, A(q))]
114- let P = [ScriptTransfer(a, q, unit)]
115- ScriptResult(WriteSet(O), TransferSet(P))
120+ let r = toString(P)
121+ let Q = [DataEntry(e, i), DataEntry(f, D), DataEntry((((i + "_") + r) + "_tickets"), q(i, r, s)), DataEntry((i + "_players"), h(i, r)), DataEntry(g, A(s))]
122+ let R = [ScriptTransfer(a, s, unit)]
123+ ScriptResult(WriteSet(Q), TransferSet(R))
116124 }
117125 }
118126
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = addressFromStringValue("3N9XnyPpWxYohKH7z5dEuq8rpnobpyzPrzE")
55
66 let b = ((100 * 1000) * 1000)
77
88 let c = ((5 * b) / 1000)
99
1010 let d = 100
1111
1212 let e = "$CURRENT_GAME"
1313
1414 let f = "$GAME_NUM"
1515
1616 let g = "$LAST_TICKET"
1717
1818 func h (i,j) = {
1919 let k = isDefined(getString(this, (i + "_players")))
2020 if (!(k))
2121 then j
2222 else if (isDefined(getString(this, (((i + "_") + j) + "_tickets"))))
2323 then getStringValue(this, (i + "_players"))
2424 else ((getStringValue(this, (i + "_players")) + "_") + j)
2525 }
2626
2727
2828 func l (m) = {
2929 let n = size(m)
3030 if ((n == 0))
3131 then throw("Parameter size must be greater then 0")
3232 else if ((n > 99))
3333 then throw("Parameter size must be less then 100")
3434 else if ((10 > n))
3535 then (("0" + toString(n)) + m)
3636 else (toString(n) + m)
3737 }
3838
3939
40-func o (i,p,q) = {
41- let r = getIntegerValue(this, g)
42- let s = (q / b)
43- let t = (r + 1)
44- let u = (t + (s * d))
45- let v = ((l(toString(t)) + "_") + l(toString(u)))
46- let w = isDefined(getString(this, (((i + "_") + p) + "_tickets")))
47- if (w)
48- then {
49- let x = getStringValue(this, (((i + "_") + p) + "_tickets"))
50- ((x + " ") + v)
51- }
52- else v
53- }
54-
55-
56-func y () = {
57- let z = isDefined(getString(this, g))
58- if (!(z))
40+func o () = {
41+ let p = isDefined(getString(this, g))
42+ if (!(p))
5943 then 0
6044 else getIntegerValue(this, g)
6145 }
6246
6347
64-func A (q) = {
65- let r = y()
66- let s = (q / b)
67- (r + (s * d))
48+func q (i,r,s) = {
49+ let t = o()
50+ let u = (s / b)
51+ let v = (t + 1)
52+ let w = (v + (u * d))
53+ let x = ((l(toString(v)) + "_") + l(toString(w)))
54+ let y = isDefined(getString(this, (((i + "_") + r) + "_tickets")))
55+ if (y)
56+ then {
57+ let z = getStringValue(this, (((i + "_") + r) + "_tickets"))
58+ ((z + " ") + x)
59+ }
60+ else x
61+ }
62+
63+
64+func A (s) = {
65+ let t = o()
66+ let u = (s / b)
67+ (t + (u * d))
6868 }
6969
7070
7171 func B (i,C) = if ((i == C))
7272 then {
7373 let D = {
7474 let E = getInteger(this, f)
7575 if ($isInstanceOf(E, "Int"))
7676 then {
7777 let F = E
7878 F
7979 }
8080 else 0
8181 }
8282 toString((D + 1))
8383 }
8484 else toString(getIntegerValue(this, f))
8585
8686
8787 func G (C) = {
88- let i = getStringValue(this, e)
89- let H = isDefined(getString(this, (i + "_result")))
90- if (H)
88+ let H = isDefined(getString(this, e))
89+ if (!(H))
90+ then C
91+ else getStringValue(this, e)
92+ }
93+
94+
95+func I (C) = {
96+ let i = G(C)
97+ let J = isDefined(getString(this, (i + "_result")))
98+ if (J)
9199 then i
92100 else C
93101 }
94102
95103
96-@Callable(I)
104+@Callable(K)
97105 func bet () = {
98- let C = toBase58String(I.transactionId)
99- let i = G(C)
106+ let C = toBase58String(K.transactionId)
107+ let i = I(C)
100108 let D = B(i, C)
101- let J = extract(I.payment)
102- let q = J.amount
103- let K = isDefined(J.assetId)
104- let L = isDefined(J.assetId)
105- let M = toBase58String(I.callerPublicKey)
106- let N = addressFromPublicKey(fromBase58String(M))
107- if (K)
109+ let L = extract(K.payment)
110+ let s = L.amount
111+ let M = isDefined(L.assetId)
112+ let N = isDefined(L.assetId)
113+ let O = toBase58String(K.callerPublicKey)
114+ let P = addressFromPublicKey(fromBase58String(O))
115+ if (M)
108116 then throw("Bet amount must be in Waves")
109- else if (L)
117+ else if (N)
110118 then throw("Transaction's fee must be in Waves")
111119 else {
112- let p = toString(N)
113- let O = [DataEntry(e, i), DataEntry(f, D), DataEntry((i + "_players"), h(i, p)), DataEntry(g, A(q))]
114- let P = [ScriptTransfer(a, q, unit)]
115- ScriptResult(WriteSet(O), TransferSet(P))
120+ let r = toString(P)
121+ let Q = [DataEntry(e, i), DataEntry(f, D), DataEntry((((i + "_") + r) + "_tickets"), q(i, r, s)), DataEntry((i + "_players"), h(i, r)), DataEntry(g, A(s))]
122+ let R = [ScriptTransfer(a, s, unit)]
123+ ScriptResult(WriteSet(Q), TransferSet(R))
116124 }
117125 }
118126
119127

github/deemru/w8io/026f985 
35.59 ms