tx · 4nXd4houXDdEj9nXWt6u3VpeUGSajGDCwe3yPW2sMp8k 3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9: -0.01400000 Waves 2019.11.26 01:16 [781382] smart account 3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9 > SELF 0.00000000 Waves
{ "type": 13, "id": "4nXd4houXDdEj9nXWt6u3VpeUGSajGDCwe3yPW2sMp8k", "fee": 1400000, "feeAssetId": null, "timestamp": 1574720216002, "version": 1, "sender": "3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9", "senderPublicKey": "AXt3aNDevk6MRY2RVvB3HzC5FgWDoMFZ4EuW9kHN9VpW", "proofs": [ "5eX8aVwYLxXmEadHZjuySN7EtJhh5vGrb56oUcXqMLb5CogLGzUyLdvaHtBR2SWWB2GhYMihZtVhsd7cBpQ8foK1" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMICAgAAAAFAQAAAAZwYXlyZWYAAAAEAAAAAmxkAAAABHVzZXIAAAAFcmVmZXIAAAAGcmVmc3VtBAAAAANsZGUIBQAAAAJsZAAAAARkYXRhBAAAAAdpc3JlZmVyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAEcmVmXwUAAAAEdXNlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAADCQAAAAAAAAIFAAAAB2lzcmVmZXICAAAAAAQAAAAHbGFzdGJhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAAB3dhbGxldF8FAAAABXJlZmVyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACmxhc3RyZWZiYWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACAgAAAAdyZWZwYXlfBQAA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ZgAAAAQFAAAABGRzbDQFAAAABHVzZXIFAAAABXJlZmVyBQAAAApyZWZwYXltZW50BQAAAARkc2w1AAAAAIGl1BY=", "chainId": 84, "height": 781382, "spentComplexity": 0 } View: original | compacted Prev: E99CVQApqSGgBbVHoHHNJWkcxEKEStWU5kjz5bjJoSp1 Next: CKBn3SEHtZqG6bDc1tw5jFAMoNHvo5k7ZUAHpbLyC6V1 Diff:
Old | New | Differences | |
---|---|---|---|
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | - | func B (b,C,D | |
117 | + | func B (b,C,D) = { | |
118 | 118 | let f = b.data | |
119 | - | let | |
120 | - | let A = WriteSet( | |
119 | + | let E = DataEntry(C, D) :: f | |
120 | + | let A = WriteSet(E) | |
121 | 121 | A | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | - | func | |
125 | + | func F (b,G,H) = { | |
126 | 126 | let f = b.data | |
127 | - | if (( | |
127 | + | if ((G == 100)) | |
128 | 128 | then { | |
129 | - | let | |
130 | - | let A = WriteSet( | |
129 | + | let E = DataEntry("numberofround", (H + 1)) :: f | |
130 | + | let A = WriteSet(E) | |
131 | 131 | A | |
132 | 132 | } | |
133 | 133 | else b | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | - | @Callable( | |
138 | - | func playbingo (K | |
139 | - | let | |
140 | - | let | |
141 | - | let | |
142 | - | let | |
143 | - | if (( | |
137 | + | @Callable(I) | |
138 | + | func playbingo (J,K,d) = { | |
139 | + | let L = extract(I.payment) | |
140 | + | let M = (value(L.amount) / 100000000) | |
141 | + | let N = parseIntValue(K) | |
142 | + | let O = N | |
143 | + | if ((O > M)) | |
144 | 144 | then throw("Ticket price is 1 WAVES") | |
145 | 145 | else { | |
146 | - | let | |
146 | + | let P = { | |
147 | 147 | let h = getInteger(this, "fondprize") | |
148 | 148 | if ($isInstanceOf(h, "Int")) | |
149 | 149 | then { | |
152 | 152 | } | |
153 | 153 | else 0 | |
154 | 154 | } | |
155 | - | let | |
156 | - | let m = WriteSet([ | |
157 | - | let | |
155 | + | let Q = DataEntry("fondprize", (P + (O / 2))) | |
156 | + | let m = WriteSet([Q]) | |
157 | + | let R = { | |
158 | 158 | let h = getInteger(this, "numberofround") | |
159 | 159 | if ($isInstanceOf(h, "Int")) | |
160 | 160 | then { | |
163 | 163 | } | |
164 | 164 | else 1 | |
165 | 165 | } | |
166 | - | let c = toString( | |
166 | + | let c = toString(I.caller) | |
167 | 167 | let p = w(m, c, d) | |
168 | - | let | |
168 | + | let S = { | |
169 | 169 | let h = getInteger(this, "ticketcount") | |
170 | 170 | if ($isInstanceOf(h, "Int")) | |
171 | 171 | then { | |
174 | 174 | } | |
175 | 175 | else 0 | |
176 | 176 | } | |
177 | - | let | |
178 | - | let t = x(p, | |
179 | - | let | |
180 | - | let v = B(t, | |
181 | - | let | |
182 | - | let | |
183 | - | let | |
184 | - | | |
177 | + | let T = (S + 1) | |
178 | + | let t = x(p, T) | |
179 | + | let U = ((((("ticket_" + toString(R)) + "_") + toString(T)) + "_") + c) | |
180 | + | let v = B(t, U, J) | |
181 | + | let V = F(v, T, R) | |
182 | + | let W = ((O * 10) * N) | |
183 | + | let X = a(V, c, d, W) | |
184 | + | X | |
185 | 185 | } | |
186 | 186 | } | |
187 | 187 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b,c,d,e) = { | |
5 | 5 | let f = b.data | |
6 | 6 | let g = { | |
7 | 7 | let h = getString(this, ("ref_" + c)) | |
8 | 8 | if ($isInstanceOf(h, "String")) | |
9 | 9 | then { | |
10 | 10 | let i = h | |
11 | 11 | i | |
12 | 12 | } | |
13 | 13 | else "" | |
14 | 14 | } | |
15 | 15 | if ((g == "")) | |
16 | 16 | then { | |
17 | 17 | let j = { | |
18 | 18 | let h = getInteger(this, ("wallet_" + d)) | |
19 | 19 | if ($isInstanceOf(h, "Int")) | |
20 | 20 | then { | |
21 | 21 | let i = h | |
22 | 22 | i | |
23 | 23 | } | |
24 | 24 | else 0 | |
25 | 25 | } | |
26 | 26 | let k = { | |
27 | 27 | let h = getInteger(this, ("refpay_" + d)) | |
28 | 28 | if ($isInstanceOf(h, "Int")) | |
29 | 29 | then { | |
30 | 30 | let i = h | |
31 | 31 | i | |
32 | 32 | } | |
33 | 33 | else 0 | |
34 | 34 | } | |
35 | 35 | let l = { | |
36 | 36 | let h = getInteger(this, ((("refpay_" + d) + "_") + c)) | |
37 | 37 | if ($isInstanceOf(h, "Int")) | |
38 | 38 | then { | |
39 | 39 | let i = h | |
40 | 40 | i | |
41 | 41 | } | |
42 | 42 | else 0 | |
43 | 43 | } | |
44 | 44 | let m = DataEntry(("wallet_" + d), (j + e)) :: f | |
45 | 45 | let n = DataEntry(("refpay_" + d), (k + e)) :: m | |
46 | 46 | let o = DataEntry(((("refpay_" + d) + "_") + c), (l + e)) :: n | |
47 | 47 | let p = WriteSet(o) | |
48 | 48 | p | |
49 | 49 | } | |
50 | 50 | else { | |
51 | 51 | let q = { | |
52 | 52 | let h = getInteger(this, ("wallet_" + g)) | |
53 | 53 | if ($isInstanceOf(h, "Int")) | |
54 | 54 | then { | |
55 | 55 | let i = h | |
56 | 56 | i | |
57 | 57 | } | |
58 | 58 | else 0 | |
59 | 59 | } | |
60 | 60 | let r = { | |
61 | 61 | let h = getInteger(this, ("refpay_" + g)) | |
62 | 62 | if ($isInstanceOf(h, "Int")) | |
63 | 63 | then { | |
64 | 64 | let i = h | |
65 | 65 | i | |
66 | 66 | } | |
67 | 67 | else 0 | |
68 | 68 | } | |
69 | 69 | let s = { | |
70 | 70 | let h = getInteger(this, ((("refpay_" + g) + "_") + c)) | |
71 | 71 | if ($isInstanceOf(h, "Int")) | |
72 | 72 | then { | |
73 | 73 | let i = h | |
74 | 74 | i | |
75 | 75 | } | |
76 | 76 | else 0 | |
77 | 77 | } | |
78 | 78 | let t = DataEntry(("wallet_" + g), (q + e)) :: f | |
79 | 79 | let u = DataEntry(("refpay_" + g), (r + e)) :: t | |
80 | 80 | let o = DataEntry(((("refpay_" + g) + "_") + c), (s + e)) :: u | |
81 | 81 | let v = WriteSet(o) | |
82 | 82 | v | |
83 | 83 | } | |
84 | 84 | } | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func w (b,c,d) = { | |
88 | 88 | let f = b.data | |
89 | 89 | let g = { | |
90 | 90 | let h = getString(this, ("ref_" + c)) | |
91 | 91 | if ($isInstanceOf(h, "String")) | |
92 | 92 | then { | |
93 | 93 | let i = h | |
94 | 94 | i | |
95 | 95 | } | |
96 | 96 | else "" | |
97 | 97 | } | |
98 | 98 | if ((g == "")) | |
99 | 99 | then { | |
100 | 100 | let m = DataEntry(("ref_" + c), d) :: f | |
101 | 101 | let n = DataEntry(((("refer_" + d) + "_") + c), c) :: m | |
102 | 102 | let p = WriteSet(n) | |
103 | 103 | p | |
104 | 104 | } | |
105 | 105 | else b | |
106 | 106 | } | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func x (b,y) = { | |
110 | 110 | let f = b.data | |
111 | 111 | let z = DataEntry("ticketcount", y) :: f | |
112 | 112 | let A = WriteSet(z) | |
113 | 113 | A | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | - | func B (b,C,D | |
117 | + | func B (b,C,D) = { | |
118 | 118 | let f = b.data | |
119 | - | let | |
120 | - | let A = WriteSet( | |
119 | + | let E = DataEntry(C, D) :: f | |
120 | + | let A = WriteSet(E) | |
121 | 121 | A | |
122 | 122 | } | |
123 | 123 | ||
124 | 124 | ||
125 | - | func | |
125 | + | func F (b,G,H) = { | |
126 | 126 | let f = b.data | |
127 | - | if (( | |
127 | + | if ((G == 100)) | |
128 | 128 | then { | |
129 | - | let | |
130 | - | let A = WriteSet( | |
129 | + | let E = DataEntry("numberofround", (H + 1)) :: f | |
130 | + | let A = WriteSet(E) | |
131 | 131 | A | |
132 | 132 | } | |
133 | 133 | else b | |
134 | 134 | } | |
135 | 135 | ||
136 | 136 | ||
137 | - | @Callable( | |
138 | - | func playbingo (K | |
139 | - | let | |
140 | - | let | |
141 | - | let | |
142 | - | let | |
143 | - | if (( | |
137 | + | @Callable(I) | |
138 | + | func playbingo (J,K,d) = { | |
139 | + | let L = extract(I.payment) | |
140 | + | let M = (value(L.amount) / 100000000) | |
141 | + | let N = parseIntValue(K) | |
142 | + | let O = N | |
143 | + | if ((O > M)) | |
144 | 144 | then throw("Ticket price is 1 WAVES") | |
145 | 145 | else { | |
146 | - | let | |
146 | + | let P = { | |
147 | 147 | let h = getInteger(this, "fondprize") | |
148 | 148 | if ($isInstanceOf(h, "Int")) | |
149 | 149 | then { | |
150 | 150 | let i = h | |
151 | 151 | i | |
152 | 152 | } | |
153 | 153 | else 0 | |
154 | 154 | } | |
155 | - | let | |
156 | - | let m = WriteSet([ | |
157 | - | let | |
155 | + | let Q = DataEntry("fondprize", (P + (O / 2))) | |
156 | + | let m = WriteSet([Q]) | |
157 | + | let R = { | |
158 | 158 | let h = getInteger(this, "numberofround") | |
159 | 159 | if ($isInstanceOf(h, "Int")) | |
160 | 160 | then { | |
161 | 161 | let i = h | |
162 | 162 | i | |
163 | 163 | } | |
164 | 164 | else 1 | |
165 | 165 | } | |
166 | - | let c = toString( | |
166 | + | let c = toString(I.caller) | |
167 | 167 | let p = w(m, c, d) | |
168 | - | let | |
168 | + | let S = { | |
169 | 169 | let h = getInteger(this, "ticketcount") | |
170 | 170 | if ($isInstanceOf(h, "Int")) | |
171 | 171 | then { | |
172 | 172 | let i = h | |
173 | 173 | i | |
174 | 174 | } | |
175 | 175 | else 0 | |
176 | 176 | } | |
177 | - | let | |
178 | - | let t = x(p, | |
179 | - | let | |
180 | - | let v = B(t, | |
181 | - | let | |
182 | - | let | |
183 | - | let | |
184 | - | | |
177 | + | let T = (S + 1) | |
178 | + | let t = x(p, T) | |
179 | + | let U = ((((("ticket_" + toString(R)) + "_") + toString(T)) + "_") + c) | |
180 | + | let v = B(t, U, J) | |
181 | + | let V = F(v, T, R) | |
182 | + | let W = ((O * 10) * N) | |
183 | + | let X = a(V, c, d, W) | |
184 | + | X | |
185 | 185 | } | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 |
github/deemru/w8io/169f3d6 73.26 ms ◑