tx · H1SUpEXa863ijp7fS86XeAnKSBvesHBgjmEZLvG1kLAe

3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T:  -0.01400000 Waves

2022.05.11 12:48 [2046839] smart account 3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T > SELF 0.00000000 Waves

{ "type": 13, "id": "H1SUpEXa863ijp7fS86XeAnKSBvesHBgjmEZLvG1kLAe", "fee": 1400000, "feeAssetId": null, "timestamp": 1652262530032, "version": 1, "sender": "3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T", "senderPublicKey": "7iXEgsFNsnbLZ3ca4tmz8jffnyxMu9keuBV6CuQPJLuA", "proofs": [ "5iAWP9ZvxsGbsi2mquJwkrVa54T88aCmga6mTB8G3tR18hufdgaaYS3WtbVSDGb9iKGQQoivWY9unJmG85891kEe" ], "script": "base64:AAIFAAAAAAAAADQIAhILCgkICAgIAQgBCAESBAoCCAgSBQoDCAgEEgQKAggIEgMKAQESBAoCCAgSAwoBCBIAAAAAGwAAAAAJc2VwYXJhdG9yAgAAAAJfXwAAAAAMa2V5RmVlQW1vdW50CQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAADZmVlBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAOa2V5VXNkbkFzc2V0SWQJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAAAt1c2RuQXNzZXRJZAUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAAAAEWtleVZvdGluZ0R1cmF0aW9uCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAALZXBvY2hMZW5ndGgFAAAAA25pbAUAAAAJc2VwYXJhdG9yAAAAABFrZXlGaW5hbGl6ZVJld2FyZAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAADmZpbmFsaXplUmV3YXJkBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAASa2V5Vm90aW5nVGhyZXNob2xkCQAE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AAPdGFyZ2V0UHVibGljS2V5NuD9Lg==", "chainId": 84, "height": 2046839, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6fRp6dfcnfwgf5DffwywYQMKBLaTAFZhu8XDARq31cGD Next: EfH64ov9Pc8YTaE9prTQihx791knnLjqfEkZdejRVdLT Diff:
OldNewDifferences
2626 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
2727
2828
29-func keyInListAssetId (amountAssetId,priceAssetId) = makeString([("%s%s%s" + "inList"), amountAssetId, priceAssetId], separator)
29+func keyInListAssetId (amountAssetId,priceAssetId) = makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
3030
3131
32-func keyStartHeight (amountAssetId,priceAssetId) = makeString([("%s%s%s" + "startHeight"), amountAssetId, priceAssetId], separator)
32+func keyStartHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "startHeight", amountAssetId, priceAssetId], separator)
3333
3434
3535 func keyVotingResult (amountAssetId,priceAssetId) = makeString(["%s%s%s", "votingResult", amountAssetId, priceAssetId], separator)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let keyFeeAmount = makeString(["%s", "fee"], separator)
77
88 let keyUsdnAssetId = makeString(["%s", "usdnAssetId"], separator)
99
1010 let keyVotingDuration = makeString(["%s", "epochLength"], separator)
1111
1212 let keyFinalizeReward = makeString(["%s", "finalizeReward"], separator)
1313
1414 let keyVotingThreshold = makeString(["%s", "votingThreshold"], separator)
1515
1616 let keyWxAssetId = makeString(["%s", "wxAssetId"], separator)
1717
1818 let keyAssetsStoreContract = makeString(["%s", "assetsStoreContract"], separator)
1919
2020 let keyuserPoolContract = makeString(["%s", "userPoolContract"], separator)
2121
2222 let keyEmissionContract = makeString(["%s", "emissionContract"], separator)
2323
2424 let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
2525
2626 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
2727
2828
29-func keyInListAssetId (amountAssetId,priceAssetId) = makeString([("%s%s%s" + "inList"), amountAssetId, priceAssetId], separator)
29+func keyInListAssetId (amountAssetId,priceAssetId) = makeString(["%s%s%s", "inList", amountAssetId, priceAssetId], separator)
3030
3131
32-func keyStartHeight (amountAssetId,priceAssetId) = makeString([("%s%s%s" + "startHeight"), amountAssetId, priceAssetId], separator)
32+func keyStartHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "startHeight", amountAssetId, priceAssetId], separator)
3333
3434
3535 func keyVotingResult (amountAssetId,priceAssetId) = makeString(["%s%s%s", "votingResult", amountAssetId, priceAssetId], separator)
3636
3737
3838 func keyVote (amountAssetId,priceAssetId,voterAddress) = makeString(["%s%s%s%s", "vote", amountAssetId, priceAssetId, voterAddress], separator)
3939
4040
4141 func keyVoteValue (gwxAmount,vote) = {
4242 let key = if (vote)
4343 then makeString(["%d%s", gwxAmount, "yes"], separator)
4444 else makeString(["%d%s", gwxAmount, "no"], separator)
4545 key
4646 }
4747
4848
4949 func keyManagerPublicKey () = "%s__managerPublicKey"
5050
5151
5252 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
5353
5454
5555 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract))
5656
5757 let userPoolContract = addressFromStringValue(getStringOrFail(keyuserPoolContract))
5858
5959 let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract))
6060
6161 let assetStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract))
6262
6363 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
6464 case s: String =>
6565 fromBase58String(s)
6666 case _: Unit =>
6767 unit
6868 case _ =>
6969 throw("Match error")
7070 }
7171
7272
7373 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
7474 case s: String =>
7575 fromBase58String(s)
7676 case _: Unit =>
7777 unit
7878 case _ =>
7979 throw("Match error")
8080 }
8181
8282
8383 func mustManager (i) = {
8484 let pd = throw("Permission denied")
8585 match managerPublicKeyOrUnit() {
8686 case pk: ByteVector =>
8787 if ((i.callerPublicKey == pk))
8888 then true
8989 else pd
9090 case _: Unit =>
9191 if ((i.caller == this))
9292 then true
9393 else pd
9494 case _ =>
9595 throw("Match error")
9696 }
9797 }
9898
9999
100100 func asInt (val) = match val {
101101 case valInt: Int =>
102102 valInt
103103 case _ =>
104104 throw("Failed to cast into Integer")
105105 }
106106
107107
108108 @Callable(i)
109109 func constructor (assetsStoreContractPrm,userPoolContractPrm,boostingContractPrm,emissionContractPrm,feeAmountPrm,wxAssetIdPrm,votingDurationPrm,usdnAssetIdPrm,finalizeRewardPrm) = {
110110 let checks = [mustManager(i), if (isDefined(addressFromString(assetsStoreContractPrm)))
111111 then true
112112 else throw("Invalid asset_store contract address"), if (isDefined(addressFromString(boostingContractPrm)))
113113 then true
114114 else throw("Invalid boosting contract address"), if (isDefined(addressFromString(userPoolContractPrm)))
115115 then true
116116 else throw("Invalid user_pools contract address"), if (isDefined(addressFromString(emissionContractPrm)))
117117 then true
118118 else throw("Invalid emission contract address"), if ((feeAmountPrm >= 0))
119119 then true
120120 else throw("Invalid fee amount"), if ((votingDurationPrm > 0))
121121 then true
122122 else throw("Invalid voting duration"), if ((finalizeRewardPrm > 0))
123123 then true
124124 else throw("Invalid finalize reward"), if (isDefined(assetInfo(fromBase58String(wxAssetIdPrm))))
125125 then true
126126 else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String(usdnAssetIdPrm))))
127127 then true
128128 else throw("Invalid USDN asset ID")]
129129 if ((checks == checks))
130130 then $Tuple2([StringEntry(keyAssetsStoreContract, assetsStoreContractPrm), StringEntry(keyuserPoolContract, userPoolContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), IntegerEntry(keyFeeAmount, feeAmountPrm), IntegerEntry(keyVotingDuration, votingDurationPrm), IntegerEntry(keyFinalizeReward, finalizeRewardPrm), StringEntry(keyWxAssetId, wxAssetIdPrm), StringEntry(keyUsdnAssetId, usdnAssetIdPrm)], unit)
131131 else throw("Strict value is not equal to itself.")
132132 }
133133
134134
135135
136136 @Callable(i)
137137 func suggest (amountAssetId,priceAssetId) = {
138138 let payment = value(i.payments[0])
139139 let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "Invalid amountAssetId ID")
140140 let checks = [if ((info.issuer == i.caller))
141141 then true
142142 else throw("Asset can only be suggested by its issuer"), if ((info.scripted == false))
143143 then true
144144 else throw("Asset is smart"), if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId))))
145145 then true
146146 else throw("Invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount))))
147147 then true
148148 else throw("Invalid fee amount"), if ((priceAssetId == value(getString(keyUsdnAssetId))))
149149 then true
150150 else throw("priceAssetId is not USDN"), if ((getBoolean(keyInListAssetId(amountAssetId, priceAssetId)) == unit))
151151 then true
152152 else throw("Already in voting list")]
153153 if ((checks == checks))
154154 then {
155155 let ensureActive = match invoke(userPoolContract, "statusREADONLY", [amountAssetId, priceAssetId], nil) {
156156 case s: String =>
157157 if ((s == "active"))
158158 then true
159159 else throw("User pool is not active")
160160 case _ =>
161161 throw("User pool is not active")
162162 }
163163 if ((ensureActive == ensureActive))
164164 then {
165165 let ensureAmountAssetVerified = match invoke(assetStoreContract, "isVerifiedREADONLY", [amountAssetId], nil) {
166166 case b: Boolean =>
167167 b
168168 case _ =>
169169 throw("Asset is not verified")
170170 }
171171 if ((ensureAmountAssetVerified == ensureAmountAssetVerified))
172172 then {
173173 let burnFeeInv = invoke(emissionContract, "burn", nil, [AttachedPayment(payment.assetId, payment.amount)])
174174 if ((burnFeeInv == burnFeeInv))
175175 then [BooleanEntry(keyInListAssetId(amountAssetId, priceAssetId), true), IntegerEntry(keyStartHeight(amountAssetId, priceAssetId), height)]
176176 else throw("Strict value is not equal to itself.")
177177 }
178178 else throw("Strict value is not equal to itself.")
179179 }
180180 else throw("Strict value is not equal to itself.")
181181 }
182182 else throw("Strict value is not equal to itself.")
183183 }
184184
185185
186186
187187 @Callable(i)
188188 func vote (amountAssetId,priceAssetId,inFavor) = {
189189 let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId))) + value(getInteger(keyVotingDuration)))
190190 let checks = [if (valueOrElse(getBoolean(keyInListAssetId(amountAssetId, priceAssetId)), false))
191191 then true
192192 else throw("The token isn't on the voting list"), if ((height >= votingFinishHeight))
193193 then true
194194 else throw("too late to vote")]
195195 if ((checks == checks))
196196 then {
197197 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId))), separator)
198198 let positiveVotes = votingResult[1]
199199 let negativeVotes = votingResult[2]
200200 let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil)
201201 let entries = if (inFavor)
202202 then {
203203 let newPositiveVotes = (parseIntValue(positiveVotes) + asInt(gwxAmount))
204204 let totalVotes = makeString(["%d%d", toString(newPositiveVotes), negativeVotes], separator)
205205 let yesVoteKey = keyVote(amountAssetId, priceAssetId, toString(i.caller))
206206 let yesVoteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor)
207207 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes), StringEntry(yesVoteKey, yesVoteValue)], unit)
208208 }
209209 else {
210210 let newNegativeVotes = (parseIntValue(negativeVotes) + asInt(gwxAmount))
211211 let totalVotes = makeString(["%d%d", positiveVotes, toString(newNegativeVotes)], separator)
212212 let noVoteKey = keyVote(amountAssetId, priceAssetId, toString(i.caller))
213213 let noVoteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor)
214214 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes), StringEntry(noVoteKey, noVoteValue)], unit)
215215 }
216216 entries
217217 }
218218 else throw("Strict value is not equal to itself.")
219219 }
220220
221221
222222
223223 @Callable(i)
224224 func cancelVote (amountAssetId,priceAssetId) = {
225225 let checks = [if (isDefined(keyVotingResult(amountAssetId, priceAssetId)))
226226 then true
227227 else throw("No vote for assets pair")]
228228 if ((checks == checks))
229229 then {
230230 let vote = split(value(getString(keyVote(amountAssetId, priceAssetId, toString(i.caller)))), separator)
231231 let voteValue = vote[1]
232232 let voteType = vote[2]
233233 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId))), separator)
234234 let positiveVotes = votingResult[1]
235235 let negativeVotes = votingResult[2]
236236 let actions = if ((voteType == "yes"))
237237 then {
238238 let newPositiveVotes = (parseIntValue(positiveVotes) - parseIntValue(voteValue))
239239 let totalVotes = makeString(["%d%d", toString(newPositiveVotes), negativeVotes], separator)
240240 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes), DeleteEntry(keyVote(amountAssetId, priceAssetId, toString(i.caller)))], unit)
241241 }
242242 else {
243243 let newNegativeVotes = (parseIntValue(negativeVotes) - parseIntValue(voteValue))
244244 let totalVotes = makeString(["%d%d", toString(newNegativeVotes), negativeVotes], separator)
245245 $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes), DeleteEntry(keyVote(amountAssetId, priceAssetId, toString(i.caller)))], unit)
246246 }
247247 actions
248248 }
249249 else throw("Strict value is not equal to itself.")
250250 }
251251
252252
253253
254254 @Callable(i)
255255 func setFee (newFee) = {
256256 let checks = [mustManager(i)]
257257 if ((checks == checks))
258258 then [IntegerEntry(keyFeeAmount, newFee)]
259259 else throw("Strict value is not equal to itself.")
260260 }
261261
262262
263263
264264 @Callable(i)
265265 func finalize (amountAssetId,priceAssetId) = {
266266 let votingFinishHeight = (value(getInteger(keyStartHeight(amountAssetId, priceAssetId))) + value(getInteger(keyVotingDuration)))
267267 let checks = [if (isDefined(keyInListAssetId(amountAssetId, priceAssetId)))
268268 then true
269269 else throw("No assets pair"), if ((votingFinishHeight > height))
270270 then true
271271 else throw("insufficient height for completion")]
272272 if ((checks == checks))
273273 then {
274274 let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId))), separator)
275275 let positiveVotes = parseIntValue(votingResult[1])
276276 let negativeVotes = parseIntValue(votingResult[2])
277277 let actions = if ((positiveVotes > negativeVotes))
278278 then {
279279 let res = invoke(assetStoreContract, "setPoolLabels", [amountAssetId, priceAssetId, "WX_EMISSION"], nil)
280280 if ((res == res))
281281 then $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit)
282282 else throw("Strict value is not equal to itself.")
283283 }
284284 else $Tuple2([DeleteEntry(keyInListAssetId(amountAssetId, priceAssetId))], unit)
285285 actions
286286 }
287287 else throw("Strict value is not equal to itself.")
288288 }
289289
290290
291291
292292 @Callable(i)
293293 func setManager (pendingManagerPublicKey) = {
294294 let checkCaller = mustManager(i)
295295 if ((checkCaller == checkCaller))
296296 then {
297297 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
298298 if ((checkManagerPublicKey == checkManagerPublicKey))
299299 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
300300 else throw("Strict value is not equal to itself.")
301301 }
302302 else throw("Strict value is not equal to itself.")
303303 }
304304
305305
306306
307307 @Callable(i)
308308 func confirmManager () = {
309309 let pm = pendingManagerPublicKeyOrUnit()
310310 let hasPM = if (isDefined(pm))
311311 then true
312312 else throw("No pending manager")
313313 if ((hasPM == hasPM))
314314 then {
315315 let checkPM = if ((i.callerPublicKey == value(pm)))
316316 then true
317317 else throw("You are not pending manager")
318318 if ((checkPM == checkPM))
319319 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
320320 else throw("Strict value is not equal to itself.")
321321 }
322322 else throw("Strict value is not equal to itself.")
323323 }
324324
325325
326326 @Verifier(tx)
327327 func verify () = {
328328 let targetPublicKey = match managerPublicKeyOrUnit() {
329329 case pk: ByteVector =>
330330 pk
331331 case _: Unit =>
332332 tx.senderPublicKey
333333 case _ =>
334334 throw("Match error")
335335 }
336336 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
337337 }
338338

github/deemru/w8io/169f3d6 
48.65 ms