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