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:AAIFAAAAAAAABfAIAhIJCgcIAQEBAQEIEgMKAQgSAwoBARIAEgMKAQgSACIDU0VQIg9nZXRTdHJpbmdPckZhaWwiB2FkZHJlc3MiA2tleSIRa2V5RmFjdG9yeUFkZHJlc3MiGWtleVZvdGluZ1ZlcmlmaWVkQ29udHJhY3QiImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QiFGtleVVzZXJQb29sc0NvbnRyYWN0IhZ2b3RpbmdWZXJpZmllZENvbnRyYWN0Ih92b3RpbmdFbWlzc2lvbkNhbmRpZGF0ZUNvbnRyYWN0IhF1c2VyUG9vbHNDb250cmFjdCIYSWR4RmFjdG9yeUNmZ1N0YWtpbmdEYXBwIhlJZHhGYWN0b3J5Q2ZnQm9vc3RpbmdEYXBwIhRJZHhGYWN0b3J5Q2ZnSWRvRGFwcCIVSWR4RmFjdG9yeUNmZ1RlYW1EYXBwIhlJZHhGYWN0b3J5Q2ZnRW1pc3Npb25EYXBwIhVJZHhGYWN0b3J5Q2ZnUmVzdERhcHAiGUlkeEZhY3RvcnlDZmdTbGlwcGFnZ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AAAALRGVsZXRlRW50cnkAAAABCQEAAAABVQAAAAAFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJhQgEAAAACYUMAAAAABAAAAAJhRAQAAAABVwkBAAAAAVYAAAAAAwkAAAEAAAACBQAAAAFXAgAAAApCeXRlVmVjdG9yBAAAAAJhYwUAAAABVwUAAAACYWMDCQAAAQAAAAIFAAAAAVcCAAAABFVuaXQIBQAAAAJhQgAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmFCAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACYUIAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJhRKkqZmI=", "chainId": 84, "height": 2407343, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J56AUVLsHq1Hy5bvgbRZpuckeZrFpV2dkfW7yvKeY7G6 Next: Ayb9pKfxTvDWNPNkn58SfFd2bbHqSTPHM2WBLwGnm4MQ Diff:
OldNewDifferences
1313
1414 let keyVotingEmissionCandidateContract = "%s%s__config__votingEmissionCandidateContract"
1515
16+let keyUserPoolsContract = "%s%s__config__userPoolsContract"
17+
1618 let votingVerifiedContract = addressFromStringValue(getStringOrFail(this, keyVotingVerifiedContract))
1719
1820 let votingEmissionCandidateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionCandidateContract))
21+
22+let userPoolsContract = addressFromStringValue(getStringOrFail(this, keyUserPoolsContract))
1923
2024 let IdxFactoryCfgStakingDapp = 1
2125
192196 let wxAssetId = fromBase58String(split(getStringOrFail(this, keyConfig()), SEP)[1])
193197 if ((assetId != wxAssetId))
194198 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)))
196200 then throw("permissions denied")
197201 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))]
198202 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
77
88
99 func keyFactoryAddress () = "%s%s__config__factoryAddress"
1010
1111
1212 let keyVotingVerifiedContract = "%s%s__config__votingVerifiedContract"
1313
1414 let keyVotingEmissionCandidateContract = "%s%s__config__votingEmissionCandidateContract"
1515
16+let keyUserPoolsContract = "%s%s__config__userPoolsContract"
17+
1618 let votingVerifiedContract = addressFromStringValue(getStringOrFail(this, keyVotingVerifiedContract))
1719
1820 let votingEmissionCandidateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionCandidateContract))
21+
22+let userPoolsContract = addressFromStringValue(getStringOrFail(this, keyUserPoolsContract))
1923
2024 let IdxFactoryCfgStakingDapp = 1
2125
2226 let IdxFactoryCfgBoostingDapp = 2
2327
2428 let IdxFactoryCfgIdoDapp = 3
2529
2630 let IdxFactoryCfgTeamDapp = 4
2731
2832 let IdxFactoryCfgEmissionDapp = 5
2933
3034 let IdxFactoryCfgRestDapp = 6
3135
3236 let IdxFactoryCfgSlippageDapp = 7
3337
3438 let IdxFactoryCfgGwxRewardDapp = 10
3539
3640 func keyFactoryCfg () = "%s__factoryConfig"
3741
3842
3943 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
4044
4145
4246 func keyFactoryLpList () = "%s__lpTokensList"
4347
4448
4549 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
4650
4751
4852 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
4953
5054
5155 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress()))
5256
5357
5458 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
5559
5660
5761 func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP)
5862
5963
6064 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
6165
6266
6367 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
6468
6569
6670 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
6771
6872
6973 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
7074
7175
7276 func keyConfig () = "%s__config"
7377
7478
7579 func keyRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
7680
7781
7882 func keyRatePerBlockMaxStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlockMax__start", toString(timestamp), toString(block)], SEP)
7983
8084
8185 func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
8286
8387
8488 func keyRatePerBlockStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlock__start", toString(timestamp), toString(block)], SEP)
8589
8690
8791 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
8892
8993
9094 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
9195
9296
9397 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
9498
9599
96100 func keyManagerPublicKey () = "%s__managerPublicKey"
97101
98102
99103 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
100104
101105
102106 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
103107 case s: String =>
104108 fromBase58String(s)
105109 case _: Unit =>
106110 unit
107111 case _ =>
108112 throw("Match error")
109113 }
110114
111115
112116 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
113117 case s: String =>
114118 fromBase58String(s)
115119 case _: Unit =>
116120 unit
117121 case _ =>
118122 throw("Match error")
119123 }
120124
121125
122126 func mustManager (i) = {
123127 let pd = throw("Permission denied")
124128 match managerPublicKeyOrUnit() {
125129 case pk: ByteVector =>
126130 if ((i.callerPublicKey == pk))
127131 then true
128132 else pd
129133 case _: Unit =>
130134 if ((i.caller == this))
131135 then true
132136 else pd
133137 case _ =>
134138 throw("Match error")
135139 }
136140 }
137141
138142
139143 @Callable(i)
140144 func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp,wxAssetIdStr) = {
141145 let checkCaller = mustManager(i)
142146 if ((checkCaller == checkCaller))
143147 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))]
144148 else throw("Strict value is not equal to itself.")
145149 }
146150
147151
148152
149153 @Callable(i)
150154 func constructorV2 (votingVerifiedContractPrm) = {
151155 let checkCaller = mustManager(i)
152156 if ((checkCaller == checkCaller))
153157 then $Tuple2([StringEntry(keyVotingVerifiedContract, votingVerifiedContractPrm)], unit)
154158 else throw("Strict value is not equal to itself.")
155159 }
156160
157161
158162
159163 @Callable(i)
160164 func emit (amount) = if ((0 >= amount))
161165 then $Tuple2(nil, nil)
162166 else {
163167 let factoryContract = readFactoryAddressOrFail()
164168 let factoryCfg = readFactoryCfgOrFail(factoryContract)
165169 let stakingContract = getStakingAddressOrFail(factoryCfg)
166170 let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
167171 let caller = i.caller
168172 if (if ((caller != stakingContract))
169173 then (caller != gwxRewardsContract)
170174 else false)
171175 then throw("permissions denied")
172176 else {
173177 let wxAssetIdStr = split(getStringOrFail(this, keyConfig()), SEP)[1]
174178 let wxAssetId = fromBase58String(wxAssetIdStr)
175179 $Tuple2([ScriptTransfer(caller, amount, wxAssetId)], [wxAssetId])
176180 }
177181 }
178182
179183
180184
181185 @Callable(i)
182186 func burn () = {
183187 let factoryContract = readFactoryAddressOrFail()
184188 let factoryCfg = readFactoryCfgOrFail(factoryContract)
185189 let boostingContract = getBoostingAddressOrFail(factoryCfg)
186190 if ((size(i.payments) != 1))
187191 then throw("exact one payment is allowed")
188192 else {
189193 let pmt = i.payments[0]
190194 let assetId = value(pmt.assetId)
191195 let pmtAmount = pmt.amount
192196 let wxAssetId = fromBase58String(split(getStringOrFail(this, keyConfig()), SEP)[1])
193197 if ((assetId != wxAssetId))
194198 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)))
196200 then throw("permissions denied")
197201 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))]
198202 }
199203 }
200204
201205
202206
203207 @Callable(i)
204208 func setManager (pendingManagerPublicKey) = {
205209 let checkCaller = mustManager(i)
206210 if ((checkCaller == checkCaller))
207211 then {
208212 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
209213 if ((checkManagerPublicKey == checkManagerPublicKey))
210214 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
211215 else throw("Strict value is not equal to itself.")
212216 }
213217 else throw("Strict value is not equal to itself.")
214218 }
215219
216220
217221
218222 @Callable(i)
219223 func confirmManager () = {
220224 let pm = pendingManagerPublicKeyOrUnit()
221225 let hasPM = if (isDefined(pm))
222226 then true
223227 else throw("No pending manager")
224228 if ((hasPM == hasPM))
225229 then {
226230 let checkPM = if ((i.callerPublicKey == value(pm)))
227231 then true
228232 else throw("You are not pending manager")
229233 if ((checkPM == checkPM))
230234 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
231235 else throw("Strict value is not equal to itself.")
232236 }
233237 else throw("Strict value is not equal to itself.")
234238 }
235239
236240
237241 @Verifier(tx)
238242 func verify () = {
239243 let targetPublicKey = match managerPublicKeyOrUnit() {
240244 case pk: ByteVector =>
241245 pk
242246 case _: Unit =>
243247 tx.senderPublicKey
244248 case _ =>
245249 throw("Match error")
246250 }
247251 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
248252 }
249253

github/deemru/w8io/026f985 
74.23 ms