tx · BFcSdUYPyYQaEXCGbXHukQ2rWZzMyhvXbChU2Zs3gBbf 3NBCS9jMGoLy6DLs5amXKF61zN94MUCrniB: -0.01300000 Waves 2023.03.02 09:38 [2472087] smart account 3NBCS9jMGoLy6DLs5amXKF61zN94MUCrniB > SELF 0.00000000 Waves
{ "type": 13, "id": "BFcSdUYPyYQaEXCGbXHukQ2rWZzMyhvXbChU2Zs3gBbf", "fee": 1300000, "feeAssetId": null, "timestamp": 1677739094610, "version": 1, "sender": "3NBCS9jMGoLy6DLs5amXKF61zN94MUCrniB", "senderPublicKey": "27JDCCw777CtpqWnJZCntSQwQ6NG7Qw18ihBrWeZzrRT", "proofs": [ "2d6MTtVyu9CiMGSt1vZQ2n9Esknvpi6axqHtRF9xhKBtXnUgJrJemrxee4yLuJtddpqmksKUpWBeB9nZanFGJ5W" ], "script": "base64:AAIFAAAAAAAAACAIAhIJCgcIAQEBAQEIEgMKAQgSAwoBARIAEgMKAQgSAAAAACoAAAAAA1NFUAIAAAACX18BAAAAD2dldFN0cmluZ09yRmFpbAAAAAIAAAAHYWRkcmVzcwAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACAgAAAA9tYW5kYXRvcnkgdGhpcy4FAAAAA2tleQIAAAAPIGlzIG5vdCBkZWZpbmVkAQAAABFrZXlGYWN0b3J5QWRkcmVzcwAAAAACAAAAHCVzJXNfX2NvbmZpZ19fZmFjdG9yeUFkZHJlc3MAAAAAGWtleVZvdGluZ1ZlcmlmaWVkQ29udHJhY3QCAAAAJCVzJXNfX2NvbmZpZ19fdm90aW5nVmVyaWZpZWRDb250cmFjdAAAAAAia2V5Vm90aW5nRW1pc3Npb25DYW5kaWRhdGVDb250cmFjdAIAAAAtJXMlc19fY29uZmlnX192b3RpbmdFbWlzc2lvbkNhbmRpZGF0ZUNvbnRyYWN0AAAAABRrZXlVc2VyUG9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hbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleY5aEqQ=", "chainId": 84, "height": 2472087, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7Fug5hV6KgZuLimBPMk57j2Cn24z4dMuMScBdgu88Mhk Next: qznjxFJL5uTehRwwFbS795hemN1BNZHFJj88pprN9kJ Full:
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 | 99 | ||
100 | 100 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
107 | 107 | case s: String => | |
108 | 108 | fromBase58String(s) | |
109 | 109 | case _: Unit => | |
110 | 110 | unit | |
111 | 111 | case _ => | |
112 | 112 | throw("Match error") | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
117 | 117 | case s: String => | |
118 | 118 | fromBase58String(s) | |
119 | 119 | case _: Unit => | |
120 | 120 | unit | |
121 | 121 | case _ => | |
122 | 122 | throw("Match error") | |
123 | 123 | } | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func mustManager (i) = { | |
127 | 127 | let pd = throw("Permission denied") | |
128 | 128 | match managerPublicKeyOrUnit() { | |
129 | 129 | case pk: ByteVector => | |
130 | 130 | if ((i.callerPublicKey == pk)) | |
131 | 131 | then true | |
132 | 132 | else pd | |
133 | 133 | case _: Unit => | |
134 | 134 | if ((i.caller == this)) | |
135 | 135 | then true | |
136 | 136 | else pd | |
137 | 137 | case _ => | |
138 | 138 | throw("Match error") | |
139 | 139 | } | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | @Callable(i) | |
144 | 144 | func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp,wxAssetIdStr) = { | |
145 | 145 | let checkCaller = mustManager(i) | |
146 | 146 | if ((checkCaller == checkCaller)) | |
147 | 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))] | |
148 | 148 | else throw("Strict value is not equal to itself.") | |
149 | 149 | } | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | ||
153 | 153 | @Callable(i) | |
154 | 154 | func constructorV2 (votingVerifiedContractPrm) = { | |
155 | 155 | let checkCaller = mustManager(i) | |
156 | 156 | if ((checkCaller == checkCaller)) | |
157 | 157 | then $Tuple2([StringEntry(keyVotingVerifiedContract, votingVerifiedContractPrm)], unit) | |
158 | 158 | else throw("Strict value is not equal to itself.") | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | ||
163 | 163 | @Callable(i) | |
164 | 164 | func emit (amount) = if ((0 >= amount)) | |
165 | 165 | then $Tuple2(nil, nil) | |
166 | 166 | else { | |
167 | 167 | let factoryContract = readFactoryAddressOrFail() | |
168 | 168 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
169 | 169 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
170 | 170 | let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg) | |
171 | 171 | let caller = i.caller | |
172 | 172 | if (if ((caller != stakingContract)) | |
173 | 173 | then (caller != gwxRewardsContract) | |
174 | 174 | else false) | |
175 | 175 | then throw("permissions denied") | |
176 | 176 | else { | |
177 | 177 | let wxAssetIdStr = split(getStringOrFail(this, keyConfig()), SEP)[1] | |
178 | 178 | let wxAssetId = fromBase58String(wxAssetIdStr) | |
179 | 179 | $Tuple2([ScriptTransfer(caller, amount, wxAssetId)], [wxAssetId]) | |
180 | 180 | } | |
181 | 181 | } | |
182 | 182 | ||
183 | 183 | ||
184 | 184 | ||
185 | 185 | @Callable(i) | |
186 | 186 | func burn () = { | |
187 | 187 | let factoryContract = readFactoryAddressOrFail() | |
188 | 188 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
189 | 189 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
190 | 190 | if ((size(i.payments) != 1)) | |
191 | 191 | then throw("exact one payment is allowed") | |
192 | 192 | else { | |
193 | 193 | let pmt = i.payments[0] | |
194 | 194 | let assetId = value(pmt.assetId) | |
195 | 195 | let pmtAmount = pmt.amount | |
196 | 196 | let wxAssetId = fromBase58String(split(getStringOrFail(this, keyConfig()), SEP)[1]) | |
197 | 197 | if ((assetId != wxAssetId)) | |
198 | 198 | then throw("invalid wxAssetId is passed") | |
199 | 199 | else if (!(containsElement([boostingContract, votingVerifiedContract, votingEmissionCandidateContract, userPoolsContract], i.caller))) | |
200 | 200 | then throw("permissions denied") | |
201 | 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))] | |
202 | 202 | } | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | ||
207 | 207 | @Callable(i) | |
208 | 208 | func setManager (pendingManagerPublicKey) = { | |
209 | 209 | let checkCaller = mustManager(i) | |
210 | 210 | if ((checkCaller == checkCaller)) | |
211 | 211 | then { | |
212 | 212 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
213 | 213 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
214 | 214 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
215 | 215 | else throw("Strict value is not equal to itself.") | |
216 | 216 | } | |
217 | 217 | else throw("Strict value is not equal to itself.") | |
218 | 218 | } | |
219 | 219 | ||
220 | 220 | ||
221 | 221 | ||
222 | 222 | @Callable(i) | |
223 | 223 | func confirmManager () = { | |
224 | 224 | let pm = pendingManagerPublicKeyOrUnit() | |
225 | 225 | let hasPM = if (isDefined(pm)) | |
226 | 226 | then true | |
227 | 227 | else throw("No pending manager") | |
228 | 228 | if ((hasPM == hasPM)) | |
229 | 229 | then { | |
230 | 230 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
231 | 231 | then true | |
232 | 232 | else throw("You are not pending manager") | |
233 | 233 | if ((checkPM == checkPM)) | |
234 | 234 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
235 | 235 | else throw("Strict value is not equal to itself.") | |
236 | 236 | } | |
237 | 237 | else throw("Strict value is not equal to itself.") | |
238 | 238 | } | |
239 | 239 | ||
240 | 240 | ||
241 | 241 | @Verifier(tx) | |
242 | 242 | func verify () = { | |
243 | 243 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
244 | 244 | case pk: ByteVector => | |
245 | 245 | pk | |
246 | 246 | case _: Unit => | |
247 | 247 | tx.senderPublicKey | |
248 | 248 | case _ => | |
249 | 249 | throw("Match error") | |
250 | 250 | } | |
251 | 251 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
252 | 252 | } | |
253 | 253 |
github/deemru/w8io/026f985 42.79 ms ◑