tx · 8b3mA5FnSW2UjPXr1AkwhytFELCBpd2LHDSVDnUkUzfd 3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA: -0.01300000 Waves 2023.05.29 09:17 [2598895] smart account 3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA > SELF 0.00000000 Waves
{ "type": 13, "id": "8b3mA5FnSW2UjPXr1AkwhytFELCBpd2LHDSVDnUkUzfd", "fee": 1300000, "feeAssetId": null, "timestamp": 1685341037924, "version": 2, "chainId": 84, "sender": "3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA", "senderPublicKey": "H19CeJVbUnfsK8EYs8K6fHxwBH7pLyxw8WCDFu7D4rGQ", "proofs": [ "6ZK5b1vHgWgTZXYRL8hMYEDLbDppeLrpquyn2jeJxsgu1g5zSXwRNpEP67XCj4KByp6NqyQXtHz1LMkxyVotmXu" ], "script": "base64:BgInCAISCQoHCAEBAQEBCBIDCgEIEgMKAQESABIAEgASAwoBARIDCgEBMwADU0VQAgJfXwEHd3JhcEVycgEDbXNnCQC5CQIJAMwIAgIOZW1pc3Npb24ucmlkZToJAMwIAgkApQgBBQR0aGlzCQDMCAIFA21zZwUDbmlsAgEgAQh0aHJvd0VycgEDbXNnCQACAQkBB3dyYXBFcnIBBQNtc2cBD2dldFN0cmluZ09yRmFpbAIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQdhZGRyZXNzBQNrZXkJAQd3cmFwRXJyAQkArAICCQCsAgICD21hbmRhdG9yeSB0aGlzLgUDa2V5Ag8gaXMgbm90IGRlZmluZWQBEWtleUZhY3RvcnlBZGRyZXNzAAIcJXMlc19fY29uZmlnX19mYWN0b3J5QWRkcmVzcwAZa2V5Vm90aW5nVmVyaWZpZWRDb250cmFjdAIkJXMlc19fY29uZmlnX192b3RpbmdWZXJpZmllZENvbnRyYWN0ACJrZXlWb3RpbmdFbWlzc2lvbkNhbmRpZGF0ZUNvbnRy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vcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5HifQwA==", "height": 2598895, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HWHY8ZWwCE6DDHCbA958WNaDHWz6JnfNHgcZq2iJofak Next: 86V7ovYsNMTAbaA99dhcFUvhMdSrbAGPcYJrXYTf1wpY Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
21 | 21 | ||
22 | 22 | let keyUserPoolsContract = "%s%s__config__userPoolsContract" | |
23 | 23 | ||
24 | + | let keyVotingEmissionRateContract = "%s%s__config__votingEmissionRateContract" | |
25 | + | ||
24 | 26 | let votingVerifiedContract = addressFromStringValue(getStringOrFail(this, keyVotingVerifiedContract)) | |
25 | 27 | ||
26 | 28 | let votingEmissionCandidateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionCandidateContract)) | |
27 | 29 | ||
28 | 30 | let userPoolsContract = addressFromStringValue(getStringOrFail(this, keyUserPoolsContract)) | |
31 | + | ||
32 | + | let votingEmissionRateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionRateContract)) | |
29 | 33 | ||
30 | 34 | let IdxFactoryCfgStakingDapp = 1 | |
31 | 35 | ||
109 | 113 | let boostCoeffDefault = 3 | |
110 | 114 | ||
111 | 115 | let boostCoeff = valueOrElse(getInteger(this, keyBoostCoeff()), boostCoeffDefault) | |
116 | + | ||
117 | + | func keyGwxHoldersRewardCurrent () = "%s%s__gwxHoldersReward__current" | |
118 | + | ||
119 | + | ||
120 | + | func keyGwxHoldersRewardNext () = "%s%s__gwxHoldersReward__next" | |
121 | + | ||
112 | 122 | ||
113 | 123 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
114 | 124 | ||
219 | 229 | ||
220 | 230 | ||
221 | 231 | @Callable(i) | |
232 | + | func gwxHoldersRewardUpdate () = { | |
233 | + | let factoryContract = readFactoryAddressOrFail() | |
234 | + | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
235 | + | let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg) | |
236 | + | let checkCaller = if ((i.caller == gwxRewardsContract)) | |
237 | + | then true | |
238 | + | else mustManager(i) | |
239 | + | if ((checkCaller == checkCaller)) | |
240 | + | then { | |
241 | + | let gwxHolderRewardCurrent = valueOrElse(getInteger(keyGwxHoldersRewardCurrent()), 0) | |
242 | + | let gwxHolderRewardNext = valueOrElse(getInteger(keyGwxHoldersRewardNext()), gwxHolderRewardCurrent) | |
243 | + | let shouldBeUpdated = (gwxHolderRewardCurrent != gwxHolderRewardNext) | |
244 | + | let actions = if (shouldBeUpdated) | |
245 | + | then [IntegerEntry(keyGwxHoldersRewardCurrent(), gwxHolderRewardNext), DeleteEntry(keyGwxHoldersRewardNext())] | |
246 | + | else nil | |
247 | + | $Tuple2(actions, shouldBeUpdated) | |
248 | + | } | |
249 | + | else throw("Strict value is not equal to itself.") | |
250 | + | } | |
251 | + | ||
252 | + | ||
253 | + | ||
254 | + | @Callable(i) | |
222 | 255 | func getBoostCoeffREADONLY () = $Tuple2(nil, boostCoeff) | |
256 | + | ||
257 | + | ||
258 | + | ||
259 | + | @Callable(i) | |
260 | + | func changeRatePerBlockINTERNAL (newRatePerBlock) = { | |
261 | + | let check = if ((i.caller == this)) | |
262 | + | then true | |
263 | + | else throwErr("should be invoked internally") | |
264 | + | if ((check == check)) | |
265 | + | then { | |
266 | + | let blockTimestamp = match blockInfoByHeight(height) { | |
267 | + | case bi: BlockInfo => | |
268 | + | bi.timestamp | |
269 | + | case _ => | |
270 | + | throwErr("BlockInfo.timestamp error") | |
271 | + | } | |
272 | + | [IntegerEntry(keyRatePerBlockStartFrom(blockTimestamp, height), newRatePerBlock), IntegerEntry(keyRatePerBlockCurrent(), newRatePerBlock)] | |
273 | + | } | |
274 | + | else throw("Strict value is not equal to itself.") | |
275 | + | } | |
276 | + | ||
277 | + | ||
278 | + | ||
279 | + | @Callable(i) | |
280 | + | func changeRatePerBlock (newRatePerBlock) = { | |
281 | + | let check = if (if ((i.caller == votingEmissionRateContract)) | |
282 | + | then true | |
283 | + | else mustManager(i)) | |
284 | + | then true | |
285 | + | else throwErr("should be invoked by votingEmissionRateContract") | |
286 | + | if ((check == check)) | |
287 | + | then { | |
288 | + | let factoryContract = readFactoryAddressOrFail() | |
289 | + | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
290 | + | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
291 | + | let internalInv = invoke(this, "changeRatePerBlockINTERNAL", [newRatePerBlock], nil) | |
292 | + | if ((internalInv == internalInv)) | |
293 | + | then nil | |
294 | + | else throw("Strict value is not equal to itself.") | |
295 | + | } | |
296 | + | else throw("Strict value is not equal to itself.") | |
297 | + | } | |
223 | 298 | ||
224 | 299 | ||
225 | 300 | @Verifier(tx) |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | func wrapErr (msg) = makeString(["emission.ride:", toString(this), msg], " ") | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func throwErr (msg) = throw(wrapErr(msg)) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((("mandatory this." + key) + " is not defined"))) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | let keyVotingVerifiedContract = "%s%s__config__votingVerifiedContract" | |
19 | 19 | ||
20 | 20 | let keyVotingEmissionCandidateContract = "%s%s__config__votingEmissionCandidateContract" | |
21 | 21 | ||
22 | 22 | let keyUserPoolsContract = "%s%s__config__userPoolsContract" | |
23 | 23 | ||
24 | + | let keyVotingEmissionRateContract = "%s%s__config__votingEmissionRateContract" | |
25 | + | ||
24 | 26 | let votingVerifiedContract = addressFromStringValue(getStringOrFail(this, keyVotingVerifiedContract)) | |
25 | 27 | ||
26 | 28 | let votingEmissionCandidateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionCandidateContract)) | |
27 | 29 | ||
28 | 30 | let userPoolsContract = addressFromStringValue(getStringOrFail(this, keyUserPoolsContract)) | |
31 | + | ||
32 | + | let votingEmissionRateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionRateContract)) | |
29 | 33 | ||
30 | 34 | let IdxFactoryCfgStakingDapp = 1 | |
31 | 35 | ||
32 | 36 | let IdxFactoryCfgBoostingDapp = 2 | |
33 | 37 | ||
34 | 38 | let IdxFactoryCfgIdoDapp = 3 | |
35 | 39 | ||
36 | 40 | let IdxFactoryCfgTeamDapp = 4 | |
37 | 41 | ||
38 | 42 | let IdxFactoryCfgEmissionDapp = 5 | |
39 | 43 | ||
40 | 44 | let IdxFactoryCfgRestDapp = 6 | |
41 | 45 | ||
42 | 46 | let IdxFactoryCfgSlippageDapp = 7 | |
43 | 47 | ||
44 | 48 | let IdxFactoryCfgGwxRewardDapp = 10 | |
45 | 49 | ||
46 | 50 | func keyFactoryCfg () = "%s__factoryConfig" | |
47 | 51 | ||
48 | 52 | ||
49 | 53 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
50 | 54 | ||
51 | 55 | ||
52 | 56 | func keyFactoryLpList () = "%s__lpTokensList" | |
53 | 57 | ||
54 | 58 | ||
55 | 59 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
56 | 60 | ||
57 | 61 | ||
58 | 62 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
59 | 63 | ||
60 | 64 | ||
61 | 65 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress())) | |
62 | 66 | ||
63 | 67 | ||
64 | 68 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
65 | 69 | ||
66 | 70 | ||
67 | 71 | func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP) | |
68 | 72 | ||
69 | 73 | ||
70 | 74 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
71 | 75 | ||
72 | 76 | ||
73 | 77 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
74 | 78 | ||
75 | 79 | ||
76 | 80 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
77 | 81 | ||
78 | 82 | ||
79 | 83 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
80 | 84 | ||
81 | 85 | ||
82 | 86 | func keyConfig () = "%s__config" | |
83 | 87 | ||
84 | 88 | ||
85 | 89 | func keyRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
86 | 90 | ||
87 | 91 | ||
88 | 92 | func keyRatePerBlockMaxStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlockMax__start", toString(timestamp), toString(block)], SEP) | |
89 | 93 | ||
90 | 94 | ||
91 | 95 | func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
92 | 96 | ||
93 | 97 | ||
94 | 98 | func keyRatePerBlockStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlock__start", toString(timestamp), toString(block)], SEP) | |
95 | 99 | ||
96 | 100 | ||
97 | 101 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
98 | 102 | ||
99 | 103 | ||
100 | 104 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
101 | 105 | ||
102 | 106 | ||
103 | 107 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
104 | 108 | ||
105 | 109 | ||
106 | 110 | func keyBoostCoeff () = "%s__boostCoeff" | |
107 | 111 | ||
108 | 112 | ||
109 | 113 | let boostCoeffDefault = 3 | |
110 | 114 | ||
111 | 115 | let boostCoeff = valueOrElse(getInteger(this, keyBoostCoeff()), boostCoeffDefault) | |
116 | + | ||
117 | + | func keyGwxHoldersRewardCurrent () = "%s%s__gwxHoldersReward__current" | |
118 | + | ||
119 | + | ||
120 | + | func keyGwxHoldersRewardNext () = "%s%s__gwxHoldersReward__next" | |
121 | + | ||
112 | 122 | ||
113 | 123 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
114 | 124 | ||
115 | 125 | ||
116 | 126 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
117 | 127 | ||
118 | 128 | ||
119 | 129 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
120 | 130 | case s: String => | |
121 | 131 | addressFromStringValue(s) | |
122 | 132 | case _ => | |
123 | 133 | this | |
124 | 134 | } | |
125 | 135 | ||
126 | 136 | ||
127 | 137 | func managerPublicKeyOrUnit () = { | |
128 | 138 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
129 | 139 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
130 | 140 | case s: String => | |
131 | 141 | fromBase58String(s) | |
132 | 142 | case _: Unit => | |
133 | 143 | unit | |
134 | 144 | case _ => | |
135 | 145 | throw("Match error") | |
136 | 146 | } | |
137 | 147 | } | |
138 | 148 | ||
139 | 149 | ||
140 | 150 | func mustManager (i) = { | |
141 | 151 | let pd = throwErr("Permission denied") | |
142 | 152 | match managerPublicKeyOrUnit() { | |
143 | 153 | case pk: ByteVector => | |
144 | 154 | if ((i.callerPublicKey == pk)) | |
145 | 155 | then true | |
146 | 156 | else pd | |
147 | 157 | case _: Unit => | |
148 | 158 | if ((i.caller == this)) | |
149 | 159 | then true | |
150 | 160 | else pd | |
151 | 161 | case _ => | |
152 | 162 | throw("Match error") | |
153 | 163 | } | |
154 | 164 | } | |
155 | 165 | ||
156 | 166 | ||
157 | 167 | @Callable(i) | |
158 | 168 | func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp,wxAssetIdStr) = { | |
159 | 169 | let checkCaller = mustManager(i) | |
160 | 170 | if ((checkCaller == checkCaller)) | |
161 | 171 | 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))] | |
162 | 172 | else throw("Strict value is not equal to itself.") | |
163 | 173 | } | |
164 | 174 | ||
165 | 175 | ||
166 | 176 | ||
167 | 177 | @Callable(i) | |
168 | 178 | func constructorV2 (votingVerifiedContractPrm) = { | |
169 | 179 | let checkCaller = mustManager(i) | |
170 | 180 | if ((checkCaller == checkCaller)) | |
171 | 181 | then $Tuple2([StringEntry(keyVotingVerifiedContract, votingVerifiedContractPrm)], unit) | |
172 | 182 | else throw("Strict value is not equal to itself.") | |
173 | 183 | } | |
174 | 184 | ||
175 | 185 | ||
176 | 186 | ||
177 | 187 | @Callable(i) | |
178 | 188 | func emit (amount) = if ((0 >= amount)) | |
179 | 189 | then $Tuple2(nil, nil) | |
180 | 190 | else { | |
181 | 191 | let factoryContract = readFactoryAddressOrFail() | |
182 | 192 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
183 | 193 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
184 | 194 | let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg) | |
185 | 195 | let caller = i.caller | |
186 | 196 | if (if ((caller != stakingContract)) | |
187 | 197 | then (caller != gwxRewardsContract) | |
188 | 198 | else false) | |
189 | 199 | then throwErr("permissions denied") | |
190 | 200 | else { | |
191 | 201 | let wxAssetIdStr = split(getStringOrFail(this, keyConfig()), SEP)[1] | |
192 | 202 | let wxAssetId = fromBase58String(wxAssetIdStr) | |
193 | 203 | $Tuple2([ScriptTransfer(caller, amount, wxAssetId)], [wxAssetId]) | |
194 | 204 | } | |
195 | 205 | } | |
196 | 206 | ||
197 | 207 | ||
198 | 208 | ||
199 | 209 | @Callable(i) | |
200 | 210 | func burn () = { | |
201 | 211 | let factoryContract = readFactoryAddressOrFail() | |
202 | 212 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
203 | 213 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
204 | 214 | if ((size(i.payments) != 1)) | |
205 | 215 | then throwErr("exact one payment is allowed") | |
206 | 216 | else { | |
207 | 217 | let pmt = i.payments[0] | |
208 | 218 | let assetId = value(pmt.assetId) | |
209 | 219 | let pmtAmount = pmt.amount | |
210 | 220 | let wxAssetId = fromBase58String(split(getStringOrFail(this, keyConfig()), SEP)[1]) | |
211 | 221 | if ((assetId != wxAssetId)) | |
212 | 222 | then throwErr("invalid wxAssetId is passed") | |
213 | 223 | else if (!(containsElement([boostingContract, votingVerifiedContract, votingEmissionCandidateContract, userPoolsContract], i.caller))) | |
214 | 224 | then throwErr("permissions denied") | |
215 | 225 | 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))] | |
216 | 226 | } | |
217 | 227 | } | |
218 | 228 | ||
219 | 229 | ||
220 | 230 | ||
221 | 231 | @Callable(i) | |
232 | + | func gwxHoldersRewardUpdate () = { | |
233 | + | let factoryContract = readFactoryAddressOrFail() | |
234 | + | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
235 | + | let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg) | |
236 | + | let checkCaller = if ((i.caller == gwxRewardsContract)) | |
237 | + | then true | |
238 | + | else mustManager(i) | |
239 | + | if ((checkCaller == checkCaller)) | |
240 | + | then { | |
241 | + | let gwxHolderRewardCurrent = valueOrElse(getInteger(keyGwxHoldersRewardCurrent()), 0) | |
242 | + | let gwxHolderRewardNext = valueOrElse(getInteger(keyGwxHoldersRewardNext()), gwxHolderRewardCurrent) | |
243 | + | let shouldBeUpdated = (gwxHolderRewardCurrent != gwxHolderRewardNext) | |
244 | + | let actions = if (shouldBeUpdated) | |
245 | + | then [IntegerEntry(keyGwxHoldersRewardCurrent(), gwxHolderRewardNext), DeleteEntry(keyGwxHoldersRewardNext())] | |
246 | + | else nil | |
247 | + | $Tuple2(actions, shouldBeUpdated) | |
248 | + | } | |
249 | + | else throw("Strict value is not equal to itself.") | |
250 | + | } | |
251 | + | ||
252 | + | ||
253 | + | ||
254 | + | @Callable(i) | |
222 | 255 | func getBoostCoeffREADONLY () = $Tuple2(nil, boostCoeff) | |
256 | + | ||
257 | + | ||
258 | + | ||
259 | + | @Callable(i) | |
260 | + | func changeRatePerBlockINTERNAL (newRatePerBlock) = { | |
261 | + | let check = if ((i.caller == this)) | |
262 | + | then true | |
263 | + | else throwErr("should be invoked internally") | |
264 | + | if ((check == check)) | |
265 | + | then { | |
266 | + | let blockTimestamp = match blockInfoByHeight(height) { | |
267 | + | case bi: BlockInfo => | |
268 | + | bi.timestamp | |
269 | + | case _ => | |
270 | + | throwErr("BlockInfo.timestamp error") | |
271 | + | } | |
272 | + | [IntegerEntry(keyRatePerBlockStartFrom(blockTimestamp, height), newRatePerBlock), IntegerEntry(keyRatePerBlockCurrent(), newRatePerBlock)] | |
273 | + | } | |
274 | + | else throw("Strict value is not equal to itself.") | |
275 | + | } | |
276 | + | ||
277 | + | ||
278 | + | ||
279 | + | @Callable(i) | |
280 | + | func changeRatePerBlock (newRatePerBlock) = { | |
281 | + | let check = if (if ((i.caller == votingEmissionRateContract)) | |
282 | + | then true | |
283 | + | else mustManager(i)) | |
284 | + | then true | |
285 | + | else throwErr("should be invoked by votingEmissionRateContract") | |
286 | + | if ((check == check)) | |
287 | + | then { | |
288 | + | let factoryContract = readFactoryAddressOrFail() | |
289 | + | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
290 | + | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
291 | + | let internalInv = invoke(this, "changeRatePerBlockINTERNAL", [newRatePerBlock], nil) | |
292 | + | if ((internalInv == internalInv)) | |
293 | + | then nil | |
294 | + | else throw("Strict value is not equal to itself.") | |
295 | + | } | |
296 | + | else throw("Strict value is not equal to itself.") | |
297 | + | } | |
223 | 298 | ||
224 | 299 | ||
225 | 300 | @Verifier(tx) | |
226 | 301 | func verify () = { | |
227 | 302 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
228 | 303 | case pk: ByteVector => | |
229 | 304 | pk | |
230 | 305 | case _: Unit => | |
231 | 306 | tx.senderPublicKey | |
232 | 307 | case _ => | |
233 | 308 | throw("Match error") | |
234 | 309 | } | |
235 | 310 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
236 | 311 | } | |
237 | 312 |
github/deemru/w8io/169f3d6 40.01 ms ◑