tx · Bok6FsJjEFRFDR1rsesSEtQMzeWsbv5UbJGUFFLUQExU 3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH: -0.01400000 Waves 2019.09.17 11:25 [680001] smart account 3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH > SELF 0.00000000 Waves
{ "type": 13, "id": "Bok6FsJjEFRFDR1rsesSEtQMzeWsbv5UbJGUFFLUQExU", "fee": 1400000, "feeAssetId": null, "timestamp": 1568708689274, "version": 1, "sender": "3N78mWnEqz1PUDVJjBgoyivJpitqpxwVAgH", "senderPublicKey": "88re7tFwGU4jjye6Kxg3U4cKzYz7FooSWnqP2NNMfRt5", "proofs": [ "UqhXAHUFQHTs9RdTDJkF1ZRZyytP2ht5j5nKm9fddsiBBVtyh2q4UDpZy8isJKpLMU7WFC8CafmprZDipz2s63e" ], "script": "base64:AAIDAAAAAAAAAAAAAAAFAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAFzAAAAAAAAAAAKAQAAAARjb2VmAAAAAgAAAAFxAAAAA2RpZgkAAGkAAAACCQAAaAAAAAIFAAAAAXEJAABkAAAAAgkAAGgAAAACCQAAaAAAAAIA/////////9EFAAAAA2RpZgUAAAADZGlmAAAAAAAAACcQAAAAAAAAACcQAQAAAAthbm90aGVyY29lZgAAAAEAAAABcQQAAAADdmlnAAAAAAAAAAA0CQAAbAAAAAYJAABlAAAAAgkAAGQAAAACBQAAAAN2aWcAAAAAAAAAA+gJAABpAAAAAgAAAAAAAAGGoAUAAAABcQAAAAAAAAAAAAD//////////wAAAAAAAAAAAAAAAAAAAAAABQUAAAAERE9XTgAAAAIAAAAKY29udGV4dE9iagEAAAADYmV0AAAAAQAAAAVldmVudAQAAAABbgkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAABbgQAAAABbQkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwIAAAABb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AAWWx/8A==", "chainId": 84, "height": 680001, "spentComplexity": 0 } View: original | compacted Prev: 35SHfw2KPBjCwMwM5hwjTLo1y5ekXuEzJAgjjMMeQ1qH Next: BTx96z3wnvk1pRkPLahJUzZuntirF4bXYd27H4sQVtb4 Diff:
Old | New | Differences | |
---|---|---|---|
131 | 131 | then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(i.caller, (n * 1000000), unit)])) | |
132 | 132 | else if (x) | |
133 | 133 | then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(i.caller, (r * 1000000), unit)])) | |
134 | - | else throw(" | |
134 | + | else throw("event did not happen or you have zero win") | |
135 | 135 | } | |
136 | 136 | ||
137 | 137 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 190 | |
5 | 5 | ||
6 | 6 | let b = 190 | |
7 | 7 | ||
8 | 8 | let c = 10 | |
9 | 9 | ||
10 | 10 | func d (e,f) = ((e * (((-47 * f) * f) + 10000)) / 10000) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func g (e) = { | |
14 | 14 | let h = 52 | |
15 | 15 | pow(((h + 1000) - (100000 / e)), 0, -1, 0, 5, DOWN) | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | @Callable(i) | |
20 | 20 | func bet (j) = { | |
21 | 21 | let k = getIntegerValue(this, "n") | |
22 | 22 | let l = getIntegerValue(this, "m") | |
23 | 23 | let m = getIntegerValue(this, "count") | |
24 | 24 | let f = (k - l) | |
25 | 25 | let n = { | |
26 | 26 | let o = getInteger(this, (toString(i.caller) + "_event1amount")) | |
27 | 27 | if ($isInstanceOf(o, "Unit")) | |
28 | 28 | then { | |
29 | 29 | let p = o | |
30 | 30 | 0 | |
31 | 31 | } | |
32 | 32 | else if ($isInstanceOf(o, "Int")) | |
33 | 33 | then { | |
34 | 34 | let q = o | |
35 | 35 | q | |
36 | 36 | } | |
37 | 37 | else throw() | |
38 | 38 | } | |
39 | 39 | let r = { | |
40 | 40 | let o = getInteger(this, (toString(i.caller) + "_event2amount")) | |
41 | 41 | if ($isInstanceOf(o, "Unit")) | |
42 | 42 | then { | |
43 | 43 | let p = o | |
44 | 44 | 0 | |
45 | 45 | } | |
46 | 46 | else if ($isInstanceOf(o, "Int")) | |
47 | 47 | then { | |
48 | 48 | let q = o | |
49 | 49 | q | |
50 | 50 | } | |
51 | 51 | else throw() | |
52 | 52 | } | |
53 | 53 | if ((j == 1)) | |
54 | 54 | then if ((100 >= d(a, ((k + 1) - l)))) | |
55 | 55 | then throw("to low coef") | |
56 | 56 | else { | |
57 | 57 | let s = (k + 1) | |
58 | 58 | let t = (m + 1) | |
59 | 59 | WriteSet([DataEntry((toString(i.caller) + "_event1amount"), (n + d(a, (k - l)))), DataEntry((toString(t) + "_event"), j), DataEntry((toString(t) + "_qoef1"), d(a, (k - l))), DataEntry((toString(t) + "_qoef2"), g(d(a, (k - l)))), DataEntry("q1_next", d(a, ((k + 1) - l))), DataEntry("q2_next", g(d(a, ((k + 1) - l)))), DataEntry("n", s), DataEntry("count", t)]) | |
60 | 60 | } | |
61 | 61 | else if ((100 >= g(d(a, ((k - l) - 1))))) | |
62 | 62 | then throw("to low coef") | |
63 | 63 | else { | |
64 | 64 | let u = (l + 1) | |
65 | 65 | let t = (m + 1) | |
66 | 66 | WriteSet([DataEntry((toString(i.caller) + "_event2amount"), (r + g(d(a, (k - l))))), DataEntry((toString(t) + "_event"), j), DataEntry((toString(t) + "_qoef2"), g(d(a, (k - l)))), DataEntry("q1_next", d(a, ((k - 1) - l))), DataEntry("q2_next", g(d(a, ((k - 1) - l)))), DataEntry((toString(t) + "_qoef1"), d(a, (k - l))), DataEntry("m", u), DataEntry("count", t)]) | |
67 | 67 | } | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | ||
72 | 72 | @Callable(i) | |
73 | 73 | func withdraw () = { | |
74 | 74 | let n = { | |
75 | 75 | let o = getInteger(this, (toString(i.caller) + "_event1amount")) | |
76 | 76 | if ($isInstanceOf(o, "Unit")) | |
77 | 77 | then { | |
78 | 78 | let p = o | |
79 | 79 | 0 | |
80 | 80 | } | |
81 | 81 | else if ($isInstanceOf(o, "Int")) | |
82 | 82 | then { | |
83 | 83 | let q = o | |
84 | 84 | q | |
85 | 85 | } | |
86 | 86 | else throw() | |
87 | 87 | } | |
88 | 88 | let r = { | |
89 | 89 | let o = getInteger(this, (toString(i.caller) + "_event2amount")) | |
90 | 90 | if ($isInstanceOf(o, "Unit")) | |
91 | 91 | then { | |
92 | 92 | let p = o | |
93 | 93 | 0 | |
94 | 94 | } | |
95 | 95 | else if ($isInstanceOf(o, "Int")) | |
96 | 96 | then { | |
97 | 97 | let q = o | |
98 | 98 | q | |
99 | 99 | } | |
100 | 100 | else throw() | |
101 | 101 | } | |
102 | 102 | let v = { | |
103 | 103 | let o = getBoolean(this, "result_event_1") | |
104 | 104 | if ($isInstanceOf(o, "Unit")) | |
105 | 105 | then { | |
106 | 106 | let p = o | |
107 | 107 | false | |
108 | 108 | } | |
109 | 109 | else if ($isInstanceOf(o, "Boolean")) | |
110 | 110 | then { | |
111 | 111 | let w = o | |
112 | 112 | w | |
113 | 113 | } | |
114 | 114 | else throw() | |
115 | 115 | } | |
116 | 116 | let x = { | |
117 | 117 | let o = getBoolean(this, "result_event_2") | |
118 | 118 | if ($isInstanceOf(o, "Unit")) | |
119 | 119 | then { | |
120 | 120 | let p = o | |
121 | 121 | false | |
122 | 122 | } | |
123 | 123 | else if ($isInstanceOf(o, "Boolean")) | |
124 | 124 | then { | |
125 | 125 | let w = o | |
126 | 126 | w | |
127 | 127 | } | |
128 | 128 | else throw() | |
129 | 129 | } | |
130 | 130 | if (v) | |
131 | 131 | then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(i.caller, (n * 1000000), unit)])) | |
132 | 132 | else if (x) | |
133 | 133 | then ScriptResult(WriteSet([DataEntry((toString(i.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(i.caller, (r * 1000000), unit)])) | |
134 | - | else throw(" | |
134 | + | else throw("event did not happen or you have zero win") | |
135 | 135 | } | |
136 | 136 | ||
137 | 137 |
github/deemru/w8io/026f985 33.75 ms ◑