tx · 5Y2sTnjYdYprqoBF1UTgHsKFjywZxwZdDsGYZjXNv6Ss 3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA: -0.01300000 Waves 2023.03.14 17:25 [2489835] smart account 3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA > SELF 0.00000000 Waves
{ "type": 13, "id": "5Y2sTnjYdYprqoBF1UTgHsKFjywZxwZdDsGYZjXNv6Ss", "fee": 1300000, "feeAssetId": null, "timestamp": 1678804002893, "version": 2, "chainId": 84, "sender": "3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA", "senderPublicKey": "H19CeJVbUnfsK8EYs8K6fHxwBH7pLyxw8WCDFu7D4rGQ", "proofs": [ "4SGJcG31FyLKgYT3z3VBqdCjd73wjoxzpLFV9Kc3TZ2iaS9dgLxqqr9VZtrpBYCFGDaZiRBodMRzncokV8Sm4siX" ], "script": "base64:AAIFAAAAAAAABfAIAhIJCgcIAQEBAQEIEgMKAQgSAwoBARIAEgMKAQgSACIDU0VQIg9nZXRTdHJpbmdPckZhaWwiB2FkZHJlc3MiA2tleSIRa2V5RmFjdG9yeUFkZHJlc3MiGWtleVZvdGluZ1ZlcmlmaWVkQ29udHJhY3QiImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QiFGtleVVzZXJQb29sc0NvbnRyYWN0IhZ2b3RpbmdWZXJpZmllZENvbnRyYWN0Ih92b3RpbmdFbWlzc2lvbkNhbmRpZGF0ZUNvbnRyYWN0IhF1c2VyUG9vbHNDb250cmFjdCIYSWR4RmFjdG9yeUNmZ1N0YWtpbmdEYXBwIhlJZHhGYWN0b3J5Q2ZnQm9vc3RpbmdEYXBwIhRJZHhGYWN0b3J5Q2ZnSWRvRGFwcCIVSWR4RmFjdG9yeUNmZ1RlYW1EYXBwIhlJZHhGYWN0b3J5Q2ZnRW1pc3Npb25EYXBwIhVJZHhGYWN0b3J5Q2ZnUmVzdERhcHAiGUlkeEZhY3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QAAAAJheQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQEAAAABVQAAAAAFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJhQgEAAAACYUMAAAAABAAAAAJhRAQAAAABVwkBAAAAAVYAAAAAAwkAAAEAAAACBQAAAAFXAgAAAApCeXRlVmVjdG9yBAAAAAJhYwUAAAABVwUAAAACYWMDCQAAAQAAAAIFAAAAAVcCAAAABFVuaXQIBQAAAAJhQgAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmFCAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACYUIAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJhRKkqZmI=", "height": 2489835, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Aj4zMT6janE3Ttin2UoBnk8R5fwhXG21y3mWWeSw9BdZ Next: 98djQvqt7aiYDNg7MbWM3bUBbPp6c4bxSVX5yqqHP6zX Diff:
Old | New | Differences | |
---|---|---|---|
96 | 96 | ||
97 | 97 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
98 | 98 | ||
99 | - | ||
100 | - | func keyBoostCoeff () = "%s__boostCoeff" | |
101 | - | ||
102 | - | ||
103 | - | let boostCoeffDefault = 3 | |
104 | - | ||
105 | - | let boostCoeff = valueOrElse(getInteger(this, keyBoostCoeff()), boostCoeffDefault) | |
106 | 99 | ||
107 | 100 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
108 | 101 | ||
245 | 238 | } | |
246 | 239 | ||
247 | 240 | ||
248 | - | ||
249 | - | @Callable(i) | |
250 | - | func getBoostCoeffREADONLY () = $Tuple2(nil, boostCoeff) | |
251 | - | ||
252 | - | ||
253 | 241 | @Verifier(tx) | |
254 | 242 | func verify () = { | |
255 | 243 | let targetPublicKey = match managerPublicKeyOrUnit() { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | let keyVotingVerifiedContract = "%s%s__config__votingVerifiedContract" | |
13 | 13 | ||
14 | 14 | let keyVotingEmissionCandidateContract = "%s%s__config__votingEmissionCandidateContract" | |
15 | 15 | ||
16 | 16 | let keyUserPoolsContract = "%s%s__config__userPoolsContract" | |
17 | 17 | ||
18 | 18 | let votingVerifiedContract = addressFromStringValue(getStringOrFail(this, keyVotingVerifiedContract)) | |
19 | 19 | ||
20 | 20 | let votingEmissionCandidateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionCandidateContract)) | |
21 | 21 | ||
22 | 22 | let userPoolsContract = addressFromStringValue(getStringOrFail(this, keyUserPoolsContract)) | |
23 | 23 | ||
24 | 24 | let IdxFactoryCfgStakingDapp = 1 | |
25 | 25 | ||
26 | 26 | let IdxFactoryCfgBoostingDapp = 2 | |
27 | 27 | ||
28 | 28 | let IdxFactoryCfgIdoDapp = 3 | |
29 | 29 | ||
30 | 30 | let IdxFactoryCfgTeamDapp = 4 | |
31 | 31 | ||
32 | 32 | let IdxFactoryCfgEmissionDapp = 5 | |
33 | 33 | ||
34 | 34 | let IdxFactoryCfgRestDapp = 6 | |
35 | 35 | ||
36 | 36 | let IdxFactoryCfgSlippageDapp = 7 | |
37 | 37 | ||
38 | 38 | let IdxFactoryCfgGwxRewardDapp = 10 | |
39 | 39 | ||
40 | 40 | func keyFactoryCfg () = "%s__factoryConfig" | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func keyFactoryLpList () = "%s__lpTokensList" | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress())) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP) | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyConfig () = "%s__config" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyRatePerBlockMaxStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlockMax__start", toString(timestamp), toString(block)], SEP) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyRatePerBlockStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlock__start", toString(timestamp), toString(block)], SEP) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
98 | 98 | ||
99 | - | ||
100 | - | func keyBoostCoeff () = "%s__boostCoeff" | |
101 | - | ||
102 | - | ||
103 | - | let boostCoeffDefault = 3 | |
104 | - | ||
105 | - | let boostCoeff = valueOrElse(getInteger(this, keyBoostCoeff()), boostCoeffDefault) | |
106 | 99 | ||
107 | 100 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
108 | 101 | ||
109 | 102 | ||
110 | 103 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
111 | 104 | ||
112 | 105 | ||
113 | 106 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
114 | 107 | case s: String => | |
115 | 108 | fromBase58String(s) | |
116 | 109 | case _: Unit => | |
117 | 110 | unit | |
118 | 111 | case _ => | |
119 | 112 | throw("Match error") | |
120 | 113 | } | |
121 | 114 | ||
122 | 115 | ||
123 | 116 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
124 | 117 | case s: String => | |
125 | 118 | fromBase58String(s) | |
126 | 119 | case _: Unit => | |
127 | 120 | unit | |
128 | 121 | case _ => | |
129 | 122 | throw("Match error") | |
130 | 123 | } | |
131 | 124 | ||
132 | 125 | ||
133 | 126 | func mustManager (i) = { | |
134 | 127 | let pd = throw("Permission denied") | |
135 | 128 | match managerPublicKeyOrUnit() { | |
136 | 129 | case pk: ByteVector => | |
137 | 130 | if ((i.callerPublicKey == pk)) | |
138 | 131 | then true | |
139 | 132 | else pd | |
140 | 133 | case _: Unit => | |
141 | 134 | if ((i.caller == this)) | |
142 | 135 | then true | |
143 | 136 | else pd | |
144 | 137 | case _ => | |
145 | 138 | throw("Match error") | |
146 | 139 | } | |
147 | 140 | } | |
148 | 141 | ||
149 | 142 | ||
150 | 143 | @Callable(i) | |
151 | 144 | func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp,wxAssetIdStr) = { | |
152 | 145 | let checkCaller = mustManager(i) | |
153 | 146 | if ((checkCaller == checkCaller)) | |
154 | 147 | 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))] | |
155 | 148 | else throw("Strict value is not equal to itself.") | |
156 | 149 | } | |
157 | 150 | ||
158 | 151 | ||
159 | 152 | ||
160 | 153 | @Callable(i) | |
161 | 154 | func constructorV2 (votingVerifiedContractPrm) = { | |
162 | 155 | let checkCaller = mustManager(i) | |
163 | 156 | if ((checkCaller == checkCaller)) | |
164 | 157 | then $Tuple2([StringEntry(keyVotingVerifiedContract, votingVerifiedContractPrm)], unit) | |
165 | 158 | else throw("Strict value is not equal to itself.") | |
166 | 159 | } | |
167 | 160 | ||
168 | 161 | ||
169 | 162 | ||
170 | 163 | @Callable(i) | |
171 | 164 | func emit (amount) = if ((0 >= amount)) | |
172 | 165 | then $Tuple2(nil, nil) | |
173 | 166 | else { | |
174 | 167 | let factoryContract = readFactoryAddressOrFail() | |
175 | 168 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
176 | 169 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
177 | 170 | let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg) | |
178 | 171 | let caller = i.caller | |
179 | 172 | if (if ((caller != stakingContract)) | |
180 | 173 | then (caller != gwxRewardsContract) | |
181 | 174 | else false) | |
182 | 175 | then throw("permissions denied") | |
183 | 176 | else { | |
184 | 177 | let wxAssetIdStr = split(getStringOrFail(this, keyConfig()), SEP)[1] | |
185 | 178 | let wxAssetId = fromBase58String(wxAssetIdStr) | |
186 | 179 | $Tuple2([ScriptTransfer(caller, amount, wxAssetId)], [wxAssetId]) | |
187 | 180 | } | |
188 | 181 | } | |
189 | 182 | ||
190 | 183 | ||
191 | 184 | ||
192 | 185 | @Callable(i) | |
193 | 186 | func burn () = { | |
194 | 187 | let factoryContract = readFactoryAddressOrFail() | |
195 | 188 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
196 | 189 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
197 | 190 | if ((size(i.payments) != 1)) | |
198 | 191 | then throw("exact one payment is allowed") | |
199 | 192 | else { | |
200 | 193 | let pmt = i.payments[0] | |
201 | 194 | let assetId = value(pmt.assetId) | |
202 | 195 | let pmtAmount = pmt.amount | |
203 | 196 | let wxAssetId = fromBase58String(split(getStringOrFail(this, keyConfig()), SEP)[1]) | |
204 | 197 | if ((assetId != wxAssetId)) | |
205 | 198 | then throw("invalid wxAssetId is passed") | |
206 | 199 | else if (!(containsElement([boostingContract, votingVerifiedContract, votingEmissionCandidateContract, userPoolsContract], i.caller))) | |
207 | 200 | then throw("permissions denied") | |
208 | 201 | 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))] | |
209 | 202 | } | |
210 | 203 | } | |
211 | 204 | ||
212 | 205 | ||
213 | 206 | ||
214 | 207 | @Callable(i) | |
215 | 208 | func setManager (pendingManagerPublicKey) = { | |
216 | 209 | let checkCaller = mustManager(i) | |
217 | 210 | if ((checkCaller == checkCaller)) | |
218 | 211 | then { | |
219 | 212 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
220 | 213 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
221 | 214 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
222 | 215 | else throw("Strict value is not equal to itself.") | |
223 | 216 | } | |
224 | 217 | else throw("Strict value is not equal to itself.") | |
225 | 218 | } | |
226 | 219 | ||
227 | 220 | ||
228 | 221 | ||
229 | 222 | @Callable(i) | |
230 | 223 | func confirmManager () = { | |
231 | 224 | let pm = pendingManagerPublicKeyOrUnit() | |
232 | 225 | let hasPM = if (isDefined(pm)) | |
233 | 226 | then true | |
234 | 227 | else throw("No pending manager") | |
235 | 228 | if ((hasPM == hasPM)) | |
236 | 229 | then { | |
237 | 230 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
238 | 231 | then true | |
239 | 232 | else throw("You are not pending manager") | |
240 | 233 | if ((checkPM == checkPM)) | |
241 | 234 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
242 | 235 | else throw("Strict value is not equal to itself.") | |
243 | 236 | } | |
244 | 237 | else throw("Strict value is not equal to itself.") | |
245 | 238 | } | |
246 | 239 | ||
247 | 240 | ||
248 | - | ||
249 | - | @Callable(i) | |
250 | - | func getBoostCoeffREADONLY () = $Tuple2(nil, boostCoeff) | |
251 | - | ||
252 | - | ||
253 | 241 | @Verifier(tx) | |
254 | 242 | func verify () = { | |
255 | 243 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
256 | 244 | case pk: ByteVector => | |
257 | 245 | pk | |
258 | 246 | case _: Unit => | |
259 | 247 | tx.senderPublicKey | |
260 | 248 | case _ => | |
261 | 249 | throw("Match error") | |
262 | 250 | } | |
263 | 251 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
264 | 252 | } | |
265 | 253 |
github/deemru/w8io/026f985 40.35 ms ◑