tx · 7gAw8n94EQfmPdhReCNbmden3Xv464U18AwRPHBQ7UBi

3MuEfswstC6FgzjQPtVnucaffFf54bA9p3H:  -0.01300000 Waves

2023.07.19 14:41 [2672691] smart account 3MuEfswstC6FgzjQPtVnucaffFf54bA9p3H > SELF 0.00000000 Waves

{ "type": 13, "id": "7gAw8n94EQfmPdhReCNbmden3Xv464U18AwRPHBQ7UBi", "fee": 1300000, "feeAssetId": null, "timestamp": 1689766939914, "version": 2, "chainId": 84, "sender": "3MuEfswstC6FgzjQPtVnucaffFf54bA9p3H", "senderPublicKey": "8pvajz9uNGrmuTHSzjyYc4LZJ6VkqBjwmS7HCWKsZk67", "proofs": [ "4oWURXFPEVM7rMRnA5AWsCaCWwLJXfGvHTxPUihtsNEGGiyftLZRmavqCpXcfKy8cQj4uHF89bkQykK7aX82cmZk" ], "script": "base64:BgIiCAISCQoHCAEBAQEBCBIDCgEIEgMKAQESABIAEgASAwoBATQAA1NFUAICX18BB3dyYXBFcnIBA21zZwkAuQkCCQDMCAICDmVtaXNzaW9uLnJpZGU6CQDMCAIJAKUIAQUEdGhpcwkAzAgCBQNtc2cFA25pbAIBIAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnAQ9nZXRTdHJpbmdPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUHYWRkcmVzcwUDa2V5CQEHd3JhcEVycgEJAKwCAgkArAICAg9tYW5kYXRvcnkgdGhpcy4FA2tleQIPIGlzIG5vdCBkZWZpbmVkARFrZXlGYWN0b3J5QWRkcmVzcwACHCVzJXNfX2NvbmZpZ19fZmFjdG9yeUFkZHJlc3MAGWtleVZvdGluZ1ZlcmlmaWVkQ29udHJhY3QCJCVzJXNfX2NvbmZpZ19fdm90aW5nVmVyaWZpZWRDb250cmFjdAAia2V5Vm90aW5nRW1pc3Npb25DYW5kaWRhdGVDb250cmFjdAItJXMlc19fY29uZmlnX192b3RpbmdFb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vbkJvb3N0RW1pc3Npb25VcGRhdGUFA25pbAUDbmlsAwkAAAIFDmJvb3N0aW5nSW52b2tlBQ5ib29zdGluZ0ludm9rZQQOYmxvY2tUaW1lc3RhbXAEByRtYXRjaDAJAO0HAQUGaGVpZ2h0AwkAAQIFByRtYXRjaDACCUJsb2NrSW5mbwQCYmkFByRtYXRjaDAIBQJiaQl0aW1lc3RhbXAJAQh0aHJvd0VycgECGUJsb2NrSW5mby50aW1lc3RhbXAgZXJyb3IJAMwIAgkBDEludGVnZXJFbnRyeQIJARhrZXlSYXRlUGVyQmxvY2tTdGFydEZyb20CBQ5ibG9ja1RpbWVzdGFtcAUGaGVpZ2h0BQ9uZXdSYXRlUGVyQmxvY2sJAMwIAgkBDEludGVnZXJFbnRyeQIJARZrZXlSYXRlUGVyQmxvY2tDdXJyZW50AAUPbmV3UmF0ZVBlckJsb2NrBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXm5iSnx", "height": 2672691, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A6FhHvWGiBRoZ9iSu8e61aMxarkuYPJDY3cHMhzXaESN Next: none Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
2121
2222 let keyUserPoolsContract = "%s%s__config__userPoolsContract"
2323
24+let keyVotingEmissionRateContract = "%s%s__config__votingEmissionRateContract"
25+
2426 let votingVerifiedContract = addressFromStringValue(getStringOrFail(this, keyVotingVerifiedContract))
2527
2628 let votingEmissionCandidateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionCandidateContract))
2729
2830 let userPoolsContract = addressFromStringValue(getStringOrFail(this, keyUserPoolsContract))
31+
32+let votingEmissionRateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionRateContract))
2933
3034 let IdxFactoryCfgStakingDapp = 1
3135
9195 func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
9296
9397
98+func keyRatePerBlockNext () = "%s%s__ratePerBlock__next"
99+
100+
94101 func keyRatePerBlockStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlock__start", toString(timestamp), toString(block)], SEP)
95102
96103
110117
111118 let boostCoeff = valueOrElse(getInteger(this, keyBoostCoeff()), boostCoeffDefault)
112119
120+func keyGwxHoldersRewardCurrent () = "%s%s__gwxHoldersReward__current"
121+
122+
123+func keyGwxHoldersRewardNext () = "%s%s__gwxHoldersReward__next"
124+
125+
113126 func keyManagerPublicKey () = "%s__managerPublicKey"
114127
115128
116-func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
129+func keyManagerVaultAddress () = "%s__managerVaultAddress"
117130
118131
119-func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
132+func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
120133 case s: String =>
121- fromBase58String(s)
122- case _: Unit =>
123- unit
134+ addressFromStringValue(s)
124135 case _ =>
125- throw("Match error")
136+ this
126137 }
127138
128139
129-func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
130- case s: String =>
131- fromBase58String(s)
132- case _: Unit =>
133- unit
134- case _ =>
135- throw("Match error")
136-}
140+func managerPublicKeyOrUnit () = {
141+ let managerVaultAddress = getManagerVaultAddressOrThis()
142+ match getString(managerVaultAddress, keyManagerPublicKey()) {
143+ case s: String =>
144+ fromBase58String(s)
145+ case _: Unit =>
146+ unit
147+ case _ =>
148+ throw("Match error")
149+ }
150+ }
137151
138152
139153 func mustManager (i) = {
218232
219233
220234 @Callable(i)
221-func setManager (pendingManagerPublicKey) = {
222- let checkCaller = mustManager(i)
235+func gwxHoldersRewardUpdate () = {
236+ let factoryContract = readFactoryAddressOrFail()
237+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
238+ let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
239+ let checkCaller = if ((i.caller == gwxRewardsContract))
240+ then true
241+ else mustManager(i)
223242 if ((checkCaller == checkCaller))
224243 then {
225- let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
226- if ((checkManagerPublicKey == checkManagerPublicKey))
227- then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
228- else throw("Strict value is not equal to itself.")
229- }
230- else throw("Strict value is not equal to itself.")
231- }
232-
233-
234-
235-@Callable(i)
236-func confirmManager () = {
237- let pm = pendingManagerPublicKeyOrUnit()
238- let hasPM = if (isDefined(pm))
239- then true
240- else throwErr("No pending manager")
241- if ((hasPM == hasPM))
242- then {
243- let checkPM = if ((i.callerPublicKey == value(pm)))
244- then true
245- else throwErr("You are not pending manager")
246- if ((checkPM == checkPM))
247- then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
248- else throw("Strict value is not equal to itself.")
244+ let gwxHolderRewardCurrent = valueOrElse(getInteger(keyGwxHoldersRewardCurrent()), 0)
245+ let gwxHolderRewardNext = valueOrElse(getInteger(keyGwxHoldersRewardNext()), gwxHolderRewardCurrent)
246+ let shouldBeUpdated = (gwxHolderRewardCurrent != gwxHolderRewardNext)
247+ let actions = if (shouldBeUpdated)
248+ then [IntegerEntry(keyGwxHoldersRewardCurrent(), gwxHolderRewardNext), DeleteEntry(keyGwxHoldersRewardNext())]
249+ else nil
250+ $Tuple2(actions, shouldBeUpdated)
249251 }
250252 else throw("Strict value is not equal to itself.")
251253 }
254256
255257 @Callable(i)
256258 func getBoostCoeffREADONLY () = $Tuple2(nil, boostCoeff)
259+
260+
261+
262+@Callable(i)
263+func changeRatePerBlock (newRatePerBlock) = {
264+ let check = if (if ((i.caller == votingEmissionRateContract))
265+ then true
266+ else mustManager(i))
267+ then true
268+ else throwErr("should be invoked by votingEmissionRateContract")
269+ if ((check == check))
270+ then {
271+ let factoryContract = readFactoryAddressOrFail()
272+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
273+ let boostingContract = getBoostingAddressOrFail(factoryCfg)
274+ let boostingInvoke = reentrantInvoke(boostingContract, "onBoostEmissionUpdate", nil, nil)
275+ if ((boostingInvoke == boostingInvoke))
276+ then {
277+ let blockTimestamp = match blockInfoByHeight(height) {
278+ case bi: BlockInfo =>
279+ bi.timestamp
280+ case _ =>
281+ throwErr("BlockInfo.timestamp error")
282+ }
283+[IntegerEntry(keyRatePerBlockStartFrom(blockTimestamp, height), newRatePerBlock), IntegerEntry(keyRatePerBlockCurrent(), newRatePerBlock)]
284+ }
285+ else throw("Strict value is not equal to itself.")
286+ }
287+ else throw("Strict value is not equal to itself.")
288+ }
257289
258290
259291 @Verifier(tx)
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 func wrapErr (msg) = makeString(["emission.ride:", toString(this), msg], " ")
77
88
99 func throwErr (msg) = throw(wrapErr(msg))
1010
1111
1212 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((("mandatory this." + key) + " is not defined")))
1313
1414
1515 func keyFactoryAddress () = "%s%s__config__factoryAddress"
1616
1717
1818 let keyVotingVerifiedContract = "%s%s__config__votingVerifiedContract"
1919
2020 let keyVotingEmissionCandidateContract = "%s%s__config__votingEmissionCandidateContract"
2121
2222 let keyUserPoolsContract = "%s%s__config__userPoolsContract"
2323
24+let keyVotingEmissionRateContract = "%s%s__config__votingEmissionRateContract"
25+
2426 let votingVerifiedContract = addressFromStringValue(getStringOrFail(this, keyVotingVerifiedContract))
2527
2628 let votingEmissionCandidateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionCandidateContract))
2729
2830 let userPoolsContract = addressFromStringValue(getStringOrFail(this, keyUserPoolsContract))
31+
32+let votingEmissionRateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionRateContract))
2933
3034 let IdxFactoryCfgStakingDapp = 1
3135
3236 let IdxFactoryCfgBoostingDapp = 2
3337
3438 let IdxFactoryCfgIdoDapp = 3
3539
3640 let IdxFactoryCfgTeamDapp = 4
3741
3842 let IdxFactoryCfgEmissionDapp = 5
3943
4044 let IdxFactoryCfgRestDapp = 6
4145
4246 let IdxFactoryCfgSlippageDapp = 7
4347
4448 let IdxFactoryCfgGwxRewardDapp = 10
4549
4650 func keyFactoryCfg () = "%s__factoryConfig"
4751
4852
4953 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
5054
5155
5256 func keyFactoryLpList () = "%s__lpTokensList"
5357
5458
5559 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
5660
5761
5862 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
5963
6064
6165 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress()))
6266
6367
6468 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
6569
6670
6771 func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP)
6872
6973
7074 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
7175
7276
7377 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
7478
7579
7680 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
7781
7882
7983 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
8084
8185
8286 func keyConfig () = "%s__config"
8387
8488
8589 func keyRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
8690
8791
8892 func keyRatePerBlockMaxStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlockMax__start", toString(timestamp), toString(block)], SEP)
8993
9094
9195 func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
9296
9397
98+func keyRatePerBlockNext () = "%s%s__ratePerBlock__next"
99+
100+
94101 func keyRatePerBlockStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlock__start", toString(timestamp), toString(block)], SEP)
95102
96103
97104 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
98105
99106
100107 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
101108
102109
103110 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
104111
105112
106113 func keyBoostCoeff () = "%s__boostCoeff"
107114
108115
109116 let boostCoeffDefault = 3
110117
111118 let boostCoeff = valueOrElse(getInteger(this, keyBoostCoeff()), boostCoeffDefault)
112119
120+func keyGwxHoldersRewardCurrent () = "%s%s__gwxHoldersReward__current"
121+
122+
123+func keyGwxHoldersRewardNext () = "%s%s__gwxHoldersReward__next"
124+
125+
113126 func keyManagerPublicKey () = "%s__managerPublicKey"
114127
115128
116-func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
129+func keyManagerVaultAddress () = "%s__managerVaultAddress"
117130
118131
119-func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
132+func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
120133 case s: String =>
121- fromBase58String(s)
122- case _: Unit =>
123- unit
134+ addressFromStringValue(s)
124135 case _ =>
125- throw("Match error")
136+ this
126137 }
127138
128139
129-func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
130- case s: String =>
131- fromBase58String(s)
132- case _: Unit =>
133- unit
134- case _ =>
135- throw("Match error")
136-}
140+func managerPublicKeyOrUnit () = {
141+ let managerVaultAddress = getManagerVaultAddressOrThis()
142+ match getString(managerVaultAddress, keyManagerPublicKey()) {
143+ case s: String =>
144+ fromBase58String(s)
145+ case _: Unit =>
146+ unit
147+ case _ =>
148+ throw("Match error")
149+ }
150+ }
137151
138152
139153 func mustManager (i) = {
140154 let pd = throwErr("Permission denied")
141155 match managerPublicKeyOrUnit() {
142156 case pk: ByteVector =>
143157 if ((i.callerPublicKey == pk))
144158 then true
145159 else pd
146160 case _: Unit =>
147161 if ((i.caller == this))
148162 then true
149163 else pd
150164 case _ =>
151165 throw("Match error")
152166 }
153167 }
154168
155169
156170 @Callable(i)
157171 func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp,wxAssetIdStr) = {
158172 let checkCaller = mustManager(i)
159173 if ((checkCaller == checkCaller))
160174 then [IntegerEntry(keyRatePerBlockMaxStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlockMax), IntegerEntry(keyRatePerBlockMaxCurrent(), ratePerBlockMax), IntegerEntry(keyRatePerBlockStartFrom(emissionStartTimestamp, emissionStartBlock), ratePerBlock), IntegerEntry(keyRatePerBlockCurrent(), ratePerBlock), IntegerEntry(keyEmissionStartBlock(), emissionStartBlock), IntegerEntry(keyEmissionDurationInBlocks(), emissionDuration), IntegerEntry(keyEmissionEndBlock(), (emissionStartBlock + emissionDuration)), StringEntry(keyFactoryAddress(), factoryAddress), StringEntry(keyConfig(), ("%s__" + wxAssetIdStr))]
161175 else throw("Strict value is not equal to itself.")
162176 }
163177
164178
165179
166180 @Callable(i)
167181 func constructorV2 (votingVerifiedContractPrm) = {
168182 let checkCaller = mustManager(i)
169183 if ((checkCaller == checkCaller))
170184 then $Tuple2([StringEntry(keyVotingVerifiedContract, votingVerifiedContractPrm)], unit)
171185 else throw("Strict value is not equal to itself.")
172186 }
173187
174188
175189
176190 @Callable(i)
177191 func emit (amount) = if ((0 >= amount))
178192 then $Tuple2(nil, nil)
179193 else {
180194 let factoryContract = readFactoryAddressOrFail()
181195 let factoryCfg = readFactoryCfgOrFail(factoryContract)
182196 let stakingContract = getStakingAddressOrFail(factoryCfg)
183197 let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
184198 let caller = i.caller
185199 if (if ((caller != stakingContract))
186200 then (caller != gwxRewardsContract)
187201 else false)
188202 then throwErr("permissions denied")
189203 else {
190204 let wxAssetIdStr = split(getStringOrFail(this, keyConfig()), SEP)[1]
191205 let wxAssetId = fromBase58String(wxAssetIdStr)
192206 $Tuple2([ScriptTransfer(caller, amount, wxAssetId)], [wxAssetId])
193207 }
194208 }
195209
196210
197211
198212 @Callable(i)
199213 func burn () = {
200214 let factoryContract = readFactoryAddressOrFail()
201215 let factoryCfg = readFactoryCfgOrFail(factoryContract)
202216 let boostingContract = getBoostingAddressOrFail(factoryCfg)
203217 if ((size(i.payments) != 1))
204218 then throwErr("exact one payment is allowed")
205219 else {
206220 let pmt = i.payments[0]
207221 let assetId = value(pmt.assetId)
208222 let pmtAmount = pmt.amount
209223 let wxAssetId = fromBase58String(split(getStringOrFail(this, keyConfig()), SEP)[1])
210224 if ((assetId != wxAssetId))
211225 then throwErr("invalid wxAssetId is passed")
212226 else if (!(containsElement([boostingContract, votingVerifiedContract, votingEmissionCandidateContract, userPoolsContract], i.caller)))
213227 then throwErr("permissions denied")
214228 else [Burn(assetId, pmtAmount), StringEntry(("%s%s%s__history__burn__" + toBase58String(i.transactionId)), makeString(["%d%d%d", toString(height), toString(lastBlock.timestamp), toString(pmtAmount)], SEP))]
215229 }
216230 }
217231
218232
219233
220234 @Callable(i)
221-func setManager (pendingManagerPublicKey) = {
222- let checkCaller = mustManager(i)
235+func gwxHoldersRewardUpdate () = {
236+ let factoryContract = readFactoryAddressOrFail()
237+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
238+ let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
239+ let checkCaller = if ((i.caller == gwxRewardsContract))
240+ then true
241+ else mustManager(i)
223242 if ((checkCaller == checkCaller))
224243 then {
225- let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
226- if ((checkManagerPublicKey == checkManagerPublicKey))
227- then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
228- else throw("Strict value is not equal to itself.")
229- }
230- else throw("Strict value is not equal to itself.")
231- }
232-
233-
234-
235-@Callable(i)
236-func confirmManager () = {
237- let pm = pendingManagerPublicKeyOrUnit()
238- let hasPM = if (isDefined(pm))
239- then true
240- else throwErr("No pending manager")
241- if ((hasPM == hasPM))
242- then {
243- let checkPM = if ((i.callerPublicKey == value(pm)))
244- then true
245- else throwErr("You are not pending manager")
246- if ((checkPM == checkPM))
247- then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
248- else throw("Strict value is not equal to itself.")
244+ let gwxHolderRewardCurrent = valueOrElse(getInteger(keyGwxHoldersRewardCurrent()), 0)
245+ let gwxHolderRewardNext = valueOrElse(getInteger(keyGwxHoldersRewardNext()), gwxHolderRewardCurrent)
246+ let shouldBeUpdated = (gwxHolderRewardCurrent != gwxHolderRewardNext)
247+ let actions = if (shouldBeUpdated)
248+ then [IntegerEntry(keyGwxHoldersRewardCurrent(), gwxHolderRewardNext), DeleteEntry(keyGwxHoldersRewardNext())]
249+ else nil
250+ $Tuple2(actions, shouldBeUpdated)
249251 }
250252 else throw("Strict value is not equal to itself.")
251253 }
252254
253255
254256
255257 @Callable(i)
256258 func getBoostCoeffREADONLY () = $Tuple2(nil, boostCoeff)
259+
260+
261+
262+@Callable(i)
263+func changeRatePerBlock (newRatePerBlock) = {
264+ let check = if (if ((i.caller == votingEmissionRateContract))
265+ then true
266+ else mustManager(i))
267+ then true
268+ else throwErr("should be invoked by votingEmissionRateContract")
269+ if ((check == check))
270+ then {
271+ let factoryContract = readFactoryAddressOrFail()
272+ let factoryCfg = readFactoryCfgOrFail(factoryContract)
273+ let boostingContract = getBoostingAddressOrFail(factoryCfg)
274+ let boostingInvoke = reentrantInvoke(boostingContract, "onBoostEmissionUpdate", nil, nil)
275+ if ((boostingInvoke == boostingInvoke))
276+ then {
277+ let blockTimestamp = match blockInfoByHeight(height) {
278+ case bi: BlockInfo =>
279+ bi.timestamp
280+ case _ =>
281+ throwErr("BlockInfo.timestamp error")
282+ }
283+[IntegerEntry(keyRatePerBlockStartFrom(blockTimestamp, height), newRatePerBlock), IntegerEntry(keyRatePerBlockCurrent(), newRatePerBlock)]
284+ }
285+ else throw("Strict value is not equal to itself.")
286+ }
287+ else throw("Strict value is not equal to itself.")
288+ }
257289
258290
259291 @Verifier(tx)
260292 func verify () = {
261293 let targetPublicKey = match managerPublicKeyOrUnit() {
262294 case pk: ByteVector =>
263295 pk
264296 case _: Unit =>
265297 tx.senderPublicKey
266298 case _ =>
267299 throw("Match error")
268300 }
269301 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
270302 }
271303

github/deemru/w8io/026f985 
48.69 ms