tx · 8hEkaQ57fL34xsMdQrjtxk81VUcB1pHAs7aXdqnmsoSg
3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy: -0.14000000 Waves
2021.11.09 11:44 [1783240] smart account 3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy > SELF 0.00000000 Waves
{
"type": 13,
"id": "8hEkaQ57fL34xsMdQrjtxk81VUcB1pHAs7aXdqnmsoSg",
"fee": 14000000,
"feeAssetId": null,
"timestamp": 1636447454353,
"version": 2,
"chainId": 84,
"sender": "3N4LqYvK8toVfW83bVrzvm4VoA55PB21Bmy",
"senderPublicKey": "9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq",
"proofs": [
"4LJdciKVSue9TBqYVog1yfoB5VqCtrQRJHZvNoopdy25Wmm9QBZtbT5RQHdKeqqeLPnKdPGZCZ4zTzHRmtu86b8m",
"2XPmSGVHQHjYHJ7A7oM43sJSckDzwJaGekgPkArfRMmEosFe1QqQatK3Loqefv5Hf3DRZjo7HRZAdfPDMZUnEt5y"
],
"script": "base64:AAIFAAAAAAAAABwIAhIECgIBARIDCgEBEgASAwoBARIAEgASABIAAAAAHwAAAAAMYWRtaW5QdWJLZXkxAQAAACB8WGt7UsWljWcca/SparQip5nE5Sy5e44NxDRBaM1QeAAAAAAMYWRtaW5QdWJLZXkyAQAAACB8WGt7UsWljWcca/SparQip5nE5Sy5e44NxDRBaM1QeAAAAAAMYWRtaW5QdWJLZXkzAQAAACB8WGt7UsWljWcca/SparQip5nE5Sy5e44NxDRBaM1QeAAAAAAUYWRtaW5QdWJLZXlTdGFydFN0b3ABAAAAIHxYa3tSxaWNZxxr9KlqtCKnmcTlLLl7jg3ENEFozVB4AAAAAAlrZXlBY3RpdmUCAAAABmFjdGl2ZQAAAAAIa2V5Q2F1c2UCAAAADnNodXRkb3duX2NhdXNlAAAAAAxrZXlWb3RlU3RhcnQCAAAAEXZvdGVfc3RhcnRfaGVpZ2h0AAAAAAprZXlWb3RlRW5kAgA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29mcwAAAAAAAAAAAQUAAAAMYWRtaW5QdWJLZXkyAAAAAAAAAAABAAAAAAAAAAAABAAAABJhZG1pblB1YktleTNTaWduZWQDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAAMYWRtaW5QdWJLZXkzAAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAABJhZG1pblB1YktleTFTaWduZWQFAAAAEmFkbWluUHViS2V5MlNpZ25lZAUAAAASYWRtaW5QdWJLZXkzU2lnbmVkAAAAAAAAAAAC/+DPNg==",
"height": 1783240,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 2k1kxKHD4yWAwpfBvU5RcvzWBDwqhJUXkiRQTfSqUA81
Next: HyCJCJ92SvpdMnEz1pHjNMfMuMzqRQVxg6sf3JzdSJ7Z
Diff:
Old | New | | Differences |
---|
35 | 35 | | |
---|
36 | 36 | | let q = "total_ENNO_vote" |
---|
37 | 37 | | |
---|
38 | | - | let r = "total_ENNO_vote_share" |
---|
| 38 | + | let r = "_ENNO_claimed_amount" |
---|
39 | 39 | | |
---|
40 | | - | let s = "_ENNO_claimed_amount" |
---|
| 40 | + | let s = "_ENNO_last_claimed_amount" |
---|
41 | 41 | | |
---|
42 | | - | let t = "_ENNO_last_claimed_amount" |
---|
| 42 | + | let t = "share_" |
---|
43 | 43 | | |
---|
44 | | - | let u = "share_" |
---|
| 44 | + | let u = valueOrElse(getBoolean(this, e), true) |
---|
45 | 45 | | |
---|
46 | | - | let v = valueOrElse(getBoolean(this, e), true) |
---|
| 46 | + | let v = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' |
---|
47 | 47 | | |
---|
48 | | - | let w = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' |
---|
| 48 | + | let w = base58'6TmLfry3GRQoVSaesGSnp6NtZKveYgEopTLsjaGgXoso' |
---|
49 | 49 | | |
---|
50 | | - | let x = base58'6TmLfry3GRQoVSaesGSnp6NtZKveYgEopTLsjaGgXoso' |
---|
51 | | - | |
---|
52 | | - | func y (z) = [BooleanEntry(e, false), StringEntry(f, z)] |
---|
| 50 | + | func x (y) = [BooleanEntry(e, false), StringEntry(f, y)] |
---|
53 | 51 | | |
---|
54 | 52 | | |
---|
55 | | - | func A (B) = valueOrElse(getInteger(this, (toString(B) + o)), 0) |
---|
| 53 | + | func z (A) = valueOrElse(getInteger(this, (toString(A) + o)), 0) |
---|
56 | 54 | | |
---|
57 | 55 | | |
---|
58 | | - | func C () = valueOrElse(getInteger(this, p), 0) |
---|
| 56 | + | func B () = valueOrElse(getInteger(this, p), 0) |
---|
59 | 57 | | |
---|
60 | 58 | | |
---|
61 | | - | func D (B,E) = valueOrElse(getInteger(this, (toString(B) + E)), 0) |
---|
| 59 | + | func C (A,D) = valueOrElse(getInteger(this, (toString(A) + D)), 0) |
---|
62 | 60 | | |
---|
63 | 61 | | |
---|
64 | | - | func F (E) = valueOrElse(getInteger(this, E), 0) |
---|
| 62 | + | func E (D) = valueOrElse(getInteger(this, D), 0) |
---|
65 | 63 | | |
---|
66 | 64 | | |
---|
67 | | - | func G (H) = { |
---|
68 | | - | let I = getInteger(addressFromPublicKey(w), (u + toString(H))) |
---|
69 | | - | let J = { |
---|
70 | | - | let K = I |
---|
71 | | - | if ($isInstanceOf(K, "Int")) |
---|
| 65 | + | func F (G) = { |
---|
| 66 | + | let H = getInteger(addressFromPublicKey(v), (t + toString(G))) |
---|
| 67 | + | let I = { |
---|
| 68 | + | let J = H |
---|
| 69 | + | if ($isInstanceOf(J, "Int")) |
---|
72 | 70 | | then { |
---|
73 | | - | let L = K |
---|
74 | | - | L |
---|
| 71 | + | let K = J |
---|
| 72 | + | K |
---|
75 | 73 | | } |
---|
76 | | - | else if ($isInstanceOf(K, "Unit")) |
---|
| 74 | + | else if ($isInstanceOf(J, "Unit")) |
---|
77 | 75 | | then { |
---|
78 | | - | let L = K |
---|
| 76 | + | let K = J |
---|
79 | 77 | | throw("Only governance qualifiers can call this function.") |
---|
80 | 78 | | } |
---|
81 | 79 | | else throw("Match error") |
---|
82 | 80 | | } |
---|
83 | | - | J |
---|
| 81 | + | I |
---|
84 | 82 | | } |
---|
85 | 83 | | |
---|
86 | 84 | | |
---|
87 | | - | func M (H) = { |
---|
88 | | - | let N = getInteger(this, (toString(H) + s)) |
---|
89 | | - | let O = { |
---|
90 | | - | let K = N |
---|
91 | | - | if ($isInstanceOf(K, "Int")) |
---|
| 85 | + | func L (G) = { |
---|
| 86 | + | let M = getInteger(this, (toString(G) + r)) |
---|
| 87 | + | let N = { |
---|
| 88 | + | let J = M |
---|
| 89 | + | if ($isInstanceOf(J, "Int")) |
---|
92 | 90 | | then { |
---|
93 | | - | let L = K |
---|
94 | | - | L |
---|
| 91 | + | let K = J |
---|
| 92 | + | K |
---|
95 | 93 | | } |
---|
96 | | - | else if ($isInstanceOf(K, "Unit")) |
---|
| 94 | + | else if ($isInstanceOf(J, "Unit")) |
---|
97 | 95 | | then { |
---|
98 | | - | let L = K |
---|
| 96 | + | let K = J |
---|
99 | 97 | | 0 |
---|
100 | 98 | | } |
---|
101 | 99 | | else throw("Match error") |
---|
102 | 100 | | } |
---|
103 | | - | O |
---|
| 101 | + | N |
---|
104 | 102 | | } |
---|
105 | 103 | | |
---|
106 | 104 | | |
---|
107 | | - | func P (Q) = { |
---|
108 | | - | let R = (F(h) - height) |
---|
109 | | - | let L = fraction(Q, R, 100000000) |
---|
110 | | - | L |
---|
| 105 | + | func O (P) = { |
---|
| 106 | + | let Q = (E(h) - height) |
---|
| 107 | + | let K = fraction(P, Q, 100000000) |
---|
| 108 | + | K |
---|
111 | 109 | | } |
---|
112 | 110 | | |
---|
113 | 111 | | |
---|
114 | | - | @Callable(S) |
---|
115 | | - | func initVote (T,U) = if (!(v)) |
---|
| 112 | + | @Callable(R) |
---|
| 113 | + | func initVote (S,T) = if (!(u)) |
---|
116 | 114 | | then throw("DApp is inactive at this moment") |
---|
117 | | - | else if (!(containsElement([d], S.callerPublicKey))) |
---|
| 115 | + | else if (!(containsElement([d], R.callerPublicKey))) |
---|
118 | 116 | | then throw("Only admin can call this function") |
---|
119 | | - | else [IntegerEntry(g, T), IntegerEntry(h, U), IntegerEntry(q, 0), IntegerEntry(r, 0), IntegerEntry(n, 0), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_yes_share"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_no_share"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_height"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote")] |
---|
| 117 | + | else [IntegerEntry(g, S), IntegerEntry(h, T), IntegerEntry(q, 0), IntegerEntry(n, 0), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_yes_share"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_no_share"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_height"), DeleteEntry("3MtKR6Jr6tAT3ixw2AXFxwQQdYMhxz4sVn7_ENNO_vote_yes_share"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote"), DeleteEntry("total_ENNO_vote"), DeleteEntry("total_ENNO_vote_share")] |
---|
120 | 118 | | |
---|
121 | 119 | | |
---|
122 | 120 | | |
---|
123 | | - | @Callable(S) |
---|
124 | | - | func vote (V) = if (!(v)) |
---|
| 121 | + | @Callable(R) |
---|
| 122 | + | func vote (U) = if (!(u)) |
---|
125 | 123 | | then throw("DApp is inactive at this moment") |
---|
126 | | - | else if ((F(g) > height)) |
---|
| 124 | + | else if ((E(g) > height)) |
---|
127 | 125 | | then throw("Voting has not started yet.") |
---|
128 | | - | else if ((height > F(h))) |
---|
| 126 | + | else if ((height > E(h))) |
---|
129 | 127 | | then throw("Voting has already ended.") |
---|
130 | 128 | | else { |
---|
131 | | - | let W = F(n) |
---|
132 | | - | let X = D(S.caller, m) |
---|
133 | | - | let Y = D(S.caller, j) |
---|
134 | | - | let Z = D(S.caller, o) |
---|
135 | | - | let aa = (Y + V) |
---|
136 | | - | if ((0 > aa)) |
---|
| 129 | + | let V = E(n) |
---|
| 130 | + | let W = C(R.caller, m) |
---|
| 131 | + | let X = C(R.caller, j) |
---|
| 132 | + | let Y = C(R.caller, o) |
---|
| 133 | + | let Z = (X + U) |
---|
| 134 | + | if ((0 > Z)) |
---|
137 | 135 | | then throw("Vote amount is more than available.") |
---|
138 | 136 | | else { |
---|
139 | | - | let ab = (Z - Y) |
---|
140 | | - | let ac = P(V) |
---|
141 | | - | if ((V > ab)) |
---|
| 137 | + | let aa = (Y - X) |
---|
| 138 | + | let ab = O(U) |
---|
| 139 | + | if ((U > aa)) |
---|
142 | 140 | | then throw("Vote amount is more than available.") |
---|
143 | 141 | | else { |
---|
144 | | - | let ad = (X + ac) |
---|
145 | | - | let ae = (W + ad) |
---|
146 | | - | let af = F(q) |
---|
147 | | - | let ag = (af + ac) |
---|
148 | | - | [IntegerEntry((toString(S.caller) + m), ad), IntegerEntry((toString(S.caller) + j), aa), IntegerEntry(q, ag), IntegerEntry(n, ae)] |
---|
| 142 | + | let ac = (W + ab) |
---|
| 143 | + | let ad = (V + ac) |
---|
| 144 | + | let ae = E(q) |
---|
| 145 | + | let af = (ae + ab) |
---|
| 146 | + | [IntegerEntry((toString(R.caller) + m), ac), IntegerEntry((toString(R.caller) + j), Z), IntegerEntry(q, af), IntegerEntry(n, ad)] |
---|
149 | 147 | | } |
---|
150 | 148 | | } |
---|
151 | 149 | | } |
---|
152 | 150 | | |
---|
153 | 151 | | |
---|
154 | 152 | | |
---|
155 | | - | @Callable(S) |
---|
156 | | - | func lockENNO () = if (!(v)) |
---|
| 153 | + | @Callable(R) |
---|
| 154 | + | func lockENNO () = if (!(u)) |
---|
157 | 155 | | then throw("DApp is inactive at this moment") |
---|
158 | 156 | | else { |
---|
159 | | - | let ah = $Tuple2(S.payments[0].amount, S.payments[0].assetId) |
---|
160 | | - | let ai = ah._1 |
---|
161 | | - | let aj = ah._2 |
---|
162 | | - | if ((aj != x)) |
---|
| 157 | + | let ag = $Tuple2(R.payments[0].amount, R.payments[0].assetId) |
---|
| 158 | + | let ah = ag._1 |
---|
| 159 | + | let ai = ag._2 |
---|
| 160 | + | if ((ai != w)) |
---|
163 | 161 | | then throw("Incorrect payment assetId only Enno Cash is allowed.") |
---|
164 | 162 | | else { |
---|
165 | | - | let Z = A(S.caller) |
---|
166 | | - | let ak = (Z + ai) |
---|
167 | | - | let al = C() |
---|
168 | | - | let am = (al + ai) |
---|
169 | | - | [IntegerEntry((toString(S.caller) + o), ak), IntegerEntry(p, am)] |
---|
| 163 | + | let Y = z(R.caller) |
---|
| 164 | + | let aj = (Y + ah) |
---|
| 165 | + | let ak = B() |
---|
| 166 | + | let al = (ak + ah) |
---|
| 167 | + | [IntegerEntry((toString(R.caller) + o), aj), IntegerEntry(p, al)] |
---|
170 | 168 | | } |
---|
171 | 169 | | } |
---|
172 | 170 | | |
---|
173 | 171 | | |
---|
174 | 172 | | |
---|
175 | | - | @Callable(S) |
---|
176 | | - | func withdrawENNO (an) = if (!(v)) |
---|
| 173 | + | @Callable(R) |
---|
| 174 | + | func withdrawENNO (am) = if (!(u)) |
---|
177 | 175 | | then throw("DApp is inactive at this moment") |
---|
178 | | - | else if ((0 >= an)) |
---|
| 176 | + | else if ((0 >= am)) |
---|
179 | 177 | | then throw("withdrawAmount <= 0") |
---|
180 | 178 | | else { |
---|
181 | | - | let al = C() |
---|
182 | | - | let Z = A(S.caller) |
---|
183 | | - | if ((an > al)) |
---|
| 179 | + | let ak = B() |
---|
| 180 | + | let Y = z(R.caller) |
---|
| 181 | + | if ((am > ak)) |
---|
184 | 182 | | then throw("withdrawAmount is more than available to withdraw") |
---|
185 | | - | else if ((an > Z)) |
---|
| 183 | + | else if ((am > Y)) |
---|
186 | 184 | | then throw("You are trying to unstake more than you have staked.") |
---|
187 | 185 | | else { |
---|
188 | | - | let am = (al - an) |
---|
189 | | - | let ao = (Z - an) |
---|
190 | | - | [IntegerEntry((toString(S.caller) + o), ao), IntegerEntry(p, am), ScriptTransfer(S.caller, an, x)] |
---|
| 186 | + | let al = (ak - am) |
---|
| 187 | + | let an = (Y - am) |
---|
| 188 | + | [IntegerEntry((toString(R.caller) + o), an), IntegerEntry(p, al), ScriptTransfer(R.caller, am, w)] |
---|
191 | 189 | | } |
---|
192 | 190 | | } |
---|
193 | 191 | | |
---|
194 | 192 | | |
---|
195 | 193 | | |
---|
196 | | - | @Callable(S) |
---|
197 | | - | func claimAndWithdrawENNO () = if (!(v)) |
---|
| 194 | + | @Callable(R) |
---|
| 195 | + | func claimAndWithdrawENNO () = if (!(u)) |
---|
198 | 196 | | then throw("DApp is inactive at this moment") |
---|
199 | 197 | | else { |
---|
200 | | - | let ap = G(S.originCaller) |
---|
201 | | - | let aq = M(S.originCaller) |
---|
202 | | - | let ar = (ap - aq) |
---|
203 | | - | let al = C() |
---|
204 | | - | if ((ar > al)) |
---|
| 198 | + | let ao = F(R.originCaller) |
---|
| 199 | + | let ap = L(R.originCaller) |
---|
| 200 | + | let aq = (ao - ap) |
---|
| 201 | + | let ak = B() |
---|
| 202 | + | if ((aq > ak)) |
---|
205 | 203 | | then throw("claimAmount is more than available to withdraw") |
---|
206 | | - | else if ((0 >= ar)) |
---|
| 204 | + | else if ((0 >= aq)) |
---|
207 | 205 | | then throw("Claim amount must be bigger than 0") |
---|
208 | 206 | | else { |
---|
209 | | - | let as = (aq + ar) |
---|
210 | | - | [IntegerEntry((toString(S.originCaller) + s), as), IntegerEntry((toString(S.originCaller) + t), ar), ScriptTransfer(S.originCaller, ar, x)] |
---|
| 207 | + | let ar = (ap + aq) |
---|
| 208 | + | [IntegerEntry((toString(R.originCaller) + r), ar), IntegerEntry((toString(R.originCaller) + s), aq), ScriptTransfer(R.originCaller, aq, w)] |
---|
211 | 209 | | } |
---|
212 | 210 | | } |
---|
213 | 211 | | |
---|
214 | 212 | | |
---|
215 | 213 | | |
---|
216 | | - | @Callable(S) |
---|
217 | | - | func claimAndStakeENNO () = if (!(v)) |
---|
| 214 | + | @Callable(R) |
---|
| 215 | + | func claimAndStakeENNO () = if (!(u)) |
---|
218 | 216 | | then throw("DApp is inactive at this moment") |
---|
219 | 217 | | else { |
---|
220 | | - | let ap = G(S.originCaller) |
---|
221 | | - | let aq = M(S.originCaller) |
---|
222 | | - | let ar = (ap - aq) |
---|
223 | | - | if ((0 >= ar)) |
---|
| 218 | + | let ao = F(R.originCaller) |
---|
| 219 | + | let ap = L(R.originCaller) |
---|
| 220 | + | let aq = (ao - ap) |
---|
| 221 | + | if ((0 >= aq)) |
---|
224 | 222 | | then throw("Claim amount must be bigger than 0") |
---|
225 | 223 | | else { |
---|
226 | | - | let as = (aq + ar) |
---|
227 | | - | let Z = A(S.originCaller) |
---|
228 | | - | let ak = (Z + ar) |
---|
229 | | - | let al = C() |
---|
230 | | - | let am = (al + ar) |
---|
231 | | - | [IntegerEntry((toString(S.originCaller) + o), ak), IntegerEntry((toString(S.originCaller) + s), as), IntegerEntry((toString(S.originCaller) + t), ar), IntegerEntry(p, am)] |
---|
| 224 | + | let ar = (ap + aq) |
---|
| 225 | + | let Y = z(R.originCaller) |
---|
| 226 | + | let aj = (Y + aq) |
---|
| 227 | + | let ak = B() |
---|
| 228 | + | let al = (ak + aq) |
---|
| 229 | + | [IntegerEntry((toString(R.originCaller) + o), aj), IntegerEntry((toString(R.originCaller) + r), ar), IntegerEntry((toString(R.originCaller) + s), aq), IntegerEntry(p, al)] |
---|
232 | 230 | | } |
---|
233 | 231 | | } |
---|
234 | 232 | | |
---|
235 | 233 | | |
---|
236 | 234 | | |
---|
237 | | - | @Callable(S) |
---|
238 | | - | func shutdown () = if (!(v)) |
---|
| 235 | + | @Callable(R) |
---|
| 236 | + | func shutdown () = if (!(u)) |
---|
239 | 237 | | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, f), "the cause wasn't specified"))) |
---|
240 | | - | else if (!(containsElement([a, b, c, d], S.callerPublicKey))) |
---|
| 238 | + | else if (!(containsElement([a, b, c, d], R.callerPublicKey))) |
---|
241 | 239 | | then throw("Only admin can call this function") |
---|
242 | | - | else y("Paused by admin") |
---|
| 240 | + | else x("Paused by admin") |
---|
243 | 241 | | |
---|
244 | 242 | | |
---|
245 | 243 | | |
---|
246 | | - | @Callable(S) |
---|
247 | | - | func activate () = if (v) |
---|
| 244 | + | @Callable(R) |
---|
| 245 | + | func activate () = if (u) |
---|
248 | 246 | | then throw("DApp is already active") |
---|
249 | | - | else if (!(containsElement([a, b, c, d], S.callerPublicKey))) |
---|
| 247 | + | else if (!(containsElement([a, b, c, d], R.callerPublicKey))) |
---|
250 | 248 | | then throw("Only admin can call this function") |
---|
251 | 249 | | else [BooleanEntry(e, true), DeleteEntry(f)] |
---|
252 | 250 | | |
---|
253 | 251 | | |
---|
254 | | - | @Verifier(at) |
---|
255 | | - | func au () = { |
---|
256 | | - | let av = if (sigVerify(at.bodyBytes, at.proofs[0], a)) |
---|
| 252 | + | @Verifier(as) |
---|
| 253 | + | func at () = { |
---|
| 254 | + | let au = if (sigVerify(as.bodyBytes, as.proofs[0], a)) |
---|
257 | 255 | | then 1 |
---|
258 | 256 | | else 0 |
---|
259 | | - | let aw = if (sigVerify(at.bodyBytes, at.proofs[1], b)) |
---|
| 257 | + | let av = if (sigVerify(as.bodyBytes, as.proofs[1], b)) |
---|
260 | 258 | | then 1 |
---|
261 | 259 | | else 0 |
---|
262 | | - | let ax = if (sigVerify(at.bodyBytes, at.proofs[2], c)) |
---|
| 260 | + | let aw = if (sigVerify(as.bodyBytes, as.proofs[2], c)) |
---|
263 | 261 | | then 1 |
---|
264 | 262 | | else 0 |
---|
265 | | - | (((av + aw) + ax) >= 2) |
---|
| 263 | + | (((au + av) + aw) >= 2) |
---|
266 | 264 | | } |
---|
267 | 265 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' |
---|
5 | 5 | | |
---|
6 | 6 | | let b = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' |
---|
7 | 7 | | |
---|
8 | 8 | | let c = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' |
---|
9 | 9 | | |
---|
10 | 10 | | let d = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' |
---|
11 | 11 | | |
---|
12 | 12 | | let e = "active" |
---|
13 | 13 | | |
---|
14 | 14 | | let f = "shutdown_cause" |
---|
15 | 15 | | |
---|
16 | 16 | | let g = "vote_start_height" |
---|
17 | 17 | | |
---|
18 | 18 | | let h = "vote_end_height" |
---|
19 | 19 | | |
---|
20 | 20 | | let i = "yes_amount" |
---|
21 | 21 | | |
---|
22 | 22 | | let j = "_ENNO_vote" |
---|
23 | 23 | | |
---|
24 | 24 | | let k = "_ENNO_vote_height" |
---|
25 | 25 | | |
---|
26 | 26 | | let l = "_ENNO_vote_value" |
---|
27 | 27 | | |
---|
28 | 28 | | let m = "_ENNO_vote_yes_share" |
---|
29 | 29 | | |
---|
30 | 30 | | let n = "total_ENNO_vote_yes" |
---|
31 | 31 | | |
---|
32 | 32 | | let o = "_ENNO_amount" |
---|
33 | 33 | | |
---|
34 | 34 | | let p = "total_ENNO_amount" |
---|
35 | 35 | | |
---|
36 | 36 | | let q = "total_ENNO_vote" |
---|
37 | 37 | | |
---|
38 | | - | let r = "total_ENNO_vote_share" |
---|
| 38 | + | let r = "_ENNO_claimed_amount" |
---|
39 | 39 | | |
---|
40 | | - | let s = "_ENNO_claimed_amount" |
---|
| 40 | + | let s = "_ENNO_last_claimed_amount" |
---|
41 | 41 | | |
---|
42 | | - | let t = "_ENNO_last_claimed_amount" |
---|
| 42 | + | let t = "share_" |
---|
43 | 43 | | |
---|
44 | | - | let u = "share_" |
---|
| 44 | + | let u = valueOrElse(getBoolean(this, e), true) |
---|
45 | 45 | | |
---|
46 | | - | let v = valueOrElse(getBoolean(this, e), true) |
---|
| 46 | + | let v = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' |
---|
47 | 47 | | |
---|
48 | | - | let w = base58'9NPkhjF6pssidKGhnMzHn9auzo5q5fPBaabRQBx7CaFq' |
---|
| 48 | + | let w = base58'6TmLfry3GRQoVSaesGSnp6NtZKveYgEopTLsjaGgXoso' |
---|
49 | 49 | | |
---|
50 | | - | let x = base58'6TmLfry3GRQoVSaesGSnp6NtZKveYgEopTLsjaGgXoso' |
---|
51 | | - | |
---|
52 | | - | func y (z) = [BooleanEntry(e, false), StringEntry(f, z)] |
---|
| 50 | + | func x (y) = [BooleanEntry(e, false), StringEntry(f, y)] |
---|
53 | 51 | | |
---|
54 | 52 | | |
---|
55 | | - | func A (B) = valueOrElse(getInteger(this, (toString(B) + o)), 0) |
---|
| 53 | + | func z (A) = valueOrElse(getInteger(this, (toString(A) + o)), 0) |
---|
56 | 54 | | |
---|
57 | 55 | | |
---|
58 | | - | func C () = valueOrElse(getInteger(this, p), 0) |
---|
| 56 | + | func B () = valueOrElse(getInteger(this, p), 0) |
---|
59 | 57 | | |
---|
60 | 58 | | |
---|
61 | | - | func D (B,E) = valueOrElse(getInteger(this, (toString(B) + E)), 0) |
---|
| 59 | + | func C (A,D) = valueOrElse(getInteger(this, (toString(A) + D)), 0) |
---|
62 | 60 | | |
---|
63 | 61 | | |
---|
64 | | - | func F (E) = valueOrElse(getInteger(this, E), 0) |
---|
| 62 | + | func E (D) = valueOrElse(getInteger(this, D), 0) |
---|
65 | 63 | | |
---|
66 | 64 | | |
---|
67 | | - | func G (H) = { |
---|
68 | | - | let I = getInteger(addressFromPublicKey(w), (u + toString(H))) |
---|
69 | | - | let J = { |
---|
70 | | - | let K = I |
---|
71 | | - | if ($isInstanceOf(K, "Int")) |
---|
| 65 | + | func F (G) = { |
---|
| 66 | + | let H = getInteger(addressFromPublicKey(v), (t + toString(G))) |
---|
| 67 | + | let I = { |
---|
| 68 | + | let J = H |
---|
| 69 | + | if ($isInstanceOf(J, "Int")) |
---|
72 | 70 | | then { |
---|
73 | | - | let L = K |
---|
74 | | - | L |
---|
| 71 | + | let K = J |
---|
| 72 | + | K |
---|
75 | 73 | | } |
---|
76 | | - | else if ($isInstanceOf(K, "Unit")) |
---|
| 74 | + | else if ($isInstanceOf(J, "Unit")) |
---|
77 | 75 | | then { |
---|
78 | | - | let L = K |
---|
| 76 | + | let K = J |
---|
79 | 77 | | throw("Only governance qualifiers can call this function.") |
---|
80 | 78 | | } |
---|
81 | 79 | | else throw("Match error") |
---|
82 | 80 | | } |
---|
83 | | - | J |
---|
| 81 | + | I |
---|
84 | 82 | | } |
---|
85 | 83 | | |
---|
86 | 84 | | |
---|
87 | | - | func M (H) = { |
---|
88 | | - | let N = getInteger(this, (toString(H) + s)) |
---|
89 | | - | let O = { |
---|
90 | | - | let K = N |
---|
91 | | - | if ($isInstanceOf(K, "Int")) |
---|
| 85 | + | func L (G) = { |
---|
| 86 | + | let M = getInteger(this, (toString(G) + r)) |
---|
| 87 | + | let N = { |
---|
| 88 | + | let J = M |
---|
| 89 | + | if ($isInstanceOf(J, "Int")) |
---|
92 | 90 | | then { |
---|
93 | | - | let L = K |
---|
94 | | - | L |
---|
| 91 | + | let K = J |
---|
| 92 | + | K |
---|
95 | 93 | | } |
---|
96 | | - | else if ($isInstanceOf(K, "Unit")) |
---|
| 94 | + | else if ($isInstanceOf(J, "Unit")) |
---|
97 | 95 | | then { |
---|
98 | | - | let L = K |
---|
| 96 | + | let K = J |
---|
99 | 97 | | 0 |
---|
100 | 98 | | } |
---|
101 | 99 | | else throw("Match error") |
---|
102 | 100 | | } |
---|
103 | | - | O |
---|
| 101 | + | N |
---|
104 | 102 | | } |
---|
105 | 103 | | |
---|
106 | 104 | | |
---|
107 | | - | func P (Q) = { |
---|
108 | | - | let R = (F(h) - height) |
---|
109 | | - | let L = fraction(Q, R, 100000000) |
---|
110 | | - | L |
---|
| 105 | + | func O (P) = { |
---|
| 106 | + | let Q = (E(h) - height) |
---|
| 107 | + | let K = fraction(P, Q, 100000000) |
---|
| 108 | + | K |
---|
111 | 109 | | } |
---|
112 | 110 | | |
---|
113 | 111 | | |
---|
114 | | - | @Callable(S) |
---|
115 | | - | func initVote (T,U) = if (!(v)) |
---|
| 112 | + | @Callable(R) |
---|
| 113 | + | func initVote (S,T) = if (!(u)) |
---|
116 | 114 | | then throw("DApp is inactive at this moment") |
---|
117 | | - | else if (!(containsElement([d], S.callerPublicKey))) |
---|
| 115 | + | else if (!(containsElement([d], R.callerPublicKey))) |
---|
118 | 116 | | then throw("Only admin can call this function") |
---|
119 | | - | else [IntegerEntry(g, T), IntegerEntry(h, U), IntegerEntry(q, 0), IntegerEntry(r, 0), IntegerEntry(n, 0), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_yes_share"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_no_share"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_height"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote")] |
---|
| 117 | + | else [IntegerEntry(g, S), IntegerEntry(h, T), IntegerEntry(q, 0), IntegerEntry(n, 0), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_yes_share"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_no_share"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote_height"), DeleteEntry("3MtKR6Jr6tAT3ixw2AXFxwQQdYMhxz4sVn7_ENNO_vote_yes_share"), DeleteEntry("3N1ygWjGRDx6Wmva87krushRi2wfRe1WAps_ENNO_vote"), DeleteEntry("total_ENNO_vote"), DeleteEntry("total_ENNO_vote_share")] |
---|
120 | 118 | | |
---|
121 | 119 | | |
---|
122 | 120 | | |
---|
123 | | - | @Callable(S) |
---|
124 | | - | func vote (V) = if (!(v)) |
---|
| 121 | + | @Callable(R) |
---|
| 122 | + | func vote (U) = if (!(u)) |
---|
125 | 123 | | then throw("DApp is inactive at this moment") |
---|
126 | | - | else if ((F(g) > height)) |
---|
| 124 | + | else if ((E(g) > height)) |
---|
127 | 125 | | then throw("Voting has not started yet.") |
---|
128 | | - | else if ((height > F(h))) |
---|
| 126 | + | else if ((height > E(h))) |
---|
129 | 127 | | then throw("Voting has already ended.") |
---|
130 | 128 | | else { |
---|
131 | | - | let W = F(n) |
---|
132 | | - | let X = D(S.caller, m) |
---|
133 | | - | let Y = D(S.caller, j) |
---|
134 | | - | let Z = D(S.caller, o) |
---|
135 | | - | let aa = (Y + V) |
---|
136 | | - | if ((0 > aa)) |
---|
| 129 | + | let V = E(n) |
---|
| 130 | + | let W = C(R.caller, m) |
---|
| 131 | + | let X = C(R.caller, j) |
---|
| 132 | + | let Y = C(R.caller, o) |
---|
| 133 | + | let Z = (X + U) |
---|
| 134 | + | if ((0 > Z)) |
---|
137 | 135 | | then throw("Vote amount is more than available.") |
---|
138 | 136 | | else { |
---|
139 | | - | let ab = (Z - Y) |
---|
140 | | - | let ac = P(V) |
---|
141 | | - | if ((V > ab)) |
---|
| 137 | + | let aa = (Y - X) |
---|
| 138 | + | let ab = O(U) |
---|
| 139 | + | if ((U > aa)) |
---|
142 | 140 | | then throw("Vote amount is more than available.") |
---|
143 | 141 | | else { |
---|
144 | | - | let ad = (X + ac) |
---|
145 | | - | let ae = (W + ad) |
---|
146 | | - | let af = F(q) |
---|
147 | | - | let ag = (af + ac) |
---|
148 | | - | [IntegerEntry((toString(S.caller) + m), ad), IntegerEntry((toString(S.caller) + j), aa), IntegerEntry(q, ag), IntegerEntry(n, ae)] |
---|
| 142 | + | let ac = (W + ab) |
---|
| 143 | + | let ad = (V + ac) |
---|
| 144 | + | let ae = E(q) |
---|
| 145 | + | let af = (ae + ab) |
---|
| 146 | + | [IntegerEntry((toString(R.caller) + m), ac), IntegerEntry((toString(R.caller) + j), Z), IntegerEntry(q, af), IntegerEntry(n, ad)] |
---|
149 | 147 | | } |
---|
150 | 148 | | } |
---|
151 | 149 | | } |
---|
152 | 150 | | |
---|
153 | 151 | | |
---|
154 | 152 | | |
---|
155 | | - | @Callable(S) |
---|
156 | | - | func lockENNO () = if (!(v)) |
---|
| 153 | + | @Callable(R) |
---|
| 154 | + | func lockENNO () = if (!(u)) |
---|
157 | 155 | | then throw("DApp is inactive at this moment") |
---|
158 | 156 | | else { |
---|
159 | | - | let ah = $Tuple2(S.payments[0].amount, S.payments[0].assetId) |
---|
160 | | - | let ai = ah._1 |
---|
161 | | - | let aj = ah._2 |
---|
162 | | - | if ((aj != x)) |
---|
| 157 | + | let ag = $Tuple2(R.payments[0].amount, R.payments[0].assetId) |
---|
| 158 | + | let ah = ag._1 |
---|
| 159 | + | let ai = ag._2 |
---|
| 160 | + | if ((ai != w)) |
---|
163 | 161 | | then throw("Incorrect payment assetId only Enno Cash is allowed.") |
---|
164 | 162 | | else { |
---|
165 | | - | let Z = A(S.caller) |
---|
166 | | - | let ak = (Z + ai) |
---|
167 | | - | let al = C() |
---|
168 | | - | let am = (al + ai) |
---|
169 | | - | [IntegerEntry((toString(S.caller) + o), ak), IntegerEntry(p, am)] |
---|
| 163 | + | let Y = z(R.caller) |
---|
| 164 | + | let aj = (Y + ah) |
---|
| 165 | + | let ak = B() |
---|
| 166 | + | let al = (ak + ah) |
---|
| 167 | + | [IntegerEntry((toString(R.caller) + o), aj), IntegerEntry(p, al)] |
---|
170 | 168 | | } |
---|
171 | 169 | | } |
---|
172 | 170 | | |
---|
173 | 171 | | |
---|
174 | 172 | | |
---|
175 | | - | @Callable(S) |
---|
176 | | - | func withdrawENNO (an) = if (!(v)) |
---|
| 173 | + | @Callable(R) |
---|
| 174 | + | func withdrawENNO (am) = if (!(u)) |
---|
177 | 175 | | then throw("DApp is inactive at this moment") |
---|
178 | | - | else if ((0 >= an)) |
---|
| 176 | + | else if ((0 >= am)) |
---|
179 | 177 | | then throw("withdrawAmount <= 0") |
---|
180 | 178 | | else { |
---|
181 | | - | let al = C() |
---|
182 | | - | let Z = A(S.caller) |
---|
183 | | - | if ((an > al)) |
---|
| 179 | + | let ak = B() |
---|
| 180 | + | let Y = z(R.caller) |
---|
| 181 | + | if ((am > ak)) |
---|
184 | 182 | | then throw("withdrawAmount is more than available to withdraw") |
---|
185 | | - | else if ((an > Z)) |
---|
| 183 | + | else if ((am > Y)) |
---|
186 | 184 | | then throw("You are trying to unstake more than you have staked.") |
---|
187 | 185 | | else { |
---|
188 | | - | let am = (al - an) |
---|
189 | | - | let ao = (Z - an) |
---|
190 | | - | [IntegerEntry((toString(S.caller) + o), ao), IntegerEntry(p, am), ScriptTransfer(S.caller, an, x)] |
---|
| 186 | + | let al = (ak - am) |
---|
| 187 | + | let an = (Y - am) |
---|
| 188 | + | [IntegerEntry((toString(R.caller) + o), an), IntegerEntry(p, al), ScriptTransfer(R.caller, am, w)] |
---|
191 | 189 | | } |
---|
192 | 190 | | } |
---|
193 | 191 | | |
---|
194 | 192 | | |
---|
195 | 193 | | |
---|
196 | | - | @Callable(S) |
---|
197 | | - | func claimAndWithdrawENNO () = if (!(v)) |
---|
| 194 | + | @Callable(R) |
---|
| 195 | + | func claimAndWithdrawENNO () = if (!(u)) |
---|
198 | 196 | | then throw("DApp is inactive at this moment") |
---|
199 | 197 | | else { |
---|
200 | | - | let ap = G(S.originCaller) |
---|
201 | | - | let aq = M(S.originCaller) |
---|
202 | | - | let ar = (ap - aq) |
---|
203 | | - | let al = C() |
---|
204 | | - | if ((ar > al)) |
---|
| 198 | + | let ao = F(R.originCaller) |
---|
| 199 | + | let ap = L(R.originCaller) |
---|
| 200 | + | let aq = (ao - ap) |
---|
| 201 | + | let ak = B() |
---|
| 202 | + | if ((aq > ak)) |
---|
205 | 203 | | then throw("claimAmount is more than available to withdraw") |
---|
206 | | - | else if ((0 >= ar)) |
---|
| 204 | + | else if ((0 >= aq)) |
---|
207 | 205 | | then throw("Claim amount must be bigger than 0") |
---|
208 | 206 | | else { |
---|
209 | | - | let as = (aq + ar) |
---|
210 | | - | [IntegerEntry((toString(S.originCaller) + s), as), IntegerEntry((toString(S.originCaller) + t), ar), ScriptTransfer(S.originCaller, ar, x)] |
---|
| 207 | + | let ar = (ap + aq) |
---|
| 208 | + | [IntegerEntry((toString(R.originCaller) + r), ar), IntegerEntry((toString(R.originCaller) + s), aq), ScriptTransfer(R.originCaller, aq, w)] |
---|
211 | 209 | | } |
---|
212 | 210 | | } |
---|
213 | 211 | | |
---|
214 | 212 | | |
---|
215 | 213 | | |
---|
216 | | - | @Callable(S) |
---|
217 | | - | func claimAndStakeENNO () = if (!(v)) |
---|
| 214 | + | @Callable(R) |
---|
| 215 | + | func claimAndStakeENNO () = if (!(u)) |
---|
218 | 216 | | then throw("DApp is inactive at this moment") |
---|
219 | 217 | | else { |
---|
220 | | - | let ap = G(S.originCaller) |
---|
221 | | - | let aq = M(S.originCaller) |
---|
222 | | - | let ar = (ap - aq) |
---|
223 | | - | if ((0 >= ar)) |
---|
| 218 | + | let ao = F(R.originCaller) |
---|
| 219 | + | let ap = L(R.originCaller) |
---|
| 220 | + | let aq = (ao - ap) |
---|
| 221 | + | if ((0 >= aq)) |
---|
224 | 222 | | then throw("Claim amount must be bigger than 0") |
---|
225 | 223 | | else { |
---|
226 | | - | let as = (aq + ar) |
---|
227 | | - | let Z = A(S.originCaller) |
---|
228 | | - | let ak = (Z + ar) |
---|
229 | | - | let al = C() |
---|
230 | | - | let am = (al + ar) |
---|
231 | | - | [IntegerEntry((toString(S.originCaller) + o), ak), IntegerEntry((toString(S.originCaller) + s), as), IntegerEntry((toString(S.originCaller) + t), ar), IntegerEntry(p, am)] |
---|
| 224 | + | let ar = (ap + aq) |
---|
| 225 | + | let Y = z(R.originCaller) |
---|
| 226 | + | let aj = (Y + aq) |
---|
| 227 | + | let ak = B() |
---|
| 228 | + | let al = (ak + aq) |
---|
| 229 | + | [IntegerEntry((toString(R.originCaller) + o), aj), IntegerEntry((toString(R.originCaller) + r), ar), IntegerEntry((toString(R.originCaller) + s), aq), IntegerEntry(p, al)] |
---|
232 | 230 | | } |
---|
233 | 231 | | } |
---|
234 | 232 | | |
---|
235 | 233 | | |
---|
236 | 234 | | |
---|
237 | | - | @Callable(S) |
---|
238 | | - | func shutdown () = if (!(v)) |
---|
| 235 | + | @Callable(R) |
---|
| 236 | + | func shutdown () = if (!(u)) |
---|
239 | 237 | | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, f), "the cause wasn't specified"))) |
---|
240 | | - | else if (!(containsElement([a, b, c, d], S.callerPublicKey))) |
---|
| 238 | + | else if (!(containsElement([a, b, c, d], R.callerPublicKey))) |
---|
241 | 239 | | then throw("Only admin can call this function") |
---|
242 | | - | else y("Paused by admin") |
---|
| 240 | + | else x("Paused by admin") |
---|
243 | 241 | | |
---|
244 | 242 | | |
---|
245 | 243 | | |
---|
246 | | - | @Callable(S) |
---|
247 | | - | func activate () = if (v) |
---|
| 244 | + | @Callable(R) |
---|
| 245 | + | func activate () = if (u) |
---|
248 | 246 | | then throw("DApp is already active") |
---|
249 | | - | else if (!(containsElement([a, b, c, d], S.callerPublicKey))) |
---|
| 247 | + | else if (!(containsElement([a, b, c, d], R.callerPublicKey))) |
---|
250 | 248 | | then throw("Only admin can call this function") |
---|
251 | 249 | | else [BooleanEntry(e, true), DeleteEntry(f)] |
---|
252 | 250 | | |
---|
253 | 251 | | |
---|
254 | | - | @Verifier(at) |
---|
255 | | - | func au () = { |
---|
256 | | - | let av = if (sigVerify(at.bodyBytes, at.proofs[0], a)) |
---|
| 252 | + | @Verifier(as) |
---|
| 253 | + | func at () = { |
---|
| 254 | + | let au = if (sigVerify(as.bodyBytes, as.proofs[0], a)) |
---|
257 | 255 | | then 1 |
---|
258 | 256 | | else 0 |
---|
259 | | - | let aw = if (sigVerify(at.bodyBytes, at.proofs[1], b)) |
---|
| 257 | + | let av = if (sigVerify(as.bodyBytes, as.proofs[1], b)) |
---|
260 | 258 | | then 1 |
---|
261 | 259 | | else 0 |
---|
262 | | - | let ax = if (sigVerify(at.bodyBytes, at.proofs[2], c)) |
---|
| 260 | + | let aw = if (sigVerify(as.bodyBytes, as.proofs[2], c)) |
---|
263 | 261 | | then 1 |
---|
264 | 262 | | else 0 |
---|
265 | | - | (((av + aw) + ax) >= 2) |
---|
| 263 | + | (((au + av) + aw) >= 2) |
---|
266 | 264 | | } |
---|
267 | 265 | | |
---|