tx · 49gdCNhqeTzWhmk5Cbi9Nbko4BbSuwZNXXLt8xyC72L4 3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs: -0.01400000 Waves 2019.09.07 02:53 [664896] smart account 3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs > SELF 0.00000000 Waves
{ "type": 13, "id": "49gdCNhqeTzWhmk5Cbi9Nbko4BbSuwZNXXLt8xyC72L4", "fee": 1400000, "feeAssetId": null, "timestamp": 1567814030997, "version": 1, "sender": "3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs", "senderPublicKey": "HSTmdhPrJF81ozDBaqVn8QVtV76oD7gzDfcHPQRdxdwW", "proofs": [ "4oyZaNiwtso1fcaWsEo8sHskMHsCKJ5RFESWu5wyEG6J4EYHNp8A4Nyqw24u76D6gYfQdkCMUd3zDpJe5rRBvn3H" ], "script": "base64:AAIDAAAAAAAAAAAAAAALAAAAABJTZXJ2ZXJCZXRQdWJsaWNLZXkJAAJZAAAAAQIAAAAsN2ltOWNhaUNtRTRTTDZqVG00S1RpY0hINGJHUGY1djU5cm5mVUEzY0NSRGoAAAAAB1dBVkVMRVQJAABoAAAAAgkAAGgAAAACAAAAAAAAAABkAAAAAAAAAAPoAAAAAAAAAAPoAAAAAApDT01NSVNTSU9OCQAAaQAAAAIJAABoAAAAAgAAAAAAAAAABQUAAAAHV0FWRUxFVAAAAAAAAAAD6AAAAAAOVGlja2V0c1BlcldhdmUAAAAAAAAAAGQAAAAAC0NVUlJFTlRHQU1FAgAAAA0kQ1VSUkVOVF9HQU1FAAAAAA9HQU1FU0NPVU5URVJLRVkCAAAACSRHQU1FX05VTQAAAAAKTEFTVFRJQ0tFVAIAAAAMJExBU1RfVElDS0VUAQAAAA5nZXRQbGF5ZXJzTGlzdAAAAAIAAAAGZ2FtZUlkAAAADWN1cnJlbnRQbGF5ZXIEAAAAEHBsYXllcnNQcmVzZW50ZWQJAQAAAAlpc0RlZmluZWQAAAABCQEAAAARQGV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5XYXZlcwkAAAIAAAABAgAAABtCZXQgYW1vdW50IG11c3QgYmUgaW4gV2F2ZXMDBQAAAA1mZWVOb3RJbldhdmVzCQAAAgAAAAECAAAAIlRyYW5zYWN0aW9uJ3MgZmVlIG11c3QgYmUgaW4gV2F2ZXMEAAAAEHBsYXllckFkZHJlc3NTdHIJAAQlAAAAAQUAAAANcGxheWVyQWRkcmVzcwQAAAAHYmV0RGF0YQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAALQ1VSUkVOVEdBTUUFAAAABmdhbWVJZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAGZ2FtZUlkAgAAAAFfBQAAABBwbGF5ZXJBZGRyZXNzU3RyAgAAAAhfdGlja2V0cwkBAAAACmdldFRpY2tldHMAAAABCAUAAAADcG10AAAABmFtb3VudAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAZnYW1lSWQCAAAACF9wbGF5ZXJzCQEAAAAOZ2V0UGxheWVyc0xpc3QAAAACBQAAAAZnYW1lSWQFAAAAEHBsYXllckFkZHJlc3NTdHIFAAAAA25pbAkBAAAACFdyaXRlU2V0AAAAAQUAAAAHYmV0RGF0YQkAAAIAAAABAgAAAClUaGlzIGdhbWUgYWxyZWFkeSBlbmQsIHRyeSBtYWtlIGJldCBhZ2FpbgAAAACGvwbu", "chainId": 84, "height": 664896, "spentComplexity": 0 } View: original | compacted Prev: Hnuoz15zweps2xD8SoPhAYxaX6M3nVT9HcHcHLaoSjPU Next: 3xdgn5HftbjmQoJa5ao3AypK5rrSQmkZXK4BjLvajARm Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = fromBase58String("7im9caiCmE4SL6jTm4KTicHH4bGPf5v59rnfUA3cCRDj") | |
5 | 5 | ||
6 | 6 | let b = ((100 * 1000) * 1000) | |
7 | 7 | ||
8 | 8 | let c = ((5 * b) / 1000) | |
9 | 9 | ||
10 | 10 | let d = 100 | |
11 | 11 | ||
12 | 12 | let e = "$CURRENT_GAME" | |
13 | 13 | ||
14 | 14 | let f = "$GAME_NUM" | |
15 | 15 | ||
16 | 16 | let g = "$LAST_TICKET" | |
17 | 17 | ||
18 | 18 | func h (i,j) = { | |
19 | 19 | let k = isDefined(getStringValue(this, (i + "_players"))) | |
20 | 20 | if (!(k)) | |
21 | 21 | then j | |
22 | 22 | else if (isDefined(getStringValue(this, (((i + "_") + j) + "_tickets")))) | |
23 | 23 | then getStringValue(this, (i + "_players")) | |
24 | 24 | else ((getStringValue(this, (i + "_players")) + "_") + j) | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func l (m) = { | |
29 | 29 | let n = getIntegerValue(this, g) | |
30 | 30 | let o = (m / b) | |
31 | 31 | let p = "011_03100__03101_03300__010_010__010_010__010_010" | |
32 | 32 | p | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func q () = { | |
37 | 37 | let r = { | |
38 | 38 | let s = getInteger(this, f) | |
39 | 39 | if ($isInstanceOf(s, "Int")) | |
40 | 40 | then { | |
41 | 41 | let t = s | |
42 | 42 | t | |
43 | 43 | } | |
44 | 44 | else 0 | |
45 | 45 | } | |
46 | 46 | (r + 1) | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func u (v) = { | |
51 | 51 | let i = getStringValue(this, e) | |
52 | 52 | if ((i == "")) | |
53 | 53 | then v | |
54 | 54 | else i | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | @Callable(w) | |
59 | 59 | func gameEnd () = { | |
60 | 60 | let x = [DataEntry(e, "")] | |
61 | 61 | WriteSet(x) | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | ||
66 | 66 | @Callable(w) | |
67 | 67 | func bet () = { | |
68 | 68 | let v = toBase58String(w.transactionId) | |
69 | 69 | let i = u(v) | |
70 | 70 | let y = extract(w.payment) | |
71 | 71 | let z = isDefined(y.assetId) | |
72 | 72 | let A = isDefined(y.assetId) | |
73 | 73 | let B = toBase58String(w.callerPublicKey) | |
74 | 74 | let C = addressFromPublicKey(fromBase58String(B)) | |
75 | 75 | let D = isDefined(getString(this, (i + "_result"))) | |
76 | 76 | if (!(D)) | |
77 | 77 | then if (z) | |
78 | 78 | then throw("Bet amount must be in Waves") | |
79 | 79 | else if (A) | |
80 | 80 | then throw("Transaction's fee must be in Waves") | |
81 | 81 | else { | |
82 | 82 | let E = toString(C) | |
83 | 83 | let F = [DataEntry(e, i), DataEntry((((i + "_") + E) + "_tickets"), l(y.amount)), DataEntry((i + "_players"), h(i, E))] | |
84 | 84 | WriteSet(F) | |
85 | 85 | } | |
86 | 86 | else throw("This game already end, try make bet again") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 |
github/deemru/w8io/026f985 38.22 ms ◑