tx · dHmWccVV24gUFnqycf5Mkma6NsgHntaad9Z5ZjjwpRm 3MvXnAcEtL9x3i499UcvTQZPufrT5ZZUEd5: -0.01400000 Waves 2022.10.05 13:35 [2258915] smart account 3MvXnAcEtL9x3i499UcvTQZPufrT5ZZUEd5 > SELF 0.00000000 Waves
{ "type": 13, "id": "dHmWccVV24gUFnqycf5Mkma6NsgHntaad9Z5ZjjwpRm", "fee": 1400000, "feeAssetId": null, "timestamp": 1664966174098, "version": 1, "sender": "3MvXnAcEtL9x3i499UcvTQZPufrT5ZZUEd5", "senderPublicKey": "GSAhb4fdky75LiCZ4p4DDK4rmWpmsgGBg1ZVdtPfmRES", "proofs": [ "4TAMrAxJ7yKyNwajBmLTSSCxXZvYLoKMGYpWASCPEEfZAv7hxUYkawVQUq8FvyKoXmqbeq9N97MPAN1sMyVm2vrQ" ], "script": "base64:BgIsCAISCgoICAgBAQEBAQESAwoBCBIDCgEIEgUKAwgIARIECgIICBIDCgEIEgATAANTRVACAl9fARNrZXlNYW5hZ2VyUHVibGljS2V5AAIUJXNfX21hbmFnZXJQdWJsaWNLZXkBGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAIbJXNfX3BlbmRpbmdNYW5hZ2VyUHVibGljS2V5ARBrZXlXaXRoZHJhd0RlbGF5AgZhc3NldEEGYXNzZXRCCQC5CQIJAMwIAgIGJXMlcyVzCQDMCAICDXdpdGhkcmF3RGVsYXkJAMwIAgUGYXNzZXRBCQDMCAIFBmFzc2V0QgUDbmlsBQNTRVABFWtleURlcG9zaXRGZWVQZXJtaWxsZQIGYXNzZXRBBmFzc2V0QgkAuQkCCQDMCAICBiVzJXMlcwkAzAgCAhJkZXBvc2l0RmVlUGVybWlsbGUJAMwIAgUGYXNzZXRBCQDMCAIFBmFzc2V0QgUDbmlsBQNTRVABFmtleVdpdGhkcmF3RmVlUGVybWlsbGUCBmFzc2V0QQZhc3NldEIJALkJAgkAzAgCAgYlcyVzJXMJAMwIAgITd2l0aGRyYX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", "spentComplexity": 0 } View: original | compacted Prev: 7d516jzASdtgMp6yZLMqSNvbu1PVy2Kgdmnpgm4pye5g Next: FecnB2t2t1tnm7CExkFGJSt9vGjZCS3Uoqzo8Sy1nELb Diff:
Old | New | Differences | |
---|---|---|---|
34 | 34 | ||
35 | 35 | ||
36 | 36 | func keyTotalFeeCollectedWithdraw (assetA,assetB) = makeString(["%s%s%s%s", "totalFeeCollected", "withdraw", assetA, assetB], SEP) | |
37 | - | ||
38 | - | ||
39 | - | func keyAssetLockTime (assetA,assetB,userAddress) = makeString(["%s%s%s%s", "assetLockTime", assetA, assetB, userAddress], SEP) | |
40 | 37 | ||
41 | 38 | ||
42 | 39 | func keyProcessInProgress (userAddress,assetA,assetB,heightInKey) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "inProgress", userAddress, assetA, assetB, toString(heightInKey)], SEP) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func keyWithdrawDelay (assetA,assetB) = makeString(["%s%s%s", "withdrawDelay", assetA, assetB], SEP) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func keyDepositFeePermille (assetA,assetB) = makeString(["%s%s%s", "depositFeePermille", assetA, assetB], SEP) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func keyWithdrawFeePermille (assetA,assetB) = makeString(["%s%s%s", "withdrawFeePermille", assetA, assetB], SEP) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func keyMinAmountDeposit (assetA,assetB) = makeString(["%s%s%s", "minAmountDeposit", assetA, assetB], SEP) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func keyAssetsPairStatus (assetA,assetB) = makeString(["%s%s%s", "assetsPairStatus", assetA, assetB], SEP) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func keyMinAmountWithdraw (assetA,assetB) = makeString(["%s%s%s", "minAmountWithdraw", assetA, assetB], SEP) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func keyBalance (assetA,assetB,userAddress) = makeString(["%s%s%s%s", "balance", assetA, assetB, userAddress], SEP) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func keyTotalFeeCollectedDeposit (assetA,assetB) = makeString(["%s%s%s%s", "totalFeeCollected", "deposit", assetA, assetB], SEP) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func keyTotalFeeCollectedWithdraw (assetA,assetB) = makeString(["%s%s%s%s", "totalFeeCollected", "withdraw", assetA, assetB], SEP) | |
37 | - | ||
38 | - | ||
39 | - | func keyAssetLockTime (assetA,assetB,userAddress) = makeString(["%s%s%s%s", "assetLockTime", assetA, assetB, userAddress], SEP) | |
40 | 37 | ||
41 | 38 | ||
42 | 39 | func keyProcessInProgress (userAddress,assetA,assetB,heightInKey) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "inProgress", userAddress, assetA, assetB, toString(heightInKey)], SEP) | |
43 | 40 | ||
44 | 41 | ||
45 | 42 | func keyProcessDone (userAddress,assetA,assetB,heightInKey) = makeString(["%s%s%s%s%s%d", "withdrawProcess", "done", userAddress, assetA, assetB, toString(heightInKey)], SEP) | |
46 | 43 | ||
47 | 44 | ||
48 | 45 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
49 | 46 | case s: String => | |
50 | 47 | fromBase58String(s) | |
51 | 48 | case _: Unit => | |
52 | 49 | unit | |
53 | 50 | case _ => | |
54 | 51 | throw("Match error") | |
55 | 52 | } | |
56 | 53 | ||
57 | 54 | ||
58 | 55 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
59 | 56 | case s: String => | |
60 | 57 | fromBase58String(s) | |
61 | 58 | case _: Unit => | |
62 | 59 | unit | |
63 | 60 | case _ => | |
64 | 61 | throw("Match error") | |
65 | 62 | } | |
66 | 63 | ||
67 | 64 | ||
68 | 65 | func mustManager (i) = { | |
69 | 66 | let pd = throw("Permission denied.") | |
70 | 67 | match managerPublicKeyOrUnit() { | |
71 | 68 | case pk: ByteVector => | |
72 | 69 | if ((i.callerPublicKey == pk)) | |
73 | 70 | then true | |
74 | 71 | else pd | |
75 | 72 | case _: Unit => | |
76 | 73 | if ((i.caller == this)) | |
77 | 74 | then true | |
78 | 75 | else pd | |
79 | 76 | case _ => | |
80 | 77 | throw("Match error") | |
81 | 78 | } | |
82 | 79 | } | |
83 | 80 | ||
84 | 81 | ||
85 | 82 | func fmtErr (msg) = makeString(["otc_multiasset.ride:", msg], " ") | |
86 | 83 | ||
87 | 84 | ||
88 | 85 | func throwErr (msg) = throw(fmtErr(msg)) | |
89 | 86 | ||
90 | 87 | ||
91 | 88 | @Callable(i) | |
92 | 89 | func registerAsset (assetA,assetB,withdrawDelay,depositFee,withdrawFee,minAmountDeposit,minAmountWithdraw,pairStatus) = { | |
93 | 90 | let checkCaller = mustManager(i) | |
94 | 91 | if ((checkCaller == checkCaller)) | |
95 | 92 | then { | |
96 | 93 | let withdrawDelayKey = keyWithdrawDelay(assetA, assetB) | |
97 | 94 | let depositFeePermilleKey = keyDepositFeePermille(assetA, assetB) | |
98 | 95 | let withdrawFeePermilleKey = keyWithdrawFeePermille(assetA, assetB) | |
99 | 96 | let minAmountDepositKey = keyMinAmountDeposit(assetA, assetB) | |
100 | 97 | let minAmountWithdrawKey = keyMinAmountWithdraw(assetA, assetB) | |
101 | 98 | let pairStatusKey = keyAssetsPairStatus(assetA, assetB) | |
102 | 99 | [IntegerEntry(withdrawDelayKey, withdrawDelay), IntegerEntry(depositFeePermilleKey, depositFee), IntegerEntry(withdrawFeePermilleKey, withdrawFee), IntegerEntry(minAmountDepositKey, minAmountDeposit), IntegerEntry(minAmountWithdrawKey, minAmountWithdraw), IntegerEntry(pairStatusKey, pairStatus)] | |
103 | 100 | } | |
104 | 101 | else throw("Strict value is not equal to itself.") | |
105 | 102 | } | |
106 | 103 | ||
107 | 104 | ||
108 | 105 | ||
109 | 106 | @Callable(i) | |
110 | 107 | func swapAssetsAToB (assetB) = { | |
111 | 108 | let payment = value(i.payments[0]) | |
112 | 109 | let assetA = toBase58String(value(payment.assetId)) | |
113 | 110 | let asset = fromBase58String(value(assetB)) | |
114 | 111 | let userAddress = toString(i.caller) | |
115 | 112 | let minAmountDeposit = valueOrErrorMessage(getInteger(keyMinAmountDeposit(assetA, assetB)), fmtErr("This asset pair does not exist.")) | |
116 | 113 | let toDeposit = payment.amount | |
117 | 114 | let depositFee = valueOrErrorMessage(getInteger(keyDepositFeePermille(assetA, assetB)), fmtErr("The deposit fee for this pair of assets is not set.")) | |
118 | 115 | let fee = ((toDeposit / 1000) * depositFee) | |
119 | 116 | let currentUserBalance = valueOrElse(getInteger(keyBalance(assetA, assetB, userAddress)), 0) | |
120 | 117 | let totalCommissions = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0) | |
121 | 118 | let pairStatus = valueOrErrorMessage(getInteger(keyAssetsPairStatus(assetA, assetB)), fmtErr("The asset pair status for this pair of assets is not set.")) | |
122 | 119 | let checkPairStatus = if ((pairStatus == 0)) | |
123 | 120 | then true | |
124 | 121 | else throwErr("The couple's deposit is blocked.") | |
125 | 122 | if ((checkPairStatus == checkPairStatus)) | |
126 | 123 | then { | |
127 | 124 | let checkPayment = if ((toDeposit >= minAmountDeposit)) | |
128 | 125 | then true | |
129 | 126 | else throwErr("The deposit amount is less than the minimum.") | |
130 | 127 | if ((checkPayment == checkPayment)) | |
131 | 128 | then { | |
132 | 129 | let newBalance = ((currentUserBalance + toDeposit) - fee) | |
133 | 130 | let checkBalance = if ((newBalance > 0)) | |
134 | 131 | then true | |
135 | 132 | else throwErr("The final balance is less than or equal to 0.") | |
136 | 133 | if ((checkBalance == checkBalance)) | |
137 | 134 | then [IntegerEntry(keyBalance(assetA, assetB, userAddress), newBalance), IntegerEntry(keyTotalFeeCollectedDeposit(assetA, assetB), (totalCommissions + fee)), ScriptTransfer(i.caller, (toDeposit - fee), asset)] | |
138 | 135 | else throw("Strict value is not equal to itself.") | |
139 | 136 | } | |
140 | 137 | else throw("Strict value is not equal to itself.") | |
141 | 138 | } | |
142 | 139 | else throw("Strict value is not equal to itself.") | |
143 | 140 | } | |
144 | 141 | ||
145 | 142 | ||
146 | 143 | ||
147 | 144 | @Callable(i) | |
148 | 145 | func initializationSwapAssetsBToA (assetA) = { | |
149 | 146 | let payment = value(i.payments[0]) | |
150 | 147 | let toWithdraw = payment.amount | |
151 | 148 | let assetB = toBase58String(value(payment.assetId)) | |
152 | 149 | let userAddress = toString(i.caller) | |
153 | 150 | let minAmountWithdraw = valueOrErrorMessage(getInteger(keyMinAmountWithdraw(assetA, assetB)), fmtErr("The minimum withdrawal amount for this pair of assets is not set.")) | |
154 | 151 | let assetLockHeight = (height + valueOrErrorMessage(getInteger(keyWithdrawDelay(assetA, assetB)), fmtErr("Withdrawal delay is not set for the specified pair."))) | |
155 | 152 | let currentUserBalance = valueOrErrorMessage(getInteger(keyBalance(assetA, assetB, userAddress)), fmtErr("This user balance does not exist.")) | |
156 | 153 | let totalCommissions = valueOrElse(getInteger(keyTotalFeeCollectedWithdraw(assetA, assetB)), 0) | |
157 | 154 | let withdrawFeePermilleKey = keyWithdrawFeePermille(assetA, assetB) | |
158 | 155 | let withdrawFee = valueOrErrorMessage(getInteger(withdrawFeePermilleKey), fmtErr("The withdrawal fee for this pair of assets is not set.")) | |
159 | 156 | let fee = ((toWithdraw / 1000) * withdrawFee) | |
160 | 157 | let newBalance = (currentUserBalance - toWithdraw) | |
161 | 158 | let checkBalance = if ((newBalance >= 0)) | |
162 | 159 | then true | |
163 | 160 | else throwErr("Swap amount fail, amount is to small.") | |
164 | 161 | if ((checkBalance == checkBalance)) | |
165 | 162 | then { | |
166 | 163 | let checkPayment = if ((toWithdraw >= minAmountWithdraw)) | |
167 | 164 | then true | |
168 | 165 | else throwErr("The withdraw amount is less than the minimum.") | |
169 | 166 | if ((checkPayment == checkPayment)) | |
170 | 167 | then { | |
171 | 168 | let checkProcessInProgress = if ((getInteger(keyProcessInProgress(userAddress, assetA, assetB, assetLockHeight)) == unit)) | |
172 | 169 | then true | |
173 | 170 | else throwErr("At this height, there is already an exchange of this pair.") | |
174 | 171 | if ((checkProcessInProgress == checkProcessInProgress)) | |
175 | 172 | then [IntegerEntry(keyBalance(assetA, assetB, userAddress), newBalance), IntegerEntry(keyProcessInProgress(userAddress, assetA, assetB, assetLockHeight), (toWithdraw - fee)), IntegerEntry(keyTotalFeeCollectedWithdraw(assetA, assetB), (totalCommissions + fee))] | |
176 | 173 | else throw("Strict value is not equal to itself.") | |
177 | 174 | } | |
178 | 175 | else throw("Strict value is not equal to itself.") | |
179 | 176 | } | |
180 | 177 | else throw("Strict value is not equal to itself.") | |
181 | 178 | } | |
182 | 179 | ||
183 | 180 | ||
184 | 181 | ||
185 | 182 | @Callable(i) | |
186 | 183 | func withdrawAsset (assetA,assetB,heightInKey) = { | |
187 | 184 | let userAddress = toString(i.caller) | |
188 | 185 | let toWithdraw = valueOrErrorMessage(getInteger(keyProcessInProgress(userAddress, assetA, assetB, heightInKey)), fmtErr("At this height, withdraw was not initialized with this pair of assets.")) | |
189 | 186 | let asset = fromBase58String(value(assetA)) | |
190 | 187 | let checkHeight = if ((height >= heightInKey)) | |
191 | 188 | then true | |
192 | 189 | else throwErr((("Withdrawal is possible after " + toString(heightInKey)) + " height or you have already withdrawn.")) | |
193 | 190 | if ((checkHeight == checkHeight)) | |
194 | 191 | then [DeleteEntry(keyProcessInProgress(userAddress, assetA, assetB, heightInKey)), IntegerEntry(keyProcessDone(userAddress, assetA, assetB, heightInKey), toWithdraw), ScriptTransfer(i.caller, toWithdraw, asset)] | |
195 | 192 | else throw("Strict value is not equal to itself.") | |
196 | 193 | } | |
197 | 194 | ||
198 | 195 | ||
199 | 196 | ||
200 | 197 | @Callable(i) | |
201 | 198 | func withdrawFee (assetA,assetB) = { | |
202 | 199 | let checkCaller = mustManager(i) | |
203 | 200 | if ((checkCaller == checkCaller)) | |
204 | 201 | then { | |
205 | 202 | let toWithdrawB = valueOrElse(getInteger(keyTotalFeeCollectedDeposit(assetA, assetB)), 0) | |
206 | 203 | let withdrawAssetB = fromBase58String(value(assetB)) | |
207 | 204 | let toWithdrawA = valueOrElse(getInteger(keyTotalFeeCollectedWithdraw(assetA, assetB)), 0) | |
208 | 205 | let withdrawAssetA = fromBase58String(value(assetA)) | |
209 | 206 | [IntegerEntry(keyTotalFeeCollectedDeposit(assetA, assetB), 0), ScriptTransfer(i.caller, toWithdrawA, withdrawAssetA), IntegerEntry(keyTotalFeeCollectedWithdraw(assetA, assetB), 0), ScriptTransfer(i.caller, toWithdrawB, withdrawAssetB)] | |
210 | 207 | } | |
211 | 208 | else throw("Strict value is not equal to itself.") | |
212 | 209 | } | |
213 | 210 | ||
214 | 211 | ||
215 | 212 | ||
216 | 213 | @Callable(i) | |
217 | 214 | func setManager (pendingManagerPublicKey) = { | |
218 | 215 | let checkCaller = mustManager(i) | |
219 | 216 | if ((checkCaller == checkCaller)) | |
220 | 217 | then { | |
221 | 218 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
222 | 219 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
223 | 220 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
224 | 221 | else throw("Strict value is not equal to itself.") | |
225 | 222 | } | |
226 | 223 | else throw("Strict value is not equal to itself.") | |
227 | 224 | } | |
228 | 225 | ||
229 | 226 | ||
230 | 227 | ||
231 | 228 | @Callable(i) | |
232 | 229 | func confirmManager () = { | |
233 | 230 | let pm = pendingManagerPublicKeyOrUnit() | |
234 | 231 | let hasPM = if (isDefined(pm)) | |
235 | 232 | then true | |
236 | 233 | else throwErr("No pending manager.") | |
237 | 234 | if ((hasPM == hasPM)) | |
238 | 235 | then { | |
239 | 236 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
240 | 237 | then true | |
241 | 238 | else throwErr("You are not pending manager.") | |
242 | 239 | if ((checkPM == checkPM)) | |
243 | 240 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
244 | 241 | else throw("Strict value is not equal to itself.") | |
245 | 242 | } | |
246 | 243 | else throw("Strict value is not equal to itself.") | |
247 | 244 | } | |
248 | 245 | ||
249 | 246 | ||
250 | 247 | @Verifier(tx) | |
251 | 248 | func verify () = { | |
252 | 249 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
253 | 250 | case pk: ByteVector => | |
254 | 251 | pk | |
255 | 252 | case _: Unit => | |
256 | 253 | tx.senderPublicKey | |
257 | 254 | case _ => | |
258 | 255 | throw("Match error") | |
259 | 256 | } | |
260 | 257 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
261 | 258 | } | |
262 | 259 |
github/deemru/w8io/169f3d6 51.14 ms ◑