tx · J7CtRfvmR6nxAmVpGH798a1n9V3WL4HU17ZVEzPLqXak

3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T:  -0.01400000 Waves

2022.04.29 15:59 [2029795] smart account 3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T > SELF 0.00000000 Waves

{ "type": 13, "id": "J7CtRfvmR6nxAmVpGH798a1n9V3WL4HU17ZVEzPLqXak", "fee": 1400000, "feeAssetId": null, "timestamp": 1651237181832, "version": 1, "sender": "3N1Epwa6GQuTQr2K9WzeUcqSFCdERwuvL5T", "senderPublicKey": "7iXEgsFNsnbLZ3ca4tmz8jffnyxMu9keuBV6CuQPJLuA", "proofs": [ "5EZEVLxdjSEpKZExrLeRyWYD4G9EBuYbmUYTJ4H6pF2M5VLSBLps4vcNqTsE9sf82TmBEtSyF4jCZw2AJYBGQeQJ" ], "script": "base64:AAIFAAAAAAAAACMIAhILCgkICAgIAQgBAQgSBAoCCAgSBQoDCAgEEgMKAQgSAAAAABgAAAAACXNlcGFyYXRvcgIAAAACX18AAAAADGtleUZlZUFtb3VudAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAAA2ZlZQUAAAADbmlsBQAAAAlzZXBhcmF0b3IAAAAADmtleVVzZG5Bc3NldElkCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAALdXNkbkFzc2V0SWQFAAAAA25pbAUAAAAJc2VwYXJhdG9yAAAAABFrZXlWb3RpbmdEdXJhdGlvbgkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAAC2Vwb2NoTGVuZ3RoBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAASa2V5Vm90aW5nVGhyZXNob2xkCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAPdm90aW5nVGhyZXNob2xkBQAAAANuaWwFAAAACXNlcGFyYXRvcgAAAAAMa2V5V3hBc3NldElkCQAEuQAAAAIJAARMAAAAAgIAAAAC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AACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleWIann0=", "chainId": 84, "height": 2029795, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 9mtHfAgaGN7N91fkPGmPhsUBTh3D6wTaYQWxY2A7hnSX Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let separator = "__"
5+
6+let keyFeeAmount = makeString(["%s", "fee"], separator)
7+
8+let keyUsdnAssetId = makeString(["%s", "usdnAssetId"], separator)
9+
10+let keyVotingDuration = makeString(["%s", "epochLength"], separator)
11+
12+let keyVotingThreshold = makeString(["%s", "votingThreshold"], separator)
13+
14+let keyWxAssetId = makeString(["%s", "wxAssetId"], separator)
15+
16+let keyAssetsStoreContract = makeString(["%s", "assetsStoreContract"], separator)
17+
18+let keyuserPoolContract = makeString(["%s", "userPoolContract"], separator)
19+
20+let keyEmissionContract = makeString(["%s", "emissionContract"], separator)
21+
22+let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
23+
24+func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
25+
26+
27+func keyInListAssetId (amountAssetId,priceAssetId) = makeString([("%s%s%s" + "inList"), amountAssetId, priceAssetId], separator)
28+
29+
30+func keyStartHeight (amountAssetId,priceAssetId) = makeString([("%s%s%s" + "startHeight"), amountAssetId, priceAssetId], separator)
31+
32+
33+func keyVotingResult (amountAssetId,priceAssetId) = makeString(["%s%s%s", "votingResult", amountAssetId, priceAssetId], separator)
34+
35+
36+func keyVote (amountAssetId,priceAssetId,voterAddress) = makeString(["%s%s%s%s", "vote", amountAssetId, priceAssetId, voterAddress], separator)
37+
38+
39+func keyManagerPublicKey () = "%s__managerPublicKey"
40+
41+
42+func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
43+
44+
45+let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract))
46+
47+let userPoolContract = addressFromStringValue(getStringOrFail(keyuserPoolContract))
48+
49+let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract))
50+
51+func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
52+ case s: String =>
53+ fromBase58String(s)
54+ case _: Unit =>
55+ unit
56+ case _ =>
57+ throw("Match error")
58+}
59+
60+
61+func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
62+ case s: String =>
63+ fromBase58String(s)
64+ case _: Unit =>
65+ unit
66+ case _ =>
67+ throw("Match error")
68+}
69+
70+
71+func mustManager (i) = {
72+ let pd = throw("Permission denied")
73+ match managerPublicKeyOrUnit() {
74+ case pk: ByteVector =>
75+ if ((i.callerPublicKey == pk))
76+ then true
77+ else pd
78+ case _: Unit =>
79+ if ((i.caller == this))
80+ then true
81+ else pd
82+ case _ =>
83+ throw("Match error")
84+ }
85+ }
86+
87+
88+func asInt (val) = match val {
89+ case valInt: Int =>
90+ valInt
91+ case _ =>
92+ throw("Failed to cast into Integer")
93+}
94+
95+
96+@Callable(i)
97+func constructor (assetsStoreContractPrm,userPoolContractPrm,boostingContractPrm,emissionContractPrm,feeAmountPrm,wxAssetIdPrm,votingThresholdPrm,votingDurationPrm,usdnAssetIdPrm) = {
98+ let checks = [if (mustManager(i))
99+ then true
100+ else throw("Must manager"), if (isDefined(addressFromString(assetsStoreContractPrm)))
101+ then true
102+ else throw("Invalid asset_store contract address"), if (isDefined(addressFromString(boostingContractPrm)))
103+ then true
104+ else throw("Invalid boosting contract address"), if (isDefined(addressFromString(userPoolContractPrm)))
105+ then true
106+ else throw("Invalid user_pools contract address"), if (isDefined(addressFromString(emissionContractPrm)))
107+ then true
108+ else throw("Invalid emission contract address"), if ((feeAmountPrm >= 0))
109+ then true
110+ else throw("Invalid fee amount"), if ((votingDurationPrm > 0))
111+ then true
112+ else throw("Invalid voting duration"), if ((votingThresholdPrm >= 0))
113+ then true
114+ else throw("Invalid voting threshold"), if (isDefined(assetInfo(fromBase58String(wxAssetIdPrm))))
115+ then true
116+ else throw("Invalid WX asset ID"), if (isDefined(assetInfo(fromBase58String(usdnAssetIdPrm))))
117+ then true
118+ else throw("Invalid USDN asset ID")]
119+ if ((checks == checks))
120+ then $Tuple2([StringEntry(keyAssetsStoreContract, assetsStoreContractPrm), StringEntry(keyuserPoolContract, userPoolContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), IntegerEntry(keyFeeAmount, feeAmountPrm), IntegerEntry(keyVotingDuration, votingDurationPrm), IntegerEntry(keyVotingThreshold, votingThresholdPrm), StringEntry(keyWxAssetId, wxAssetIdPrm), StringEntry(keyUsdnAssetId, usdnAssetIdPrm)], unit)
121+ else throw("Strict value is not equal to itself.")
122+ }
123+
124+
125+
126+@Callable(i)
127+func suggest (amountAssetId,priceAssetId) = {
128+ let payment = value(i.payments[0])
129+ let info = valueOrErrorMessage(assetInfo(fromBase58String(amountAssetId)), "Invalid amountAssetId ID")
130+ let checks = [if ((info.issuer == i.caller))
131+ then true
132+ else throw("Asset can only be suggested by its issuer"), if ((info.scripted == false))
133+ then true
134+ else throw("Asset is smart"), if ((toBase58String(value(payment.assetId)) == value(getString(keyWxAssetId))))
135+ then true
136+ else throw("Invalid fee asset"), if ((payment.amount == value(getInteger(keyFeeAmount))))
137+ then true
138+ else throw("Invalid fee amount"), if ((priceAssetId == value(getString(keyUsdnAssetId))))
139+ then true
140+ else throw("priceAssetId is not USDN"), if ((getBoolean(keyInListAssetId(amountAssetId, priceAssetId)) == unit))
141+ then true
142+ else throw("Already in voting list"), if (valueOrElse(invoke(userPoolContract, "keyStatus", [amountAssetId, priceAssetId], nil), false))
143+ then true
144+ else throw("User pool is not active")]
145+ if ((checks == checks))
146+ then {
147+ let isAmountAssetVerified = match invoke(value(addressFromString(keyAssetsStoreContract)), "isVerifiedREADONLY", [amountAssetId], nil) {
148+ case b: Boolean =>
149+ b
150+ case _ =>
151+ throw("Asset is not verified")
152+ }
153+ let burnFeeInv = invoke(emissionContract, "burn", nil, [AttachedPayment(payment.assetId, payment.amount)])
154+ if ((burnFeeInv == burnFeeInv))
155+ then [BooleanEntry(keyInListAssetId(amountAssetId, priceAssetId), true), IntegerEntry(keyStartHeight(amountAssetId, priceAssetId), height)]
156+ else throw("Strict value is not equal to itself.")
157+ }
158+ else throw("Strict value is not equal to itself.")
159+ }
160+
161+
162+
163+@Callable(i)
164+func vote (amountAssetId,priceAssetId,inFavor) = {
165+ let checks = [if (valueOrElse(getBoolean(keyInListAssetId(amountAssetId, priceAssetId)), false))
166+ then true
167+ else throw("The token isn't on the voting list"), (height >= (value(getInteger(keyStartHeight(amountAssetId, priceAssetId))) + value(getInteger(keyVotingDuration))))]
168+ if ((checks == checks))
169+ then {
170+ let votingResult = split(value(getString(keyVotingResult(amountAssetId, priceAssetId))), separator)
171+ let positiveVotes = votingResult[1]
172+ let negativeVotes = votingResult[2]
173+ let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), height], nil)
174+ let entries = if (inFavor)
175+ then {
176+ let newPositiveVotes = (parseIntValue(positiveVotes) + asInt(gwxAmount))
177+ let totalVotes = makeString(["%d%d", toString(newPositiveVotes), negativeVotes], separator)
178+ let yesVoteKey = keyVote(amountAssetId, priceAssetId, toString(i.caller))
179+ let yesVoteValue = makeString([keyVotingResult(amountAssetId, priceAssetId), "yes"], separator)
180+ $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes), StringEntry(yesVoteKey, yesVoteValue)], unit)
181+ }
182+ else {
183+ let newNegativeVotes = (parseIntValue(negativeVotes) + asInt(gwxAmount))
184+ let totalVotes = makeString(["%d%d", positiveVotes, toString(newNegativeVotes)], separator)
185+ let noVoteKey = keyVote(amountAssetId, priceAssetId, toString(i.caller))
186+ let noVoteValue = makeString([keyVotingResult(amountAssetId, priceAssetId), "no"], separator)
187+ $Tuple2([StringEntry(keyVotingResult(amountAssetId, priceAssetId), totalVotes), StringEntry(noVoteKey, noVoteValue)], unit)
188+ }
189+ entries
190+ }
191+ else throw("Strict value is not equal to itself.")
192+ }
193+
194+
195+
196+@Callable(i)
197+func setManager (pendingManagerPublicKey) = {
198+ let checkCaller = mustManager(i)
199+ if ((checkCaller == checkCaller))
200+ then {
201+ let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
202+ if ((checkManagerPublicKey == checkManagerPublicKey))
203+ then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
204+ else throw("Strict value is not equal to itself.")
205+ }
206+ else throw("Strict value is not equal to itself.")
207+ }
208+
209+
210+
211+@Callable(i)
212+func confirmManager () = {
213+ let pm = pendingManagerPublicKeyOrUnit()
214+ let hasPM = if (isDefined(pm))
215+ then true
216+ else throw("No pending manager")
217+ if ((hasPM == hasPM))
218+ then {
219+ let checkPM = if ((i.callerPublicKey == value(pm)))
220+ then true
221+ else throw("You are not pending manager")
222+ if ((checkPM == checkPM))
223+ then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
224+ else throw("Strict value is not equal to itself.")
225+ }
226+ else throw("Strict value is not equal to itself.")
227+ }
228+
229+
230+@Verifier(tx)
231+func verify () = {
232+ let targetPublicKey = match managerPublicKeyOrUnit() {
233+ case pk: ByteVector =>
234+ pk
235+ case _: Unit =>
236+ tx.senderPublicKey
237+ case _ =>
238+ throw("Match error")
239+ }
240+ sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
241+ }
242+

github/deemru/w8io/169f3d6 
23.51 ms