tx · 6RfovmyiHxdzcz6WRPzbuqoJ2CtkVURjuwLvoWCAN1GT

3MxuKn3ZoWnX58Q4ooAraNxabpcdaAtpufk:  -0.01300000 Waves

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

{ "type": 13, "id": "6RfovmyiHxdzcz6WRPzbuqoJ2CtkVURjuwLvoWCAN1GT", "fee": 1300000, "feeAssetId": null, "timestamp": 1666253776824, "version": 1, "sender": "3MxuKn3ZoWnX58Q4ooAraNxabpcdaAtpufk", "senderPublicKey": "3GJt6j9wqqWrm9ontm1mnLfeW2wgWZYSqzVb9ueSKL1E", "proofs": [ "2wcmYnWD1ExXLn2GufBrxXrsr3ZmZaDPen4fWMagVLPF2sLJA8PxXMbZV4x2cBpjZD8hs1pjha6NHm8bnYdAdzAJ" ], "script": "base64:AAIFAAAAAAAAAzQIAhIDCgEIEgMKAQgSABIDCgEYEgMKAQgiA1NFUCIFRU1QVFkiDmlkeFBvb2xBZGRyZXNzIglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIg9pZHhGYWN0U3Rha0NudHIiC2tleUZhY3RDbnRyIhNrZXlNYW5hZ2VyUHVibGljS2V5IhprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleSILa2V5UG9vbEFkZHIiC2tleUFtdEFzc2V0Ig1rZXlQcmljZUFzc2V0Ig9rZXlBZG1pblB1YktleXMiBmtleUFtcCINa2V5QW1wSGlzdG9yeSIGaGVpZ2h0IhBrZXlGYWN0b3J5Q29uZmlnIg1rZXlQb29sQ29uZmlnIgZpQW10QXMiBWlQckFzIh9rZXlNYXBwaW5nc0Jhc2VBc3NldDJpbnRlcm5hbElkIgViQVN0ciIha2V5QWxsb3dlZExwU3RhYmxlQWRkb25TY3JpcHRIYXNoIg9nZXRTdHJpbmdPckZhaWwiBGFkZHIiA2tleSIMZ2V0SW50T3JGYWlsIgxwb29sQ29udHJhY3QiD2Z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AFFAAAAAIFAAAAAmFkBQAAAAJhZQkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAmFmAQAAAAJhZwAAAAAEAAAAAmFoBAAAAAFLCQEAAAABSgAAAAADCQAAAQAAAAIFAAAAAUsCAAAACkJ5dGVWZWN0b3IEAAAAAVEFAAAAAUsFAAAAAVEDCQAAAQAAAAIFAAAAAUsCAAAABFVuaXQIBQAAAAJhZgAAAA9zZW5kZXJQdWJsaWNLZXkJAAACAAAAAQIAAAALTWF0Y2ggZXJyb3IEAAAAAUsFAAAAAmFmAwkAAAEAAAACBQAAAAFLAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABTAUAAAABSwQAAAACYWkJAAH2AAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAAUwAAAAGc2NyaXB0BAAAAAJhagkAAlsAAAABCQEAAAAFdmFsdWUAAAABCQAEHQAAAAIFAAAAAUQJAQAAAAF4AAAAAAQAAAACYWsJAAPxAAAAAQUAAAAEdGhpcwMDCQAAAAAAAAIFAAAAAmFqBQAAAAJhaQkBAAAAAiE9AAAAAgUAAAACYWsFAAAAAmFpBwYJAAH0AAAAAwgFAAAAAmFmAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACYWYAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAJhaAkAAfQAAAADCAUAAAACYWYAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJhZgAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAAmFosNzZsg==", "chainId": 84, "height": 2280469, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DagWjPAXneYWi2nGGAJutnYxjGoHbmGswkuX6cMbTDjJ Next: 3KMMn4SgejjwKMnphNseRpKdYqqK6xWGmfAigFpLvzqz Diff:
OldNewDifferences
194194 if ((checkCaller == checkCaller))
195195 then {
196196 let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil)
197- let res2 = invoke(poolContract, "setS", [keyAmpHistory(height), amp], nil)
197+ let res2 = invoke(poolContract, "setS", [keyAmpHistory(q), amp], nil)
198198 $Tuple2(nil, $Tuple2(res1, res2))
199199 }
200200 else throw("Strict value is not equal to itself.")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let EMPTY = ""
77
88 let idxPoolAddress = 1
99
1010 let idxLPAsId = 3
1111
1212 let idxAmAsId = 4
1313
1414 let idxPrAsId = 5
1515
1616 let idxFactStakCntr = 1
1717
1818 func keyFactCntr () = "%s__factoryContract"
1919
2020
2121 func keyManagerPublicKey () = "%s__managerPublicKey"
2222
2323
2424 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
2525
2626
2727 func keyPoolAddr () = "%s__poolAddress"
2828
2929
3030 func keyAmtAsset () = "%s__amountAsset"
3131
3232
3333 func keyPriceAsset () = "%s__priceAsset"
3434
3535
3636 func keyAdminPubKeys () = "%s__adminPubKeys"
3737
3838
3939 func keyAmp () = "%s__amp"
4040
4141
4242 func keyAmpHistory (height) = ("%s%d__amp__" + toString(height))
4343
4444
4545 func keyFactoryConfig () = "%s__factoryConfig"
4646
4747
4848 func keyPoolConfig (iAmtAs,iPrAs) = (((("%d%d%s__" + iAmtAs) + "__") + iPrAs) + "__config")
4949
5050
5151 func keyMappingsBaseAsset2internalId (bAStr) = ("%s%s%s__mappings__baseAsset2internalId__" + bAStr)
5252
5353
5454 func keyAllowedLpStableAddonScriptHash () = "%s__allowedLpStableAddonScriptHash"
5555
5656
5757 func getStringOrFail (addr,key) = valueOrErrorMessage(getString(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
5858
5959
6060 func getIntOrFail (addr,key) = valueOrErrorMessage(getInteger(addr, key), makeString(["mandatory ", toString(addr), ".", key, " not defined"], ""))
6161
6262
6363 let poolContract = addressFromStringValue(getStringOrFail(this, keyPoolAddr()))
6464
6565 let factoryContract = addressFromStringValue(getStringOrFail(poolContract, keyFactCntr()))
6666
6767 func getPoolConfig () = {
6868 let amtAs = getStringOrFail(poolContract, keyAmtAsset())
6969 let priceAs = getStringOrFail(poolContract, keyPriceAsset())
7070 let iPriceAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAs))
7171 let iAmtAs = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAs))
7272 split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAs), toString(iPriceAs))), SEP)
7373 }
7474
7575
7676 func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP)
7777
7878
7979 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
8080 case s: String =>
8181 fromBase58String(s)
8282 case _: Unit =>
8383 unit
8484 case _ =>
8585 throw("Match error")
8686 }
8787
8888
8989 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
9090 case s: String =>
9191 fromBase58String(s)
9292 case _: Unit =>
9393 unit
9494 case _ =>
9595 throw("Match error")
9696 }
9797
9898
9999 func mustManager (i) = {
100100 let pd = throw("Permission denied")
101101 match managerPublicKeyOrUnit() {
102102 case pk: ByteVector =>
103103 if ((i.callerPublicKey == pk))
104104 then true
105105 else pd
106106 case _: Unit =>
107107 if ((i.caller == this))
108108 then true
109109 else pd
110110 case _ =>
111111 throw("Match error")
112112 }
113113 }
114114
115115
116116 func getAdmins () = match getString(keyAdminPubKeys()) {
117117 case s: String =>
118118 if ((size(s) == 0))
119119 then nil
120120 else split(s, SEP)
121121 case _ =>
122122 nil
123123 }
124124
125125
126126 func mustAdmin (i) = if (containsElement(getAdmins(), toBase58String(i.callerPublicKey)))
127127 then true
128128 else mustManager(i)
129129
130130
131131 func mustPool (i) = if ((i.caller == poolContract))
132132 then true
133133 else throw("caller must be the pool")
134134
135135
136136 @Callable(i)
137137 func constructor (poolAddress) = {
138138 let checkCaller = mustManager(i)
139139 if ((checkCaller == checkCaller))
140140 then [StringEntry(keyPoolAddr(), poolAddress)]
141141 else throw("Strict value is not equal to itself.")
142142 }
143143
144144
145145
146146 @Callable(i)
147147 func setManager (pendingManagerPublicKey) = {
148148 let checkCaller = mustManager(i)
149149 if ((checkCaller == checkCaller))
150150 then {
151151 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
152152 if ((checkManagerPublicKey == checkManagerPublicKey))
153153 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
154154 else throw("Strict value is not equal to itself.")
155155 }
156156 else throw("Strict value is not equal to itself.")
157157 }
158158
159159
160160
161161 @Callable(i)
162162 func confirmManager () = {
163163 let pm = pendingManagerPublicKeyOrUnit()
164164 let hasPM = if (isDefined(pm))
165165 then true
166166 else throw("No pending manager")
167167 if ((hasPM == hasPM))
168168 then {
169169 let checkPM = if ((i.callerPublicKey == value(pm)))
170170 then true
171171 else throw("You are not pending manager")
172172 if ((checkPM == checkPM))
173173 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
174174 else throw("Strict value is not equal to itself.")
175175 }
176176 else throw("Strict value is not equal to itself.")
177177 }
178178
179179
180180
181181 @Callable(i)
182182 func setAdmins (adminPubKeys) = {
183183 let checkCaller = mustManager(i)
184184 if ((checkCaller == checkCaller))
185185 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
186186 else throw("Strict value is not equal to itself.")
187187 }
188188
189189
190190
191191 @Callable(i)
192192 func setAmp (amp) = {
193193 let checkCaller = mustAdmin(i)
194194 if ((checkCaller == checkCaller))
195195 then {
196196 let res1 = invoke(poolContract, "setS", [keyAmp(), amp], nil)
197- let res2 = invoke(poolContract, "setS", [keyAmpHistory(height), amp], nil)
197+ let res2 = invoke(poolContract, "setS", [keyAmpHistory(q), amp], nil)
198198 $Tuple2(nil, $Tuple2(res1, res2))
199199 }
200200 else throw("Strict value is not equal to itself.")
201201 }
202202
203203
204204 @Verifier(tx)
205205 func verify () = {
206206 let targetPublicKey = match managerPublicKeyOrUnit() {
207207 case pk: ByteVector =>
208208 pk
209209 case _: Unit =>
210210 tx.senderPublicKey
211211 case _ =>
212212 throw("Match error")
213213 }
214214 match tx {
215215 case s: SetScriptTransaction =>
216216 let newHash = blake2b256(value(s.script))
217217 let allowedHash = fromBase64String(value(getString(factoryContract, keyAllowedLpStableAddonScriptHash())))
218218 let currentHash = scriptHash(this)
219219 if (if ((allowedHash == newHash))
220220 then (currentHash != newHash)
221221 else false)
222222 then true
223223 else sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
224224 case _ =>
225225 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
226226 }
227227 }
228228

github/deemru/w8io/026f985 
420.94 ms