tx · 14Ss988skoTZAbjK2pcvn3AbZGF76mhAfgJoZN7HEjYM

3MvXnAcEtL9x3i499UcvTQZPufrT5ZZUEd5:  -0.01400000 Waves

2022.09.19 19:43 [2236254] smart account 3MvXnAcEtL9x3i499UcvTQZPufrT5ZZUEd5 > SELF 0.00000000 Waves

{ "type": 13, "id": "14Ss988skoTZAbjK2pcvn3AbZGF76mhAfgJoZN7HEjYM", "fee": 1400000, "feeAssetId": null, "timestamp": 1663605818882, "version": 1, "sender": "3MvXnAcEtL9x3i499UcvTQZPufrT5ZZUEd5", "senderPublicKey": "GSAhb4fdky75LiCZ4p4DDK4rmWpmsgGBg1ZVdtPfmRES", "proofs": [ "2H3kzHzUEXxj7o6eYvyiWzDJ3XLsFR4cRjrnwQqTX1TU83oiFU6MzGq2xkrxnqP7bMsB9HdeoAu8BxPwmoedJVMA" ], "script": "base64:BgIsCAISCgoICAgBAQEBAQESAwoBCBIDCgEIEgUKAwgIARIECgIICBIDCgEIEgAUAANTRVACAl9fARNrZXlNYW5hZ2VyUHVibGljS2V5AAIUJXNfX21hbmFnZXJQdWJsaWNLZXkBGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAIbJXNfX3BlbmRpbmdNYW5hZ2VyUHVibGljS2V5ARBrZXlXaXRoZHJhd0RlbGF5AgZhc3NldEEGYXNzZXRCCQC5CQIJAMwIAgIGJXMlcyVzCQDMCAICDXdpdGhkcmF3RGVsYXkJAMwIAgUGYXNzZXRBCQDMCAIFBmFzc2V0QgUDbmlsBQNTRVABFWtleURlcG9zaXRGZWVQZXJtaWxsZQIGYXNzZXRBBmFzc2V0QgkAuQkCCQDMCAICBiVzJXMlcwkAzAgCAhJkZXBvc2l0RmVlUGVybWlsbGUJAMwIAgUGYXNzZXRBCQDMCAIFBmFzc2V0QgUDbmlsBQNTRVABFmtleVdpdGhkcmF3RmVlUGVybWlsbGUCBmFzc2V0QQZhc3NldEIJALkJAgkAzAgCAgYlcyVzJXMJAMwIAgITd2l0aG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gkBC0RlbGV0ZUVudHJ5AQkBGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQPdGFyZ2V0UHVibGljS2V5BAckbWF0Y2gwCQEWbWFuYWdlclB1YmxpY0tleU9yVW5pdAADCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQCcGsFByRtYXRjaDAFAnBrAwkAAQIFByRtYXRjaDACBFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V59ff0MQ==", "chainId": 84, "height": 2236254, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 35RmjPnFsTychHmYmaGk5YCGMrzjkpCNtM4YzZ36WihX Next: 7d516jzASdtgMp6yZLMqSNvbu1PVy2Kgdmnpgm4pye5g Diff:
OldNewDifferences
153153 let minAmountWithdraw = valueOrErrorMessage(getInteger(keyMinAmountWithdraw(assetA, assetB)), fmtErr("The minimum withdrawal amount for this pair of assets is not set."))
154154 let assetLockHeight = (height + valueOrErrorMessage(getInteger(keyWithdrawDelay(assetA, assetB)), fmtErr("Withdrawal delay is not set for the specified pair.")))
155155 let currentUserBalance = valueOrErrorMessage(getInteger(keyBalance(assetA, assetB, userAddress)), fmtErr("This user balance does not exist."))
156- let totalCommissions = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0)
156+ let totalCommissions = valueOrElse(getInteger(keyTotalFeeCollectedWithdraw(assetA, assetB)), 0)
157157 let withdrawFeePermilleKey = keyWithdrawFeePermille(assetA, assetB)
158158 let withdrawFee = valueOrErrorMessage(getInteger(withdrawFeePermilleKey), fmtErr("The withdrawal fee for this pair of assets is not set."))
159159 let fee = ((toWithdraw / 1000) * withdrawFee)
203203 let checkCaller = mustManager(i)
204204 if ((checkCaller == checkCaller))
205205 then {
206- let toWithdrawA = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0)
206+ let toWithdrawB = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0)
207+ let withdrawAssetB = fromBase58String(value(assetB))
208+ let toWithdrawA = valueOrElse(getInteger(keyTotalFeeCollectedWithdraw(assetA, assetB)), 0)
207209 let withdrawAssetA = fromBase58String(value(assetA))
208- let toWithdrawB = valueOrElse(getInteger(keyTotalFeeCollectedWithdraw(assetA, assetB)), 0)
209- let withdrawAssetB = fromBase58String(value(assetB))
210210 [IntegerEntry(keyTotalFeeCollectedDeposit(assetA, assetB), 0), ScriptTransfer(i.caller, toWithdrawA, withdrawAssetA), IntegerEntry(keyTotalFeeCollectedWithdraw(assetA, assetB), 0), ScriptTransfer(i.caller, toWithdrawB, withdrawAssetB)]
211211 }
212212 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 SEP = "__"
55
66 func keyManagerPublicKey () = "%s__managerPublicKey"
77
88
99 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
1010
1111
1212 func keyWithdrawDelay (assetA,assetB) = makeString(["%s%s%s", "withdrawDelay", assetA, assetB], SEP)
1313
1414
1515 func keyDepositFeePermille (assetA,assetB) = makeString(["%s%s%s", "depositFeePermille", assetA, assetB], SEP)
1616
1717
1818 func keyWithdrawFeePermille (assetA,assetB) = makeString(["%s%s%s", "withdrawFeePermille", assetA, assetB], SEP)
1919
2020
2121 func keyMinAmountDeposit (assetA,assetB) = makeString(["%s%s%s", "minAmountDeposit", assetA, assetB], SEP)
2222
2323
2424 func keyAssetsPairStatus (assetA,assetB) = makeString(["%s%s%s", "assetsPairStatus", assetA, assetB], SEP)
2525
2626
2727 func keyMinAmountWithdraw (assetA,assetB) = makeString(["%s%s%s", "minAmountWithdraw", assetA, assetB], SEP)
2828
2929
3030 func keyBalance (assetA,assetB,userAddress) = makeString(["%s%s%s%s", "balance", assetA, assetB, userAddress], SEP)
3131
3232
3333 func keyTotalFeeCollectedDeposit (assetA,assetB) = makeString(["%s%s%s%s", "totalFeeCollected", "deposit", assetA, assetB], SEP)
3434
3535
3636 func keyTotalFeeCollectedWithdraw (assetA,assetB) = makeString(["%s%s%s%s", "totalFeeCollected", "withdraw", assetA, assetB], SEP)
3737
3838
3939 func keyAssetLockTime (assetA,assetB,userAddress) = makeString(["%s%s%s%s", "assetLockTime", assetA, assetB, userAddress], SEP)
4040
4141
4242 func keyProcessInProgress (userAddress,assetA,assetB,heightInKey) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "inProgress", userAddress, assetA, assetB, toString(heightInKey)], SEP)
4343
4444
4545 func keyProcessDone (userAddress,assetA,assetB,heightInKey) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "done", userAddress, assetA, assetB, toString(heightInKey)], SEP)
4646
4747
4848 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
4949 case s: String =>
5050 fromBase58String(s)
5151 case _: Unit =>
5252 unit
5353 case _ =>
5454 throw("Match error")
5555 }
5656
5757
5858 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
5959 case s: String =>
6060 fromBase58String(s)
6161 case _: Unit =>
6262 unit
6363 case _ =>
6464 throw("Match error")
6565 }
6666
6767
6868 func mustManager (i) = {
6969 let pd = throw("Permission denied.")
7070 match managerPublicKeyOrUnit() {
7171 case pk: ByteVector =>
7272 if ((i.callerPublicKey == pk))
7373 then true
7474 else pd
7575 case _: Unit =>
7676 if ((i.caller == this))
7777 then true
7878 else pd
7979 case _ =>
8080 throw("Match error")
8181 }
8282 }
8383
8484
8585 func fmtErr (msg) = makeString(["otc_multiasset.ride:", msg], " ")
8686
8787
8888 func throwErr (msg) = throw(fmtErr(msg))
8989
9090
9191 @Callable(i)
9292 func registerAsset (assetA,assetB,withdrawDelay,depositFee,withdrawFee,minAmountDeposit,minAmountWithdraw,pairStatus) = {
9393 let checkCaller = mustManager(i)
9494 if ((checkCaller == checkCaller))
9595 then {
9696 let withdrawDelayKey = keyWithdrawDelay(assetA, assetB)
9797 let depositFeePermilleKey = keyDepositFeePermille(assetA, assetB)
9898 let withdrawFeePermilleKey = keyWithdrawFeePermille(assetA, assetB)
9999 let minAmountDepositKey = keyMinAmountDeposit(assetA, assetB)
100100 let minAmountWithdrawKey = keyMinAmountWithdraw(assetA, assetB)
101101 let pairStatusKey = keyAssetsPairStatus(assetA, assetB)
102102 [IntegerEntry(withdrawDelayKey, withdrawDelay), IntegerEntry(depositFeePermilleKey, depositFee), IntegerEntry(withdrawFeePermilleKey, withdrawFee), IntegerEntry(minAmountDepositKey, minAmountDeposit), IntegerEntry(minAmountWithdrawKey, minAmountWithdraw), IntegerEntry(pairStatusKey, pairStatus)]
103103 }
104104 else throw("Strict value is not equal to itself.")
105105 }
106106
107107
108108
109109 @Callable(i)
110110 func swapAssetsAToB (assetB) = {
111111 let payment = value(i.payments[0])
112112 let assetA = toBase58String(value(payment.assetId))
113113 let asset = fromBase58String(value(assetB))
114114 let userAddress = toString(i.caller)
115115 let minAmountDeposit = valueOrErrorMessage(getInteger(keyMinAmountDeposit(assetA, assetB)), fmtErr("This asset pair does not exist."))
116116 let toDeposit = payment.amount
117117 let depositFee = valueOrErrorMessage(getInteger(keyDepositFeePermille(assetA, assetB)), fmtErr("The deposit fee for this pair of assets is not set."))
118118 let fee = ((toDeposit / 1000) * depositFee)
119119 let currentUserBalance = valueOrElse(getInteger(keyBalance(assetA, assetB, userAddress)), 0)
120120 let totalCommissions = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0)
121121 let pairStatus = valueOrErrorMessage(getInteger(keyAssetsPairStatus(assetA, assetB)), fmtErr("The asset pair status for this pair of assets is not set."))
122122 let checkPairStatus = if ((pairStatus == 0))
123123 then true
124124 else throwErr("The couple's deposit is blocked.")
125125 if ((checkPairStatus == checkPairStatus))
126126 then {
127127 let checkPayment = if ((toDeposit >= minAmountDeposit))
128128 then true
129129 else throwErr("The deposit amount is less than the minimum.")
130130 if ((checkPayment == checkPayment))
131131 then {
132132 let newBalance = ((currentUserBalance + toDeposit) - fee)
133133 let checkBalance = if ((newBalance > 0))
134134 then true
135135 else throwErr("The final balance is less than or equal to 0.")
136136 if ((checkBalance == checkBalance))
137137 then [IntegerEntry(keyBalance(assetA, assetB, userAddress), newBalance), IntegerEntry(keyTotalFeeCollectedDeposit(assetA, assetB), (totalCommissions + fee)), ScriptTransfer(i.caller, (toDeposit - fee), asset)]
138138 else throw("Strict value is not equal to itself.")
139139 }
140140 else throw("Strict value is not equal to itself.")
141141 }
142142 else throw("Strict value is not equal to itself.")
143143 }
144144
145145
146146
147147 @Callable(i)
148148 func initializationSwapAssetsBToA (assetA) = {
149149 let payment = value(i.payments[0])
150150 let toWithdraw = payment.amount
151151 let assetB = toBase58String(value(payment.assetId))
152152 let userAddress = toString(i.caller)
153153 let minAmountWithdraw = valueOrErrorMessage(getInteger(keyMinAmountWithdraw(assetA, assetB)), fmtErr("The minimum withdrawal amount for this pair of assets is not set."))
154154 let assetLockHeight = (height + valueOrErrorMessage(getInteger(keyWithdrawDelay(assetA, assetB)), fmtErr("Withdrawal delay is not set for the specified pair.")))
155155 let currentUserBalance = valueOrErrorMessage(getInteger(keyBalance(assetA, assetB, userAddress)), fmtErr("This user balance does not exist."))
156- let totalCommissions = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0)
156+ let totalCommissions = valueOrElse(getInteger(keyTotalFeeCollectedWithdraw(assetA, assetB)), 0)
157157 let withdrawFeePermilleKey = keyWithdrawFeePermille(assetA, assetB)
158158 let withdrawFee = valueOrErrorMessage(getInteger(withdrawFeePermilleKey), fmtErr("The withdrawal fee for this pair of assets is not set."))
159159 let fee = ((toWithdraw / 1000) * withdrawFee)
160160 let newBalance = (currentUserBalance - toWithdraw)
161161 let checkBalance = if ((newBalance >= 0))
162162 then true
163163 else throwErr("Swap amount fail, amount is to small.")
164164 if ((checkBalance == checkBalance))
165165 then {
166166 let checkPayment = if ((toWithdraw >= minAmountWithdraw))
167167 then true
168168 else throwErr("The withdraw amount is less than the minimum.")
169169 if ((checkPayment == checkPayment))
170170 then {
171171 let checkAssetLockHeight = if ((valueOrElse(getInteger(keyAssetLockTime(assetA, assetB, userAddress)), 0) != assetLockHeight))
172172 then true
173173 else throwErr("At this height, there is already an exchange of this pair.")
174174 if ((checkAssetLockHeight == checkAssetLockHeight))
175175 then [IntegerEntry(keyAssetLockTime(assetA, assetB, userAddress), assetLockHeight), IntegerEntry(keyBalance(assetA, assetB, userAddress), newBalance), IntegerEntry(keyProcessInProgress(userAddress, assetA, assetB, assetLockHeight), (toWithdraw - fee)), IntegerEntry(keyTotalFeeCollectedWithdraw(assetA, assetB), (totalCommissions + fee))]
176176 else throw("Strict value is not equal to itself.")
177177 }
178178 else throw("Strict value is not equal to itself.")
179179 }
180180 else throw("Strict value is not equal to itself.")
181181 }
182182
183183
184184
185185 @Callable(i)
186186 func withdrawAsset (assetA,assetB,heightInKey) = {
187187 let userAddress = toString(i.caller)
188188 let assetLockHeight = valueOrErrorMessage(getInteger(keyAssetLockTime(assetA, assetB, userAddress)), fmtErr("An asset pair or height is specified incorrectly."))
189189 let toWithdraw = valueOrErrorMessage(getInteger(keyProcessInProgress(userAddress, assetA, assetB, heightInKey)), fmtErr("At this height, withdraw was not initialized with this pair of assets."))
190190 let asset = fromBase58String(value(assetA))
191191 let checkHeight = if ((height >= assetLockHeight))
192192 then true
193193 else throwErr((("Withdrawal is possible after " + toString(heightInKey)) + " height or you have already withdrawn."))
194194 if ((checkHeight == checkHeight))
195195 then [DeleteEntry(keyProcessInProgress(userAddress, assetA, assetB, heightInKey)), IntegerEntry(keyProcessDone(userAddress, assetA, assetB, heightInKey), toWithdraw), ScriptTransfer(i.caller, toWithdraw, asset)]
196196 else throw("Strict value is not equal to itself.")
197197 }
198198
199199
200200
201201 @Callable(i)
202202 func withdrawFee (assetA,assetB) = {
203203 let checkCaller = mustManager(i)
204204 if ((checkCaller == checkCaller))
205205 then {
206- let toWithdrawA = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0)
206+ let toWithdrawB = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0)
207+ let withdrawAssetB = fromBase58String(value(assetB))
208+ let toWithdrawA = valueOrElse(getInteger(keyTotalFeeCollectedWithdraw(assetA, assetB)), 0)
207209 let withdrawAssetA = fromBase58String(value(assetA))
208- let toWithdrawB = valueOrElse(getInteger(keyTotalFeeCollectedWithdraw(assetA, assetB)), 0)
209- let withdrawAssetB = fromBase58String(value(assetB))
210210 [IntegerEntry(keyTotalFeeCollectedDeposit(assetA, assetB), 0), ScriptTransfer(i.caller, toWithdrawA, withdrawAssetA), IntegerEntry(keyTotalFeeCollectedWithdraw(assetA, assetB), 0), ScriptTransfer(i.caller, toWithdrawB, withdrawAssetB)]
211211 }
212212 else throw("Strict value is not equal to itself.")
213213 }
214214
215215
216216
217217 @Callable(i)
218218 func setManager (pendingManagerPublicKey) = {
219219 let checkCaller = mustManager(i)
220220 if ((checkCaller == checkCaller))
221221 then {
222222 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
223223 if ((checkManagerPublicKey == checkManagerPublicKey))
224224 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
225225 else throw("Strict value is not equal to itself.")
226226 }
227227 else throw("Strict value is not equal to itself.")
228228 }
229229
230230
231231
232232 @Callable(i)
233233 func confirmManager () = {
234234 let pm = pendingManagerPublicKeyOrUnit()
235235 let hasPM = if (isDefined(pm))
236236 then true
237237 else throwErr("No pending manager.")
238238 if ((hasPM == hasPM))
239239 then {
240240 let checkPM = if ((i.callerPublicKey == value(pm)))
241241 then true
242242 else throwErr("You are not pending manager.")
243243 if ((checkPM == checkPM))
244244 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
245245 else throw("Strict value is not equal to itself.")
246246 }
247247 else throw("Strict value is not equal to itself.")
248248 }
249249
250250
251251 @Verifier(tx)
252252 func verify () = {
253253 let targetPublicKey = match managerPublicKeyOrUnit() {
254254 case pk: ByteVector =>
255255 pk
256256 case _: Unit =>
257257 tx.senderPublicKey
258258 case _ =>
259259 throw("Match error")
260260 }
261261 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
262262 }
263263

github/deemru/w8io/026f985 
53.57 ms