tx · 9pAnbzNCLGuURtfJX6wFQU47v6Pp24hYbU1EtHRbohjw 3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs: -0.01400000 Waves 2019.09.07 03:38 [664944] smart account 3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs > SELF 0.00000000 Waves
{ "type": 13, "id": "9pAnbzNCLGuURtfJX6wFQU47v6Pp24hYbU1EtHRbohjw", "fee": 1400000, "feeAssetId": null, "timestamp": 1567816730043, "version": 1, "sender": "3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs", "senderPublicKey": "HSTmdhPrJF81ozDBaqVn8QVtV76oD7gzDfcHPQRdxdwW", "proofs": [ "5ApJ1SsqnqDbZRnfVkHf9bwxs7TNVXWAaP24jqNFg5hSeCDnGSePat8FtE18iF1mbRSzJuKbMVcXqWTSS6LZigCB" ], "script": "base64:AAIDAAAAAAAAAAAAAAALAAAAABJTZXJ2ZXJCZXRQdWJsaWNLZXkJAAJZAAAAAQIAAAAsN2ltOWNhaUNtRTRTTDZqVG00S1RpY0hINGJHUGY1djU5cm5mVUEzY0NSRGoAAAAAB1dBVkVMRVQJAABoAAAAAgkAAGgAAAACAAAAAAAAAABkAAAAAAAAAAPoAAAAAAAAAAPoAAAAAApDT01NSVNTSU9OCQAAaQAAAAIJAABoAAAAAgAAAAAAAAAABQUAAAAHV0FWRUxFVAAAAAAAAAAD6AAAAAAOVGlja2V0c1BlcldhdmUAAAAAAAAAAGQAAAAAC0NVUlJFTlRHQU1FAgAAAA0kQ1VSUkVOVF9HQU1FAAAAAA9HQU1FU0NPVU5URVJLRVkCAAAACSRHQU1FX05VTQAAAAAKTEFTVFRJQ0tFVAIAAAAMJExBU1RfVElDS0VUAQAAAA5nZXRQbGF5ZXJzTGlzdAAAAAIAAAAGZ2FtZUlkAAAADWN1cnJlbnRQbGF5ZXIEAAAAEHBsYXllcnNQcmVzZW50ZWQJAQAAAAlpc0RlZmluZWQAAAABCQEAAAARQGV4dHJO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DBQAAAA1iZXROb3RJbldhdmVzCQAAAgAAAAECAAAAG0JldCBhbW91bnQgbXVzdCBiZSBpbiBXYXZlcwMFAAAADWZlZU5vdEluV2F2ZXMJAAACAAAAAQIAAAAiVHJhbnNhY3Rpb24ncyBmZWUgbXVzdCBiZSBpbiBXYXZlcwQAAAAQcGxheWVyQWRkcmVzc1N0cgkABCUAAAABBQAAAA1wbGF5ZXJBZGRyZXNzBAAAAAdiZXREYXRhCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAtDVVJSRU5UR0FNRQUAAAAGZ2FtZUlkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAA9HQU1FU0NPVU5URVJLRVkFAAAAB2dhbWVOdW0JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAABmdhbWVJZAIAAAABXwUAAAAQcGxheWVyQWRkcmVzc1N0cgIAAAAIX3RpY2tldHMJAQAAAApnZXRUaWNrZXRzAAAAAQgFAAAAA3BtdAAAAAZhbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAGZ2FtZUlkAgAAAAhfcGxheWVycwkBAAAADmdldFBsYXllcnNMaXN0AAAAAgUAAAAGZ2FtZUlkBQAAABBwbGF5ZXJBZGRyZXNzU3RyBQAAAANuaWwJAQAAAAhXcml0ZVNldAAAAAEFAAAAB2JldERhdGEAAAAA3HwPVg==", "chainId": 84, "height": 664944, "spentComplexity": 0 } View: original | compacted Prev: 942HiodPA16FECR6g6LttxXovqdhobUs8A6eMdJbab8e Next: 9pLz7eev4hTAbL6UederunZSrj6zHEg8pMaFjVMmHDXz 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 (i,r) = if ((i == r)) | |
37 | 37 | then { | |
38 | 38 | let s = { | |
39 | 39 | let t = getInteger(this, f) | |
40 | 40 | if ($isInstanceOf(t, "Int")) | |
41 | 41 | then { | |
42 | 42 | let u = t | |
43 | 43 | u | |
44 | 44 | } | |
45 | 45 | else 0 | |
46 | 46 | } | |
47 | 47 | toString((s + 1)) | |
48 | 48 | } | |
49 | 49 | else toString(getIntegerValue(this, f)) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func v (r) = { | |
53 | 53 | let i = getStringValue(this, e) | |
54 | 54 | let w = isDefined(getString(this, (i + "_result"))) | |
55 | 55 | if (w) | |
56 | 56 | then i | |
57 | 57 | else r | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | @Callable(x) | |
62 | 62 | func bet () = { | |
63 | 63 | let r = toBase58String(x.transactionId) | |
64 | 64 | let i = v(r) | |
65 | 65 | let s = q(i, r) | |
66 | 66 | let y = extract(x.payment) | |
67 | 67 | let z = isDefined(y.assetId) | |
68 | 68 | let A = isDefined(y.assetId) | |
69 | 69 | let B = toBase58String(x.callerPublicKey) | |
70 | 70 | let C = addressFromPublicKey(fromBase58String(B)) | |
71 | 71 | if (z) | |
72 | 72 | then throw("Bet amount must be in Waves") | |
73 | 73 | else if (A) | |
74 | 74 | then throw("Transaction's fee must be in Waves") | |
75 | 75 | else { | |
76 | 76 | let D = toString(C) | |
77 | 77 | let E = [DataEntry(e, i), DataEntry(f, s), DataEntry((((i + "_") + D) + "_tickets"), l(y.amount)), DataEntry((i + "_players"), h(i, D))] | |
78 | 78 | WriteSet(E) | |
79 | 79 | } | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 |
github/deemru/w8io/026f985 37.91 ms ◑