tx · EoKn4XHR9LZ9DCp2iv64ieaLJk7nWbHmS65ciURcvaHo 3N8M61KCm8G72mK8PjacFbnnxdbFsyqQDeT: -0.01400000 Waves 2019.07.01 17:34 [566446] smart account 3N8M61KCm8G72mK8PjacFbnnxdbFsyqQDeT > SELF 0.00000000 Waves
{ "type": 13, "id": "EoKn4XHR9LZ9DCp2iv64ieaLJk7nWbHmS65ciURcvaHo", "fee": 1400000, "feeAssetId": null, "timestamp": 1561991708189, "version": 1, "sender": "3N8M61KCm8G72mK8PjacFbnnxdbFsyqQDeT", "senderPublicKey": "Bhyvkx4xdbEi4KPJNZSzx9gZgzgyLEsavuj2kYSt7SST", "proofs": [ "3YU4ERVFrev6Yu2zWvFo5xr2AMUTCHS2ajxPSCKQ61y3ZuBkPNzWd3JuhSGiiJdX1JsCeu7odbgnzFm9M3xUWJTb" ], "script": "base64:AAIDAAAAAAAAAAAAAAAlAAAAAA9TZXJ2ZXJQdWJsaWNLZXkBAAAAIL79hxhmqWX34iA/RS9p36FY3qCJjLclClmAz4vj6GlBAAAAAA1TZXJ2ZXJBZGRyZXNzCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNNdThvS1NjV0N3UjMzWW9tVDV1a1U3M1A3akxyeVpUazRzAAAAABBSb3VsZXR0ZVNlY3Rpb25zAAAAAAAAAAAVAAAAABFEYXRhR2FtZU51bWJlcktleQIAAAALQVBQX0dBTUVfSUQAAAAADURhdGFBbW91bnRLZXkCAAAABkFNT1VOVAAAAAAORGF0YVNlY3Rpb25LZXkCAAAAB1NFQ1RJT04AAAAADURhdGFTdGF0dXNLZXkCAAAABlNUQVRVUwAAAAANRGF0YVJlc3VsdEtleQIAAAAGUkVTVUxUAAAAAA1EYXRhU3RhdHVzTmV3AgAAAANORVcAAAAADURhdGFTdGF0dXNXaW4CAAAAA1dJTgAAAAAPRGF0YVN0YXR1c0xvb3NlAgAAAAVMT09TRQAAAAAHV0FWRUxFVAkAAG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RGF0YQAAAAMFAAAAEWdhbWVUcmFuc2FjdGlvbklkBQAAAA1EYXRhU3RhdHVzS2V5CQEAAAAJR2V0U3RhdHVzAAAAAQUAAAAFaXNXaW4JAARMAAAAAgkBAAAADFN0b3JlRGF0YUludAAAAAMFAAAAEWdhbWVUcmFuc2FjdGlvbklkBQAAAA1EYXRhUmVzdWx0S2V5BQAAAARyYW5kBQAAAANuaWwDBQAAAAVpc1dpbgkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAACHdyaXRlU2V0CQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADVNlcnZlckFkZHJlc3MFAAAACkNPTU1JU1NJT04FAAAABHVuaXQFAAAAA25pbAUAAAAId3JpdGVTZXQJAAACAAAAAQkAASwAAAACBQAAAA1FcnJvckdhbWVPdmVyBQAAAAZzdGF0dXMAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAADc3R4BQAAAAckbWF0Y2gwBgcHwoovog==", "chainId": 84, "height": 566446, "spentComplexity": 0 } View: original | compacted Prev: Hk5i5rsc32kDfMoXGPVcrRoDxTkWx7iYqzkems38h65M Next: 2CZ7UFXYCrbK4y5hjcr5eUcotxt42ci8foTcBbXDQf7H Diff:
Old | New | Differences | |
---|---|---|---|
131 | 131 | else (Y == (q + m))) | |
132 | 132 | then true | |
133 | 133 | else (Y == (r + m)) | |
134 | - | if (Z) | |
135 | - | then throw(("Valid amount: " + toString(Y))) | |
136 | - | else throw(C) | |
134 | + | Z | |
137 | 135 | } | |
138 | 136 | ||
139 | 137 | ||
151 | 149 | let aj = isDefined(ag.assetId) | |
152 | 150 | let ak = ag.amount | |
153 | 151 | let al = X(ag.amount) | |
154 | - | if (ac) | |
155 | - | then throw(B) | |
156 | - | else if (ai) | |
157 | - | then throw(w) | |
158 | - | else if (aj) | |
159 | - | then throw(x) | |
160 | - | else if (ah) | |
161 | - | then throw(y) | |
162 | - | else ScriptResult(WriteSet([DataEntry(ae, af), DataEntry(d, ad), H(ae, e, ak), H(ae, f, ab), D(ae, g, i)]), TransferSet([ScriptTransfer(b, m, unit)])) | |
152 | + | if (al) | |
153 | + | then throw(("ok winAmt " + toString(al))) | |
154 | + | else throw(("not ok winAmt " + toString(al))) | |
163 | 155 | } | |
164 | 156 | ||
165 | 157 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'DrYgfD7j6AKD1iXtn9uhMka95ATZB42B1kGKCUATP2UG' | |
5 | 5 | ||
6 | 6 | let b = addressFromStringValue("3Mu8oKScWCwR33YomT5ukU73P7jLryZTk4s") | |
7 | 7 | ||
8 | 8 | let c = 21 | |
9 | 9 | ||
10 | 10 | let d = "APP_GAME_ID" | |
11 | 11 | ||
12 | 12 | let e = "AMOUNT" | |
13 | 13 | ||
14 | 14 | let f = "SECTION" | |
15 | 15 | ||
16 | 16 | let g = "STATUS" | |
17 | 17 | ||
18 | 18 | let h = "RESULT" | |
19 | 19 | ||
20 | 20 | let i = "NEW" | |
21 | 21 | ||
22 | 22 | let j = "WIN" | |
23 | 23 | ||
24 | 24 | let k = "LOOSE" | |
25 | 25 | ||
26 | 26 | let l = ((100 * 1000) * 1000) | |
27 | 27 | ||
28 | 28 | let m = ((5 * l) / 1000) | |
29 | 29 | ||
30 | 30 | let n = (1 * l) | |
31 | 31 | ||
32 | 32 | let o = (2 * l) | |
33 | 33 | ||
34 | 34 | let p = (4 * l) | |
35 | 35 | ||
36 | 36 | let q = (8 * l) | |
37 | 37 | ||
38 | 38 | let r = (14 * l) | |
39 | 39 | ||
40 | 40 | let s = [0, 2, 20, 2, 5, 2, 10, 2, 6, 2, 5, 2, 6, 2, 5, 2, 10, 2, 5, 2, 6] | |
41 | 41 | ||
42 | 42 | let t = "Only waves accepted" | |
43 | 43 | ||
44 | 44 | let u = "Parameter size must be greater than 0" | |
45 | 45 | ||
46 | 46 | let v = "Parameter size must be less than 100" | |
47 | 47 | ||
48 | 48 | let w = "Bet amount must be in Waves" | |
49 | 49 | ||
50 | 50 | let x = "Transaction's fee must be in Waves" | |
51 | 51 | ||
52 | 52 | let y = "Passed txId had been used before. Game aborted." | |
53 | 53 | ||
54 | 54 | let z = "Key not found: " | |
55 | 55 | ||
56 | 56 | let A = "Game already is over" | |
57 | 57 | ||
58 | 58 | let B = "Incorrect section result" | |
59 | 59 | ||
60 | 60 | let C = "Bet amount is not in range" | |
61 | 61 | ||
62 | 62 | func D (E,F,G) = DataEntry(((E + "_") + F), G) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func H (E,F,G) = DataEntry(((E + "_") + F), G) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func I (E,F) = { | |
69 | 69 | let J = ((E + "_") + F) | |
70 | 70 | let K = getString(this, J) | |
71 | 71 | if ($isInstanceOf(K, "String")) | |
72 | 72 | then { | |
73 | 73 | let L = K | |
74 | 74 | L | |
75 | 75 | } | |
76 | 76 | else throw((z + J)) | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func M (E,F) = { | |
81 | 81 | let J = ((E + "_") + F) | |
82 | 82 | let K = getInteger(this, J) | |
83 | 83 | if ($isInstanceOf(K, "Int")) | |
84 | 84 | then { | |
85 | 85 | let L = K | |
86 | 86 | L | |
87 | 87 | } | |
88 | 88 | else throw((z + J)) | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func N () = { | |
93 | 93 | let O = { | |
94 | 94 | let K = getInteger(this, d) | |
95 | 95 | if ($isInstanceOf(K, "Int")) | |
96 | 96 | then { | |
97 | 97 | let P = K | |
98 | 98 | P | |
99 | 99 | } | |
100 | 100 | else 0 | |
101 | 101 | } | |
102 | 102 | (O + 1) | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func Q (R,S) = { | |
107 | 107 | let T = sigVerify(fromBase58String(R), fromBase58String(S), a) | |
108 | 108 | if (T) | |
109 | 109 | then { | |
110 | 110 | let U = (toInt(sha256(toBytes(S))) % c) | |
111 | 111 | if ((0 > U)) | |
112 | 112 | then (-1 * U) | |
113 | 113 | else U | |
114 | 114 | } | |
115 | 115 | else throw("Invalid RSA signature") | |
116 | 116 | } | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func V (W) = if (W) | |
120 | 120 | then j | |
121 | 121 | else k | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func X (Y) = { | |
125 | 125 | let Z = if (if (if (if ((Y == (n + m))) | |
126 | 126 | then true | |
127 | 127 | else (Y == (o + m))) | |
128 | 128 | then true | |
129 | 129 | else (Y == (p + m))) | |
130 | 130 | then true | |
131 | 131 | else (Y == (q + m))) | |
132 | 132 | then true | |
133 | 133 | else (Y == (r + m)) | |
134 | - | if (Z) | |
135 | - | then throw(("Valid amount: " + toString(Y))) | |
136 | - | else throw(C) | |
134 | + | Z | |
137 | 135 | } | |
138 | 136 | ||
139 | 137 | ||
140 | 138 | @Callable(aa) | |
141 | 139 | func bet (ab) = { | |
142 | 140 | let ac = if ((0 >= ab)) | |
143 | 141 | then true | |
144 | 142 | else (ab > 20) | |
145 | 143 | let ad = N() | |
146 | 144 | let ae = toBase58String(aa.transactionId) | |
147 | 145 | let af = toBase58String(aa.caller.bytes) | |
148 | 146 | let ag = extract(aa.payment) | |
149 | 147 | let ah = isDefined(getString(this, ae)) | |
150 | 148 | let ai = isDefined(ag.assetId) | |
151 | 149 | let aj = isDefined(ag.assetId) | |
152 | 150 | let ak = ag.amount | |
153 | 151 | let al = X(ag.amount) | |
154 | - | if (ac) | |
155 | - | then throw(B) | |
156 | - | else if (ai) | |
157 | - | then throw(w) | |
158 | - | else if (aj) | |
159 | - | then throw(x) | |
160 | - | else if (ah) | |
161 | - | then throw(y) | |
162 | - | else ScriptResult(WriteSet([DataEntry(ae, af), DataEntry(d, ad), H(ae, e, ak), H(ae, f, ab), D(ae, g, i)]), TransferSet([ScriptTransfer(b, m, unit)])) | |
152 | + | if (al) | |
153 | + | then throw(("ok winAmt " + toString(al))) | |
154 | + | else throw(("not ok winAmt " + toString(al))) | |
163 | 155 | } | |
164 | 156 | ||
165 | 157 | ||
166 | 158 | ||
167 | 159 | @Callable(aa) | |
168 | 160 | func result (ae,am) = { | |
169 | 161 | let U = Q(ae, am) | |
170 | 162 | let an = M(ae, f) | |
171 | 163 | let ao = I(ae, g) | |
172 | 164 | if ((ao == i)) | |
173 | 165 | then { | |
174 | 166 | let ap = (U == an) | |
175 | 167 | let aq = WriteSet([D(ae, g, V(ap)), H(ae, h, U)]) | |
176 | 168 | if (ap) | |
177 | 169 | then ScriptResult(aq, TransferSet([ScriptTransfer(b, m, unit)])) | |
178 | 170 | else aq | |
179 | 171 | } | |
180 | 172 | else throw((A + ao)) | |
181 | 173 | } | |
182 | 174 | ||
183 | 175 | ||
184 | 176 | @Verifier(ar) | |
185 | 177 | func as () = if (sigVerify(ar.bodyBytes, ar.proofs[0], ar.senderPublicKey)) | |
186 | 178 | then { | |
187 | 179 | let K = ar | |
188 | 180 | if ($isInstanceOf(K, "SetScriptTransaction")) | |
189 | 181 | then { | |
190 | 182 | let at = K | |
191 | 183 | true | |
192 | 184 | } | |
193 | 185 | else false | |
194 | 186 | } | |
195 | 187 | else false | |
196 | 188 |
github/deemru/w8io/169f3d6 44.26 ms ◑