tx · J67VZ78HLA4xxnUmbaMcSW6x4Zn1wJBqU7VWuQan7v4J 3MuAPY3jP4q2AoNYX27B5BU9EoLU77mr7pS: -0.02000000 Waves 2022.02.24 18:57 [1937943] smart account 3MuAPY3jP4q2AoNYX27B5BU9EoLU77mr7pS > SELF 0.00000000 Waves
{ "type": 13, "id": "J67VZ78HLA4xxnUmbaMcSW6x4Zn1wJBqU7VWuQan7v4J", "fee": 2000000, "feeAssetId": null, "timestamp": 1645718244801, "version": 1, "sender": "3MuAPY3jP4q2AoNYX27B5BU9EoLU77mr7pS", "senderPublicKey": "rqCnkHfz5ix6HNKiVvYE3URUtLs6f2nWzt4hpdGGQdm", "proofs": [ "3R6L9yVKrqGtV8cv9UiDMYyKT7HHdn7c9CWeqScxBCRnbsXN7Sxc5C9iwNpPYNChTdPi1gAECqrdqDMeb4Z1TQiy" ], "script": "base64:AAIFAAAAAAAAACoIAhIFCgMICAgSABIDCgEIEgMKAQgSAwoBARIAEgYKBAEBAQESBAoCAQEAAAA4AAAAAAhQUklDRUxFVAAAAAAAAA9CQAAAAAAJTVVMVFNDQUxFAAAAAAAAAAAIAAAAAAtFVUxFUk5VTUJFUgAAAAAAEDPE1gAAAAAGc2NhbGU2AAAAAAAAD0JAAAAAAAxzY2FsZTZCaWdJbnQJAAE2AAAAAQAAAAAAAA9CQAAAAAAGc2NhbGU4AAAAAAAF9eEAAAAAAAxzY2FsZThCaWdJbnQJAAE2AAAAAQAAAAAABfXhAAAAAAAHc2NhbGUxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAQAAABJrZXlOZXV0cmlub0FkZHJlc3MAAAAAAgAAAB0lcyVzX19jb25maWdfX25ldXRyaW5vQWRkcmVzcwEAAAASa2V5TmV1dHJpbm9Bc3NldElkAAAAAAIAAAARbmV1dHJpbm9fYXNzZXRfaWQBAAAAHWtleUxpcXVpZGF0aW9uQ29udHJhY3RBZGRyZXNzAAAAAAIAAAAUbGlxdWlkYXRpb25fY29udHJ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XF1YWwgdG8gaXRzZWxmLgAAAAFpAQAAAB51bnN0YWtlQ29taXNzaW9uQW1vdW50UkVBRE9OTFkAAAACAAAABmFtb3VudAAAAAtzdGFydEhlaWdodAQAAAABYQkBAAAABWFzSW50AAAAAQkAA/wAAAAEBQAAAAxtYXRoQ29udHJhY3QCAAAAHWdldFVuc3Rha2VDb21pc3Npb25BbW91bnRNQVRICQAETAAAAAIFAAAABmFtb3VudAkABEwAAAACBQAAAAtzdGFydEhlaWdodAUAAAADbmlsBQAAAANuaWwDCQAAAAAAAAIFAAAAAWEFAAAAAWEJAAUUAAAAAgUAAAADbmlsCQAEuQAAAAIJAARMAAAAAgIAAAACJWQJAARMAAAAAgkAAaQAAAABBQAAAAFhBQAAAANuaWwFAAAAA1NFUAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAA0C7ROA==", "chainId": 84, "height": 1937943, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FGSr975LS85EETM9t5fSqMTrCSqm1CkbfTjD49RhZbqx Next: BZwiStCihZewvFouQphtgBc3YiSLpdxLKCp5ozyNwNyo Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let PRICELET = 1000000 | |
5 | 5 | ||
6 | 6 | let MULTSCALE = 8 | |
7 | 7 | ||
8 | 8 | let EULERNUMBER = 271828182 | |
9 | 9 | ||
10 | 10 | let scale6 = 1000000 | |
11 | 11 | ||
12 | 12 | let scale6BigInt = toBigInt(1000000) | |
13 | 13 | ||
14 | 14 | let scale8 = 100000000 | |
15 | 15 | ||
16 | 16 | let scale8BigInt = toBigInt(100000000) | |
17 | 17 | ||
18 | 18 | let scale18 = toBigInt(1000000000000000000) | |
19 | 19 | ||
20 | 20 | let SEP = "__" | |
21 | 21 | ||
22 | 22 | func keyNeutrinoAddress () = "%s%s__config__neutrinoAddress" | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func keyNeutrinoAssetId () = "neutrino_asset_id" | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func keyLiquidationContractAddress () = "liquidation_contract" | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func keyRPDContract () = "rpd_contract" | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func keyAuctionContract () = "auction_contract" | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func keyContolContract () = "control_contract" | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func keyBondAssetId () = "bond_asset_id" | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func keyBalanceLocked () = "balance_lock_" | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func keyWavesLockedBalance () = (keyBalanceLocked() + "waves") | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func keyNeutrinoLockedBalance () = (keyBalanceLocked() + "neutrino") | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func keyMinWavesSwapAmount () = "min_waves_swap_amount" | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func keyMinNeutrinoSwapAmount () = "min_neutrino_swap_amount" | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func keyWavesOutFeePart () = "wavesOut_swap_feePart" | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func keyNeutrinoOutFeePart () = "neutrinoOut_swap_feePart" | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyNsbtLockContract () = "%s__nsbtLockContract" | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyMathContract () = "%s__mathContract" | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func keyQuickSwapLimitDuration () = "%s__quickSwapLimitDuration" | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyUserLastQuickSwapHeight (userAddress) = makeString(["%s%s", "userLastQuickSwapHeight", userAddress], SEP) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyQuickSwapUserSpentInPeriod (userAddress) = makeString(["%s%s", "quickSwapUserSpentInPeriod", userAddress], SEP) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyBalanceWavesLockInterval () = "balance_waves_lock_interval" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyBalanceNeutrinoLockInterval () = "balance_neutrino_lock_interval" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyPrice () = "price" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyLockParamUserAmount (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "amount"], SEP) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyLockParamStartBlock (userAddress) = makeString(["%s%s%s", "paramByUser", userAddress, "start"], SEP) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyMinLockAmount () = "%s__minLockAmount" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyMinWavesForNsbtBuy () = "min_waves_nsbt_buy" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func convertNeutrinoToWaves (amount,price) = fraction(fraction(amount, PRICELET, price), scale8, scale6) | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func convertWavesToNeutrino (amount,price) = fraction(fraction(amount, price, PRICELET), scale6, scale8) | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func asAnyList (val) = match val { | |
116 | 116 | case valAnyList: List[Any] => | |
117 | 117 | valAnyList | |
118 | 118 | case _ => | |
119 | 119 | throw("fail to cast into List[Any]") | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func asInt (val) = match val { | |
124 | 124 | case valInt: Int => | |
125 | 125 | valInt | |
126 | 126 | case _ => | |
127 | 127 | throw("fail to cast into Int") | |
128 | 128 | } | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func asString (val) = match val { | |
132 | 132 | case valStr: String => | |
133 | 133 | valStr | |
134 | 134 | case _ => | |
135 | 135 | throw("fail to cast into String") | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | let neutrinoContract = addressFromStringValue(getStringOrFail(this, keyNeutrinoAddress())) | |
146 | 146 | ||
147 | 147 | let controlContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyContolContract())) | |
148 | 148 | ||
149 | 149 | let auctionContract = addressFromStringValue(getStringOrFail(neutrinoContract, keyAuctionContract())) | |
150 | 150 | ||
151 | 151 | let liquidationContract = getStringOrFail(neutrinoContract, keyLiquidationContractAddress()) | |
152 | 152 | ||
153 | 153 | let rpdContract = getStringOrFail(neutrinoContract, keyRPDContract()) | |
154 | 154 | ||
155 | 155 | let mathContract = addressFromStringValue(getStringOrFail(this, keyMathContract())) | |
156 | 156 | ||
157 | 157 | let nsbtStakingContract = addressFromStringValue(getStringOrFail(this, keyNsbtLockContract())) | |
158 | 158 | ||
159 | 159 | let neutrinoAssetIdString = getStringOrFail(neutrinoContract, keyNeutrinoAssetId()) | |
160 | 160 | ||
161 | 161 | let neutrinoAssetId = fromBase58String(neutrinoAssetIdString) | |
162 | 162 | ||
163 | 163 | let nsbtAssetIdStr = getStringValue(neutrinoContract, keyBondAssetId()) | |
164 | 164 | ||
165 | 165 | let nsbtAssetId = fromBase58String(nsbtAssetIdStr) | |
166 | 166 | ||
167 | 167 | @Callable(i) | |
168 | 168 | func constructor (neutrinoAddress,nsbtLockAddress,mathAddress) = if ((i.caller != this)) | |
169 | 169 | then throw("not authorized") | |
170 | 170 | else [StringEntry(keyNeutrinoAddress(), neutrinoAddress), StringEntry(keyNsbtLockContract(), nsbtLockAddress), StringEntry(keyMathContract(), mathAddress)] | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | ||
174 | 174 | @Callable(i) | |
175 | 175 | func neutrinoStatsREADONLY () = { | |
176 | 176 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil)) | |
177 | 177 | if ((neutrinoMetrics == neutrinoMetrics)) | |
178 | 178 | then if (true) | |
179 | 179 | then throw(toString(asInt(neutrinoMetrics[1]))) | |
180 | 180 | else { | |
181 | 181 | let prices = asAnyList(invoke(mathContract, "calcContractNsbtPriceMATH()", nil, nil)) | |
182 | 182 | if ((prices == prices)) | |
183 | 183 | then { | |
184 | 184 | let currentPrice = asInt(neutrinoMetrics[1]) | |
185 | 185 | let neutrinoLockedBalance = asInt(neutrinoMetrics[2]) | |
186 | 186 | let wavesLockedBalance = asInt(neutrinoMetrics[3]) | |
187 | 187 | let reservesInWaves = asInt(neutrinoMetrics[4]) | |
188 | 188 | let reservesInUsdn = asInt(neutrinoMetrics[5]) | |
189 | 189 | let neutrinoSupply = asInt(neutrinoMetrics[6]) | |
190 | 190 | let surplus = asInt(neutrinoMetrics[7]) | |
191 | 191 | let surplusPercent = asInt(neutrinoMetrics[8]) | |
192 | 192 | let BR = asInt(neutrinoMetrics[9]) | |
193 | 193 | let nsbtSupply = asInt(neutrinoMetrics[10]) | |
194 | 194 | let maxNsbtSupply = asInt(neutrinoMetrics[11]) | |
195 | 195 | let nsbt2usdnPrice = asInt(prices[1]) | |
196 | 196 | let nsbt2wavesPrice = asInt(prices[2]) | |
197 | 197 | let minWaves4NsbtBuy = getIntegerValue(auctionContract, keyMinWavesForNsbtBuy()) | |
198 | 198 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(neutrinoLockedBalance), toString(wavesLockedBalance), toString(reservesInWaves), toString(reservesInUsdn), toString(neutrinoSupply), toString(surplus), toString(surplusPercent), toString(BR), toString(nsbtSupply), toString(maxNsbtSupply), toString(nsbt2usdnPrice), toString(nsbt2wavesPrice), toString(minWaves4NsbtBuy)], SEP)) | |
199 | 199 | } | |
200 | 200 | else throw("Strict value is not equal to itself.") | |
201 | 201 | } | |
202 | 202 | else throw("Strict value is not equal to itself.") | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | ||
207 | 207 | @Callable(i) | |
208 | 208 | func swapInfoREADONLY (userAddressStr) = { | |
209 | 209 | let currentPrice = getIntegerValue(controlContract, keyPrice()) | |
210 | 210 | let minWavesSwapAmt = getIntegerValue(neutrinoContract, keyMinWavesSwapAmount()) | |
211 | 211 | let minUsdnSwapAmt = getIntegerValue(neutrinoContract, keyMinNeutrinoSwapAmount()) | |
212 | 212 | let waves2UsdnFee = getIntegerValue(neutrinoContract, keyWavesOutFeePart()) | |
213 | 213 | let usdn2WavesFee = getIntegerValue(neutrinoContract, keyNeutrinoOutFeePart()) | |
214 | 214 | let usdnSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceNeutrinoLockInterval()) | |
215 | 215 | let wavesSwapDelayDuration = getIntegerValue(neutrinoContract, keyBalanceWavesLockInterval()) | |
216 | 216 | let $t077448838 = if ((userAddressStr == "")) | |
217 | 217 | then $Tuple4(0, 0, 0, 0) | |
218 | 218 | else { | |
219 | 219 | let userGNsbtAmount = valueOrElse(getInteger(nsbtStakingContract, keyLockParamUserAmount(userAddressStr)), 0) | |
220 | 220 | if ((userGNsbtAmount == userGNsbtAmount)) | |
221 | 221 | then { | |
222 | 222 | let usdnLmtMax = asInt(invoke(mathContract, "calcSwapLimitMATH", [userGNsbtAmount], nil)) | |
223 | 223 | if ((usdnLmtMax == usdnLmtMax)) | |
224 | 224 | then { | |
225 | 225 | let quickSwapResetBlocks = getIntegerValue(neutrinoContract, keyQuickSwapLimitDuration()) | |
226 | 226 | let lastQuickSwapBlock = valueOrElse(getInteger(neutrinoContract, keyUserLastQuickSwapHeight(userAddressStr)), 0) | |
227 | 227 | let isNewQuickSwapPeriod = ((height - lastQuickSwapBlock) > quickSwapResetBlocks) | |
228 | 228 | let quickSwapUserSpent = if (isNewQuickSwapPeriod) | |
229 | 229 | then 0 | |
230 | 230 | else valueOrElse(getInteger(neutrinoContract, keyQuickSwapUserSpentInPeriod(userAddressStr)), 0) | |
231 | 231 | let blcks2LmtReset = if (isNewQuickSwapPeriod) | |
232 | 232 | then 0 | |
233 | 233 | else (quickSwapResetBlocks - (height - lastQuickSwapBlock)) | |
234 | 234 | let wavesLmtMax = convertNeutrinoToWaves(usdnLmtMax, currentPrice) | |
235 | 235 | $Tuple4(quickSwapUserSpent, blcks2LmtReset, usdnLmtMax, wavesLmtMax) | |
236 | 236 | } | |
237 | 237 | else throw("Strict value is not equal to itself.") | |
238 | 238 | } | |
239 | 239 | else throw("Strict value is not equal to itself.") | |
240 | 240 | } | |
241 | 241 | let quickSwapUserSpent = $t077448838._1 | |
242 | 242 | let blocks2LimitReset = $t077448838._2 | |
243 | 243 | let maxUsdnLimit = $t077448838._3 | |
244 | 244 | let maxWavesLimit = $t077448838._4 | |
245 | 245 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%d%d", toString(currentPrice), toString(minWavesSwapAmt), toString(minUsdnSwapAmt), toString(waves2UsdnFee), toString(usdn2WavesFee), toString(usdnSwapDelayDuration), toString(wavesSwapDelayDuration), toString(blocks2LimitReset), toString(maxWavesLimit), toString(maxUsdnLimit), toString(quickSwapUserSpent)], SEP)) | |
246 | 246 | } | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | ||
250 | 250 | @Callable(i) | |
251 | 251 | func gnsbtInfoREADONLY (userAddressStr) = { | |
252 | 252 | let gnsbtShare = 10000 | |
253 | 253 | let claimedTotalInUsdn = 10000 | |
254 | 254 | let claimedUsdn = 10000 | |
255 | 255 | let claimedWaves = 10000 | |
256 | 256 | let unclaimedTotalInUsdn = 10000 | |
257 | 257 | let unclaimedUsdn = 10000 | |
258 | 258 | let unclaimedWaves = 10000 | |
259 | 259 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(gnsbtShare), toString(claimedTotalInUsdn), toString(claimedUsdn), toString(claimedWaves), toString(unclaimedTotalInUsdn), toString(unclaimedUsdn), toString(unclaimedWaves)], SEP)) | |
260 | 260 | } | |
261 | 261 | ||
262 | 262 | ||
263 | 263 | ||
264 | 264 | @Callable(i) | |
265 | 265 | func buyNsbtREADONLY (wavesPay) = { | |
266 | 266 | let minWavesAmountNsbtBuy = valueOrElse(getInteger(auctionContract, keyMinWavesForNsbtBuy()), 10) | |
267 | 267 | if (((minWavesAmountNsbtBuy * scale8) > wavesPay)) | |
268 | 268 | then throw((("min " + toString(minWavesAmountNsbtBuy)) + " waves expected")) | |
269 | 269 | else { | |
270 | 270 | let neutrinoMetrics = asAnyList(invoke(mathContract, "calcNeutinoMetricsMATH", nil, nil)) | |
271 | 271 | if ((neutrinoMetrics == neutrinoMetrics)) | |
272 | 272 | then { | |
273 | 273 | let currentPrice = asInt(neutrinoMetrics[1]) | |
274 | 274 | let reserve = asInt(neutrinoMetrics[4]) | |
275 | 275 | let neutrinoSupply = asInt(neutrinoMetrics[6]) | |
276 | 276 | let nsbtSupply = asInt(neutrinoMetrics[10]) | |
277 | 277 | let nsbtSupplyMAX = value(assetInfo(nsbtAssetId)).quantity | |
278 | 278 | let curveResult = asAnyList(invoke(mathContract, "curveFunctionMATH", [reserve, neutrinoSupply, currentPrice, nsbtSupplyMAX, nsbtSupply, wavesPay], nil)) | |
279 | 279 | if ((curveResult == curveResult)) | |
280 | 280 | then { | |
281 | 281 | let nsbtAmount = asInt(curveResult[1]) | |
282 | 282 | if ((0 >= nsbtAmount)) | |
283 | 283 | then throw("nsbtAmount <= 0") | |
284 | 284 | else if ((wavesPay > (nsbtAmount * 9223372))) | |
285 | 285 | then throw(((("Nsbt2Waves price exceeds MAX_INT: " + toString(wavesPay)) + "/") + toString(nsbtAmount))) | |
286 | 286 | else $Tuple2(nil, makeString(["%d", toString(nsbtAmount)], SEP)) | |
287 | 287 | } | |
288 | 288 | else throw("Strict value is not equal to itself.") | |
289 | 289 | } | |
290 | 290 | else throw("Strict value is not equal to itself.") | |
291 | 291 | } | |
292 | 292 | } | |
293 | 293 | ||
294 | 294 | ||
295 | 295 | ||
296 | 296 | @Callable(i) | |
297 | 297 | func minStakedAmountREADONLY () = $Tuple2(nil, makeString(["%d", toString(getIntOrFail(nsbtStakingContract, keyMinLockAmount()))], SEP)) | |
298 | 298 | ||
299 | 299 | ||
300 | 300 | ||
301 | 301 | @Callable(i) | |
302 | 302 | func mergedStakeREADONLY (amount1,height1,amount2,height2) = { | |
303 | 303 | let h = asInt(invoke(mathContract, "mergeStakesMATH", [amount1, height1, amount2, height2], nil)) | |
304 | 304 | if ((h == h)) | |
305 | 305 | then $Tuple2(nil, makeString(["%d%d", toString((amount1 + amount2)), toString(h)], SEP)) | |
306 | 306 | else throw("Strict value is not equal to itself.") | |
307 | 307 | } | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | ||
311 | 311 | @Callable(i) | |
312 | 312 | func unstakeComissionAmountREADONLY (amount,startHeight) = { | |
313 | 313 | let a = asInt(invoke(mathContract, "getUnstakeComissionAmountMATH", [amount, startHeight], nil)) | |
314 | 314 | if ((a == a)) | |
315 | 315 | then $Tuple2(nil, makeString(["%d", toString(a)], SEP)) | |
316 | 316 | else throw("Strict value is not equal to itself.") | |
317 | 317 | } | |
318 | 318 | ||
319 | 319 |
github/deemru/w8io/026f985 45.95 ms ◑