tx · J56AUVLsHq1Hy5bvgbRZpuckeZrFpV2dkfW7yvKeY7G6

3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA:  -0.01300000 Waves

2022.10.20 11:14 [2280469] smart account 3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA > SELF 0.00000000 Waves

{ "type": 13, "id": "J56AUVLsHq1Hy5bvgbRZpuckeZrFpV2dkfW7yvKeY7G6", "fee": 1300000, "feeAssetId": null, "timestamp": 1666253672925, "version": 1, "sender": "3NBqs2vfpyT5cMdUJ97mEJ1Ycp2y8GbAZDA", "senderPublicKey": "H19CeJVbUnfsK8EYs8K6fHxwBH7pLyxw8WCDFu7D4rGQ", "proofs": [ "2ZwX7Wu5uFS3nTZic2tFBnKRPR2w8GJnjA4Nq8Twrd1HRJgycWnPhywbXQBpVJww6rznLXRBQ7vvDdcXtRPBnLeP" ], "script": "base64:AAIFAAAAAAAABccIAhIJCgcIAQEBAQEIEgMKAQgSAwoBARIAEgMKAQgSACIDU0VQIg9nZXRTdHJpbmdPckZhaWwiB2FkZHJlc3MiA2tleSIRa2V5RmFjdG9yeUFkZHJlc3MiGWtleVZvdGluZ1ZlcmlmaWVkQ29udHJhY3QiImtleVZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QiFnZvdGluZ1ZlcmlmaWVkQ29udHJhY3QiH3ZvdGluZ0VtaXNzaW9uQ2FuZGlkYXRlQ29udHJhY3QiGElkeEZhY3RvcnlDZmdTdGFraW5nRGFwcCIZSWR4RmFjdG9yeUNmZ0Jvb3N0aW5nRGFwcCIUSWR4RmFjdG9yeUNmZ0lkb0RhcHAiFUlkeEZhY3RvcnlDZmdUZWFtRGFwcCIZSWR4RmFjdG9yeUNmZ0VtaXNzaW9uRGFwcCIVSWR4RmFjdG9yeUNmZ1Jlc3REYXBwIhlJZHhGYWN0b3J5Q2ZnU2xpcHBhZ2VEYXBwIhpJZHhGYWN0b3J5Q2ZnR3d4UmV3YXJkRG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kBAAAAAVQAAAAAAwkAAAEAAAACBQAAAAFVAgAAAApCeXRlVmVjdG9yBAAAAAJhYQUAAAABVQUAAAACYWEDCQAAAQAAAAIFAAAAAVUCAAAABFVuaXQIBQAAAAJhegAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IJAAH0AAAAAwgFAAAAAmF6AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACYXoAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJhQhK4wBM=", "chainId": 84, "height": 2280469, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7W58ExSwMiaKxKHAHt3gaJf3UaCtFdzuYNexDujfTNvi Next: GEwEFzibKCDXtAtV7KGiifN6KR3ARsg55brdcDWRsw29 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
1616 let votingVerifiedContract = addressFromStringValue(getStringOrFail(this, keyVotingVerifiedContract))
1717
1818 let votingEmissionCandidateContract = addressFromStringValue(getStringOrFail(this, keyVotingEmissionCandidateContract))
1919
2020 let IdxFactoryCfgStakingDapp = 1
2121
2222 let IdxFactoryCfgBoostingDapp = 2
2323
2424 let IdxFactoryCfgIdoDapp = 3
2525
2626 let IdxFactoryCfgTeamDapp = 4
2727
2828 let IdxFactoryCfgEmissionDapp = 5
2929
3030 let IdxFactoryCfgRestDapp = 6
3131
3232 let IdxFactoryCfgSlippageDapp = 7
3333
3434 let IdxFactoryCfgGwxRewardDapp = 10
3535
3636 func keyFactoryCfg () = "%s__factoryConfig"
3737
3838
3939 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
4040
4141
4242 func keyFactoryLpList () = "%s__lpTokensList"
4343
4444
4545 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
4646
4747
4848 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
4949
5050
5151 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress()))
5252
5353
5454 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
5555
5656
5757 func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP)
5858
5959
6060 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
6161
6262
6363 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
6464
6565
6666 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
6767
6868
6969 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
7070
7171
7272 func keyConfig () = "%s__config"
7373
7474
7575 func keyRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
7676
7777
7878 func keyRatePerBlockMaxStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlockMax__start", toString(timestamp), toString(block)], SEP)
7979
8080
8181 func keyRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
8282
8383
8484 func keyRatePerBlockStartFrom (timestamp,block) = makeString(["%s%s%d%d__ratePerBlock__start", toString(timestamp), toString(block)], SEP)
8585
8686
8787 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
8888
8989
9090 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
9191
9292
9393 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
9494
9595
9696 func keyManagerPublicKey () = "%s__managerPublicKey"
9797
9898
9999 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
100100
101101
102102 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
103103 case s: String =>
104104 fromBase58String(s)
105105 case _: Unit =>
106106 unit
107107 case _ =>
108108 throw("Match error")
109109 }
110110
111111
112112 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
113113 case s: String =>
114114 fromBase58String(s)
115115 case _: Unit =>
116116 unit
117117 case _ =>
118118 throw("Match error")
119119 }
120120
121121
122122 func mustManager (i) = {
123123 let pd = throw("Permission denied")
124124 match managerPublicKeyOrUnit() {
125125 case pk: ByteVector =>
126126 if ((i.callerPublicKey == pk))
127127 then true
128128 else pd
129129 case _: Unit =>
130130 if ((i.caller == this))
131131 then true
132132 else pd
133133 case _ =>
134134 throw("Match error")
135135 }
136136 }
137137
138138
139139 @Callable(i)
140140 func constructor (factoryAddress,ratePerBlockMax,ratePerBlock,emissionStartBlock,emissionDuration,emissionStartTimestamp,wxAssetIdStr) = {
141141 let checkCaller = mustManager(i)
142142 if ((checkCaller == checkCaller))
143143 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))]
144144 else throw("Strict value is not equal to itself.")
145145 }
146146
147147
148148
149149 @Callable(i)
150150 func constructorV2 (votingVerifiedContractPrm) = {
151151 let checkCaller = mustManager(i)
152152 if ((checkCaller == checkCaller))
153153 then $Tuple2([StringEntry(keyVotingVerifiedContract, votingVerifiedContractPrm)], unit)
154154 else throw("Strict value is not equal to itself.")
155155 }
156156
157157
158158
159159 @Callable(i)
160160 func emit (amount) = if ((0 >= amount))
161161 then $Tuple2(nil, nil)
162162 else {
163163 let factoryContract = readFactoryAddressOrFail()
164164 let factoryCfg = readFactoryCfgOrFail(factoryContract)
165165 let stakingContract = getStakingAddressOrFail(factoryCfg)
166166 let gwxRewardsContract = getGwxRewardAddressOrFail(factoryCfg)
167167 let caller = i.caller
168168 if (if ((caller != stakingContract))
169169 then (caller != gwxRewardsContract)
170170 else false)
171171 then throw("permissions denied")
172172 else {
173173 let wxAssetIdStr = split(getStringOrFail(this, keyConfig()), SEP)[1]
174174 let wxAssetId = fromBase58String(wxAssetIdStr)
175175 $Tuple2([ScriptTransfer(caller, amount, wxAssetId)], [wxAssetId])
176176 }
177177 }
178178
179179
180180
181181 @Callable(i)
182182 func burn () = {
183183 let factoryContract = readFactoryAddressOrFail()
184184 let factoryCfg = readFactoryCfgOrFail(factoryContract)
185185 let boostingContract = getBoostingAddressOrFail(factoryCfg)
186186 if ((size(i.payments) != 1))
187187 then throw("exact one payment is allowed")
188188 else {
189189 let pmt = i.payments[0]
190190 let assetId = value(pmt.assetId)
191191 let pmtAmount = pmt.amount
192192 let wxAssetId = fromBase58String(split(getStringOrFail(this, keyConfig()), SEP)[1])
193193 if ((assetId != wxAssetId))
194194 then throw("invalid wxAssetId is passed")
195195 else if (!(containsElement([boostingContract, votingVerifiedContract, votingEmissionCandidateContract], i.caller)))
196196 then throw("permissions denied")
197197 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))]
198198 }
199199 }
200200
201201
202202
203203 @Callable(i)
204204 func setManager (pendingManagerPublicKey) = {
205205 let checkCaller = mustManager(i)
206206 if ((checkCaller == checkCaller))
207207 then {
208208 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
209209 if ((checkManagerPublicKey == checkManagerPublicKey))
210210 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
211211 else throw("Strict value is not equal to itself.")
212212 }
213213 else throw("Strict value is not equal to itself.")
214214 }
215215
216216
217217
218218 @Callable(i)
219219 func confirmManager () = {
220220 let pm = pendingManagerPublicKeyOrUnit()
221221 let hasPM = if (isDefined(pm))
222222 then true
223223 else throw("No pending manager")
224224 if ((hasPM == hasPM))
225225 then {
226226 let checkPM = if ((i.callerPublicKey == value(pm)))
227227 then true
228228 else throw("You are not pending manager")
229229 if ((checkPM == checkPM))
230230 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
231231 else throw("Strict value is not equal to itself.")
232232 }
233233 else throw("Strict value is not equal to itself.")
234234 }
235235
236236
237237 @Verifier(tx)
238238 func verify () = {
239239 let targetPublicKey = match managerPublicKeyOrUnit() {
240240 case pk: ByteVector =>
241241 pk
242242 case _: Unit =>
243243 tx.senderPublicKey
244244 case _ =>
245245 throw("Match error")
246246 }
247247 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
248248 }
249249

github/deemru/w8io/026f985 
29.07 ms