tx · GtvfjEuvtjzB9GoK3UJ2EcuqmFKCAj87nxabLxTUAEAQ 3N6UbaxTBjMS5jZmJ9cxqX3YGfe7bsQAzyn: -0.01400000 Waves 2020.01.04 00:00 [838203] smart account 3N6UbaxTBjMS5jZmJ9cxqX3YGfe7bsQAzyn > SELF 0.00000000 Waves
{ "type": 13, "id": "GtvfjEuvtjzB9GoK3UJ2EcuqmFKCAj87nxabLxTUAEAQ", "fee": 1400000, "feeAssetId": null, "timestamp": 1578085224173, "version": 1, "sender": "3N6UbaxTBjMS5jZmJ9cxqX3YGfe7bsQAzyn", "senderPublicKey": "6ZjaNmnAvx6D1PtkZEHppdJPoEJ9mhBhRTq8fcTT59Xd", "proofs": [ "44JS3otcGvReyZU9RXZJsXUuPWXrQahVddDTsMfVK5Dr8VX65yTcWTQZmVkMiTxJ4zE6TxhLg7b6ffLdFZDGNFkS" ], "script": "base64:AAIDAAAAAAAAAAkIARIDCgEBEgAAAAAOAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAN2aWcAAAAAAAAAADQAAAAACnJpc2tBbW91bnQAAAAAAAAAA+gAAAAADGJldFRocmVzaG9sZAAAAAAAAAAACgAAAAAGYmV0TWluAAAAAAAAAAACAAAAAAZiZXRNYXgAAAAAAAAAAGQBAAAACXExRXh0cmFjdAAAAAAEAAAAAnExAwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQIAAAAHcTFfbmV4dAUAAAAHcTFzdGFydAUAAAAHcTFzdGFydAUAAAACcTEBAAAACXEyRXh0cmFjdAAAAAAEAAAAAnEyAwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQIAAAAHcTJfbmV4dAUAAAAHcTJzdGFydAUAAAAHcTJzdGFydAUAAAACcTIBAAAAEmRlYnRBbW91bnQxRXh0cmFjdAAAAAAEAAAAC2RlYnRBbW91bnQxAwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkA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JQAAAAEIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgIAAAANX2V2ZW50MmFtb3VudAAAAAAAAAAAAAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgkAAGgAAAACBQAAAAxldmVudDJhbW91bnQAAAAAAAAPQkAFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAAClldmVudCBkaWQgbm90IGhhcHBlbiBvciB5b3UgaGF2ZSB6ZXJvIHdpbgAAAABC43+3", "chainId": 84, "height": 838203, "spentComplexity": 0 } View: original | compacted Prev: E7Va7TFWcsadevtdFM8uk4Aaqm9tHpbxFDA6ektZCQak Next: 5f8rhV2ezoHocaG57C9hRBWPjmLAKvQyD38piAn9iGrj Diff:
Old | New | Differences | |
---|---|---|---|
98 | 98 | } | |
99 | 99 | else throw("Payment not attached") | |
100 | 100 | } | |
101 | - | let B = if (!(isDefined("count"))) | |
102 | - | then getIntegerValue(this, "count") | |
103 | - | else 0 | |
101 | + | let B = getIntegerValue(this, "count") | |
104 | 102 | throw(toString(B)) | |
105 | 103 | } | |
106 | 104 |
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 = 52 | |
9 | 9 | ||
10 | 10 | let d = 1000 | |
11 | 11 | ||
12 | 12 | let e = 10 | |
13 | 13 | ||
14 | 14 | let f = 2 | |
15 | 15 | ||
16 | 16 | let g = 100 | |
17 | 17 | ||
18 | 18 | func h () = { | |
19 | 19 | let i = if (!(isDefined("q1_next"))) | |
20 | 20 | then a | |
21 | 21 | else a | |
22 | 22 | i | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func j () = { | |
27 | 27 | let k = if (!(isDefined("q2_next"))) | |
28 | 28 | then b | |
29 | 29 | else b | |
30 | 30 | k | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func l () = { | |
35 | 35 | let m = if (!(isDefined("debtAmount1"))) | |
36 | 36 | then getIntegerValue(this, "debtAmount1") | |
37 | 37 | else 0 | |
38 | 38 | m | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func n () = { | |
43 | 43 | let o = if (!(isDefined("debtAmount2"))) | |
44 | 44 | then getIntegerValue(this, "debtAmount2") | |
45 | 45 | else 0 | |
46 | 46 | o | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func p (q,r) = { | |
51 | 51 | let s = getIntegerValue(this, q) | |
52 | 52 | let t = (((1 * 100000) - (s * 1000)) / (g - e)) | |
53 | 53 | let u = ((1 * 100000) - (t * g)) | |
54 | 54 | let v = (((r * t) + u) / 1000) | |
55 | 55 | v | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func w (s,c) = { | |
60 | 60 | let w = pow(((c + 1000) - (100000 / s)), 0, -1, 0, 5, DOWN) | |
61 | 61 | w | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func x (r,m,o) = if ((0 > m)) | |
66 | 66 | then { | |
67 | 67 | let t = (((1 * 1000000) - (a * 10000)) / d) | |
68 | 68 | let u = ((1 * 1000000) - (t * d)) | |
69 | 69 | let i = ((-(t) * m) + (u / 1000)) | |
70 | 70 | let k = w(i, c) | |
71 | 71 | [i, k] | |
72 | 72 | } | |
73 | 73 | else if ((m > 0)) | |
74 | 74 | then { | |
75 | 75 | let t = (((1 * 1000000) - (a * 10000)) / d) | |
76 | 76 | let u = ((1 * 1000000) - (t * d)) | |
77 | 77 | let k = ((-(t) * o) + (u / 1000)) | |
78 | 78 | let i = w(k, c) | |
79 | 79 | [i, k] | |
80 | 80 | } | |
81 | 81 | else { | |
82 | 82 | let i = a | |
83 | 83 | let k = b | |
84 | 84 | [i, k] | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | @Callable(y) | |
89 | 89 | func bet (q) = { | |
90 | 90 | let r = { | |
91 | 91 | let z = y.payment | |
92 | 92 | if ($isInstanceOf(z, "AttachedPayment")) | |
93 | 93 | then { | |
94 | 94 | let A = z | |
95 | 95 | if ((f > A.amount)) | |
96 | 96 | then throw("low payment") | |
97 | 97 | else A.amount | |
98 | 98 | } | |
99 | 99 | else throw("Payment not attached") | |
100 | 100 | } | |
101 | - | let B = if (!(isDefined("count"))) | |
102 | - | then getIntegerValue(this, "count") | |
103 | - | else 0 | |
101 | + | let B = getIntegerValue(this, "count") | |
104 | 102 | throw(toString(B)) | |
105 | 103 | } | |
106 | 104 | ||
107 | 105 | ||
108 | 106 | ||
109 | 107 | @Callable(y) | |
110 | 108 | func withdraw () = { | |
111 | 109 | let C = { | |
112 | 110 | let z = getInteger(this, (toString(y.caller) + "__event1DebtForThisPlayer")) | |
113 | 111 | if ($isInstanceOf(z, "Unit")) | |
114 | 112 | then { | |
115 | 113 | let D = z | |
116 | 114 | 0 | |
117 | 115 | } | |
118 | 116 | else if ($isInstanceOf(z, "Int")) | |
119 | 117 | then { | |
120 | 118 | let E = z | |
121 | 119 | E | |
122 | 120 | } | |
123 | 121 | else throw() | |
124 | 122 | } | |
125 | 123 | let F = { | |
126 | 124 | let z = getInteger(this, (toString(y.caller) + "__event2DebtForThisPlayer")) | |
127 | 125 | if ($isInstanceOf(z, "Unit")) | |
128 | 126 | then { | |
129 | 127 | let D = z | |
130 | 128 | 0 | |
131 | 129 | } | |
132 | 130 | else if ($isInstanceOf(z, "Int")) | |
133 | 131 | then { | |
134 | 132 | let E = z | |
135 | 133 | E | |
136 | 134 | } | |
137 | 135 | else throw() | |
138 | 136 | } | |
139 | 137 | let G = { | |
140 | 138 | let z = getBoolean(this, "result_event_1") | |
141 | 139 | if ($isInstanceOf(z, "Unit")) | |
142 | 140 | then { | |
143 | 141 | let D = z | |
144 | 142 | false | |
145 | 143 | } | |
146 | 144 | else if ($isInstanceOf(z, "Boolean")) | |
147 | 145 | then { | |
148 | 146 | let u = z | |
149 | 147 | u | |
150 | 148 | } | |
151 | 149 | else throw() | |
152 | 150 | } | |
153 | 151 | let H = { | |
154 | 152 | let z = getBoolean(this, "result_event_2") | |
155 | 153 | if ($isInstanceOf(z, "Unit")) | |
156 | 154 | then { | |
157 | 155 | let D = z | |
158 | 156 | false | |
159 | 157 | } | |
160 | 158 | else if ($isInstanceOf(z, "Boolean")) | |
161 | 159 | then { | |
162 | 160 | let u = z | |
163 | 161 | u | |
164 | 162 | } | |
165 | 163 | else throw() | |
166 | 164 | } | |
167 | 165 | if (G) | |
168 | 166 | then ScriptResult(WriteSet([DataEntry((toString(y.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(y.caller, (C * 1000000), unit)])) | |
169 | 167 | else if (H) | |
170 | 168 | then ScriptResult(WriteSet([DataEntry((toString(y.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(y.caller, (F * 1000000), unit)])) | |
171 | 169 | else throw("event did not happen or you have zero win") | |
172 | 170 | } | |
173 | 171 | ||
174 | 172 |
github/deemru/w8io/169f3d6 45.22 ms ◑