tx · 47nzm6AAKnKAJasEPmtWrWoz35E9SfLvbWT3s1Na8xmQ

3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh:  -0.01000000 Waves

2023.05.17 10:20 [2581648] smart account 3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh > SELF 0.00000000 Waves

{ "type": 13, "id": "47nzm6AAKnKAJasEPmtWrWoz35E9SfLvbWT3s1Na8xmQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1684308058424, "version": 2, "chainId": 84, "sender": "3N4ziXSMRverXyxHDUKKMR9MHXnB3TyU3Yh", "senderPublicKey": "EU9obW1yVhR8qug3EmXPeew3DMagvJFQzY5Ku8bmcsU7", "proofs": [ "81WYptmuy7ynVH1LPv4BY99cNfAuEF3x6JjJLS8MRKdSsktZRz7tCUh9nv3JcGte7fcN2gNDvGfBtKXjVXw8N4p" ], "script": "base64:BgIfCAISBwoFCAgIAQESABIDCgEBEgASAwoBARIECgIICBsACXNlcGFyYXRvcgICX18ADmtleUVwb2NoTGVuZ3RoCQC5CQIJAMwIAgICJXMJAMwIAgILZXBvY2hMZW5ndGgFA25pbAUJc2VwYXJhdG9yABNrZXlFbWlzc2lvbkNvbnRyYWN0CQC5CQIJAMwIAgICJXMJAMwIAgIQZW1pc3Npb25Db250cmFjdAUDbmlsBQlzZXBhcmF0b3IAE2tleUJvb3N0aW5nQ29udHJhY3QJALkJAgkAzAgCAgIlcwkAzAgCAhBib29zdGluZ0NvbnRyYWN0BQNuaWwFCXNlcGFyYXRvcgASa2V5RmFjdG9yeUNvbnRyYWN0CQC5CQIJAMwIAgICJXMJAMwIAgIPZmFjdG9yeUNvbnRyYWN0BQNuaWwFCXNlcGFyYXRvcgAMa2V5VGhyZXNob2xkCQC5CQIJAMwIAgICJXMJAMwIAgIPdm90aW5nVGhyZXNob2xkBQNuaWwFCXNlcGFyYXRvcgAPa2V5UmF0ZVBlckJsb2NrCQC5CQIJAMwIAgIEJXMlcwkAzAgCAgxyYXRlUGVyQ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bExhYmVsCQDMCAIFDWFtb3VudEFzc2V0SWQJAMwIAgUMcHJpY2VBc3NldElkBQNuaWwFA25pbAMJAAACBQNyZXMFA3JlcwUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuBQNuaWwFB2FjdGlvbnMJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AXlm5ow==", "height": 2581648, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FDPpxPPdueCYML14qes544JqGwPcPSJLeD4TnXptmcQM Next: FpMcHXZKes1tdv5PDmm3WTWjR1gUqfVCZYoVgmH6Y5DW Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let separator = "__"
5+
6+let keyEpochLength = makeString(["%s", "epochLength"], separator)
7+
8+let keyEmissionContract = makeString(["%s", "emissionContract"], separator)
9+
10+let keyBoostingContract = makeString(["%s", "boostingContract"], separator)
11+
12+let keyFactoryContract = makeString(["%s", "factoryContract"], separator)
13+
14+let keyThreshold = makeString(["%s", "votingThreshold"], separator)
15+
16+let keyRatePerBlock = makeString(["%s%s", "ratePerBlock", "current"], separator)
17+
18+let keyRatePerBlockMax = makeString(["%s%s", "ratePerBlockMax", "current"], separator)
19+
20+let keyRateChangeStep = makeString(["%s", "rateChangeStep"], separator)
21+
22+func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
23+
24+
25+func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), (key + " is not defined"))
26+
27+
28+func keyStartHeight () = makeString(["%s", "startHeight"], separator)
29+
30+
31+func keyVotingResult () = makeString(["%s", "votingResult"], separator)
32+
33+
34+func totalVotes (totalIncrease,totalNone,totalDecrease) = makeString(["%d%d%d", totalIncrease, totalNone, totalDecrease], separator)
35+
36+
37+func keyVote (voterAddress) = makeString(["%s%s", "vote", voterAddress], separator)
38+
39+
40+func keyVoteValue (gwxAmount,vote) = {
41+ let key = if ((vote == 1))
42+ then makeString(["%d%s", gwxAmount, "increase"], separator)
43+ else if ((vote == -1))
44+ then makeString(["%d%s", gwxAmount, "decrease"], separator)
45+ else makeString(["%d%s", gwxAmount, "none"], separator)
46+ key
47+ }
48+
49+
50+let boostingContract = addressFromStringValue(getStringOrFail(keyBoostingContract))
51+
52+let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract))
53+
54+let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract))
55+
56+func keyManagerPublicKey () = "%s__managerPublicKey"
57+
58+
59+func keyManagerVaultAddress () = "%s__managerVaultAddress"
60+
61+
62+func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
63+ case s: String =>
64+ addressFromStringValue(s)
65+ case _ =>
66+ this
67+}
68+
69+
70+func managerPublicKeyOrUnit () = {
71+ let managerVaultAddress = getManagerVaultAddressOrThis()
72+ match getString(managerVaultAddress, keyManagerPublicKey()) {
73+ case s: String =>
74+ fromBase58String(s)
75+ case _: Unit =>
76+ unit
77+ case _ =>
78+ throw("Match error")
79+ }
80+ }
81+
82+
83+func isManager (i) = match managerPublicKeyOrUnit() {
84+ case pk: ByteVector =>
85+ (i.callerPublicKey == pk)
86+ case _: Unit =>
87+ (i.caller == this)
88+ case _ =>
89+ throw("Match error")
90+}
91+
92+
93+func mustManager (i) = if (isManager(i))
94+ then true
95+ else throw("permission denied")
96+
97+
98+func asInt (val) = match val {
99+ case valInt: Int =>
100+ valInt
101+ case _ =>
102+ throw("failed to cast into Integer")
103+}
104+
105+
106+func calcNewRate (ratePerBlockMax,ratePerBlock,changeStep) = {
107+ let maxAllowed = fraction(100, ratePerBlockMax, 120)
108+ let increasedRate = min([fraction((100 + changeStep), ratePerBlock, 100), maxAllowed])
109+ let decreasedRate = max([fraction((100 - changeStep), ratePerBlock, 100), 0])
110+ $Tuple3(increasedRate, ratePerBlock, decreasedRate)
111+ }
112+
113+
114+@Callable(i)
115+func constructor (boostingContractPrm,emissionContractPrm,factoryContractPrm,votingDurationPrm,threshold) = {
116+ let checks = [mustManager(i), if (isDefined(addressFromString(boostingContractPrm)))
117+ then true
118+ else throw("Invalid boosting contract address"), if (isDefined(addressFromString(emissionContractPrm)))
119+ then true
120+ else throw("Invalid emission contract address"), if (isDefined(addressFromString(factoryContractPrm)))
121+ then true
122+ else throw("Invalid factory contract address"), if ((votingDurationPrm > 0))
123+ then true
124+ else throw("Invalid voting duration"), if ((threshold > 0))
125+ then true
126+ else throw("invalid threshold")]
127+ if ((checks == checks))
128+ then $Tuple2([StringEntry(keyBoostingContract, boostingContractPrm), StringEntry(keyEmissionContract, emissionContractPrm), StringEntry(keyFactoryContract, factoryContractPrm), IntegerEntry(keyEpochLength, votingDurationPrm), IntegerEntry(keyThreshold, threshold)], unit)
129+ else throw("Strict value is not equal to itself.")
130+ }
131+
132+
133+
134+@Callable(i)
135+func getRateChangeAmountsREADONLY () = {
136+ let ratePerBlockMax = getIntegerValue(emissionContract, keyRatePerBlockMax)
137+ let ratePerBlock = getIntegerValue(emissionContract, keyRatePerBlock)
138+ let rateChangeStep = getIntegerValue(this, keyRateChangeStep)
139+ $Tuple2(nil, calcNewRate(ratePerBlockMax, ratePerBlock, rateChangeStep))
140+ }
141+
142+
143+
144+@Callable(i)
145+func vote (inFavor) = {
146+ let votingFinishHeight = (value(getInteger(keyStartHeight())) + value(getInteger(keyEpochLength)))
147+ let checks = [if ((votingFinishHeight > height))
148+ then true
149+ else throw("too late to vote"), if (containsElement([1, 0, -1], inFavor))
150+ then true
151+ else throw("not valid argument")]
152+ if ((checks == checks))
153+ then {
154+ let gwxAmount = invoke(boostingContract, "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), votingFinishHeight], nil)
155+ let notZero = if ((asInt(gwxAmount) > 0))
156+ then true
157+ else throw("you don't have gwx")
158+ if ((notZero == notZero))
159+ then {
160+ let vote = match getString(keyVote(toString(i.caller))) {
161+ case s: String =>
162+ let vote = split(s, separator)
163+ let voteValue = vote[1]
164+ let voteType = vote[2]
165+ let isVoteTypeSimilar = if (if (if ((voteType == "increase"))
166+ then (inFavor == 1)
167+ else false)
168+ then true
169+ else if ((voteType == "decrease"))
170+ then (inFavor == -1)
171+ else false)
172+ then true
173+ else if ((voteType == "none"))
174+ then (inFavor == 0)
175+ else false
176+ let isVoteValueSimilar = if (isVoteTypeSimilar)
177+ then (asInt(gwxAmount) == parseIntValue(voteValue))
178+ else false
179+ let isNewVoteSimilar = if (if (isVoteTypeSimilar)
180+ then isVoteValueSimilar
181+ else false)
182+ then throw("you already voted")
183+ else invoke(this, "cancelVote", nil, nil)
184+ isNewVoteSimilar
185+ case u: Unit =>
186+ u
187+ case _ =>
188+ throw("Match error")
189+ }
190+ if ((vote == vote))
191+ then {
192+ let votingResult = split(value(getString(keyVotingResult())), separator)
193+ let votesToIncrease = votingResult[1]
194+ let votesToNone = votingResult[2]
195+ let votesToDecrease = votingResult[3]
196+ let newPositiveAndNegativeVotes = if ((inFavor == 1))
197+ then {
198+ let newPositiveVotes = (parseIntValue(votesToIncrease) + asInt(gwxAmount))
199+[toString(newPositiveVotes), votesToNone, votesToDecrease]
200+ }
201+ else if ((inFavor == -1))
202+ then {
203+ let newNegativeVotes = (parseIntValue(votesToNone) + asInt(gwxAmount))
204+[votesToIncrease, votesToNone, toString(newNegativeVotes)]
205+ }
206+ else {
207+ let newNoneVotes = (parseIntValue(votesToNone) + asInt(gwxAmount))
208+[votesToIncrease, toString(newNoneVotes), votesToDecrease]
209+ }
210+ let voteKey = keyVote(toString(i.caller))
211+ let voteValue = keyVoteValue(toString(asInt(gwxAmount)), inFavor)
212+ $Tuple2([StringEntry(keyVotingResult(), totalVotes(newPositiveAndNegativeVotes[0], newPositiveAndNegativeVotes[1], newPositiveAndNegativeVotes[2])), StringEntry(voteKey, voteValue)], unit)
213+ }
214+ else throw("Strict value is not equal to itself.")
215+ }
216+ else throw("Strict value is not equal to itself.")
217+ }
218+ else throw("Strict value is not equal to itself.")
219+ }
220+
221+
222+
223+@Callable(i)
224+func cancelVote () = {
225+ let userAddress = if ((i.caller == this))
226+ then toString(i.originCaller)
227+ else toString(i.caller)
228+ let checks = [if (isDefined(getString(keyVotingResult())))
229+ then true
230+ else throw("no vote")]
231+ if ((checks == checks))
232+ then {
233+ let vote = split(value(getString(keyVote(userAddress))), separator)
234+ let voteValue = vote[1]
235+ let voteType = vote[2]
236+ let votingResult = split(value(getString(keyVotingResult())), separator)
237+ let votesToIncrease = votingResult[1]
238+ let votesToNone = votingResult[2]
239+ let votesToDecrease = votingResult[3]
240+ let actions = if ((voteType == "increase"))
241+ then {
242+ let newIncreaseVotes = (parseIntValue(votesToIncrease) - parseIntValue(voteValue))
243+ $Tuple2([StringEntry(keyVotingResult(), totalVotes(toString(newIncreaseVotes), votesToNone, votesToDecrease)), DeleteEntry(keyVote(userAddress))], unit)
244+ }
245+ else if ((voteType == "descrease"))
246+ then {
247+ let newDecreaseVotes = (parseIntValue(votesToDecrease) - parseIntValue(voteValue))
248+ $Tuple2([StringEntry(keyVotingResult(), totalVotes(votesToIncrease, votesToNone, toString(newDecreaseVotes))), DeleteEntry(keyVote(userAddress))], unit)
249+ }
250+ else {
251+ let newNoneVotes = (parseIntValue(votesToNone) - parseIntValue(voteValue))
252+ $Tuple2([StringEntry(keyVotingResult(), totalVotes(votesToIncrease, toString(newNoneVotes), votesToDecrease)), DeleteEntry(keyVote(userAddress))], unit)
253+ }
254+ actions
255+ }
256+ else throw("Strict value is not equal to itself.")
257+ }
258+
259+
260+
261+@Callable(i)
262+func setThreshold (newThreshold) = {
263+ let checks = [mustManager(i), if ((newThreshold > 0))
264+ then true
265+ else throw("invalid threshold")]
266+ if ((checks == checks))
267+ then $Tuple2([IntegerEntry(keyThreshold, newThreshold)], unit)
268+ else throw("Strict value is not equal to itself.")
269+ }
270+
271+
272+
273+@Callable(i)
274+func finalize (amountAssetId,priceAssetId) = {
275+ let votingFinishHeight = (value(getInteger(keyStartHeight())) + value(getInteger(keyEpochLength)))
276+ let checks = [if ((height >= votingFinishHeight))
277+ then true
278+ else throw("insufficient height for completion")]
279+ if ((checks == checks))
280+ then {
281+ let votingResult = split(value(getString(keyVotingResult())), separator)
282+ let votesToIncrease = parseIntValue(votingResult[1])
283+ let votesToNone = parseIntValue(votingResult[2])
284+ let votesToDecrease = parseIntValue(votingResult[3])
285+ let allVotes = ((votesToIncrease + votesToNone) + votesToDecrease)
286+ let threshold = getIntOrFail(keyThreshold)
287+ let actions = if (if ((allVotes >= threshold))
288+ then true
289+ else false)
290+ then {
291+ let res = invoke(factoryContract, "setWxEmissionPoolLabel", [amountAssetId, priceAssetId], nil)
292+ if ((res == res))
293+ then nil
294+ else throw("Strict value is not equal to itself.")
295+ }
296+ else nil
297+ actions
298+ }
299+ else throw("Strict value is not equal to itself.")
300+ }
301+
302+

github/deemru/w8io/026f985 
28.28 ms