tx · AGArpRAYWjvpgtCpEyy9hYvupnhUQUvBrKx6PF4zD9iX 3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9: -0.01400000 Waves 2019.11.25 18:33 [780987] smart account 3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9 > SELF 0.00000000 Waves
{ "type": 13, "id": "AGArpRAYWjvpgtCpEyy9hYvupnhUQUvBrKx6PF4zD9iX", "fee": 1400000, "feeAssetId": null, "timestamp": 1574696146704, "version": 1, "sender": "3N17A1zqJZ1R2dZtMvyChQwSzepRZ1d98t9", "senderPublicKey": "AXt3aNDevk6MRY2RVvB3HzC5FgWDoMFZ4EuW9kHN9VpW", "proofs": [ "3Sfths84CdcaENv27uDJpsmBT2iHxvJ6sqVnSJAz39y2ojLsVQMLTfAw3Q7takg4kUterqskw6ADSwuhrUS6d8hq" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMICAgAAAAFAQAAAAZwYXlyZWYAAAAEAAAAAmxkAAAABHVzZXIAAAAFcmVmZXIAAAAGcmVmc3VtBAAAAANsZGUIBQAAAAJsZAAAAARkYXRhBAAAAAdpc3JlZmVyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMJAAEsAAAAAgUAAAAEdXNlcgIAAAAEX3JlZgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAgAAAAADCQAAAAAAAAIFAAAAB2lzcmVmZXICAAAAAAQAAAAHbGFzdGJhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAIFAAAABXJlZmVyAgAAAAdfd2FsbGV0AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAACmxhc3RyZWZiYWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAVyZWZlcgIAAAAH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EZHNsNAkBAAAADmNoZWNrbmV4dHJvdW5kAAAAAwUAAAAEZHNsMwUAAAAObmV3VGlja2V0Y291bnQFAAAAC251bWJlcnJvdW5kBAAAAApyZWZwYXltZW50CQAAaAAAAAIJAABoAAAAAgUAAAAJcGF5dGlja2V0AAAAAAAAAAAKBQAAAAF4BAAAAARkc2w1CQEAAAAGcGF5cmVmAAAABAUAAAAEZHNsNAUAAAAEdXNlcgUAAAAFcmVmZXIFAAAACnJlZnBheW1lbnQFAAAABGRzbDUAAAAAIARwdg==", "chainId": 84, "height": 780987, "spentComplexity": 0 } View: original | compacted Prev: 6q8rzNCd5znAKxmAP6uwyWzoX5KFzfQuUjdd4eTJm61j Next: AoUKh4WyLa31VuvEbFYdd8VhD1yjTdMBAEzq72eUWNcc Diff:
Old | New | Differences | |
---|---|---|---|
120 | 120 | let J = value(I.amount) | |
121 | 121 | let K = parseIntValue(H) | |
122 | 122 | let L = ((J * K) / 100000000) | |
123 | - | let M = (1 * K) | |
124 | - | if ((M > L)) | |
123 | + | if ((L > J)) | |
125 | 124 | then throw("Ticket price is 1 WAVES") | |
126 | 125 | else { | |
127 | - | let | |
126 | + | let M = { | |
128 | 127 | let h = getInteger(this, "fondprize") | |
129 | 128 | if ($isInstanceOf(h, "Int")) | |
130 | 129 | then { | |
133 | 132 | } | |
134 | 133 | else 0 | |
135 | 134 | } | |
136 | - | let | |
137 | - | let l = WriteSet([ | |
138 | - | let | |
135 | + | let N = DataEntry("fondprize", (M + (L / 2))) | |
136 | + | let l = WriteSet([N]) | |
137 | + | let O = { | |
139 | 138 | let h = getInteger(this, "numberofround") | |
140 | 139 | if ($isInstanceOf(h, "Int")) | |
141 | 140 | then { | |
146 | 145 | } | |
147 | 146 | let c = toString(F.caller) | |
148 | 147 | let n = t(l, c, d) | |
149 | - | let | |
148 | + | let P = { | |
150 | 149 | let h = getInteger(this, "ticketcount") | |
151 | 150 | if ($isInstanceOf(h, "Int")) | |
152 | 151 | then { | |
155 | 154 | } | |
156 | 155 | else 0 | |
157 | 156 | } | |
158 | - | let | |
159 | - | let q = u(n, | |
160 | - | let | |
161 | - | let s = y(q, | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | | |
157 | + | let Q = (P + 1) | |
158 | + | let q = u(n, Q) | |
159 | + | let R = ((((("ticket_" + toString(O)) + "_") + toString(Q)) + "_") + c) | |
160 | + | let s = y(q, R, G) | |
161 | + | let S = C(s, Q, O) | |
162 | + | let T = ((L * 10) * K) | |
163 | + | let U = a(S, c, d, T) | |
164 | + | U | |
166 | 165 | } | |
167 | 166 | } | |
168 | 167 |
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, (c + "_ref")) | |
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, (d + "_wallet")) | |
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, (d + "_refpay")) | |
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 = DataEntry((d + "_wallet"), (j + e)) :: f | |
36 | 36 | let m = DataEntry((d + "_refpay"), (k + e)) :: l | |
37 | 37 | let n = WriteSet(m) | |
38 | 38 | n | |
39 | 39 | } | |
40 | 40 | else { | |
41 | 41 | let o = { | |
42 | 42 | let h = getInteger(this, (g + "_wallet")) | |
43 | 43 | if ($isInstanceOf(h, "Int")) | |
44 | 44 | then { | |
45 | 45 | let i = h | |
46 | 46 | i | |
47 | 47 | } | |
48 | 48 | else 0 | |
49 | 49 | } | |
50 | 50 | let p = { | |
51 | 51 | let h = getInteger(this, (g + "_refpay")) | |
52 | 52 | if ($isInstanceOf(h, "Int")) | |
53 | 53 | then { | |
54 | 54 | let i = h | |
55 | 55 | i | |
56 | 56 | } | |
57 | 57 | else 0 | |
58 | 58 | } | |
59 | 59 | let q = DataEntry((g + "_wallet"), (o + e)) :: f | |
60 | 60 | let r = DataEntry((g + "_refpay"), (p + e)) :: q | |
61 | 61 | let s = WriteSet(r) | |
62 | 62 | s | |
63 | 63 | } | |
64 | 64 | } | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func t (b,c,d) = { | |
68 | 68 | let f = b.data | |
69 | 69 | let g = { | |
70 | 70 | let h = getString(this, (c + "_ref")) | |
71 | 71 | if ($isInstanceOf(h, "String")) | |
72 | 72 | then { | |
73 | 73 | let i = h | |
74 | 74 | i | |
75 | 75 | } | |
76 | 76 | else "" | |
77 | 77 | } | |
78 | 78 | if ((g == "")) | |
79 | 79 | then { | |
80 | 80 | let l = DataEntry((c + "_ref"), d) :: f | |
81 | 81 | let m = DataEntry((d + "_refer"), c) :: l | |
82 | 82 | let n = WriteSet(m) | |
83 | 83 | n | |
84 | 84 | } | |
85 | 85 | else b | |
86 | 86 | } | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func u (b,v) = { | |
90 | 90 | let f = b.data | |
91 | 91 | let w = DataEntry("ticketcount", v) :: f | |
92 | 92 | let x = WriteSet(w) | |
93 | 93 | x | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func y (b,z,A) = { | |
98 | 98 | let f = b.data | |
99 | 99 | let B = DataEntry(z, A) :: f | |
100 | 100 | let x = WriteSet(B) | |
101 | 101 | x | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func C (b,D,E) = { | |
106 | 106 | let f = b.data | |
107 | 107 | if ((D == 100)) | |
108 | 108 | then { | |
109 | 109 | let B = DataEntry("numberofround", (E + 1)) :: f | |
110 | 110 | let x = WriteSet(B) | |
111 | 111 | x | |
112 | 112 | } | |
113 | 113 | else b | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | @Callable(F) | |
118 | 118 | func playbingo (G,H,d) = { | |
119 | 119 | let I = extract(F.payment) | |
120 | 120 | let J = value(I.amount) | |
121 | 121 | let K = parseIntValue(H) | |
122 | 122 | let L = ((J * K) / 100000000) | |
123 | - | let M = (1 * K) | |
124 | - | if ((M > L)) | |
123 | + | if ((L > J)) | |
125 | 124 | then throw("Ticket price is 1 WAVES") | |
126 | 125 | else { | |
127 | - | let | |
126 | + | let M = { | |
128 | 127 | let h = getInteger(this, "fondprize") | |
129 | 128 | if ($isInstanceOf(h, "Int")) | |
130 | 129 | then { | |
131 | 130 | let i = h | |
132 | 131 | i | |
133 | 132 | } | |
134 | 133 | else 0 | |
135 | 134 | } | |
136 | - | let | |
137 | - | let l = WriteSet([ | |
138 | - | let | |
135 | + | let N = DataEntry("fondprize", (M + (L / 2))) | |
136 | + | let l = WriteSet([N]) | |
137 | + | let O = { | |
139 | 138 | let h = getInteger(this, "numberofround") | |
140 | 139 | if ($isInstanceOf(h, "Int")) | |
141 | 140 | then { | |
142 | 141 | let i = h | |
143 | 142 | i | |
144 | 143 | } | |
145 | 144 | else 1 | |
146 | 145 | } | |
147 | 146 | let c = toString(F.caller) | |
148 | 147 | let n = t(l, c, d) | |
149 | - | let | |
148 | + | let P = { | |
150 | 149 | let h = getInteger(this, "ticketcount") | |
151 | 150 | if ($isInstanceOf(h, "Int")) | |
152 | 151 | then { | |
153 | 152 | let i = h | |
154 | 153 | i | |
155 | 154 | } | |
156 | 155 | else 0 | |
157 | 156 | } | |
158 | - | let | |
159 | - | let q = u(n, | |
160 | - | let | |
161 | - | let s = y(q, | |
162 | - | let | |
163 | - | let | |
164 | - | let | |
165 | - | | |
157 | + | let Q = (P + 1) | |
158 | + | let q = u(n, Q) | |
159 | + | let R = ((((("ticket_" + toString(O)) + "_") + toString(Q)) + "_") + c) | |
160 | + | let s = y(q, R, G) | |
161 | + | let S = C(s, Q, O) | |
162 | + | let T = ((L * 10) * K) | |
163 | + | let U = a(S, c, d, T) | |
164 | + | U | |
166 | 165 | } | |
167 | 166 | } | |
168 | 167 | ||
169 | 168 |
github/deemru/w8io/169f3d6 58.32 ms ◑