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