tx · 33uXFZ8zGM7rCtMiwjUDvFfCmEQNcRmXi6aLrRCwcZ2v

3Mzgi6deFV8CyF2nqbWSBkqba5JaD42EXyb:  -0.01400000 Waves

2021.11.15 14:02 [1792059] smart account 3Mzgi6deFV8CyF2nqbWSBkqba5JaD42EXyb > SELF 0.00000000 Waves

{ "type": 13, "id": "33uXFZ8zGM7rCtMiwjUDvFfCmEQNcRmXi6aLrRCwcZ2v", "fee": 1400000, "feeAssetId": null, "timestamp": 1636974148890, "version": 2, "chainId": 84, "sender": "3Mzgi6deFV8CyF2nqbWSBkqba5JaD42EXyb", "senderPublicKey": "61fhePmC5L8iWserAMXoPAZbv24cAo6eyvnyYpoLpZJy", "proofs": [ "5kCrBikzGF7xyrpjdve8XwPV2aXZxC919hSiToKm7av6oxkLDnw9QjiRj5GvPjw2KuYdBXNJk7Eg6bKRUVxG9Vem", "4FariDofdRLaehhTGpqDtBzuork7ULvdZkSEtWs9tRSc6rgq2ZRRa82BvKwQfioiYe6kGKjBhGQrd7UAuAa7zaUc" ], "script": "base64:AAIEAAAAAAAAABsIAhIAEgQKAggIEgUKAwEEARIECgIBCBIAEgAAAAA6AAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAEWtleU51bWJlck9mVm90aW5nAgAAABR2b3RpbmdfYWN0aXZlX251bWJlcgAAAAAPa2V5SGVpZ2h0T2ZQb29sAgAAAA5fZmluaXNoX2hlaWdodAAAAAAFa2V5Tm8CAAAAD190b3RhbF92b3Rlc19ubwAAAAAGa2V5WWVzAgAAABBfdG90YWxfdm90ZXNfeWVzAAAAAAlrZXlOb1VzZXICAAAACF92b3RlX25vAAAAAAprZXlZZXNVc2VyAgAAAAlfdm90ZV95ZXMAAAAAEWtleVN0YXR1c09mVm90aW5nAgAAAAdfc3RhdHVzAAAAABFrZXlBbW91bnRPZlZvdGluZwIAAAAOd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AAAAAAAAAABAAAABJhZG1pblB1YktleTNTaWduZWQDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAAMYWRtaW5QdWJLZXkzAAAAAAAAAAABAAAAAAAAAAAACQAAZwAAAAIJAABkAAAAAgkAAGQAAAACBQAAABJhZG1pblB1YktleTFTaWduZWQFAAAAEmFkbWluUHViS2V5MlNpZ25lZAUAAAASYWRtaW5QdWJLZXkzU2lnbmVkAAAAAAAAAAACNlaXCw==", "height": 1792059, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D9T5bzoNoAg6zHGT1cwFwxYtxZVHxrz9axw7Kiv4U88u Next: 3tFSfG4t8GfuYP7RNKicdHAF9xBAMvjFp2kjmgdYWfs5 Diff:
OldNewDifferences
4949
5050 let activeVoteThird = "voting_active_cell_3"
5151
52-let keyPair = "pair_"
52+let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy'
5353
54-let keyOraclePoolIndex = "index_"
54+let adminPubKey2 = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk'
5555
56-let keyPoolInFarming = "_current_reward"
57-
58-let keyAdminPubKey1 = "admin_pub_1"
59-
60-let keyAdminPubKey2 = "admin_pub_2"
61-
62-let keyAdminPubKey3 = "admin_pub_3"
63-
64-let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
65-
66-func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) {
67- case string: String =>
68- fromBase58String(string)
69- case nothing =>
70- throw("Admin public key is empty")
71-}
72-
73-
74-let adminPubKey1 = getAdminPub(keyAdminPubKey1)
75-
76-let adminPubKey2 = getAdminPub(keyAdminPubKey2)
77-
78-let adminPubKey3 = getAdminPub(keyAdminPubKey3)
56+let adminPubKey3 = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP'
7957
8058 let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
8159
8361
8462 let govAddr = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
8563
86-let farmingAddress = Address(base58'3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT')
87-
8864 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
8965
9066 let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ'
67+
68+let EAST = base58'BGFpLHKYAnTLq28F4i8Lpe8UTn5oB85cwsa9nWdhJBZ7'
9169
9270 let isActive = getBooleanValue(this, keyActive)
9371
133111 }
134112
135113
136-func isActivePoolExists (pools,address) = {
114+func isActivePoolExists (pools,assetA,assetB) = {
137115 let poolsData = split(pools, "_")
138116 let isPoolDefine = isDefined(getInteger(this, pools))
139117 if (if (isPoolDefine)
140118 then (pools != "")
141119 else false)
142120 then {
143- let voting = poolsData[1]
144- let newPools = (((address + "_") + voting) + votingId)
121+ let voting = poolsData[2]
122+ let newPools = (((((assetA + "_") + assetB) + "_") + voting) + votingId)
145123 let isNewPoolDefine = isDefined(getInteger(this, newPools))
146124 let heightOfVoting = valueOrElse(getInteger(this, (voting + keyHeightOfPool)), 0)
147125 let statusOfVoting = valueOrElse(getBoolean(this, (voting + keyStatusOfVoting)), true)
178156 }
179157
180158
181-func isLastActivePoolExists (address) = if (if (isActivePoolExists(firstActiveVote, address))
159+func isLastActivePoolExists (assetA,assetB) = if (if (isActivePoolExists(firstActiveVote, assetA, assetB))
182160 then true
183- else isActivePoolExists(secondActiveVote, address))
161+ else isActivePoolExists(secondActiveVote, assetA, assetB))
184162 then true
185- else isActivePoolExists(thirdActiveVote, address)
163+ else isActivePoolExists(thirdActiveVote, assetA, assetB)
186164
187165
188166 func getActivePool (voting) = {
243221
244222
245223 @Callable(i)
246-func initVotingForNewPool (address) = {
247- let $t072297304 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
248- let pmtAmount = $t072297304._1
249- let pmtAssetId = $t072297304._2
224+func initVotingForNewPool (assetA,assetB) = {
225+ let $t069377012 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
226+ let pmtAmount = $t069377012._1
227+ let pmtAssetId = $t069377012._2
228+ let $t070177116 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
229+ let poolAssetIdA = $t070177116._1
230+ let poolAssetIdB = $t070177116._2
250231 let unactiveVote = getUnactiveVotingPool()
251232 let newNumberOfVoting = getActiveVotingPoolAmount()
252- let isPoolExists = isLastActivePoolExists(address)
233+ let isPoolExists = isLastActivePoolExists(assetA, assetB)
234+ let $t072867364 = getAssetInfo(poolAssetIdA)
235+ let pmtStrAssetIdA = $t072867364._1
236+ let pmtAssetNameA = $t072867364._2
237+ let pmtDecimalsA = $t072867364._3
238+ let $t073697447 = getAssetInfo(poolAssetIdB)
239+ let pmtStrAssetIdB = $t073697447._1
240+ let pmtAssetNameB = $t073697447._2
241+ let pmtDecimalsB = $t073697447._3
253242 if (!(isActive))
254243 then throw("DApp is inactive at this moment")
255- else if (!(isDefined(getInteger(oracle, (keyOraclePoolIndex + address)))))
256- then throw("Pool must be in oracle")
257- else if (isDefined(getString(farmingAddress, (address + keyPoolInFarming))))
258- then throw("Pool already in farming")
259- else if (isPoolExists)
260- then throw("This pool already exists")
261- else if (if (((newNumberOfVoting + 1) > maxAmountOfVoting))
262- then true
263- else (unactiveVote == ""))
264- then throw(("Too many votings. Maximum quantity: " + toString(maxAmountOfVoting)))
265- else if ((size(i.payments) != 1))
266- then throw("One attached asset expected")
267- else if ((pmtAssetId != SWOP))
268- then throw("You must use a SWOP token")
244+ else if ((poolAssetIdA == poolAssetIdB))
245+ then throw("Assets must be different")
246+ else if (isPoolExists)
247+ then throw("This pool already exists")
248+ else if (if (((newNumberOfVoting + 1) > maxAmountOfVoting))
249+ then true
250+ else (unactiveVote == ""))
251+ then throw(("Too many votings. Maximum quantity: " + toString(maxAmountOfVoting)))
252+ else if ((size(i.payments) != 1))
253+ then throw("One attached asset expected")
254+ else if ((pmtAssetId != SWOP))
255+ then throw("You must use a SWOP token")
256+ else if (if ((assetA == ""))
257+ then true
258+ else (assetB == ""))
259+ then throw("Assets can't be empty")
269260 else if ((pmtAmount != comissionForInitalizationOfVoting))
270261 then throw("You need to attach 10 SWOP tokens")
271- else [IntegerEntry(((address + toString(amountOfVoting)) + votingId), amountOfVoting), IntegerEntry((toString(amountOfVoting) + keyHeightOfPool), (height + votingPeriodLength)), BooleanEntry((toString(amountOfVoting) + keyStatusOfVoting), true), IntegerEntry(keyAmountOfVoting, (amountOfVoting + 1)), IntegerEntry(keyNumberOfVoting, (newNumberOfVoting + 1)), StringEntry(unactiveVote, ((address + toString(amountOfVoting)) + votingId)), ScriptTransfer(walletAddress, pmtAmount, pmtAssetId)]
262+ else if (!(if (if (if ((poolAssetIdB == USDN))
263+ then true
264+ else (poolAssetIdB == unit))
265+ then true
266+ else (poolAssetIdB == SWOP))
267+ then true
268+ else (poolAssetIdB == EAST)))
269+ then throw("assetB must be USDN, WAVES or SWOP")
270+ else [IntegerEntry((((((assetA + "_") + assetB) + "_") + toString(amountOfVoting)) + votingId), amountOfVoting), IntegerEntry((toString(amountOfVoting) + keyHeightOfPool), (height + votingPeriodLength)), 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)]
272271 }
273272
274273
284283 else (valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYesUser)), 0) + voteAmt)
285284 if (!(isCallerInGovernance(i.caller)))
286285 then throw("This address has 0 SWOP in Governance dApp")
287- else if (!(isActive))
288- then throw("DApp is inactive at this moment")
289- else if (!(statusOfVoting))
290- then throw("This voting was canceled")
291- else if ((currentHeight > poolInitHeight))
292- then throw("This voting was expired")
293- else if ((0 > voteAmt))
294- then throw("The number of votes must be positive")
295- else if ((totalVoteUser > userSWOPinGovernance))
296- then throw((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance."))
297- else if (yesOrNo)
298- then {
299- let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYesUser)), 0)
300- let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyYes)), 0) - oldVoteUser) + voteAmt)
286+ else if (!(statusOfVoting))
287+ then throw("This voting was canceled")
288+ else if ((currentHeight > poolInitHeight))
289+ then throw("This voting was expired")
290+ else if ((0 > voteAmt))
291+ then throw("The number of votes must be positive")
292+ else if ((totalVoteUser > userSWOPinGovernance))
293+ then throw((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance."))
294+ else if (yesOrNo)
295+ then {
296+ let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYesUser)), 0)
297+ let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyYes)), 0) - oldVoteUser) + voteAmt)
301298 [IntegerEntry((toString(voting) + keyYes), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyYesUser), voteAmt)]
302- }
303- else {
304- let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNoUser)), 0)
305- let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyNo)), 0) - oldVoteUser) + voteAmt)
299+ }
300+ else {
301+ let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNoUser)), 0)
302+ let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyNo)), 0) - oldVoteUser) + voteAmt)
306303 [IntegerEntry((toString(voting) + keyNo), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyNoUser), voteAmt)]
307- }
304+ }
308305 }
309306
310307
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let version = "1.0.0"
55
66 let keyVersion = "version"
77
88 let keyActive = "active"
99
1010 let keyNumberOfVoting = "voting_active_number"
1111
1212 let keyHeightOfPool = "_finish_height"
1313
1414 let keyNo = "_total_votes_no"
1515
1616 let keyYes = "_total_votes_yes"
1717
1818 let keyNoUser = "_vote_no"
1919
2020 let keyYesUser = "_vote_yes"
2121
2222 let keyStatusOfVoting = "_status"
2323
2424 let keyAmountOfVoting = "voting_id_last"
2525
2626 let keyMaxAmountOfVoting = "max_amount_voting"
2727
2828 let keyMaxDayOfVoting = "max_day_voting"
2929
3030 let keyCommission = "commission"
3131
3232 let keyCommissionScaleDelimiter = "commission_scale_delimiter"
3333
3434 let keyCause = "shutdown_cause"
3535
3636 let keyCancelCause = "_cancel_cause"
3737
3838 let kUserTotalSWOP = "_SWOP_amount"
3939
4040 let kName = "_asset_name"
4141
4242 let votingId = "_voting"
4343
4444 let periodOfVoting = "period_voting"
4545
4646 let activeVoteFirst = "voting_active_cell_1"
4747
4848 let activeVoteSecond = "voting_active_cell_2"
4949
5050 let activeVoteThird = "voting_active_cell_3"
5151
52-let keyPair = "pair_"
52+let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy'
5353
54-let keyOraclePoolIndex = "index_"
54+let adminPubKey2 = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk'
5555
56-let keyPoolInFarming = "_current_reward"
57-
58-let keyAdminPubKey1 = "admin_pub_1"
59-
60-let keyAdminPubKey2 = "admin_pub_2"
61-
62-let keyAdminPubKey3 = "admin_pub_3"
63-
64-let oracle = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
65-
66-func getAdminPub (keyAdminPub) = match getString(oracle, keyAdminPub) {
67- case string: String =>
68- fromBase58String(string)
69- case nothing =>
70- throw("Admin public key is empty")
71-}
72-
73-
74-let adminPubKey1 = getAdminPub(keyAdminPubKey1)
75-
76-let adminPubKey2 = getAdminPub(keyAdminPubKey2)
77-
78-let adminPubKey3 = getAdminPub(keyAdminPubKey3)
56+let adminPubKey3 = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP'
7957
8058 let adminPubKeyStartStop = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
8159
8260 let walletAddress = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4')
8361
8462 let govAddr = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU')
8563
86-let farmingAddress = Address(base58'3MsxHxruYWoddB4HRiPBYAWtMXMtCF1V9XT')
87-
8864 let USDN = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS'
8965
9066 let SWOP = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ'
67+
68+let EAST = base58'BGFpLHKYAnTLq28F4i8Lpe8UTn5oB85cwsa9nWdhJBZ7'
9169
9270 let isActive = getBooleanValue(this, keyActive)
9371
9472 let numberOfVoting = getIntegerValue(this, keyNumberOfVoting)
9573
9674 let amountOfVoting = getIntegerValue(this, keyAmountOfVoting)
9775
9876 let firstActiveVote = valueOrElse(getString(this, activeVoteFirst), "")
9977
10078 let secondActiveVote = valueOrElse(getString(this, activeVoteSecond), "")
10179
10280 let thirdActiveVote = valueOrElse(getString(this, activeVoteThird), "")
10381
10482 let comissionForInitalizationOfVoting = 1000000000
10583
10684 let scaleValue3 = 1000
10785
10886 let scaleValue8 = 100000000
10987
11088 let slippageToleranceDelimiter = 1000
11189
11290 let scaleValue8Digits = 8
11391
11492 let maxAmountOfVoting = 3
11593
11694 let maxDayOfVoting = 7
11795
11896 let votingPeriodLength = (1443 * maxDayOfVoting)
11997
12098 func getAssetInfo (assetId) = match assetId {
12199 case id: ByteVector =>
122100 if (isDefined(assetInfo(id)))
123101 then {
124102 let stringId = toBase58String(id)
125103 let info = valueOrErrorMessage(assetInfo(id), (("Asset " + stringId) + " doesn't exist"))
126104 $Tuple3(stringId, info.name, info.decimals)
127105 }
128106 else throw("Asset is not defined")
129107 case waves: Unit =>
130108 $Tuple3("WAVES", "WAVES", 8)
131109 case _ =>
132110 throw("Match error")
133111 }
134112
135113
136-func isActivePoolExists (pools,address) = {
114+func isActivePoolExists (pools,assetA,assetB) = {
137115 let poolsData = split(pools, "_")
138116 let isPoolDefine = isDefined(getInteger(this, pools))
139117 if (if (isPoolDefine)
140118 then (pools != "")
141119 else false)
142120 then {
143- let voting = poolsData[1]
144- let newPools = (((address + "_") + voting) + votingId)
121+ let voting = poolsData[2]
122+ let newPools = (((((assetA + "_") + assetB) + "_") + voting) + votingId)
145123 let isNewPoolDefine = isDefined(getInteger(this, newPools))
146124 let heightOfVoting = valueOrElse(getInteger(this, (voting + keyHeightOfPool)), 0)
147125 let statusOfVoting = valueOrElse(getBoolean(this, (voting + keyStatusOfVoting)), true)
148126 if (isNewPoolDefine)
149127 then if ((heightOfVoting > height))
150128 then if (statusOfVoting)
151129 then true
152130 else false
153131 else false
154132 else false
155133 }
156134 else false
157135 }
158136
159137
160138 func isUnactivePoolExists (poolsState) = {
161139 let pools = valueOrElse(getString(this, poolsState), "")
162140 let poolsData = split(pools, "_")
163141 let isPoolDefine = isDefined(getInteger(this, pools))
164142 if (if (isPoolDefine)
165143 then (pools != "")
166144 else false)
167145 then {
168146 let voting = poolsData[2]
169147 let heightOfVoting = valueOrElse(getInteger(this, (voting + keyHeightOfPool)), 0)
170148 let statusOfVoting = valueOrElse(getBoolean(this, (voting + keyStatusOfVoting)), true)
171149 if ((heightOfVoting > height))
172150 then if (statusOfVoting)
173151 then ""
174152 else poolsState
175153 else poolsState
176154 }
177155 else poolsState
178156 }
179157
180158
181-func isLastActivePoolExists (address) = if (if (isActivePoolExists(firstActiveVote, address))
159+func isLastActivePoolExists (assetA,assetB) = if (if (isActivePoolExists(firstActiveVote, assetA, assetB))
182160 then true
183- else isActivePoolExists(secondActiveVote, address))
161+ else isActivePoolExists(secondActiveVote, assetA, assetB))
184162 then true
185- else isActivePoolExists(thirdActiveVote, address)
163+ else isActivePoolExists(thirdActiveVote, assetA, assetB)
186164
187165
188166 func getActivePool (voting) = {
189167 let heightOfVoting = valueOrElse(getInteger(this, (toString(voting) + keyHeightOfPool)), 0)
190168 let statusOfVoting = valueOrElse(getBoolean(this, (toString(voting) + keyStatusOfVoting)), true)
191169 let currentHeight = height
192170 if ((0 > voting))
193171 then 0
194172 else if (!(statusOfVoting))
195173 then 0
196174 else if ((heightOfVoting > currentHeight))
197175 then 1
198176 else 0
199177 }
200178
201179
202180 func getActiveVotingPoolAmount () = ((getActivePool(valueOrElse(getInteger(this, firstActiveVote), -1)) + getActivePool(valueOrElse(getInteger(this, secondActiveVote), -1))) + getActivePool(valueOrElse(getInteger(this, thirdActiveVote), -1)))
203181
204182
205183 func getUnactiveVotingPool () = if ((isUnactivePoolExists(activeVoteFirst) != ""))
206184 then activeVoteFirst
207185 else if ((isUnactivePoolExists(activeVoteSecond) != ""))
208186 then activeVoteSecond
209187 else if ((isUnactivePoolExists(activeVoteThird) != ""))
210188 then activeVoteThird
211189 else ""
212190
213191
214192 func getAssetInfoFromString (assetStr) = if ((assetStr == "WAVES"))
215193 then unit
216194 else fromBase58String(assetStr)
217195
218196
219197 func isCallerInGovernance (user) = if ((valueOrElse(getInteger(govAddr, (toString(user) + kUserTotalSWOP)), 0) > 0))
220198 then true
221199 else false
222200
223201
224202 func suspend (cause) = [BooleanEntry(keyActive, false), StringEntry(keyCause, cause)]
225203
226204
227205 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"))
228206
229207
230208 @Callable(i)
231209 func init () = if ((i.caller != this))
232210 then throw("Only the DApp itself can call this function")
233211 else if (isDefined(getBoolean(this, keyActive)))
234212 then throw("DApp is already active")
235213 else {
236214 let initNumberOfVoting = 0
237215 let initAmountOfVoting = 0
238216 let initKeyActive = true
239217 let activeInit = ""
240218 [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)]
241219 }
242220
243221
244222
245223 @Callable(i)
246-func initVotingForNewPool (address) = {
247- let $t072297304 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
248- let pmtAmount = $t072297304._1
249- let pmtAssetId = $t072297304._2
224+func initVotingForNewPool (assetA,assetB) = {
225+ let $t069377012 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
226+ let pmtAmount = $t069377012._1
227+ let pmtAssetId = $t069377012._2
228+ let $t070177116 = $Tuple2(getAssetInfoFromString(assetA), getAssetInfoFromString(assetB))
229+ let poolAssetIdA = $t070177116._1
230+ let poolAssetIdB = $t070177116._2
250231 let unactiveVote = getUnactiveVotingPool()
251232 let newNumberOfVoting = getActiveVotingPoolAmount()
252- let isPoolExists = isLastActivePoolExists(address)
233+ let isPoolExists = isLastActivePoolExists(assetA, assetB)
234+ let $t072867364 = getAssetInfo(poolAssetIdA)
235+ let pmtStrAssetIdA = $t072867364._1
236+ let pmtAssetNameA = $t072867364._2
237+ let pmtDecimalsA = $t072867364._3
238+ let $t073697447 = getAssetInfo(poolAssetIdB)
239+ let pmtStrAssetIdB = $t073697447._1
240+ let pmtAssetNameB = $t073697447._2
241+ let pmtDecimalsB = $t073697447._3
253242 if (!(isActive))
254243 then throw("DApp is inactive at this moment")
255- else if (!(isDefined(getInteger(oracle, (keyOraclePoolIndex + address)))))
256- then throw("Pool must be in oracle")
257- else if (isDefined(getString(farmingAddress, (address + keyPoolInFarming))))
258- then throw("Pool already in farming")
259- else if (isPoolExists)
260- then throw("This pool already exists")
261- else if (if (((newNumberOfVoting + 1) > maxAmountOfVoting))
262- then true
263- else (unactiveVote == ""))
264- then throw(("Too many votings. Maximum quantity: " + toString(maxAmountOfVoting)))
265- else if ((size(i.payments) != 1))
266- then throw("One attached asset expected")
267- else if ((pmtAssetId != SWOP))
268- then throw("You must use a SWOP token")
244+ else if ((poolAssetIdA == poolAssetIdB))
245+ then throw("Assets must be different")
246+ else if (isPoolExists)
247+ then throw("This pool already exists")
248+ else if (if (((newNumberOfVoting + 1) > maxAmountOfVoting))
249+ then true
250+ else (unactiveVote == ""))
251+ then throw(("Too many votings. Maximum quantity: " + toString(maxAmountOfVoting)))
252+ else if ((size(i.payments) != 1))
253+ then throw("One attached asset expected")
254+ else if ((pmtAssetId != SWOP))
255+ then throw("You must use a SWOP token")
256+ else if (if ((assetA == ""))
257+ then true
258+ else (assetB == ""))
259+ then throw("Assets can't be empty")
269260 else if ((pmtAmount != comissionForInitalizationOfVoting))
270261 then throw("You need to attach 10 SWOP tokens")
271- else [IntegerEntry(((address + toString(amountOfVoting)) + votingId), amountOfVoting), IntegerEntry((toString(amountOfVoting) + keyHeightOfPool), (height + votingPeriodLength)), BooleanEntry((toString(amountOfVoting) + keyStatusOfVoting), true), IntegerEntry(keyAmountOfVoting, (amountOfVoting + 1)), IntegerEntry(keyNumberOfVoting, (newNumberOfVoting + 1)), StringEntry(unactiveVote, ((address + toString(amountOfVoting)) + votingId)), ScriptTransfer(walletAddress, pmtAmount, pmtAssetId)]
262+ else if (!(if (if (if ((poolAssetIdB == USDN))
263+ then true
264+ else (poolAssetIdB == unit))
265+ then true
266+ else (poolAssetIdB == SWOP))
267+ then true
268+ else (poolAssetIdB == EAST)))
269+ then throw("assetB must be USDN, WAVES or SWOP")
270+ else [IntegerEntry((((((assetA + "_") + assetB) + "_") + toString(amountOfVoting)) + votingId), amountOfVoting), IntegerEntry((toString(amountOfVoting) + keyHeightOfPool), (height + votingPeriodLength)), 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)]
272271 }
273272
274273
275274
276275 @Callable(i)
277276 func voteForPool (voting,yesOrNo,voteAmt) = {
278277 let currentHeight = height
279278 let poolInitHeight = valueOrErrorMessage(getIntegerValue(this, (toString(voting) + keyHeightOfPool)), "Empty pool height")
280279 let statusOfVoting = valueOrElse(getBoolean(this, (toString(voting) + keyStatusOfVoting)), true)
281280 let userSWOPinGovernance = valueOrElse(getInteger(govAddr, (toString(i.caller) + kUserTotalSWOP)), 0)
282281 let totalVoteUser = if (yesOrNo)
283282 then (valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNoUser)), 0) + voteAmt)
284283 else (valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYesUser)), 0) + voteAmt)
285284 if (!(isCallerInGovernance(i.caller)))
286285 then throw("This address has 0 SWOP in Governance dApp")
287- else if (!(isActive))
288- then throw("DApp is inactive at this moment")
289- else if (!(statusOfVoting))
290- then throw("This voting was canceled")
291- else if ((currentHeight > poolInitHeight))
292- then throw("This voting was expired")
293- else if ((0 > voteAmt))
294- then throw("The number of votes must be positive")
295- else if ((totalVoteUser > userSWOPinGovernance))
296- then throw((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance."))
297- else if (yesOrNo)
298- then {
299- let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYesUser)), 0)
300- let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyYes)), 0) - oldVoteUser) + voteAmt)
286+ else if (!(statusOfVoting))
287+ then throw("This voting was canceled")
288+ else if ((currentHeight > poolInitHeight))
289+ then throw("This voting was expired")
290+ else if ((0 > voteAmt))
291+ then throw("The number of votes must be positive")
292+ else if ((totalVoteUser > userSWOPinGovernance))
293+ then throw((((toString(this) + " has ") + toString(userSWOPinGovernance)) + " SWOP in governance."))
294+ else if (yesOrNo)
295+ then {
296+ let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyYesUser)), 0)
297+ let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyYes)), 0) - oldVoteUser) + voteAmt)
301298 [IntegerEntry((toString(voting) + keyYes), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyYesUser), voteAmt)]
302- }
303- else {
304- let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNoUser)), 0)
305- let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyNo)), 0) - oldVoteUser) + voteAmt)
299+ }
300+ else {
301+ let oldVoteUser = valueOrElse(getInteger(this, (((toString(i.caller) + "_") + toString(voting)) + keyNoUser)), 0)
302+ let newVote = ((valueOrElse(getInteger(this, (toString(voting) + keyNo)), 0) - oldVoteUser) + voteAmt)
306303 [IntegerEntry((toString(voting) + keyNo), newVote), IntegerEntry((((toString(i.caller) + "_") + toString(voting)) + keyNoUser), voteAmt)]
307- }
304+ }
308305 }
309306
310307
311308
312309 @Callable(i)
313310 func cancelVoting (voting,cause) = {
314311 let statusOfVoting = valueOrElse(getBoolean(this, (toString(voting) + keyStatusOfVoting)), true)
315312 if (!(isActive))
316313 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
317314 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
318315 then throw("Only admin can call this function")
319316 else if (!(statusOfVoting))
320317 then throw((("Voting " + toString(voting)) + " has already been stopped"))
321318 else [IntegerEntry(keyNumberOfVoting, (numberOfVoting - 1)), BooleanEntry((toString(voting) + keyStatusOfVoting), false), StringEntry((toString(voting) + keyCancelCause), cause)]
322319 }
323320
324321
325322
326323 @Callable(i)
327324 func shutdown () = if (!(isActive))
328325 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, keyCause), "the cause wasn't specified")))
329326 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
330327 then throw("Only admin can call this function")
331328 else suspend("Paused by admin")
332329
333330
334331
335332 @Callable(i)
336333 func activate () = if (isActive)
337334 then throw("DApp is already active")
338335 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, adminPubKeyStartStop], i.callerPublicKey)))
339336 then throw("Only admin can call this function")
340337 else [BooleanEntry(keyActive, true), DeleteEntry(keyCause)]
341338
342339
343340 @Verifier(tx)
344341 func verify () = {
345342 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
346343 then 1
347344 else 0
348345 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
349346 then 1
350347 else 0
351348 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
352349 then 1
353350 else 0
354351 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
355352 }
356353

github/deemru/w8io/3ef1775 
77.73 ms