tx · 7mmFgx9qsxpRSiiHy3wKQKQ9J1g7PeWUUd4inRyUCHwh 3Mzgi6deFV8CyF2nqbWSBkqba5JaD42EXyb: -0.01400000 Waves 2021.05.24 17:41 [1539892] smart account 3Mzgi6deFV8CyF2nqbWSBkqba5JaD42EXyb > SELF 0.00000000 Waves
{ "type": 13, "id": "7mmFgx9qsxpRSiiHy3wKQKQ9J1g7PeWUUd4inRyUCHwh", "fee": 1400000, "feeAssetId": null, "timestamp": 1621867304095, "version": 2, "chainId": 84, "sender": "3Mzgi6deFV8CyF2nqbWSBkqba5JaD42EXyb", "senderPublicKey": "61fhePmC5L8iWserAMXoPAZbv24cAo6eyvnyYpoLpZJy", "proofs": [ "5FDTeVazrF8TjYGSd3EVQaVMCczZdHsPeYca4cJBk5RruGj63u9VnBdWgK845qJm36bwhBCtZonnt4Uew8cy2aCY" ], "script": "base64:AAIEAAAAAAAAABsIAhIAEgQKAggIEgUKAwEEARIECgIBCBIAEgAAAAA9AAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAEWtleU51bWJlck9mVm90aW5nAgAAABR2b3RpbmdfYWN0aXZlX251bWJlcgAAAAAPa2V5SGVpZ2h0T2ZQb29sAgAAAA5fZmluaXNoX2hlaWdodAAAAAAFa2V5Tm8CAAAAD190b3RhbF92b3Rlc19ubwAAAAAGa2V5WWVzAgAAABBfdG90YWxfdm90ZXNfeWVzAAAAAAlrZXlOb1VzZXICAAAACF92b3RlX25vAAAAAAprZXlZZXNVc2VyAgAAAAlfdm90ZV95ZXMAAAAAEWtleVN0YXR1c09mVm90aW5nAgAAAAdfc3RhdHVzAAAAABFrZXlBbW91bnRPZlZvdGluZwIAAAAOdm90aW5nX2lkX2xhc3QAAAAAFGtleU1heEFtb3VudE9mVm90aW5nAgAAABFtYXhfYW1vdW50X3ZvdGluZwAAAAARa2V5TWF4RGF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kbWluUHViS2V5U3RhcnRTdG9wBQAAAANuaWwIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQkAAAIAAAABAgAAACFPbmx5IGFkbWluIGNhbiBjYWxsIHRoaXMgZnVuY3Rpb24JAQAAAAdzdXNwZW5kAAAAAQIAAAAPUGF1c2VkIGJ5IGFkbWluAAAAAWkBAAAACGFjdGl2YXRlAAAAAAMFAAAACGlzQWN0aXZlCQAAAgAAAAECAAAAFkRBcHAgaXMgYWxyZWFkeSBhY3RpdmUDCQEAAAABIQAAAAEJAQAAAA9jb250YWluc0VsZW1lbnQAAAACCQAETAAAAAIFAAAADGFkbWluUHViS2V5MQkABEwAAAACBQAAAAxhZG1pblB1YktleTIJAARMAAAAAgUAAAAMYWRtaW5QdWJLZXkzCQAETAAAAAIFAAAAFGFkbWluUHViS2V5U3RhcnRTdG9wBQAAAANuaWwIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQkAAAIAAAABAgAAACFPbmx5IGFkbWluIGNhbiBjYWxsIHRoaXMgZnVuY3Rpb24JAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIFAAAACWtleUFjdGl2ZQYJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAIa2V5Q2F1c2UFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5fExcrQ==", "height": 1539892, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: U6QLUhbZLwmnjZuXesbdhLndTYaxw7GMPXJVdND3ep8 Next: 3y3CEUoeVREv9VSB8tKRJmMphn3YAkQpznckVTxtyRp2 Diff:
Old | New | Differences | |
---|---|---|---|
99 | 99 | ||
100 | 100 | let maxDayOfVoting = 5 | |
101 | 101 | ||
102 | - | let fiveDays = | |
102 | + | let fiveDays = 15 | |
103 | 103 | ||
104 | 104 | func getAssetInfo (assetId) = match assetId { | |
105 | 105 | case id: ByteVector => | |
236 | 236 | ||
237 | 237 | @Callable(i) | |
238 | 238 | func initVotingForNewPool (assetA,assetB) = { | |
239 | - | let $ | |
240 | - | let pmtAmount = $ | |
241 | - | let pmtAssetId = $ | |
242 | - | let $ | |
243 | - | let poolAssetIdA = $ | |
244 | - | let poolAssetIdB = $ | |
239 | + | let $t076827757 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
240 | + | let pmtAmount = $t076827757._1 | |
241 | + | let pmtAssetId = $t076827757._2 | |
242 | + | let $t077627861 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB)) | |
243 | + | let poolAssetIdA = $t077627861._1 | |
244 | + | let poolAssetIdB = $t077627861._2 | |
245 | 245 | let unactiveVote = getUnactiveVotingPool() | |
246 | 246 | let newNumberOfVoting = getActiveVotingPoolAmount() | |
247 | 247 | let isPoolExists = isLastFiveActivePoolExists(assetA, assetB) | |
248 | - | let $ | |
249 | - | let pmtStrAssetIdA = $ | |
250 | - | let pmtAssetNameA = $ | |
251 | - | let pmtDecimalsA = $ | |
252 | - | let $ | |
253 | - | let pmtStrAssetIdB = $ | |
254 | - | let pmtAssetNameB = $ | |
255 | - | let pmtDecimalsB = $ | |
248 | + | let $t080358113 = getAssetInfo(poolAssetIdA) | |
249 | + | let pmtStrAssetIdA = $t080358113._1 | |
250 | + | let pmtAssetNameA = $t080358113._2 | |
251 | + | let pmtDecimalsA = $t080358113._3 | |
252 | + | let $t081188196 = getAssetInfo(poolAssetIdB) | |
253 | + | let pmtStrAssetIdB = $t081188196._1 | |
254 | + | let pmtAssetNameB = $t081188196._2 | |
255 | + | let pmtDecimalsB = $t081188196._3 | |
256 | 256 | if (!(isActive)) | |
257 | 257 | then throw("DApp is inactive at this moment") | |
258 | 258 | else if ((poolAssetIdA == poolAssetIdB)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let version = "1.0.0" | |
5 | 5 | ||
6 | 6 | let keyVersion = "version" | |
7 | 7 | ||
8 | 8 | let keyActive = "active" | |
9 | 9 | ||
10 | 10 | let keyNumberOfVoting = "voting_active_number" | |
11 | 11 | ||
12 | 12 | let keyHeightOfPool = "_finish_height" | |
13 | 13 | ||
14 | 14 | let keyNo = "_total_votes_no" | |
15 | 15 | ||
16 | 16 | let keyYes = "_total_votes_yes" | |
17 | 17 | ||
18 | 18 | let keyNoUser = "_vote_no" | |
19 | 19 | ||
20 | 20 | let keyYesUser = "_vote_yes" | |
21 | 21 | ||
22 | 22 | let keyStatusOfVoting = "_status" | |
23 | 23 | ||
24 | 24 | let keyAmountOfVoting = "voting_id_last" | |
25 | 25 | ||
26 | 26 | let keyMaxAmountOfVoting = "max_amount_voting" | |
27 | 27 | ||
28 | 28 | let keyMaxDayOfVoting = "max_day_voting" | |
29 | 29 | ||
30 | 30 | let keyCommission = "commission" | |
31 | 31 | ||
32 | 32 | let keyCommissionScaleDelimiter = "commission_scale_delimiter" | |
33 | 33 | ||
34 | 34 | let keyCause = "shutdown_cause" | |
35 | 35 | ||
36 | 36 | let keyCancelCause = "_cancel_cause" | |
37 | 37 | ||
38 | 38 | let kUserTotalSWOP = "_SWOP_amount" | |
39 | 39 | ||
40 | 40 | let kName = "_asset_name" | |
41 | 41 | ||
42 | 42 | let votingId = "_voting" | |
43 | 43 | ||
44 | 44 | let periodOfVoting = "period_voting" | |
45 | 45 | ||
46 | 46 | let activeVoteFirst = "voting_active_cell_1" | |
47 | 47 | ||
48 | 48 | let activeVoteSecond = "voting_active_cell_2" | |
49 | 49 | ||
50 | 50 | let activeVoteThird = "voting_active_cell_3" | |
51 | 51 | ||
52 | 52 | let activeVoteFourth = "voting_active_cell_4" | |
53 | 53 | ||
54 | 54 | let activeVoteFifth = "voting_active_cell_5" | |
55 | 55 | ||
56 | 56 | let adminPubKey1 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
57 | 57 | ||
58 | 58 | let adminPubKey2 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
59 | 59 | ||
60 | 60 | let adminPubKey3 = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
61 | 61 | ||
62 | 62 | let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
63 | 63 | ||
64 | 64 | let walletAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
65 | 65 | ||
66 | 66 | let govAddr = Address(base58'3MzJZEn6jzxCPaHEfkrXd7FhbjTyVjdRPLS') | |
67 | 67 | ||
68 | 68 | let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
69 | 69 | ||
70 | 70 | let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
71 | 71 | ||
72 | 72 | let isActive = getBooleanValue(this, keyActive) | |
73 | 73 | ||
74 | 74 | let numberOfVoting = getIntegerValue(this, keyNumberOfVoting) | |
75 | 75 | ||
76 | 76 | let amountOfVoting = getIntegerValue(this, keyAmountOfVoting) | |
77 | 77 | ||
78 | 78 | let firstActiveVote = valueOrElse(getString(this, activeVoteFirst), "") | |
79 | 79 | ||
80 | 80 | let secondActiveVote = valueOrElse(getString(this, activeVoteSecond), "") | |
81 | 81 | ||
82 | 82 | let thirdActiveVote = valueOrElse(getString(this, activeVoteThird), "") | |
83 | 83 | ||
84 | 84 | let fourthActiveVote = valueOrElse(getString(this, activeVoteFourth), "") | |
85 | 85 | ||
86 | 86 | let fifthActiveVote = valueOrElse(getString(this, activeVoteFifth), "") | |
87 | 87 | ||
88 | 88 | let comissionForInitalizationOfVoting = 1000000000 | |
89 | 89 | ||
90 | 90 | let scaleValue3 = 1000 | |
91 | 91 | ||
92 | 92 | let scaleValue8 = 100000000 | |
93 | 93 | ||
94 | 94 | let slippageToleranceDelimiter = 1000 | |
95 | 95 | ||
96 | 96 | let scaleValue8Digits = 8 | |
97 | 97 | ||
98 | 98 | let maxAmountOfVoting = 5 | |
99 | 99 | ||
100 | 100 | let maxDayOfVoting = 5 | |
101 | 101 | ||
102 | - | let fiveDays = | |
102 | + | let fiveDays = 15 | |
103 | 103 | ||
104 | 104 | func getAssetInfo (assetId) = match assetId { | |
105 | 105 | case id: ByteVector => | |
106 | 106 | if (isDefined(assetInfo(id))) | |
107 | 107 | then { | |
108 | 108 | let stringId = toBase58String(id) | |
109 | 109 | let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist")) | |
110 | 110 | $Tuple3(stringId, info.name, info.decimals) | |
111 | 111 | } | |
112 | 112 | else throw("Asset is not define") | |
113 | 113 | case waves: Unit => | |
114 | 114 | $Tuple3("WAVES", "WAVES", 8) | |
115 | 115 | case _ => | |
116 | 116 | throw("Match error") | |
117 | 117 | } | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func isActivePoolExists (pools,assetA,assetB) = { | |
121 | 121 | let poolsData = split(pools, "_") | |
122 | 122 | let isPoolDefine = isDefined(getInteger(this, pools)) | |
123 | 123 | if (if (isPoolDefine) | |
124 | 124 | then (pools != "") | |
125 | 125 | else false) | |
126 | 126 | then { | |
127 | 127 | let voting = poolsData[2] | |
128 | 128 | let newPools = (((((assetA + "_") + assetB) + "_") + voting) + votingId) | |
129 | 129 | let isNewPoolDefine = isDefined(getInteger(this, newPools)) | |
130 | 130 | let heightOfVoting = valueOrElse(getInteger(this, (voting + keyHeightOfPool)), 0) | |
131 | 131 | let statusOfVoting = valueOrElse(getBoolean(this, (voting + keyStatusOfVoting)), true) | |
132 | 132 | if (isNewPoolDefine) | |
133 | 133 | then if ((heightOfVoting > height)) | |
134 | 134 | then if (statusOfVoting) | |
135 | 135 | then true | |
136 | 136 | else false | |
137 | 137 | else false | |
138 | 138 | else false | |
139 | 139 | } | |
140 | 140 | else false | |
141 | 141 | } | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func isUnactivePoolExists (poolsState) = { | |
145 | 145 | let pools = valueOrElse(getString(this, poolsState), "") | |
146 | 146 | let poolsData = split(pools, "_") | |
147 | 147 | let isPoolDefine = isDefined(getInteger(this, pools)) | |
148 | 148 | if (if (isPoolDefine) | |
149 | 149 | then (pools != "") | |
150 | 150 | else false) | |
151 | 151 | then { | |
152 | 152 | let voting = poolsData[2] | |
153 | 153 | let heightOfVoting = valueOrElse(getInteger(this, (voting + keyHeightOfPool)), 0) | |
154 | 154 | let statusOfVoting = valueOrElse(getBoolean(this, (voting + keyStatusOfVoting)), true) | |
155 | 155 | if ((heightOfVoting > height)) | |
156 | 156 | then if (statusOfVoting) | |
157 | 157 | then "" | |
158 | 158 | else poolsState | |
159 | 159 | else poolsState | |
160 | 160 | } | |
161 | 161 | else poolsState | |
162 | 162 | } | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func isLastFiveActivePoolExists (assetA,assetB) = if (if (if (if (isActivePoolExists(firstActiveVote, assetA, assetB)) | |
166 | 166 | then true | |
167 | 167 | else isActivePoolExists(secondActiveVote, assetA, assetB)) | |
168 | 168 | then true | |
169 | 169 | else isActivePoolExists(thirdActiveVote, assetA, assetB)) | |
170 | 170 | then true | |
171 | 171 | else isActivePoolExists(fourthActiveVote, assetA, assetB)) | |
172 | 172 | then true | |
173 | 173 | else isActivePoolExists(fifthActiveVote, assetA, assetB) | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func getActivePool (voting) = { | |
177 | 177 | let heightOfVoting = valueOrElse(getInteger(this, (toString(voting) + keyHeightOfPool)), 0) | |
178 | 178 | let statusOfVoting = valueOrElse(getBoolean(this, (toString(voting) + keyStatusOfVoting)), true) | |
179 | 179 | let currentHeight = height | |
180 | 180 | if ((0 > voting)) | |
181 | 181 | then 0 | |
182 | 182 | else if (!(statusOfVoting)) | |
183 | 183 | then 0 | |
184 | 184 | else if ((heightOfVoting > currentHeight)) | |
185 | 185 | then 1 | |
186 | 186 | else 0 | |
187 | 187 | } | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func getActiveVotingPoolAmount () = ((((getActivePool(valueOrElse(getInteger(this, firstActiveVote), -1)) + getActivePool(valueOrElse(getInteger(this, secondActiveVote), -1))) + getActivePool(valueOrElse(getInteger(this, thirdActiveVote), -1))) + getActivePool(valueOrElse(getInteger(this, fourthActiveVote), -1))) + getActivePool(valueOrElse(getInteger(this, fifthActiveVote), -1))) | |
191 | 191 | ||
192 | 192 | ||
193 | 193 | func getUnactiveVotingPool () = if ((isUnactivePoolExists(activeVoteFirst) != "")) | |
194 | 194 | then activeVoteFirst | |
195 | 195 | else if ((isUnactivePoolExists(activeVoteSecond) != "")) | |
196 | 196 | then activeVoteSecond | |
197 | 197 | else if ((isUnactivePoolExists(activeVoteThird) != "")) | |
198 | 198 | then activeVoteThird | |
199 | 199 | else if ((isUnactivePoolExists(activeVoteFourth) != "")) | |
200 | 200 | then activeVoteFourth | |
201 | 201 | else if ((isUnactivePoolExists(activeVoteFifth) != "")) | |
202 | 202 | then activeVoteFifth | |
203 | 203 | else "" | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES")) | |
207 | 207 | then unit | |
208 | 208 | else fromBase58String(assetStr) | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | func isCallerInGovernance (user) = if ((valueOrElse(getInteger(govAddr, (toString(user) + kUserTotalSWOP)), 0) > 0)) | |
212 | 212 | then true | |
213 | 213 | else false | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)] | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func throwInsufficientAvailableBalance (amount,assetName) = throw(((((("Insufficient DApp balance to pay " + toString(amount)) + " ") + assetName) + " due to staking.") + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | @Callable(i) | |
223 | 223 | func init () = if ((i.caller != this)) | |
224 | 224 | then throw("Only the DApp itself can call this function") | |
225 | 225 | else if (isDefined(getBoolean(this, keyActive))) | |
226 | 226 | then throw("DApp is already active") | |
227 | 227 | else { | |
228 | 228 | let initNumberOfVoting = 0 | |
229 | 229 | let initAmountOfVoting = 0 | |
230 | 230 | let initKeyActive = true | |
231 | 231 | let activeInit = "" | |
232 | 232 | [StringEntry(keyVersion, version), BooleanEntry(keyActive, initKeyActive), IntegerEntry(keyNumberOfVoting, initNumberOfVoting), IntegerEntry(keyAmountOfVoting, initAmountOfVoting), IntegerEntry(keyMaxAmountOfVoting, maxAmountOfVoting), IntegerEntry(keyMaxDayOfVoting, maxDayOfVoting), StringEntry(activeVoteFirst, activeInit), StringEntry(activeVoteSecond, activeInit), StringEntry(activeVoteThird, activeInit), StringEntry(activeVoteFourth, activeInit), StringEntry(activeVoteFifth, activeInit)] | |
233 | 233 | } | |
234 | 234 | ||
235 | 235 | ||
236 | 236 | ||
237 | 237 | @Callable(i) | |
238 | 238 | func initVotingForNewPool (assetA,assetB) = { | |
239 | - | let $ | |
240 | - | let pmtAmount = $ | |
241 | - | let pmtAssetId = $ | |
242 | - | let $ | |
243 | - | let poolAssetIdA = $ | |
244 | - | let poolAssetIdB = $ | |
239 | + | let $t076827757 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
240 | + | let pmtAmount = $t076827757._1 | |
241 | + | let pmtAssetId = $t076827757._2 | |
242 | + | let $t077627861 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB)) | |
243 | + | let poolAssetIdA = $t077627861._1 | |
244 | + | let poolAssetIdB = $t077627861._2 | |
245 | 245 | let unactiveVote = getUnactiveVotingPool() | |
246 | 246 | let newNumberOfVoting = getActiveVotingPoolAmount() | |
247 | 247 | let isPoolExists = isLastFiveActivePoolExists(assetA, assetB) | |
248 | - | let $ | |
249 | - | let pmtStrAssetIdA = $ | |
250 | - | let pmtAssetNameA = $ | |
251 | - | let pmtDecimalsA = $ | |
252 | - | let $ | |
253 | - | let pmtStrAssetIdB = $ | |
254 | - | let pmtAssetNameB = $ | |
255 | - | let pmtDecimalsB = $ | |
248 | + | let $t080358113 = getAssetInfo(poolAssetIdA) | |
249 | + | let pmtStrAssetIdA = $t080358113._1 | |
250 | + | let pmtAssetNameA = $t080358113._2 | |
251 | + | let pmtDecimalsA = $t080358113._3 | |
252 | + | let $t081188196 = getAssetInfo(poolAssetIdB) | |
253 | + | let pmtStrAssetIdB = $t081188196._1 | |
254 | + | let pmtAssetNameB = $t081188196._2 | |
255 | + | let pmtDecimalsB = $t081188196._3 | |
256 | 256 | if (!(isActive)) | |
257 | 257 | then throw("DApp is inactive at this moment") | |
258 | 258 | else if ((poolAssetIdA == poolAssetIdB)) | |
259 | 259 | then throw("Assets must be different") | |
260 | 260 | else if (isPoolExists) | |
261 | 261 | then throw("This pool already exists") | |
262 | 262 | else if (if (((newNumberOfVoting + 1) > maxAmountOfVoting)) | |
263 | 263 | then true | |
264 | 264 | else (unactiveVote == "")) | |
265 | 265 | then throw(("Too many votes. Maximum quantity: " + toString(maxAmountOfVoting))) | |
266 | 266 | else if ((size(i.payments) != 1)) | |
267 | 267 | then throw("One attached assets expected") | |
268 | 268 | else if ((pmtAssetId != SWOP)) | |
269 | 269 | then throw("You must use a SWOP token") | |
270 | 270 | else if (if ((assetA == "")) | |
271 | 271 | then true | |
272 | 272 | else (assetB == "")) | |
273 | 273 | then throw("Assets can't be empty") | |
274 | 274 | else if ((pmtAmount != comissionForInitalizationOfVoting)) | |
275 | 275 | then throw("You need to attach 10 SWOP tokens") | |
276 | 276 | else if (!(if (if ((poolAssetIdB == USDN)) | |
277 | 277 | then true | |
278 | 278 | else (poolAssetIdB == unit)) | |
279 | 279 | then true | |
280 | 280 | else (poolAssetIdB == SWOP))) | |
281 | 281 | then throw("assetB must be USDN, WAVES or SWOP") | |
282 | 282 | else [IntegerEntry((((((assetA + "_") + assetB) + "_") + toString(amountOfVoting)) + votingId), amountOfVoting), IntegerEntry((toString(amountOfVoting) + keyHeightOfPool), (height + fiveDays)), BooleanEntry((toString(amountOfVoting) + keyStatusOfVoting), true), IntegerEntry(keyAmountOfVoting, (amountOfVoting + 1)), IntegerEntry(keyNumberOfVoting, (newNumberOfVoting + 1)), StringEntry((assetA + kName), pmtAssetNameA), StringEntry((assetB + kName), pmtAssetNameB), StringEntry(unactiveVote, (((((assetA + "_") + assetB) + "_") + toString(amountOfVoting)) + votingId)), ScriptTransfer(walletAddress, pmtAmount, pmtAssetId)] | |
283 | 283 | } | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | ||
287 | 287 | @Callable(i) | |
288 | 288 | func voteForPool (voting,yesOrNo,voteAmt) = { | |
289 | 289 | let currentHeight = height | |
290 | 290 | let poolInitHeight = valueOrErrorMessage(getIntegerValue(this, (toString(voting) + keyHeightOfPool)), "Empty pool height") | |
291 | 291 | let statusOfVoting = valueOrElse(getBoolean(this, (toString(voting) + keyStatusOfVoting)), true) | |
292 | 292 | let userSWOPinGovernance = valueOrElse(getInteger(govAddr, (toString(i.caller) + kUserTotalSWOP)), 0) | |
293 | 293 | let totalVoteUser = if (yesOrNo) | |
294 | 294 | then (valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNoUser)), 0) + voteAmt) | |
295 | 295 | else (valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYesUser)), 0) + voteAmt) | |
296 | 296 | if (!(isCallerInGovernance(i.caller))) | |
297 | 297 | then throw("This address has 0 SWOP in Governance dApp") | |
298 | 298 | else if (!(statusOfVoting)) | |
299 | 299 | then throw("This voting was canceled") | |
300 | 300 | else if ((currentHeight > poolInitHeight)) | |
301 | 301 | then throw("This voting was expired") | |
302 | 302 | else if ((0 > voteAmt)) | |
303 | 303 | then throw("The number of votes must be positive") | |
304 | 304 | else if ((totalVoteUser > userSWOPinGovernance)) | |
305 | 305 | then throw((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance.")) | |
306 | 306 | else if (yesOrNo) | |
307 | 307 | then { | |
308 | 308 | let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYesUser)), 0) | |
309 | 309 | let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyYes)), 0) - oldVoteUser) + voteAmt) | |
310 | 310 | [IntegerEntry((toString(voting) + keyYes), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyYesUser), voteAmt)] | |
311 | 311 | } | |
312 | 312 | else { | |
313 | 313 | let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNoUser)), 0) | |
314 | 314 | let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyNo)), 0) - oldVoteUser) + voteAmt) | |
315 | 315 | [IntegerEntry((toString(voting) + keyNo), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyNoUser), voteAmt)] | |
316 | 316 | } | |
317 | 317 | } | |
318 | 318 | ||
319 | 319 | ||
320 | 320 | ||
321 | 321 | @Callable(i) | |
322 | 322 | func cancelVoting (voting,cause) = { | |
323 | 323 | let statusOfVoting = valueOrElse(getBoolean(this, (toString(voting) + keyStatusOfVoting)), true) | |
324 | 324 | if (!(isActive)) | |
325 | 325 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
326 | 326 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
327 | 327 | then throw("Only admin can call this function") | |
328 | 328 | else if (!(statusOfVoting)) | |
329 | 329 | then throw((("Voting " + toString(voting)) + " has already been stopped")) | |
330 | 330 | else [IntegerEntry(keyNumberOfVoting, (numberOfVoting - 1)), BooleanEntry((toString(voting) + keyStatusOfVoting), false), StringEntry((toString(voting) + keyCancelCause), cause)] | |
331 | 331 | } | |
332 | 332 | ||
333 | 333 | ||
334 | 334 | ||
335 | 335 | @Callable(i) | |
336 | 336 | func shutdown () = if (!(isActive)) | |
337 | 337 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified"))) | |
338 | 338 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
339 | 339 | then throw("Only admin can call this function") | |
340 | 340 | else suspend("Paused by admin") | |
341 | 341 | ||
342 | 342 | ||
343 | 343 | ||
344 | 344 | @Callable(i) | |
345 | 345 | func activate () = if (isActive) | |
346 | 346 | then throw("DApp is already active") | |
347 | 347 | else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey))) | |
348 | 348 | then throw("Only admin can call this function") | |
349 | 349 | else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)] | |
350 | 350 | ||
351 | 351 | ||
352 | 352 | @Verifier(tx) | |
353 | 353 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
354 | 354 |
github/deemru/w8io/169f3d6 50.17 ms ◑