tx · 9neFdVeU3ZQLqUkpaePwb1SPAfHXkGUhMeuUSV9Y8CTj

3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs:  -0.01400000 Waves

2019.09.08 04:38 [666464] smart account 3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs > SELF 0.00000000 Waves

{ "type": 13, "id": "9neFdVeU3ZQLqUkpaePwb1SPAfHXkGUhMeuUSV9Y8CTj", "fee": 1400000, "feeAssetId": null, "timestamp": 1567906717945, "version": 1, "sender": "3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs", "senderPublicKey": "HSTmdhPrJF81ozDBaqVn8QVtV76oD7gzDfcHPQRdxdwW", "proofs": [ "Qsh4DbUPmSz3VLzHZVhukCwPCR9s9TkSFP8q23u4EGGZUXcXs5meAdCUnM6mvswAv3saq87jhMxe7hWhLgNsqqg" ], "script": "base64:AAIDAAAAAAAAAAAAAAAPAAAAAAlXaW5TZXJ2ZXIJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM045WG55UHBXeFlvaEtIN3o1ZEV1cThycG5vYnB5elByekUAAAAAB1dBVkVMRVQJAABoAAAAAgkAAGgAAAACAAAAAAAAAABkAAAAAAAAAAPoAAAAAAAAAAPoAAAAAApDT01NSVNTSU9OCQAAaQAAAAIJAABoAAAAAgAAAAAAAAAABQUAAAAHV0FWRUxFVAAAAAAAAAAD6AAAAAAOVGlja2V0c1BlcldhdmUAAAAAAAAAAGQAAAAAC0NVUlJFTlRHQU1FAgAAAA0kQ1VSUkVOVF9HQU1FAAAAAA9HQU1FU0NPVU5URVJLRVkCAAAACSRHQU1FX05VTQAAAAAKTEFTVFRJQ0tFVAIAAAAMJExBU1RfVElDS0VUAQAAAA5nZXRQbGF5ZXJzTGlzdAAAAAIAAAAGZ2FtZUlkAAAADWN1cnJlbnRQbGF5ZXIEAAAAEHBsYXllcnNQcmVzZW50ZWQJAQAAAAlpc0RlZmluZWQAA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EHBsYXllckFkZHJlc3NTdHIJAAQlAAAAAQUAAAANcGxheWVyQWRkcmVzcwQAAAAHYmV0RGF0YQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAALQ1VSUkVOVEdBTUUFAAAABmdhbWVJZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAPR0FNRVNDT1VOVEVSS0VZBQAAAAdnYW1lTnVtCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAZnYW1lSWQCAAAAAV8FAAAAEHBsYXllckFkZHJlc3NTdHICAAAACF90aWNrZXRzCQEAAAAKZ2V0VGlja2V0cwAAAAMFAAAABmdhbWVJZAUAAAAQcGxheWVyQWRkcmVzc1N0cgUAAAAKcGF5bWVudEFtdAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAZnYW1lSWQCAAAACF9wbGF5ZXJzCQEAAAAOZ2V0UGxheWVyc0xpc3QAAAACBQAAAAZnYW1lSWQFAAAAEHBsYXllckFkZHJlc3NTdHIJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAACkxBU1RUSUNLRVQJAQAAAA1nZXRMYXN0VGlja2V0AAAAAQUAAAAKcGF5bWVudEFtdAUAAAADbmlsBAAAAAt0b1dpblNlcnZlcgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAlXaW5TZXJ2ZXIFAAAACnBheW1lbnRBbXQFAAAABHVuaXQFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEFAAAAB2JldERhdGEJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAAC3RvV2luU2VydmVyAAAAADBOFfM=", "chainId": 84, "height": 666464, "spentComplexity": 0 } View: original | compacted Prev: Ecsur6jBzNHdsPLssBFXTxAxxPTJpBu28rZvq9fys884 Next: GTzbatcbQzwCFmDwSEtuCbtGoJq8pvRi7e293TXrdpXE Diff:
OldNewDifferences
4949 let t = o()
5050 let u = (s / b)
5151 let v = (t + 1)
52- let w = (v + (u * d))
52+ let w = ((v + (u * d)) - 1)
5353 let x = ((l(toString(v)) + "_") + l(toString(w)))
5454 let y = isDefined(getString(this, (((i + "_") + r) + "_tickets")))
5555 if (y)
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
4040 func o () = {
4141 let p = isDefined(getString(this, g))
4242 if (!(p))
4343 then 0
4444 else getIntegerValue(this, g)
4545 }
4646
4747
4848 func q (i,r,s) = {
4949 let t = o()
5050 let u = (s / b)
5151 let v = (t + 1)
52- let w = (v + (u * d))
52+ let w = ((v + (u * d)) - 1)
5353 let x = ((l(toString(v)) + "_") + l(toString(w)))
5454 let y = isDefined(getString(this, (((i + "_") + r) + "_tickets")))
5555 if (y)
5656 then {
5757 let z = getStringValue(this, (((i + "_") + r) + "_tickets"))
5858 ((z + " ") + x)
5959 }
6060 else x
6161 }
6262
6363
6464 func A (s) = {
6565 let t = o()
6666 let u = (s / b)
6767 (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) = {
8888 let H = isDefined(getString(this, e))
8989 if (!(H))
9090 then C
9191 else getStringValue(this, e)
9292 }
9393
9494
9595 func I (C) = {
9696 let i = G(C)
9797 let J = isDefined(getString(this, (i + "_result")))
9898 if (J)
9999 then i
100100 else C
101101 }
102102
103103
104104 @Callable(K)
105105 func bet () = {
106106 let C = toBase58String(K.transactionId)
107107 let i = I(C)
108108 let D = B(i, C)
109109 let L = extract(K.payment)
110110 let s = L.amount
111111 let M = isDefined(L.assetId)
112112 let N = isDefined(L.assetId)
113113 let O = toBase58String(K.callerPublicKey)
114114 let P = addressFromPublicKey(fromBase58String(O))
115115 if (M)
116116 then throw("Bet amount must be in Waves")
117117 else if (N)
118118 then throw("Transaction's fee must be in Waves")
119119 else {
120120 let r = toString(P)
121121 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))]
122122 let R = [ScriptTransfer(a, s, unit)]
123123 ScriptResult(WriteSet(Q), TransferSet(R))
124124 }
125125 }
126126
127127

github/deemru/w8io/026f985 
38.90 ms