tx · Ea32eC29rPLKgGsdNAzU1pGQqq6z88yrJ6Sj8AMF8mYZ

3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh:  -0.01400000 Waves

2023.05.02 09:54 [2559810] smart account 3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh > SELF 0.00000000 Waves

{ "type": 13, "id": "Ea32eC29rPLKgGsdNAzU1pGQqq6z88yrJ6Sj8AMF8mYZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1683010501243, "version": 2, "chainId": 84, "sender": "3N3g7W8FPoQ7g5EadbAD2GVjrZT5RWpHZZh", "senderPublicKey": "Ap7CkWd6fzBU34kGo4GJJzC5q4qWXuLVunzE25PchdGS", "proofs": [ "555ogRiZZrAULPg4v6zSJTDUVy1aod3VnqcXYFV67EFoDojS8tcZJ7wCrdtbfMzBNAysfRLmd7cHSYx7mfGNQBDX" ], "script": "base64:BgKdEAgCEgkKBwgICBgBCAESABIICgYICAgICAgSAwoBGBIDCgEIEgASABIECgIICCIQY29udHJhY3RGaWxlbmFtZSIDU0VQIgx3YXZlc0Fzc2V0SWQiEWludmFsaWRQcmljZUFzc2V0Igd3cmFwRXJyIgNtc2ciCHRocm93RXJyIgd0aHJvd1BEIhR0aHJvd0NyZWF0ZU5vdENhbGxlZCIRdGhyb3dZb3VOb3RJc3N1ZXIiD3Rocm93UG9vbEV4aXN0cyIVdGhyb3dBc3NldE5vdFZlcmlmaWVkIhZ0aHJvd0ludmFsaWRQcmljZUFzc2V0IhR0aHJvd0ludmFsaWRGZWVBc3NldCIXdGhyb3dJbnZhbGlkQW1vdW50QXNzZXQiEnRocm93SW52YWxpZFN0YXR1cyIfdGhyb3dDYW5BY3RpdmF0ZU9ubHlQZW5kaW5nUG9vbCIddGhyb3dGYWN0b3J5UmV0dXJuZWROb3RTdHJpbmciHHRocm93SW52YWxpZFByaWNlQXNzZXRBbW91bnQiD3Rocm93SW52YWxpZEZlZSIVdGhyb3dJbnZhbGlkQXNzZXRQYWlyI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": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GkjZUyBJNWL3LJGd6TD1hgVXrQVg28kkgqhX5TA2c9g Next: 5LWRgKxspmWRZ5VApBsmk7A3vWPYYNiVPVnfrbFocqcg Diff:
OldNewDifferences
247247 else throwInvalidAssetPair()
248248 if ((checkAssetsNotEqual == checkAssetsNotEqual))
249249 then {
250- let $t078218263 = if (if (containsElement(priceAssetsList, asset2Id))
251- then isVerified(asset1Id)
252- else false)
250+ let $t078218282 = if (if (isManager(i))
251+ then true
252+ else if (containsElement(priceAssetsList, asset2Id))
253+ then isVerified(asset1Id)
254+ else false)
253255 then $Tuple4(asset1Id, asset1Payment.amount, asset2Id, asset2Payment.amount)
254256 else if (if (containsElement(priceAssetsList, asset1Id))
255257 then isVerified(asset2Id)
256258 else false)
257259 then $Tuple4(asset2Id, asset2Payment.amount, asset1Id, asset1Payment.amount)
258260 else throwInvalidAssetPair()
259- let amountAssetId = $t078218263._1
260- let amountAssetAmount = $t078218263._2
261- let priceAssetId = $t078218263._3
262- let priceAssetAmount = $t078218263._4
261+ let amountAssetId = $t078218282._1
262+ let amountAssetAmount = $t078218282._2
263+ let priceAssetId = $t078218282._3
264+ let priceAssetAmount = $t078218282._4
263265 let managerPriceAssetMinAmount = 1
264266 let priceAssetMinAmount = if (isManager(i))
265267 then managerPriceAssetMinAmount
280282 then true
281283 else throwPoolExists(), if (!(poolExists))
282284 then true
283- else throwPoolExists(), if ((getString(keyFeeAssetId()) == feeAssetId))
285+ else throwPoolExists(), if (if (isManager(i))
286+ then true
287+ else (getString(keyFeeAssetId()) == feeAssetId))
284288 then true
285289 else throwInvalidFeeAsset(), if (if (isManager(i))
286290 then true
290294 then true
291295 else (priceAssetAmount >= priceAssetMinAmount))
292296 then true
293- else throwInvalidPriceAssetAmount(), if ((feeAssetPayment.amount == getInteger(keyFeeAmount())))
297+ else throwInvalidPriceAssetAmount(), if (if (isManager(i))
298+ then true
299+ else (feeAssetPayment.amount == getInteger(keyFeeAmount())))
294300 then true
295301 else throwInvalidFee()]
296302 if ((checks == checks))
297303 then {
298- let burnEmissionInv = invoke(emissionContract, "burn", nil, [AttachedPayment(fromBase58String(feeAssetId), feeAssetPayment.amount)])
304+ let paymentsWithFeeSize = 3
305+ let burnEmissionInv = if ((size(i.payments) >= paymentsWithFeeSize))
306+ then invoke(emissionContract, "burn", nil, [AttachedPayment(fromBase58String(feeAssetId), feeAssetPayment.amount)])
307+ else unit
299308 if ((burnEmissionInv == burnEmissionInv))
300309 then [BooleanEntry(keyCreateCalled(amountAssetId, priceAssetId), true), StringEntry(keyCreateCaller(amountAssetId, priceAssetId), toString(i.caller)), IntegerEntry(keyLastIndex(), curIndex), StringEntry(keySuffix(amountAssetId, priceAssetId), (toString(curIndex) + indexSuffix)), IntegerEntry(keyHeight(amountAssetId, priceAssetId), height), StringEntry(keyStatus(amountAssetId, priceAssetId), statusPending), IntegerEntry(keyAmountAssetAmount(amountAssetId, priceAssetId), amountAssetAmount), IntegerEntry(keyPriceAssetAmount(amountAssetId, priceAssetId), priceAssetAmount)]
301310 else throw("Strict value is not equal to itself.")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let contractFilename = "user_pools.ride"
55
66 let SEP = "__"
77
88 let wavesAssetId = "WAVES"
99
1010 let invalidPriceAsset = "Invalid price asset"
1111
1212 func wrapErr (msg) = makeString([contractFilename, ": ", msg], "")
1313
1414
1515 func throwErr (msg) = throw(wrapErr(msg))
1616
1717
1818 func throwPD () = throwErr("Permission denied")
1919
2020
2121 func throwCreateNotCalled () = throwErr("Create is not called for assets pair")
2222
2323
2424 func throwYouNotIssuer () = throwErr("You are not amountAsset issuer")
2525
2626
2727 func throwPoolExists () = throwErr("Pool with such assets already exists")
2828
2929
3030 func throwAssetNotVerified () = throwErr("Asset is not verified")
3131
3232
3333 func throwInvalidPriceAsset () = throwErr(invalidPriceAsset)
3434
3535
3636 func throwInvalidFeeAsset () = throwErr("Invalid fee asset")
3737
3838
3939 func throwInvalidAmountAsset () = throwErr("Invalid amount asset attached")
4040
4141
4242 func throwInvalidStatus () = throwErr("Invalid status")
4343
4444
4545 func throwCanActivateOnlyPendingPool () = throwErr("Can activate pool only in 'pending' status")
4646
4747
4848 func throwFactoryReturnedNotString () = throwErr("FactoryV2 returned not string")
4949
5050
5151 func throwInvalidPriceAssetAmount () = throwErr("invalid price asset amount")
5252
5353
5454 func throwInvalidFee () = throwErr("invalid fee")
5555
5656
5757 func throwInvalidAssetPair () = throwErr("invalid asset pair")
5858
5959
6060 func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP)
6161
6262
6363 func keyPendingManagerPublicKey () = makeString(["%s", "pendingManagerPublicKey"], SEP)
6464
6565
6666 func keyAdminPubKeys () = makeString(["%s", "adminPubKeys"], SEP)
6767
6868
6969 func keyStatus (amountAssetId,priceAssetId) = makeString(["%s%s%s", "status", amountAssetId, priceAssetId], SEP)
7070
7171
7272 func keyFactoryContract () = makeString(["%s", "factoryContract"], SEP)
7373
7474
7575 func keyAssetsStoreContract () = makeString(["%s", "assetsStoreContract"], SEP)
7676
7777
7878 func keyEmissionContract () = makeString(["%s", "emissionContract"], SEP)
7979
8080
8181 func keySuffix (amountAssetId,priceAssetId) = makeString(["%s%s%s", "suffix", amountAssetId, priceAssetId], SEP)
8282
8383
8484 func keyLastIndex () = makeString(["%s", "lastIndex"], SEP)
8585
8686
8787 let indexSuffix = "u"
8888
8989 let statusPending = "pending"
9090
9191 let statusDeclined = "declined"
9292
9393 let statusActive = "active"
9494
9595 let statuses = [statusPending, statusDeclined, statusActive]
9696
9797 func keyCreateCalled (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCalled", amountAssetId, priceAssetId], SEP)
9898
9999
100100 func keyCreateCaller (amountAssetId,priceAssetId) = makeString(["%s%s%s", "createCaller", amountAssetId, priceAssetId], SEP)
101101
102102
103103 func keyAmountAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "amountAssetAmount", amountAssetId, priceAssetId], SEP)
104104
105105
106106 func keyPriceAssetAmount (amountAssetId,priceAssetId) = makeString(["%s%s%s", "priceAssetAmount", amountAssetId, priceAssetId], SEP)
107107
108108
109109 func keyHeight (amountAssetId,priceAssetId) = makeString(["%s%s%s", "height", amountAssetId, priceAssetId], SEP)
110110
111111
112112 func keyFeeAssetId () = makeString(["%s", "feeAssetId"], SEP)
113113
114114
115115 func keyFeeAmount () = makeString(["%s", "feeAmount"], SEP)
116116
117117
118118 func keyAmountAssetMinAmount () = makeString(["%s", "amountAssetMinAmount"], SEP)
119119
120120
121121 func keyPriceAssetsMinAmount () = makeString(["%s", "priceAssetsMinAmount"], SEP)
122122
123123
124124 func keyPriceAssets () = makeString(["%s", "priceAssets"], SEP)
125125
126126
127127 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " is not defined"))
128128
129129
130130 func stringOptionToList (stringOrUnit) = match stringOrUnit {
131131 case s: String =>
132132 if ((size(s) == 0))
133133 then nil
134134 else split(s, SEP)
135135 case _: Unit =>
136136 nil
137137 case _ =>
138138 throw("Match error")
139139 }
140140
141141
142142 let factoryContract = addressFromStringValue(getStringOrFail(keyFactoryContract()))
143143
144144 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
145145
146146 let votingEmissionContract = addressFromStringValue(valueOrErrorMessage(getString(factoryContract, keyVotingEmissionContract), wrapErr("voting emission contract address is required")))
147147
148148 let keyVotingEmissionCandidateContract = makeString(["%s", "votingEmissionCandidateContract"], SEP)
149149
150150 let votingEmissionCandidateContract = addressFromStringValue(valueOrErrorMessage(getString(votingEmissionContract, keyVotingEmissionCandidateContract), wrapErr("voting emission candidate contract address is required")))
151151
152152 func isCreateCalled (amountAssetId,priceAssetId) = valueOrElse(getBoolean(keyCreateCalled(amountAssetId, priceAssetId)), false)
153153
154154
155155 func mustCreateCalled (amountAssetId,priceAssetId) = if (isCreateCalled(amountAssetId, priceAssetId))
156156 then true
157157 else throwCreateNotCalled()
158158
159159
160160 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
161161 case s: String =>
162162 fromBase58String(s)
163163 case _: Unit =>
164164 unit
165165 case _ =>
166166 throw("Match error")
167167 }
168168
169169
170170 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
171171 case s: String =>
172172 fromBase58String(s)
173173 case _: Unit =>
174174 unit
175175 case _ =>
176176 throw("Match error")
177177 }
178178
179179
180180 func isManager (i) = match managerPublicKeyOrUnit() {
181181 case pk: ByteVector =>
182182 (i.callerPublicKey == pk)
183183 case _: Unit =>
184184 (i.caller == this)
185185 case _ =>
186186 throw("Match error")
187187 }
188188
189189
190190 func mustManager (i) = if (isManager(i))
191191 then true
192192 else throwPD()
193193
194194
195195 func mustAdmin (i) = {
196196 let adminPKs = stringOptionToList(getString(keyAdminPubKeys()))
197197 if (containsElement(adminPKs, toBase58String(i.callerPublicKey)))
198198 then true
199199 else mustManager(i)
200200 }
201201
202202
203203 func isVerified (assetId) = (valueOrElse(getInteger(addressFromStringValue(getStringOrFail(keyAssetsStoreContract())), (("status_<" + assetId) + ">")), 0) == 2)
204204
205205
206206 func getIdAndInfo (payment) = match payment.assetId {
207207 case id: ByteVector =>
208208 let info = value(assetInfo(id))
209209 $Tuple2(toBase58String(id), info)
210210 case _: Unit =>
211211 $Tuple2(wavesAssetId, unit)
212212 case _ =>
213213 throw("Match error")
214214 }
215215
216216
217217 func validStatus (status) = containsElement(statuses, status)
218218
219219
220220 @Callable(i)
221221 func constructor (factoryV2Address,assetsStoreAddress,emissionAddress,priceAssetsMinAmount,amountAssetMinAmount,feeAssetId,feeAmount) = {
222222 let checkCaller = mustManager(i)
223223 if ((checkCaller == checkCaller))
224224 then [StringEntry(keyFactoryContract(), factoryV2Address), StringEntry(keyAssetsStoreContract(), assetsStoreAddress), StringEntry(keyEmissionContract(), emissionAddress), StringEntry(keyPriceAssetsMinAmount(), makeString(priceAssetsMinAmount, SEP)), IntegerEntry(keyAmountAssetMinAmount(), amountAssetMinAmount), StringEntry(keyFeeAssetId(), feeAssetId), IntegerEntry(keyFeeAmount(), feeAmount)]
225225 else throw("Strict value is not equal to itself.")
226226 }
227227
228228
229229
230230 @Callable(i)
231231 func create () = {
232232 let asset1Payment = value(i.payments[0])
233233 let asset2Payment = value(i.payments[1])
234234 let feeAssetPayment = value(i.payments[2])
235235 let $t074647521 = getIdAndInfo(asset1Payment)
236236 let asset1Id = $t074647521._1
237237 let asset1Info = $t074647521._2
238238 let $t075247581 = getIdAndInfo(asset2Payment)
239239 let asset2Id = $t075247581._1
240240 let asset2Info = $t075247581._2
241241 let $t075847647 = getIdAndInfo(feeAssetPayment)
242242 let feeAssetId = $t075847647._1
243243 let feeAssetInfo = $t075847647._2
244244 let priceAssetsList = stringOptionToList(getString(factoryContract, keyPriceAssets()))
245245 let checkAssetsNotEqual = if ((asset1Id != asset2Id))
246246 then true
247247 else throwInvalidAssetPair()
248248 if ((checkAssetsNotEqual == checkAssetsNotEqual))
249249 then {
250- let $t078218263 = if (if (containsElement(priceAssetsList, asset2Id))
251- then isVerified(asset1Id)
252- else false)
250+ let $t078218282 = if (if (isManager(i))
251+ then true
252+ else if (containsElement(priceAssetsList, asset2Id))
253+ then isVerified(asset1Id)
254+ else false)
253255 then $Tuple4(asset1Id, asset1Payment.amount, asset2Id, asset2Payment.amount)
254256 else if (if (containsElement(priceAssetsList, asset1Id))
255257 then isVerified(asset2Id)
256258 else false)
257259 then $Tuple4(asset2Id, asset2Payment.amount, asset1Id, asset1Payment.amount)
258260 else throwInvalidAssetPair()
259- let amountAssetId = $t078218263._1
260- let amountAssetAmount = $t078218263._2
261- let priceAssetId = $t078218263._3
262- let priceAssetAmount = $t078218263._4
261+ let amountAssetId = $t078218282._1
262+ let amountAssetAmount = $t078218282._2
263+ let priceAssetId = $t078218282._3
264+ let priceAssetAmount = $t078218282._4
263265 let managerPriceAssetMinAmount = 1
264266 let priceAssetMinAmount = if (isManager(i))
265267 then managerPriceAssetMinAmount
266268 else {
267269 let priceAssetsIndex = valueOrErrorMessage(indexOf(priceAssetsList, priceAssetId), invalidPriceAsset)
268270 value(parseInt(stringOptionToList(getString(keyPriceAssetsMinAmount()))[priceAssetsIndex]))
269271 }
270272 let lastIndex = valueOrElse(getInteger(keyLastIndex()), 0)
271273 let curIndex = (lastIndex + 1)
272274 let emissionContract = addressFromStringValue(getStringOrFail(keyEmissionContract()))
273275 let poolExists = {
274276 let @ = invoke(factoryContract, "poolExistsREADONLY", [amountAssetId, priceAssetId], nil)
275277 if ($isInstanceOf(@, "Boolean"))
276278 then @
277279 else throw(($getType(@) + " couldn't be cast to Boolean"))
278280 }
279281 let checks = [if (!(isCreateCalled(amountAssetId, priceAssetId)))
280282 then true
281283 else throwPoolExists(), if (!(poolExists))
282284 then true
283- else throwPoolExists(), if ((getString(keyFeeAssetId()) == feeAssetId))
285+ else throwPoolExists(), if (if (isManager(i))
286+ then true
287+ else (getString(keyFeeAssetId()) == feeAssetId))
284288 then true
285289 else throwInvalidFeeAsset(), if (if (isManager(i))
286290 then true
287291 else (amountAssetAmount >= getIntegerValue(keyAmountAssetMinAmount())))
288292 then true
289293 else throwInvalidAmountAsset(), if (if (isManager(i))
290294 then true
291295 else (priceAssetAmount >= priceAssetMinAmount))
292296 then true
293- else throwInvalidPriceAssetAmount(), if ((feeAssetPayment.amount == getInteger(keyFeeAmount())))
297+ else throwInvalidPriceAssetAmount(), if (if (isManager(i))
298+ then true
299+ else (feeAssetPayment.amount == getInteger(keyFeeAmount())))
294300 then true
295301 else throwInvalidFee()]
296302 if ((checks == checks))
297303 then {
298- let burnEmissionInv = invoke(emissionContract, "burn", nil, [AttachedPayment(fromBase58String(feeAssetId), feeAssetPayment.amount)])
304+ let paymentsWithFeeSize = 3
305+ let burnEmissionInv = if ((size(i.payments) >= paymentsWithFeeSize))
306+ then invoke(emissionContract, "burn", nil, [AttachedPayment(fromBase58String(feeAssetId), feeAssetPayment.amount)])
307+ else unit
299308 if ((burnEmissionInv == burnEmissionInv))
300309 then [BooleanEntry(keyCreateCalled(amountAssetId, priceAssetId), true), StringEntry(keyCreateCaller(amountAssetId, priceAssetId), toString(i.caller)), IntegerEntry(keyLastIndex(), curIndex), StringEntry(keySuffix(amountAssetId, priceAssetId), (toString(curIndex) + indexSuffix)), IntegerEntry(keyHeight(amountAssetId, priceAssetId), height), StringEntry(keyStatus(amountAssetId, priceAssetId), statusPending), IntegerEntry(keyAmountAssetAmount(amountAssetId, priceAssetId), amountAssetAmount), IntegerEntry(keyPriceAssetAmount(amountAssetId, priceAssetId), priceAssetAmount)]
301310 else throw("Strict value is not equal to itself.")
302311 }
303312 else throw("Strict value is not equal to itself.")
304313 }
305314 else throw("Strict value is not equal to itself.")
306315 }
307316
308317
309318
310319 @Callable(i)
311320 func activate (poolAddress,amountAssetId,amountAssetTicker,priceAssetId,priceAssetTicker,logo) = {
312321 let checks = [mustAdmin(i), if (isCreateCalled(amountAssetId, priceAssetId))
313322 then true
314323 else throwCreateNotCalled(), if ((value(getString(keyStatus(amountAssetId, priceAssetId))) == statusPending))
315324 then true
316325 else throwCanActivateOnlyPendingPool()]
317326 if ((checks == checks))
318327 then {
319328 let activateNewPoolInv = invoke(factoryContract, "activateNewPool", [poolAddress, amountAssetId, priceAssetId, ((amountAssetTicker + priceAssetTicker) + "LP"), (((amountAssetTicker + "/") + priceAssetTicker) + " pool liquidity provider token"), 0, "VLTPOOL", logo], nil)
320329 if ((activateNewPoolInv == activateNewPoolInv))
321330 then {
322331 let lpAssetId = match activateNewPoolInv {
323332 case id: String =>
324333 id
325334 case _ =>
326335 throwFactoryReturnedNotString()
327336 }
328337 if ((lpAssetId == lpAssetId))
329338 then {
330339 let beforePut = assetBalance(this, fromBase58String(lpAssetId))
331340 if ((beforePut == beforePut))
332341 then {
333342 let put = invoke(addressFromStringValue(poolAddress), "put", [0, false], [AttachedPayment(if ((amountAssetId == "WAVES"))
334343 then unit
335344 else fromBase58String(amountAssetId), value(getInteger(keyAmountAssetAmount(amountAssetId, priceAssetId)))), AttachedPayment(if ((priceAssetId == "WAVES"))
336345 then unit
337346 else fromBase58String(priceAssetId), value(getInteger(keyPriceAssetAmount(amountAssetId, priceAssetId))))])
338347 if ((put == put))
339348 then {
340349 let afterPut = assetBalance(this, fromBase58String(lpAssetId))
341350 if ((afterPut == afterPut))
342351 then {
343352 let user = value(addressFromString(value(getString(keyCreateCaller(amountAssetId, priceAssetId)))))
344353 let res = invoke(votingEmissionCandidateContract, "approve", [amountAssetId, priceAssetId], nil)
345354 if ((res == res))
346355 then [StringEntry(keyStatus(amountAssetId, priceAssetId), statusActive), ScriptTransfer(user, (afterPut - beforePut), fromBase58String(lpAssetId))]
347356 else throw("Strict value is not equal to itself.")
348357 }
349358 else throw("Strict value is not equal to itself.")
350359 }
351360 else throw("Strict value is not equal to itself.")
352361 }
353362 else throw("Strict value is not equal to itself.")
354363 }
355364 else throw("Strict value is not equal to itself.")
356365 }
357366 else throw("Strict value is not equal to itself.")
358367 }
359368 else throw("Strict value is not equal to itself.")
360369 }
361370
362371
363372
364373 @Callable(i)
365374 func setAdmins (adminPubKeys) = {
366375 let checkCaller = mustManager(i)
367376 if ((checkCaller == checkCaller))
368377 then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))]
369378 else throw("Strict value is not equal to itself.")
370379 }
371380
372381
373382
374383 @Callable(i)
375384 func setManager (pendingManagerPublicKey) = {
376385 let checkCaller = mustManager(i)
377386 if ((checkCaller == checkCaller))
378387 then {
379388 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
380389 if ((checkManagerPublicKey == checkManagerPublicKey))
381390 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
382391 else throw("Strict value is not equal to itself.")
383392 }
384393 else throw("Strict value is not equal to itself.")
385394 }
386395
387396
388397
389398 @Callable(i)
390399 func confirmManager () = {
391400 let pm = pendingManagerPublicKeyOrUnit()
392401 let hasPM = if (isDefined(pm))
393402 then true
394403 else throw("No pending manager")
395404 if ((hasPM == hasPM))
396405 then {
397406 let checkPM = if ((i.callerPublicKey == value(pm)))
398407 then true
399408 else throw("You are not pending manager")
400409 if ((checkPM == checkPM))
401410 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
402411 else throw("Strict value is not equal to itself.")
403412 }
404413 else throw("Strict value is not equal to itself.")
405414 }
406415
407416
408417
409418 @Callable(i)
410419 func priceAssetsREADONLY () = $Tuple2(nil, stringOptionToList(getString(keyPriceAssets())))
411420
412421
413422
414423 @Callable(i)
415424 func statusREADONLY (amountAssetId,priceAssetId) = {
416425 let status = match getString(keyStatus(amountAssetId, priceAssetId)) {
417426 case s: String =>
418427 s
419428 case _ =>
420429 unit
421430 }
422431 $Tuple2(nil, status)
423432 }
424433
425434
426435 @Verifier(tx)
427436 func verify () = {
428437 let targetPublicKey = match managerPublicKeyOrUnit() {
429438 case pk: ByteVector =>
430439 pk
431440 case _: Unit =>
432441 tx.senderPublicKey
433442 case _ =>
434443 throw("Match error")
435444 }
436445 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
437446 }
438447

github/deemru/w8io/169f3d6 
65.99 ms