tx · Ds2FD1uGvSTGr473yiPwjXW5963phP91kuF7LjjttmVs 3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP: -0.01400000 Waves 2020.01.03 17:52 [837823] smart account 3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP > SELF 0.00000000 Waves
{ "type": 13, "id": "Ds2FD1uGvSTGr473yiPwjXW5963phP91kuF7LjjttmVs", "fee": 1400000, "feeAssetId": null, "timestamp": 1578063144386, "version": 1, "sender": "3MrC1oqVCoLkfHabhJtrLJS6GxcooQwRWuP", "senderPublicKey": "3bmZaUZ9wp3K1YZQFqTkN1oZzumQPi7WLQ9QowMaqqEZ", "proofs": [ "38yQXaJnXxWbNrfgKnxnD7P9Zopb4GwKihZnG3BRhZDnphE5XZDcNQmT5PTmJ3uLJUhqLJaXnU8NajZLzoPa4yXU" ], "script": "base64:AAIDAAAAAAAAAAkIARIDCgEBEgAAAAAOAAAAAAdxMXN0YXJ0AAAAAAAAAAC+AAAAAAdxMnN0YXJ0AAAAAAAAAAC+AAAAAAN2aWcAAAAAAAAAADQAAAAACnJpc2tBbW91bnQAAAAAAAAAA+gAAAAADGJldFRocmVzaG9sZAAAAAAAAAAACgAAAAAGYmV0TWluAAAAAAAAAAACAAAAAAZiZXRNYXgAAAAAAAAAAGQBAAAACXExRXh0cmFjdAAAAAAEAAAAAnExAwkBAAAACWlzRGVmaW5lZAAAAAECAAAAB3ExX25leHQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAAB3ExX25leHQFAAAAB3Exc3RhcnQFAAAAAnExAQAAAAlxMkV4dHJhY3QAAAAABAAAAAJxMgMJAQAAAAlpc0RlZmluZWQAAAABAgAAAAdxMl9uZXh0CQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzAgAAAAdxMl9uZXh0BQAAAAdxMnN0YXJ0BQAAAAJxMgEAAAASZGVidEFtb3VudDFFeHRyYWN0AAAAAAQAAAALZGVidEF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ABLAAAAAIJAAQlAAAAAQgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyAgAAAA1fZXZlbnQyYW1vdW50AAAAAAAAAAAABQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyCQAAaAAAAAIFAAAADGV2ZW50MmFtb3VudAAAAAAAAA9CQAUAAAAEdW5pdAUAAAADbmlsCQAAAgAAAAECAAAAKWV2ZW50IGRpZCBub3QgaGFwcGVuIG9yIHlvdSBoYXZlIHplcm8gd2luAAAAAEIdOZ0=", "chainId": 84, "height": 837823, "spentComplexity": 0 } View: original | compacted Prev: FTPgkFVmb66JK3ZRZvwmYUdKYn8aZLBHDt4e1T96EjWR Next: D4cHqUaVd8nJZRMptNGfzNfb6aVCd4yvrjutUSJKoyc8 Diff:
Old | New | Differences | |
---|---|---|---|
86 | 86 | ||
87 | 87 | ||
88 | 88 | @Callable(y) | |
89 | - | func bet (q) = throw("mdam") | |
89 | + | func bet (q) = { | |
90 | + | let r = { | |
91 | + | let z = y.payment | |
92 | + | if ($isInstanceOf(z, "AttachedPayment")) | |
93 | + | then { | |
94 | + | let A = z | |
95 | + | if ((f > A.amount)) | |
96 | + | then throw("low payment") | |
97 | + | else A.amount | |
98 | + | } | |
99 | + | else throw("Payment not attached") | |
100 | + | } | |
101 | + | let B = if (isDefined("count")) | |
102 | + | then getIntegerValue(this, "count") | |
103 | + | else 0 | |
104 | + | throw("count") | |
105 | + | } | |
90 | 106 | ||
91 | 107 | ||
92 | 108 | ||
93 | 109 | @Callable(y) | |
94 | 110 | func withdraw () = { | |
95 | - | let | |
96 | - | let | |
97 | - | if ($isInstanceOf( | |
111 | + | let C = { | |
112 | + | let z = getInteger(this, (toString(y.caller) + "__event1DebtForThisPlayer")) | |
113 | + | if ($isInstanceOf(z, "Unit")) | |
98 | 114 | then { | |
99 | - | let | |
115 | + | let D = z | |
100 | 116 | 0 | |
101 | 117 | } | |
102 | - | else if ($isInstanceOf( | |
118 | + | else if ($isInstanceOf(z, "Int")) | |
103 | 119 | then { | |
104 | - | let | |
105 | - | | |
120 | + | let E = z | |
121 | + | E | |
106 | 122 | } | |
107 | 123 | else throw() | |
108 | 124 | } | |
109 | - | let | |
110 | - | let | |
111 | - | if ($isInstanceOf( | |
125 | + | let F = { | |
126 | + | let z = getInteger(this, (toString(y.caller) + "__event2DebtForThisPlayer")) | |
127 | + | if ($isInstanceOf(z, "Unit")) | |
112 | 128 | then { | |
113 | - | let | |
129 | + | let D = z | |
114 | 130 | 0 | |
115 | 131 | } | |
116 | - | else if ($isInstanceOf( | |
132 | + | else if ($isInstanceOf(z, "Int")) | |
117 | 133 | then { | |
118 | - | let | |
119 | - | | |
134 | + | let E = z | |
135 | + | E | |
120 | 136 | } | |
121 | 137 | else throw() | |
122 | 138 | } | |
123 | - | let | |
124 | - | let | |
125 | - | if ($isInstanceOf( | |
139 | + | let G = { | |
140 | + | let z = getBoolean(this, "result_event_1") | |
141 | + | if ($isInstanceOf(z, "Unit")) | |
126 | 142 | then { | |
127 | - | let | |
143 | + | let D = z | |
128 | 144 | false | |
129 | 145 | } | |
130 | - | else if ($isInstanceOf( | |
146 | + | else if ($isInstanceOf(z, "Boolean")) | |
131 | 147 | then { | |
132 | - | let u = | |
148 | + | let u = z | |
133 | 149 | u | |
134 | 150 | } | |
135 | 151 | else throw() | |
136 | 152 | } | |
137 | - | let | |
138 | - | let | |
139 | - | if ($isInstanceOf( | |
153 | + | let H = { | |
154 | + | let z = getBoolean(this, "result_event_2") | |
155 | + | if ($isInstanceOf(z, "Unit")) | |
140 | 156 | then { | |
141 | - | let | |
157 | + | let D = z | |
142 | 158 | false | |
143 | 159 | } | |
144 | - | else if ($isInstanceOf( | |
160 | + | else if ($isInstanceOf(z, "Boolean")) | |
145 | 161 | then { | |
146 | - | let u = | |
162 | + | let u = z | |
147 | 163 | u | |
148 | 164 | } | |
149 | 165 | else throw() | |
150 | 166 | } | |
151 | - | if ( | |
152 | - | then ScriptResult(WriteSet([DataEntry((toString(y.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(y.caller, ( | |
153 | - | else if ( | |
154 | - | then ScriptResult(WriteSet([DataEntry((toString(y.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(y.caller, ( | |
167 | + | if (G) | |
168 | + | then ScriptResult(WriteSet([DataEntry((toString(y.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(y.caller, (C * 1000000), unit)])) | |
169 | + | else if (H) | |
170 | + | then ScriptResult(WriteSet([DataEntry((toString(y.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(y.caller, (F * 1000000), unit)])) | |
155 | 171 | else throw("event did not happen or you have zero win") | |
156 | 172 | } | |
157 | 173 |
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 getIntegerValue(this, "q1_next") | |
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 getIntegerValue(this, "q2_next") | |
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 | - | func bet (q) = throw("mdam") | |
89 | + | func bet (q) = { | |
90 | + | let r = { | |
91 | + | let z = y.payment | |
92 | + | if ($isInstanceOf(z, "AttachedPayment")) | |
93 | + | then { | |
94 | + | let A = z | |
95 | + | if ((f > A.amount)) | |
96 | + | then throw("low payment") | |
97 | + | else A.amount | |
98 | + | } | |
99 | + | else throw("Payment not attached") | |
100 | + | } | |
101 | + | let B = if (isDefined("count")) | |
102 | + | then getIntegerValue(this, "count") | |
103 | + | else 0 | |
104 | + | throw("count") | |
105 | + | } | |
90 | 106 | ||
91 | 107 | ||
92 | 108 | ||
93 | 109 | @Callable(y) | |
94 | 110 | func withdraw () = { | |
95 | - | let | |
96 | - | let | |
97 | - | if ($isInstanceOf( | |
111 | + | let C = { | |
112 | + | let z = getInteger(this, (toString(y.caller) + "__event1DebtForThisPlayer")) | |
113 | + | if ($isInstanceOf(z, "Unit")) | |
98 | 114 | then { | |
99 | - | let | |
115 | + | let D = z | |
100 | 116 | 0 | |
101 | 117 | } | |
102 | - | else if ($isInstanceOf( | |
118 | + | else if ($isInstanceOf(z, "Int")) | |
103 | 119 | then { | |
104 | - | let | |
105 | - | | |
120 | + | let E = z | |
121 | + | E | |
106 | 122 | } | |
107 | 123 | else throw() | |
108 | 124 | } | |
109 | - | let | |
110 | - | let | |
111 | - | if ($isInstanceOf( | |
125 | + | let F = { | |
126 | + | let z = getInteger(this, (toString(y.caller) + "__event2DebtForThisPlayer")) | |
127 | + | if ($isInstanceOf(z, "Unit")) | |
112 | 128 | then { | |
113 | - | let | |
129 | + | let D = z | |
114 | 130 | 0 | |
115 | 131 | } | |
116 | - | else if ($isInstanceOf( | |
132 | + | else if ($isInstanceOf(z, "Int")) | |
117 | 133 | then { | |
118 | - | let | |
119 | - | | |
134 | + | let E = z | |
135 | + | E | |
120 | 136 | } | |
121 | 137 | else throw() | |
122 | 138 | } | |
123 | - | let | |
124 | - | let | |
125 | - | if ($isInstanceOf( | |
139 | + | let G = { | |
140 | + | let z = getBoolean(this, "result_event_1") | |
141 | + | if ($isInstanceOf(z, "Unit")) | |
126 | 142 | then { | |
127 | - | let | |
143 | + | let D = z | |
128 | 144 | false | |
129 | 145 | } | |
130 | - | else if ($isInstanceOf( | |
146 | + | else if ($isInstanceOf(z, "Boolean")) | |
131 | 147 | then { | |
132 | - | let u = | |
148 | + | let u = z | |
133 | 149 | u | |
134 | 150 | } | |
135 | 151 | else throw() | |
136 | 152 | } | |
137 | - | let | |
138 | - | let | |
139 | - | if ($isInstanceOf( | |
153 | + | let H = { | |
154 | + | let z = getBoolean(this, "result_event_2") | |
155 | + | if ($isInstanceOf(z, "Unit")) | |
140 | 156 | then { | |
141 | - | let | |
157 | + | let D = z | |
142 | 158 | false | |
143 | 159 | } | |
144 | - | else if ($isInstanceOf( | |
160 | + | else if ($isInstanceOf(z, "Boolean")) | |
145 | 161 | then { | |
146 | - | let u = | |
162 | + | let u = z | |
147 | 163 | u | |
148 | 164 | } | |
149 | 165 | else throw() | |
150 | 166 | } | |
151 | - | if ( | |
152 | - | then ScriptResult(WriteSet([DataEntry((toString(y.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(y.caller, ( | |
153 | - | else if ( | |
154 | - | then ScriptResult(WriteSet([DataEntry((toString(y.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(y.caller, ( | |
167 | + | if (G) | |
168 | + | then ScriptResult(WriteSet([DataEntry((toString(y.caller) + "_event1amount"), 0)]), TransferSet([ScriptTransfer(y.caller, (C * 1000000), unit)])) | |
169 | + | else if (H) | |
170 | + | then ScriptResult(WriteSet([DataEntry((toString(y.caller) + "_event2amount"), 0)]), TransferSet([ScriptTransfer(y.caller, (F * 1000000), unit)])) | |
155 | 171 | else throw("event did not happen or you have zero win") | |
156 | 172 | } | |
157 | 173 | ||
158 | 174 |
github/deemru/w8io/026f985 43.31 ms ◑