tx · 8egnpN8ni4wvEeZTEQndwqHJs7sWjcbTqaVqSKCEJc9M

3NBhCjipaSBkkoRSBdcyx2ui7wnY4HnxiVW:  -0.01300000 Waves

2023.05.04 13:11 [2562877] smart account 3NBhCjipaSBkkoRSBdcyx2ui7wnY4HnxiVW > SELF 0.00000000 Waves

{ "type": 13, "id": "8egnpN8ni4wvEeZTEQndwqHJs7sWjcbTqaVqSKCEJc9M", "fee": 1300000, "feeAssetId": null, "timestamp": 1683195127225, "version": 2, "chainId": 84, "sender": "3NBhCjipaSBkkoRSBdcyx2ui7wnY4HnxiVW", "senderPublicKey": "FwXakLfcNwZygjHPVBd5TDZ4C5Wrgpoi9U69GufmFkQ", "proofs": [ "4SfLDikSbsx3gnsfQdBn1meYJHtjxzxtDs9cgaujNoRBBn1JFXwktRyHDkURfYcpa1mvYhevcoDAZ1gZQcjWqYFk" ], "script": "base64:BgIlCAISCgoICAgBAQEBAQESAwoBCBIDCgEIEgUKAwgIARIECgIICBIAA1NFUAICX18BE2tleU1hbmFnZXJQdWJsaWNLZXkAAhQlc19fbWFuYWdlclB1YmxpY0tleQEWa2V5TWFuYWdlclZhdWx0QWRkcmVzcwACFyVzX19tYW5hZ2VyVmF1bHRBZGRyZXNzARdnZXRNYW5hZ2VyQWRkcmVzc09yRmFpbAAJARFAZXh0ck5hdGl2ZSgxMDYyKQEJARFAZXh0ck5hdGl2ZSgxMDU4KQEJARZrZXlNYW5hZ2VyVmF1bHRBZGRyZXNzAAEQa2V5V2l0aGRyYXdEZWxheQIGYXNzZXRBBmFzc2V0QgkAuQkCCQDMCAICBiVzJXMlcwkAzAgCAg13aXRoZHJhd0RlbGF5CQDMCAIFBmFzc2V0QQkAzAgCBQZhc3NldEIFA25pbAUDU0VQARVrZXlEZXBvc2l0RmVlUGVybWlsbGUCBmFzc2V0QQZhc3NldEIJALkJAgkAzAgCAgYlcyVzJXMJAMwIAgISZGVwb3NpdEZlZVBlcm1pbGxlCQDMCAIFBmFzc2V0QQkAzAg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GYXNzZXRBBQZhc3NldEIAAAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFC3RvV2l0aGRyYXdBBQ53aXRoZHJhd0Fzc2V0QQUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJ0eAEGdmVyaWZ5AAQPdGFyZ2V0UHVibGljS2V5BAckbWF0Y2gwCQEWbWFuYWdlclB1YmxpY0tleU9yVW5pdAADCQABAgUHJG1hdGNoMAIKQnl0ZVZlY3RvcgQCcGsFByRtYXRjaDAFAnBrAwkAAQIFByRtYXRjaDACBFVuaXQIBQJ0eA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5FVMfmg==", "height": 2562877, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CLSZFcsU3jobwVaGwq9wqTvsA9R4hKieuD4Fezk7fgAU Next: none Diff:
OldNewDifferences
66 func keyManagerPublicKey () = "%s__managerPublicKey"
77
88
9-func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
9+func keyManagerVaultAddress () = "%s__managerVaultAddress"
10+
11+
12+func getManagerAddressOrFail () = addressFromStringValue(getStringValue(keyManagerVaultAddress()))
1013
1114
1215 func keyWithdrawDelay (assetA,assetB) = makeString(["%s%s%s", "withdrawDelay", assetA, assetB], SEP)
3942 func keyProcessDone (userAddress,assetA,assetB,heightInKey) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "done", userAddress, assetA, assetB, toString(heightInKey)], SEP)
4043
4144
42-func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
43- case s: String =>
44- fromBase58String(s)
45- case _: Unit =>
46- unit
47- case _ =>
48- throw("Match error")
49-}
50-
51-
52-func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
53- case s: String =>
54- fromBase58String(s)
55- case _: Unit =>
56- unit
57- case _ =>
58- throw("Match error")
59-}
45+func managerPublicKeyOrUnit () = {
46+ let managerVaultAddress = getManagerAddressOrFail()
47+ match getString(managerVaultAddress, keyManagerPublicKey()) {
48+ case s: String =>
49+ fromBase58String(s)
50+ case _: Unit =>
51+ unit
52+ case _ =>
53+ throw("Match error")
54+ }
55+ }
6056
6157
6258 func mustManager (i) = {
204200 }
205201
206202
207-
208-@Callable(i)
209-func setManager (pendingManagerPublicKey) = {
210- let checkCaller = mustManager(i)
211- if ((checkCaller == checkCaller))
212- then {
213- let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
214- if ((checkManagerPublicKey == checkManagerPublicKey))
215- then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
216- else throw("Strict value is not equal to itself.")
217- }
218- else throw("Strict value is not equal to itself.")
219- }
220-
221-
222-
223-@Callable(i)
224-func confirmManager () = {
225- let pm = pendingManagerPublicKeyOrUnit()
226- let hasPM = if (isDefined(pm))
227- then true
228- else throwErr("No pending manager.")
229- if ((hasPM == hasPM))
230- then {
231- let checkPM = if ((i.callerPublicKey == value(pm)))
232- then true
233- else throwErr("You are not pending manager.")
234- if ((checkPM == checkPM))
235- then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
236- else throw("Strict value is not equal to itself.")
237- }
238- else throw("Strict value is not equal to itself.")
239- }
240-
241-
242203 @Verifier(tx)
243204 func verify () = {
244205 let targetPublicKey = match managerPublicKeyOrUnit() {
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
9-func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
9+func keyManagerVaultAddress () = "%s__managerVaultAddress"
10+
11+
12+func getManagerAddressOrFail () = addressFromStringValue(getStringValue(keyManagerVaultAddress()))
1013
1114
1215 func keyWithdrawDelay (assetA,assetB) = makeString(["%s%s%s", "withdrawDelay", assetA, assetB], SEP)
1316
1417
1518 func keyDepositFeePermille (assetA,assetB) = makeString(["%s%s%s", "depositFeePermille", assetA, assetB], SEP)
1619
1720
1821 func keyWithdrawFeePermille (assetA,assetB) = makeString(["%s%s%s", "withdrawFeePermille", assetA, assetB], SEP)
1922
2023
2124 func keyMinAmountDeposit (assetA,assetB) = makeString(["%s%s%s", "minAmountDeposit", assetA, assetB], SEP)
2225
2326
2427 func keyAssetsPairStatus (assetA,assetB) = makeString(["%s%s%s", "assetsPairStatus", assetA, assetB], SEP)
2528
2629
2730 func keyMinAmountWithdraw (assetA,assetB) = makeString(["%s%s%s", "minAmountWithdraw", assetA, assetB], SEP)
2831
2932
3033 func keyBalance (assetA,assetB,userAddress) = makeString(["%s%s%s%s", "balance", assetA, assetB, userAddress], SEP)
3134
3235
3336 func keyTotalFeeCollectedDeposit (assetA,assetB) = makeString(["%s%s%s%s", "totalFeeCollected", "deposit", assetA, assetB], SEP)
3437
3538
3639 func keyProcessInProgress (userAddress,assetA,assetB,heightInKey) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "inProgress", userAddress, assetA, assetB, toString(heightInKey)], SEP)
3740
3841
3942 func keyProcessDone (userAddress,assetA,assetB,heightInKey) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "done", userAddress, assetA, assetB, toString(heightInKey)], SEP)
4043
4144
42-func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
43- case s: String =>
44- fromBase58String(s)
45- case _: Unit =>
46- unit
47- case _ =>
48- throw("Match error")
49-}
50-
51-
52-func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
53- case s: String =>
54- fromBase58String(s)
55- case _: Unit =>
56- unit
57- case _ =>
58- throw("Match error")
59-}
45+func managerPublicKeyOrUnit () = {
46+ let managerVaultAddress = getManagerAddressOrFail()
47+ match getString(managerVaultAddress, keyManagerPublicKey()) {
48+ case s: String =>
49+ fromBase58String(s)
50+ case _: Unit =>
51+ unit
52+ case _ =>
53+ throw("Match error")
54+ }
55+ }
6056
6157
6258 func mustManager (i) = {
6359 let pd = throw("Permission denied.")
6460 match managerPublicKeyOrUnit() {
6561 case pk: ByteVector =>
6662 if ((i.callerPublicKey == pk))
6763 then true
6864 else pd
6965 case _: Unit =>
7066 if ((i.caller == this))
7167 then true
7268 else pd
7369 case _ =>
7470 throw("Match error")
7571 }
7672 }
7773
7874
7975 func fmtErr (msg) = makeString(["otc_multiasset.ride:", msg], " ")
8076
8177
8278 func throwErr (msg) = throw(fmtErr(msg))
8379
8480
8581 @Callable(i)
8682 func registerAsset (assetA,assetB,withdrawDelay,depositFee,withdrawFee,minAmountDeposit,minAmountWithdraw,pairStatus) = {
8783 let checkCaller = mustManager(i)
8884 if ((checkCaller == checkCaller))
8985 then {
9086 let withdrawDelayKey = keyWithdrawDelay(assetA, assetB)
9187 let depositFeePermilleKey = keyDepositFeePermille(assetA, assetB)
9288 let withdrawFeePermilleKey = keyWithdrawFeePermille(assetA, assetB)
9389 let minAmountDepositKey = keyMinAmountDeposit(assetA, assetB)
9490 let minAmountWithdrawKey = keyMinAmountWithdraw(assetA, assetB)
9591 let pairStatusKey = keyAssetsPairStatus(assetA, assetB)
9692 [IntegerEntry(withdrawDelayKey, withdrawDelay), IntegerEntry(depositFeePermilleKey, depositFee), IntegerEntry(withdrawFeePermilleKey, withdrawFee), IntegerEntry(minAmountDepositKey, minAmountDeposit), IntegerEntry(minAmountWithdrawKey, minAmountWithdraw), IntegerEntry(pairStatusKey, pairStatus)]
9793 }
9894 else throw("Strict value is not equal to itself.")
9995 }
10096
10197
10298
10399 @Callable(i)
104100 func swapAssetsAToB (assetB) = {
105101 let payment = value(i.payments[0])
106102 let assetA = toBase58String(value(payment.assetId))
107103 let asset = fromBase58String(value(assetB))
108104 let userAddress = toString(i.caller)
109105 let minAmountDeposit = valueOrErrorMessage(getInteger(keyMinAmountDeposit(assetA, assetB)), fmtErr("This asset pair does not exist."))
110106 let toDeposit = payment.amount
111107 let depositFee = valueOrErrorMessage(getInteger(keyDepositFeePermille(assetA, assetB)), fmtErr("The deposit fee for this pair of assets is not set."))
112108 let fee = ((toDeposit / 1000) * depositFee)
113109 let currentUserBalance = valueOrElse(getInteger(keyBalance(assetA, assetB, userAddress)), 0)
114110 let totalCommissions = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0)
115111 let pairStatus = valueOrErrorMessage(getInteger(keyAssetsPairStatus(assetA, assetB)), fmtErr("The asset pair status for this pair of assets is not set."))
116112 let checkPairStatus = if ((pairStatus == 0))
117113 then true
118114 else throwErr("The couple's deposit is blocked.")
119115 if ((checkPairStatus == checkPairStatus))
120116 then {
121117 let checkPayment = if ((toDeposit >= minAmountDeposit))
122118 then true
123119 else throwErr("The deposit amount is less than the minimum.")
124120 if ((checkPayment == checkPayment))
125121 then {
126122 let newBalance = ((currentUserBalance + toDeposit) - fee)
127123 let checkBalance = if ((newBalance > 0))
128124 then true
129125 else throwErr("The final balance is less than or equal to 0.")
130126 if ((checkBalance == checkBalance))
131127 then [IntegerEntry(keyBalance(assetA, assetB, userAddress), newBalance), IntegerEntry(keyTotalFeeCollectedDeposit(assetA, assetB), (totalCommissions + fee)), ScriptTransfer(i.caller, (toDeposit - fee), asset)]
132128 else throw("Strict value is not equal to itself.")
133129 }
134130 else throw("Strict value is not equal to itself.")
135131 }
136132 else throw("Strict value is not equal to itself.")
137133 }
138134
139135
140136
141137 @Callable(i)
142138 func initializationSwapAssetsBToA (assetA) = {
143139 let payment = value(i.payments[0])
144140 let toWithdraw = payment.amount
145141 let assetB = toBase58String(value(payment.assetId))
146142 let userAddress = toString(i.caller)
147143 let minAmountWithdraw = valueOrErrorMessage(getInteger(keyMinAmountWithdraw(assetA, assetB)), fmtErr("The minimum withdrawal amount for this pair of assets is not set."))
148144 let assetLockHeight = (height + valueOrErrorMessage(getInteger(keyWithdrawDelay(assetA, assetB)), fmtErr("Withdrawal delay is not set for the specified pair.")))
149145 let currentUserBalance = valueOrErrorMessage(getInteger(keyBalance(assetA, assetB, userAddress)), fmtErr("This user balance does not exist."))
150146 let totalCommissions = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0)
151147 let withdrawFeePermilleKey = keyWithdrawFeePermille(assetA, assetB)
152148 let withdrawFee = valueOrErrorMessage(getInteger(withdrawFeePermilleKey), fmtErr("The withdrawal fee for this pair of assets is not set."))
153149 let fee = ((toWithdraw / 1000) * withdrawFee)
154150 let newBalance = (currentUserBalance - toWithdraw)
155151 let checkBalance = if ((newBalance >= 0))
156152 then true
157153 else throwErr("Swap amount fail, amount is to small.")
158154 if ((checkBalance == checkBalance))
159155 then {
160156 let checkPayment = if ((toWithdraw >= minAmountWithdraw))
161157 then true
162158 else throwErr("The withdraw amount is less than the minimum.")
163159 if ((checkPayment == checkPayment))
164160 then {
165161 let checkProcessInProgress = if ((getInteger(keyProcessInProgress(userAddress, assetA, assetB, assetLockHeight)) == unit))
166162 then true
167163 else throwErr("At this height, there is already an exchange of this pair.")
168164 if ((checkProcessInProgress == checkProcessInProgress))
169165 then [IntegerEntry(keyBalance(assetA, assetB, userAddress), newBalance), IntegerEntry(keyProcessInProgress(userAddress, assetA, assetB, assetLockHeight), (toWithdraw - fee)), IntegerEntry(keyTotalFeeCollectedDeposit(assetA, assetB), (totalCommissions + fee))]
170166 else throw("Strict value is not equal to itself.")
171167 }
172168 else throw("Strict value is not equal to itself.")
173169 }
174170 else throw("Strict value is not equal to itself.")
175171 }
176172
177173
178174
179175 @Callable(i)
180176 func withdrawAsset (assetA,assetB,heightInKey) = {
181177 let userAddress = toString(i.caller)
182178 let toWithdraw = valueOrErrorMessage(getInteger(keyProcessInProgress(userAddress, assetA, assetB, heightInKey)), fmtErr("At this height, withdraw was not initialized with this pair of assets."))
183179 let asset = fromBase58String(value(assetA))
184180 let checkHeight = if ((height >= heightInKey))
185181 then true
186182 else throwErr((("Withdrawal is possible after " + toString(heightInKey)) + " height or you have already withdrawn."))
187183 if ((checkHeight == checkHeight))
188184 then [DeleteEntry(keyProcessInProgress(userAddress, assetA, assetB, heightInKey)), IntegerEntry(keyProcessDone(userAddress, assetA, assetB, heightInKey), toWithdraw), ScriptTransfer(i.caller, toWithdraw, asset)]
189185 else throw("Strict value is not equal to itself.")
190186 }
191187
192188
193189
194190 @Callable(i)
195191 func withdrawFee (assetA,assetB) = {
196192 let checkCaller = mustManager(i)
197193 if ((checkCaller == checkCaller))
198194 then {
199195 let toWithdrawA = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0)
200196 let withdrawAssetA = fromBase58String(value(assetA))
201197 [IntegerEntry(keyTotalFeeCollectedDeposit(assetA, assetB), 0), ScriptTransfer(i.caller, toWithdrawA, withdrawAssetA)]
202198 }
203199 else throw("Strict value is not equal to itself.")
204200 }
205201
206202
207-
208-@Callable(i)
209-func setManager (pendingManagerPublicKey) = {
210- let checkCaller = mustManager(i)
211- if ((checkCaller == checkCaller))
212- then {
213- let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
214- if ((checkManagerPublicKey == checkManagerPublicKey))
215- then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
216- else throw("Strict value is not equal to itself.")
217- }
218- else throw("Strict value is not equal to itself.")
219- }
220-
221-
222-
223-@Callable(i)
224-func confirmManager () = {
225- let pm = pendingManagerPublicKeyOrUnit()
226- let hasPM = if (isDefined(pm))
227- then true
228- else throwErr("No pending manager.")
229- if ((hasPM == hasPM))
230- then {
231- let checkPM = if ((i.callerPublicKey == value(pm)))
232- then true
233- else throwErr("You are not pending manager.")
234- if ((checkPM == checkPM))
235- then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
236- else throw("Strict value is not equal to itself.")
237- }
238- else throw("Strict value is not equal to itself.")
239- }
240-
241-
242203 @Verifier(tx)
243204 func verify () = {
244205 let targetPublicKey = match managerPublicKeyOrUnit() {
245206 case pk: ByteVector =>
246207 pk
247208 case _: Unit =>
248209 tx.senderPublicKey
249210 case _ =>
250211 throw("Match error")
251212 }
252213 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
253214 }
254215

github/deemru/w8io/169f3d6 
55.10 ms