tx · 3i9ZTQ6pvbZsJDxZxhjcj1gQX7wrYfW2KvMgMxAsqXAq 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai: -0.01400000 Waves 2022.04.15 12:32 [2009491] smart account 3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai > SELF 0.00000000 Waves
{ "type": 13, "id": "3i9ZTQ6pvbZsJDxZxhjcj1gQX7wrYfW2KvMgMxAsqXAq", "fee": 1400000, "feeAssetId": null, "timestamp": 1650015173660, "version": 1, "sender": "3MsMP2pb2p8MDd6Rxb7XEXqqwEhE8ATfyai", "senderPublicKey": "2JEaBjtjvMoNGKZmL9QxYefa1VkMJM3vMW8rNvTs9R2H", "proofs": [ "EZWPQAa6kcKpjxcNY1fRaTc51NBRUWbyHvzvY3Ko3WaqPxq7pXEdBpaQgj4sHBtbfozeBto5wAaAh7YDqUS7YZK" ], "script": "base64:AAIFAAAAAAAAAEsIAhIKCggICAgICAgIARIDCgEIEgYKBAgICAgSBAoCCBgSAwoBCBIAEgkKBwgICAgIAQgSBAoCCAESAwoBARIDCgEBEgYKBAgICAgAAABNAAAAAAZTQ0FMRTgAAAAAAAAAAAgAAAAABU1VTFQ4AAAAAAAF9eEAAAAAAAdTQ0FMRTE4AAAAAAAAAAASAAAAAAZNVUxUMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAAOUE9PTFdFSUdIVE1VTFQFAAAABU1VTFQ4AAAAAA5HV1h2aXJ0dWFsUE9PTAIAAAAOR1dYdmlydHVhbFBPT0wAAAAAEWRlY2ltYWxzTXVsdFByaWNlCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAADU0VQAgAAAAJfXwAAAAAFRU1QVFkCAAAAAAAAAAAKUG9vbEFjdGl2ZQAAAAAAAAAAAQAAAAAPUG9vbFB1dERpc2FibGVkAAAAAAAAAAACAAAAABNQb29sTWF0Y2hlckRpc2FibGVkAAAAAAAAAAADAAAAAAxQb29s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IFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tlefRwFQc=", "chainId": 84, "height": 2009491, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BsnEuXkxQoZRRmJ1akxP5c3M81rPatzbB78FzzvKBqqJ Next: CN4sDsfc51TABLKSWNPuWtCrFD6MfxDpeEqAWC7npzjC Diff:
Old | New | Differences | |
---|---|---|---|
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
80 | - | ||
81 | - | ||
82 | - | func keyAdminPubKeys () = "%s__adminPubKeys" | |
83 | - | ||
84 | - | ||
85 | - | func keyAssetsStoreContract () = "%s__assetsStoreContract" | |
86 | 80 | ||
87 | 81 | ||
88 | 82 | func keyPriceDecimals () = "%s__priceDecimals" | |
248 | 242 | } | |
249 | 243 | ||
250 | 244 | ||
251 | - | func mustAdmin (i) = { | |
252 | - | let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP) | |
253 | - | if (containsElement(adminPKs, toBase58String(i.callerPublicKey))) | |
254 | - | then true | |
255 | - | else { | |
256 | - | let isManager = mustManager(i) | |
257 | - | if ((isManager == isManager)) | |
258 | - | then true | |
259 | - | else throw("Strict value is not equal to itself.") | |
260 | - | } | |
261 | - | } | |
262 | - | ||
263 | - | ||
264 | 245 | @Callable(i) | |
265 | 246 | func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = { | |
266 | 247 | let checkCaller = mustManager(i) | |
310 | 291 | ||
311 | 292 | ||
312 | 293 | @Callable(i) | |
313 | - | func constructorV5 (assetsStoreContract) = { | |
314 | - | let checkCaller = mustManager(i) | |
315 | - | if ((checkCaller == checkCaller)) | |
316 | - | then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)] | |
317 | - | else throw("Strict value is not equal to itself.") | |
318 | - | } | |
319 | - | ||
320 | - | ||
321 | - | ||
322 | - | @Callable(i) | |
323 | 294 | func setManager (pendingManagerPublicKey) = { | |
324 | 295 | let checkCaller = mustManager(i) | |
325 | 296 | if ((checkCaller == checkCaller)) | |
355 | 326 | ||
356 | 327 | ||
357 | 328 | @Callable(i) | |
358 | - | func | |
329 | + | func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType) = { | |
359 | 330 | let checkCaller = mustManager(i) | |
360 | - | if ((checkCaller == checkCaller)) | |
361 | - | then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))] | |
362 | - | else throw("Strict value is not equal to itself.") | |
363 | - | } | |
364 | - | ||
365 | - | ||
366 | - | ||
367 | - | @Callable(i) | |
368 | - | func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType) = { | |
369 | - | let checkCaller = mustAdmin(i) | |
370 | 331 | if ((checkCaller == checkCaller)) | |
371 | 332 | then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress)))) | |
372 | 333 | then throw((("Pool address " + poolAddress) + " already registered.")) | |
397 | 358 | if ((poolActivateInvokeResult == poolActivateInvokeResult)) | |
398 | 359 | then if ((poolActivateInvokeResult != "success")) | |
399 | 360 | then throw("Pool initialisation error happened.") | |
400 | - | else { | |
401 | - | let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract())) | |
402 | - | let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil) | |
403 | - | if ((addAssetsLinkInv == addAssetsLinkInv)) | |
404 | - | then { | |
405 | - | let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil) | |
406 | - | if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv)) | |
407 | - | then $Tuple2(((internalAmountAssetData._2 ++ internalPriceAssetData._2) ++ [lpAssetIssueAction, Burn(lpAssetId, 1), StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(PoolActive), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, decimalsMultPrice, poolType)), StringEntry(keyMappingLpAssetToPoolAssets(lpAssetIdStr), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToLpasset(toString(internalAmountAssetId), toString(internalPriceAssetId)), ("%s__" + lpAssetIdStr)), StringEntry(keyMappingPoolContractAddressToPoolAssets(poolAddress), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToPoolContractAddress(internalAmountAssetId, internalPriceAssetId), poolAddress), StringEntry(keyMappingPoolLPAssetToPoolContractAddress(lpAssetIdStr), poolAddress), StringEntry(keyMappingPoolContracToLPAsset(poolAddress), lpAssetIdStr), IntegerEntry(keyPoolToWeight(poolAddress), poolWeight), StringEntry(keyLpTokensList(), createLpTokensListEntry(lpAssetIdStr))]), lpAssetIdStr) | |
408 | - | else throw("Strict value is not equal to itself.") | |
409 | - | } | |
410 | - | else throw("Strict value is not equal to itself.") | |
411 | - | } | |
361 | + | else $Tuple2(((internalAmountAssetData._2 ++ internalPriceAssetData._2) ++ [lpAssetIssueAction, Burn(lpAssetId, 1), StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(PoolActive), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, decimalsMultPrice, poolType)), StringEntry(keyMappingLpAssetToPoolAssets(lpAssetIdStr), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToLpasset(toString(internalAmountAssetId), toString(internalPriceAssetId)), ("%s__" + lpAssetIdStr)), StringEntry(keyMappingPoolContractAddressToPoolAssets(poolAddress), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToPoolContractAddress(internalAmountAssetId, internalPriceAssetId), poolAddress), StringEntry(keyMappingPoolLPAssetToPoolContractAddress(lpAssetIdStr), poolAddress), StringEntry(keyMappingPoolContracToLPAsset(poolAddress), lpAssetIdStr), IntegerEntry(keyPoolToWeight(poolAddress), poolWeight), StringEntry(keyLpTokensList(), createLpTokensListEntry(lpAssetIdStr))]), "success") | |
412 | 362 | else throw("Strict value is not equal to itself.") | |
413 | 363 | } | |
414 | 364 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 8 | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | let SCALE18 = 18 | |
9 | 9 | ||
10 | 10 | let MULT18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let POOLWEIGHTMULT = MULT8 | |
13 | 13 | ||
14 | 14 | let GWXvirtualPOOL = "GWXvirtualPOOL" | |
15 | 15 | ||
16 | 16 | let decimalsMultPrice = ((100 * 1000) * 1000) | |
17 | 17 | ||
18 | 18 | let SEP = "__" | |
19 | 19 | ||
20 | 20 | let EMPTY = "" | |
21 | 21 | ||
22 | 22 | let PoolActive = 1 | |
23 | 23 | ||
24 | 24 | let PoolPutDisabled = 2 | |
25 | 25 | ||
26 | 26 | let PoolMatcherDisabled = 3 | |
27 | 27 | ||
28 | 28 | let PoolShutdown = 4 | |
29 | 29 | ||
30 | 30 | let idxInternalAssetId = 1 | |
31 | 31 | ||
32 | 32 | let idxResutActions = 2 | |
33 | 33 | ||
34 | 34 | let idxIfAssetIdCalculationPerformed = 3 | |
35 | 35 | ||
36 | 36 | let idxPoolAddress = 1 | |
37 | 37 | ||
38 | 38 | let idxPoolStatus = 2 | |
39 | 39 | ||
40 | 40 | let idxPoolLPAssetId = 3 | |
41 | 41 | ||
42 | 42 | let idxAmtAssetId = 4 | |
43 | 43 | ||
44 | 44 | let idxPriceAssetId = 5 | |
45 | 45 | ||
46 | 46 | let idxAmtAssetDcm = 6 | |
47 | 47 | ||
48 | 48 | let idxPriceAssetDcm = 7 | |
49 | 49 | ||
50 | 50 | let idxIAmtAssetId = 8 | |
51 | 51 | ||
52 | 52 | let idxIPriceAssetId = 9 | |
53 | 53 | ||
54 | 54 | let idxLPAssetDcm = 10 | |
55 | 55 | ||
56 | 56 | let idxPoolType = 11 | |
57 | 57 | ||
58 | 58 | func keyFactoryConfig () = "%s__factoryConfig" | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func keyLpTokensList () = "%s__lpTokensList" | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyPoolScriptHash () = "%s%s__pool__scriptHash" | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyMatcherPub () = "%s%s__matcher__publicKey" | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func keyLegacyFactoryContract () = "%s__legacyFactoryContract" | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyLegacyPools () = "%s__legacyPools" | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
80 | - | ||
81 | - | ||
82 | - | func keyAdminPubKeys () = "%s__adminPubKeys" | |
83 | - | ||
84 | - | ||
85 | - | func keyAssetsStoreContract () = "%s__assetsStoreContract" | |
86 | 80 | ||
87 | 81 | ||
88 | 82 | func keyPriceDecimals () = "%s__priceDecimals" | |
89 | 83 | ||
90 | 84 | ||
91 | 85 | func keyAllPoolsShutdown () = "%s__shutdown" | |
92 | 86 | ||
93 | 87 | ||
94 | 88 | func keyNextInternalAssetId () = "%s__nextInternalAssetId" | |
95 | 89 | ||
96 | 90 | ||
97 | 91 | func keyPoolToWeight (poolAddress) = ("%s%s__poolWeight__" + poolAddress) | |
98 | 92 | ||
99 | 93 | ||
100 | 94 | func keyPoolToWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num)) | |
101 | 95 | ||
102 | 96 | ||
103 | 97 | func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset)) | |
104 | 98 | ||
105 | 99 | ||
106 | 100 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
107 | 101 | ||
108 | 102 | ||
109 | 103 | func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config") | |
110 | 104 | ||
111 | 105 | ||
112 | 106 | func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool") | |
113 | 107 | ||
114 | 108 | ||
115 | 109 | func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset") | |
116 | 110 | ||
117 | 111 | ||
118 | 112 | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets") | |
119 | 113 | ||
120 | 114 | ||
121 | 115 | func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract") | |
122 | 116 | ||
123 | 117 | ||
124 | 118 | func keyMappingPoolContracToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
125 | 119 | ||
126 | 120 | ||
127 | 121 | func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract") | |
128 | 122 | ||
129 | 123 | ||
130 | 124 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key)) | |
131 | 125 | ||
132 | 126 | ||
133 | 127 | func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key)) | |
134 | 128 | ||
135 | 129 | ||
136 | 130 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key)) | |
137 | 131 | ||
138 | 132 | ||
139 | 133 | let IdxFactoryCfgStakingDapp = 1 | |
140 | 134 | ||
141 | 135 | let IdxFactoryCfgBoostingDapp = 2 | |
142 | 136 | ||
143 | 137 | let IdxFactoryCfgIdoDapp = 3 | |
144 | 138 | ||
145 | 139 | let IdxFactoryCfgTeamDapp = 4 | |
146 | 140 | ||
147 | 141 | let IdxFactoryCfgEmissionDapp = 5 | |
148 | 142 | ||
149 | 143 | let IdxFactoryCfgRestDapp = 6 | |
150 | 144 | ||
151 | 145 | let IdxFactoryCfgSlippageDapp = 7 | |
152 | 146 | ||
153 | 147 | let IdxFactoryCfgDaoDapp = 8 | |
154 | 148 | ||
155 | 149 | let IdxFactoryCfgMarketingDapp = 9 | |
156 | 150 | ||
157 | 151 | let IdxFactoryCfgGwxRewardDapp = 10 | |
158 | 152 | ||
159 | 153 | let IdxFactoryCfgBirdsDapp = 11 | |
160 | 154 | ||
161 | 155 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
162 | 156 | ||
163 | 157 | ||
164 | 158 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
165 | 159 | ||
166 | 160 | ||
167 | 161 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
168 | 162 | ||
169 | 163 | ||
170 | 164 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
171 | 165 | ||
172 | 166 | ||
173 | 167 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
174 | 168 | case s: String => | |
175 | 169 | fromBase58String(s) | |
176 | 170 | case _: Unit => | |
177 | 171 | unit | |
178 | 172 | case _ => | |
179 | 173 | throw("Match error") | |
180 | 174 | } | |
181 | 175 | ||
182 | 176 | ||
183 | 177 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
184 | 178 | case s: String => | |
185 | 179 | fromBase58String(s) | |
186 | 180 | case _: Unit => | |
187 | 181 | unit | |
188 | 182 | case _ => | |
189 | 183 | throw("Match error") | |
190 | 184 | } | |
191 | 185 | ||
192 | 186 | ||
193 | 187 | func mustManager (i) = { | |
194 | 188 | let pd = throw("Permission denied") | |
195 | 189 | match managerPublicKeyOrUnit() { | |
196 | 190 | case pk: ByteVector => | |
197 | 191 | if ((i.callerPublicKey == pk)) | |
198 | 192 | then true | |
199 | 193 | else pd | |
200 | 194 | case _: Unit => | |
201 | 195 | if ((i.caller == this)) | |
202 | 196 | then true | |
203 | 197 | else pd | |
204 | 198 | case _ => | |
205 | 199 | throw("Match error") | |
206 | 200 | } | |
207 | 201 | } | |
208 | 202 | ||
209 | 203 | ||
210 | 204 | func dataFactoryCfgV3 (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract,daoContract,marketingContract,gwxRewardsContract,birdsContract) = makeString(["%s%s%s%s%s%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract, daoContract, marketingContract, gwxRewardsContract, birdsContract], SEP) | |
211 | 205 | ||
212 | 206 | ||
213 | 207 | func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP) | |
214 | 208 | ||
215 | 209 | ||
216 | 210 | func dataPoolCfg (poolAddress,poolStatus,lpAssetId,amountAssetStr,priceAssetStr,amountAssetDecimals,priceAssetDecimals,amountAssetInternalId,priceAssetInternalId,lpAssetDecimals,poolType) = makeString(["%s%d%s%s%s%d%d%d%d%d%s", poolAddress, poolStatus, lpAssetId, amountAssetStr, priceAssetStr, toString(amountAssetDecimals), toString(priceAssetDecimals), toString(amountAssetInternalId), toString(priceAssetInternalId), toString(lpAssetDecimals), poolType], SEP) | |
217 | 211 | ||
218 | 212 | ||
219 | 213 | func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP) | |
220 | 214 | ||
221 | 215 | ||
222 | 216 | func getPoolConfig (poolAddress) = { | |
223 | 217 | let poolAssets = split(getStringOrFail(keyMappingPoolContractAddressToPoolAssets(poolAddress)), SEP) | |
224 | 218 | let amountAssetInternal = poolAssets[1] | |
225 | 219 | let priceAssetInternal = poolAssets[2] | |
226 | 220 | split(getStringOrFail(keyPoolConfig(amountAssetInternal, priceAssetInternal)), SEP) | |
227 | 221 | } | |
228 | 222 | ||
229 | 223 | ||
230 | 224 | func getInternalAssetIdOrCreate (assetIdStr,incrementor) = { | |
231 | 225 | let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0) | |
232 | 226 | let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0) | |
233 | 227 | let result = if ((internalAssetId == 0)) | |
234 | 228 | then { | |
235 | 229 | let newInternalAssetId = (currentIndexOfInternalId + incrementor) | |
236 | 230 | $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true) | |
237 | 231 | } | |
238 | 232 | else $Tuple3(internalAssetId, nil, false) | |
239 | 233 | result | |
240 | 234 | } | |
241 | 235 | ||
242 | 236 | ||
243 | 237 | func createLpTokensListEntry (newLpToken) = { | |
244 | 238 | let lpTokens = getString(this, keyLpTokensList()) | |
245 | 239 | if (isDefined(lpTokens)) | |
246 | 240 | then ((value(lpTokens) + SEP) + newLpToken) | |
247 | 241 | else newLpToken | |
248 | 242 | } | |
249 | 243 | ||
250 | 244 | ||
251 | - | func mustAdmin (i) = { | |
252 | - | let adminPKs = split(valueOrElse(getString(keyAdminPubKeys()), EMPTY), SEP) | |
253 | - | if (containsElement(adminPKs, toBase58String(i.callerPublicKey))) | |
254 | - | then true | |
255 | - | else { | |
256 | - | let isManager = mustManager(i) | |
257 | - | if ((isManager == isManager)) | |
258 | - | then true | |
259 | - | else throw("Strict value is not equal to itself.") | |
260 | - | } | |
261 | - | } | |
262 | - | ||
263 | - | ||
264 | 245 | @Callable(i) | |
265 | 246 | func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = { | |
266 | 247 | let checkCaller = mustManager(i) | |
267 | 248 | if ((checkCaller == checkCaller)) | |
268 | 249 | then [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)] | |
269 | 250 | else throw("Strict value is not equal to itself.") | |
270 | 251 | } | |
271 | 252 | ||
272 | 253 | ||
273 | 254 | ||
274 | 255 | @Callable(i) | |
275 | 256 | func constructorV2 (mathcherPub58Str) = { | |
276 | 257 | let checkCaller = mustManager(i) | |
277 | 258 | if ((checkCaller == checkCaller)) | |
278 | 259 | then { | |
279 | 260 | let mathcerPub = addressFromPublicKey(fromBase58String(mathcherPub58Str)) | |
280 | 261 | if ((mathcerPub == mathcerPub)) | |
281 | 262 | then [StringEntry(keyMatcherPub(), mathcherPub58Str)] | |
282 | 263 | else throw("Strict value is not equal to itself.") | |
283 | 264 | } | |
284 | 265 | else throw("Strict value is not equal to itself.") | |
285 | 266 | } | |
286 | 267 | ||
287 | 268 | ||
288 | 269 | ||
289 | 270 | @Callable(i) | |
290 | 271 | func constructorV3 (daoContract,marketingContract,gwxRewardsContract,birdsContract) = { | |
291 | 272 | let checkCaller = mustManager(i) | |
292 | 273 | if ((checkCaller == checkCaller)) | |
293 | 274 | then { | |
294 | 275 | let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP) | |
295 | 276 | [StringEntry(keyFactoryConfig(), dataFactoryCfgV3(factoryCfg[1], factoryCfg[2], factoryCfg[3], factoryCfg[4], factoryCfg[5], factoryCfg[6], factoryCfg[7], daoContract, marketingContract, gwxRewardsContract, birdsContract))] | |
296 | 277 | } | |
297 | 278 | else throw("Strict value is not equal to itself.") | |
298 | 279 | } | |
299 | 280 | ||
300 | 281 | ||
301 | 282 | ||
302 | 283 | @Callable(i) | |
303 | 284 | func constructorV4 (legacyFactoryContract,legacyPools) = { | |
304 | 285 | let checkCaller = mustManager(i) | |
305 | 286 | if ((checkCaller == checkCaller)) | |
306 | 287 | then [StringEntry(keyLegacyFactoryContract(), legacyFactoryContract), StringEntry(keyLegacyPools(), makeString(legacyPools, SEP))] | |
307 | 288 | else throw("Strict value is not equal to itself.") | |
308 | 289 | } | |
309 | 290 | ||
310 | 291 | ||
311 | 292 | ||
312 | 293 | @Callable(i) | |
313 | - | func constructorV5 (assetsStoreContract) = { | |
314 | - | let checkCaller = mustManager(i) | |
315 | - | if ((checkCaller == checkCaller)) | |
316 | - | then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)] | |
317 | - | else throw("Strict value is not equal to itself.") | |
318 | - | } | |
319 | - | ||
320 | - | ||
321 | - | ||
322 | - | @Callable(i) | |
323 | 294 | func setManager (pendingManagerPublicKey) = { | |
324 | 295 | let checkCaller = mustManager(i) | |
325 | 296 | if ((checkCaller == checkCaller)) | |
326 | 297 | then { | |
327 | 298 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
328 | 299 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
329 | 300 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
330 | 301 | else throw("Strict value is not equal to itself.") | |
331 | 302 | } | |
332 | 303 | else throw("Strict value is not equal to itself.") | |
333 | 304 | } | |
334 | 305 | ||
335 | 306 | ||
336 | 307 | ||
337 | 308 | @Callable(i) | |
338 | 309 | func confirmManager () = { | |
339 | 310 | let pm = pendingManagerPublicKeyOrUnit() | |
340 | 311 | let hasPM = if (isDefined(pm)) | |
341 | 312 | then true | |
342 | 313 | else throw("No pending manager") | |
343 | 314 | if ((hasPM == hasPM)) | |
344 | 315 | then { | |
345 | 316 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
346 | 317 | then true | |
347 | 318 | else throw("You are not pending manager") | |
348 | 319 | if ((checkPM == checkPM)) | |
349 | 320 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
350 | 321 | else throw("Strict value is not equal to itself.") | |
351 | 322 | } | |
352 | 323 | else throw("Strict value is not equal to itself.") | |
353 | 324 | } | |
354 | 325 | ||
355 | 326 | ||
356 | 327 | ||
357 | 328 | @Callable(i) | |
358 | - | func | |
329 | + | func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType) = { | |
359 | 330 | let checkCaller = mustManager(i) | |
360 | - | if ((checkCaller == checkCaller)) | |
361 | - | then [StringEntry(keyAdminPubKeys(), makeString(adminPubKeys, SEP))] | |
362 | - | else throw("Strict value is not equal to itself.") | |
363 | - | } | |
364 | - | ||
365 | - | ||
366 | - | ||
367 | - | @Callable(i) | |
368 | - | func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,poolType) = { | |
369 | - | let checkCaller = mustAdmin(i) | |
370 | 331 | if ((checkCaller == checkCaller)) | |
371 | 332 | then if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress)))) | |
372 | 333 | then throw((("Pool address " + poolAddress) + " already registered.")) | |
373 | 334 | else { | |
374 | 335 | let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1) | |
375 | 336 | let internalAmountAssetId = internalAmountAssetData._1 | |
376 | 337 | let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3) | |
377 | 338 | then 2 | |
378 | 339 | else 1) | |
379 | 340 | let internalPriceAssetId = internalPriceAssetData._1 | |
380 | 341 | let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress)) | |
381 | 342 | let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash()) | |
382 | 343 | let poolConfig = getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))) | |
383 | 344 | if (isDefined(poolConfig)) | |
384 | 345 | then throw((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated.")) | |
385 | 346 | else { | |
386 | 347 | let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)))) | |
387 | 348 | let amountAssetsDecimals = if ((amountAssetStr == "WAVES")) | |
388 | 349 | then decimalsMultPrice | |
389 | 350 | else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN) | |
390 | 351 | let priceAssetsDecimals = if ((priceAssetStr == "WAVES")) | |
391 | 352 | then decimalsMultPrice | |
392 | 353 | else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN) | |
393 | 354 | let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true) | |
394 | 355 | let lpAssetId = calculateAssetId(lpAssetIssueAction) | |
395 | 356 | let lpAssetIdStr = toBase58String(lpAssetId) | |
396 | 357 | let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil) | |
397 | 358 | if ((poolActivateInvokeResult == poolActivateInvokeResult)) | |
398 | 359 | then if ((poolActivateInvokeResult != "success")) | |
399 | 360 | then throw("Pool initialisation error happened.") | |
400 | - | else { | |
401 | - | let assetsStoreContract = addressFromStringValue(getStringOrFail(keyAssetsStoreContract())) | |
402 | - | let addAssetsLinkInv = invoke(assetsStoreContract, "addAssetsLink", [amountAssetStr, priceAssetStr, lpAssetIdStr], nil) | |
403 | - | if ((addAssetsLinkInv == addAssetsLinkInv)) | |
404 | - | then { | |
405 | - | let increaseAssetPoolsNumberInv = invoke(assetsStoreContract, "increaseAssetPoolsNumber", [amountAssetStr], nil) | |
406 | - | if ((increaseAssetPoolsNumberInv == increaseAssetPoolsNumberInv)) | |
407 | - | then $Tuple2(((internalAmountAssetData._2 ++ internalPriceAssetData._2) ++ [lpAssetIssueAction, Burn(lpAssetId, 1), StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(PoolActive), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, decimalsMultPrice, poolType)), StringEntry(keyMappingLpAssetToPoolAssets(lpAssetIdStr), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToLpasset(toString(internalAmountAssetId), toString(internalPriceAssetId)), ("%s__" + lpAssetIdStr)), StringEntry(keyMappingPoolContractAddressToPoolAssets(poolAddress), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToPoolContractAddress(internalAmountAssetId, internalPriceAssetId), poolAddress), StringEntry(keyMappingPoolLPAssetToPoolContractAddress(lpAssetIdStr), poolAddress), StringEntry(keyMappingPoolContracToLPAsset(poolAddress), lpAssetIdStr), IntegerEntry(keyPoolToWeight(poolAddress), poolWeight), StringEntry(keyLpTokensList(), createLpTokensListEntry(lpAssetIdStr))]), lpAssetIdStr) | |
408 | - | else throw("Strict value is not equal to itself.") | |
409 | - | } | |
410 | - | else throw("Strict value is not equal to itself.") | |
411 | - | } | |
361 | + | else $Tuple2(((internalAmountAssetData._2 ++ internalPriceAssetData._2) ++ [lpAssetIssueAction, Burn(lpAssetId, 1), StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(PoolActive), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, decimalsMultPrice, poolType)), StringEntry(keyMappingLpAssetToPoolAssets(lpAssetIdStr), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToLpasset(toString(internalAmountAssetId), toString(internalPriceAssetId)), ("%s__" + lpAssetIdStr)), StringEntry(keyMappingPoolContractAddressToPoolAssets(poolAddress), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToPoolContractAddress(internalAmountAssetId, internalPriceAssetId), poolAddress), StringEntry(keyMappingPoolLPAssetToPoolContractAddress(lpAssetIdStr), poolAddress), StringEntry(keyMappingPoolContracToLPAsset(poolAddress), lpAssetIdStr), IntegerEntry(keyPoolToWeight(poolAddress), poolWeight), StringEntry(keyLpTokensList(), createLpTokensListEntry(lpAssetIdStr))]), "success") | |
412 | 362 | else throw("Strict value is not equal to itself.") | |
413 | 363 | } | |
414 | 364 | } | |
415 | 365 | else throw("Strict value is not equal to itself.") | |
416 | 366 | } | |
417 | 367 | ||
418 | 368 | ||
419 | 369 | ||
420 | 370 | @Callable(i) | |
421 | 371 | func managePool (poolAddress,newStatus) = { | |
422 | 372 | let checkCaller = mustManager(i) | |
423 | 373 | if ((checkCaller == checkCaller)) | |
424 | 374 | then { | |
425 | 375 | let poolConfig = getPoolConfig(poolAddress) | |
426 | 376 | let poolStatus = poolConfig[idxPoolStatus] | |
427 | 377 | let lpAssetIdStr = poolConfig[idxPoolLPAssetId] | |
428 | 378 | let amountAssetStr = poolConfig[idxAmtAssetId] | |
429 | 379 | let priceAssetStr = poolConfig[idxPriceAssetId] | |
430 | 380 | let amountAssetsDecimals = parseIntValue(poolConfig[idxAmtAssetDcm]) | |
431 | 381 | let priceAssetsDecimals = parseIntValue(poolConfig[idxPriceAssetDcm]) | |
432 | 382 | let internalAmountAssetId = parseIntValue(poolConfig[idxIAmtAssetId]) | |
433 | 383 | let internalPriceAssetId = parseIntValue(poolConfig[idxIPriceAssetId]) | |
434 | 384 | let lpAssetDcm = parseIntValue(poolConfig[idxLPAssetDcm]) | |
435 | 385 | let poolType = poolConfig[idxPoolType] | |
436 | 386 | [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(newStatus), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, lpAssetDcm, poolType))] | |
437 | 387 | } | |
438 | 388 | else throw("Strict value is not equal to itself.") | |
439 | 389 | } | |
440 | 390 | ||
441 | 391 | ||
442 | 392 | ||
443 | 393 | @Callable(i) | |
444 | 394 | func emit (amountToEmit) = { | |
445 | 395 | let caller = i.caller | |
446 | 396 | let originCaller = i.originCaller | |
447 | 397 | let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContracToLPAsset(toString(caller))), "Invalid LP address called me.") | |
448 | 398 | let lpAsset = fromBase58String(lpAssetRequested) | |
449 | 399 | let legacyPools = split(valueOrElse(getString(keyLegacyPools()), EMPTY), SEP) | |
450 | 400 | let legacyFactoryContract = addressFromStringValue(valueOrErrorMessage(getString(keyLegacyFactoryContract()), "Legacy factory contract does not exists.")) | |
451 | 401 | if ((0 >= amountToEmit)) | |
452 | 402 | then nil | |
453 | 403 | else if (containsElement(legacyPools, toString(caller))) | |
454 | 404 | then $Tuple2(nil, legacyFactoryContract) | |
455 | 405 | else $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success") | |
456 | 406 | } | |
457 | 407 | ||
458 | 408 | ||
459 | 409 | ||
460 | 410 | @Callable(i) | |
461 | 411 | func burn (amountToBurn) = { | |
462 | 412 | let caller = i.caller | |
463 | 413 | let originCaller = i.originCaller | |
464 | 414 | let payment = value(i.payments[0]) | |
465 | 415 | let paymentAmount = value(payment.amount) | |
466 | 416 | let inAmountAssetId = toBase58String(value(payment.assetId)) | |
467 | 417 | let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContracToLPAsset(toString(caller))), "Invalid LP address called me.") | |
468 | 418 | if ((inAmountAssetId != lpAssetRequestedForBurning)) | |
469 | 419 | then throw("Invalid asset passed.") | |
470 | 420 | else if ((amountToBurn != paymentAmount)) | |
471 | 421 | then throw("Invalid amount passed.") | |
472 | 422 | else { | |
473 | 423 | let lpAsset = fromBase58String(lpAssetRequestedForBurning) | |
474 | 424 | $Tuple2([Burn(lpAsset, amountToBurn)], "success") | |
475 | 425 | } | |
476 | 426 | } | |
477 | 427 | ||
478 | 428 | ||
479 | 429 | ||
480 | 430 | @Callable(i) | |
481 | 431 | func modifyWeights (btcPoolAddress,ethPoolAddress,ethBtcPoolAddress,usdcUsdtPoolAddress) = { | |
482 | 432 | let checkCaller = mustManager(i) | |
483 | 433 | if ((checkCaller == checkCaller)) | |
484 | 434 | then { | |
485 | 435 | let ethBtcWeightNew = ((5 * POOLWEIGHTMULT) / 100) | |
486 | 436 | let usdcUsdtWeightNew = ((5 * POOLWEIGHTMULT) / 100) | |
487 | 437 | let weightDecrement = ((5 * POOLWEIGHTMULT) / 100) | |
488 | 438 | let factoryCfg = split(getStringOrFail(keyFactoryConfig()), SEP) | |
489 | 439 | let stakingDapp = getStakingAddressOrFail(factoryCfg) | |
490 | 440 | let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg) | |
491 | 441 | let btcWeightKEY = keyPoolToWeight(btcPoolAddress) | |
492 | 442 | let ethWeightKEY = keyPoolToWeight(ethPoolAddress) | |
493 | 443 | let ethBtcWeightKEY = keyPoolToWeight(ethBtcPoolAddress) | |
494 | 444 | let usdcUsdtWeightKEY = keyPoolToWeight(usdcUsdtPoolAddress) | |
495 | 445 | let btcWeight = getIntOrFail(btcWeightKEY) | |
496 | 446 | let ethWeight = getIntOrFail(ethWeightKEY) | |
497 | 447 | let btcWeightNew = (btcWeight - weightDecrement) | |
498 | 448 | let ethWeightNew = (ethWeight - weightDecrement) | |
499 | 449 | if ((0 >= btcWeightNew)) | |
500 | 450 | then throw(("invalid btcWeightNew: " + toString(btcWeightNew))) | |
501 | 451 | else if ((0 >= ethWeightNew)) | |
502 | 452 | then throw(("invalid ethWeightNew: " + toString(ethWeightNew))) | |
503 | 453 | else { | |
504 | 454 | let btcLpAssetIdStr = getStringOrFail(keyMappingPoolContracToLPAsset(btcPoolAddress)) | |
505 | 455 | let ethLpAssetIdStr = getStringOrFail(keyMappingPoolContracToLPAsset(ethPoolAddress)) | |
506 | 456 | let ethBtcLpAssetIdStr = getStringOrFail(keyMappingPoolContracToLPAsset(ethBtcPoolAddress)) | |
507 | 457 | let usdcUsdtLpAssetIdStr = getStringOrFail(keyMappingPoolContracToLPAsset(usdcUsdtPoolAddress)) | |
508 | 458 | let onModifyWeightBtc = invoke(stakingDapp, "onModifyWeight", [btcLpAssetIdStr, btcPoolAddress], nil) | |
509 | 459 | if ((onModifyWeightBtc == onModifyWeightBtc)) | |
510 | 460 | then { | |
511 | 461 | let onModifyWeightEth = invoke(stakingDapp, "onModifyWeight", [ethLpAssetIdStr, ethPoolAddress], nil) | |
512 | 462 | if ((onModifyWeightEth == onModifyWeightEth)) | |
513 | 463 | then { | |
514 | 464 | let onModifyWeightEthBtc = invoke(stakingDapp, "onModifyWeight", [ethBtcLpAssetIdStr, ethBtcPoolAddress], nil) | |
515 | 465 | if ((onModifyWeightEthBtc == onModifyWeightEthBtc)) | |
516 | 466 | then { | |
517 | 467 | let onModifyWeightUsdcUsdt = invoke(stakingDapp, "onModifyWeight", [usdcUsdtLpAssetIdStr, usdcUsdtPoolAddress], nil) | |
518 | 468 | if ((onModifyWeightUsdcUsdt == onModifyWeightUsdcUsdt)) | |
519 | 469 | then [IntegerEntry(btcWeightKEY, btcWeightNew), IntegerEntry(ethWeightKEY, ethWeightNew), IntegerEntry(ethBtcWeightKEY, ethBtcWeightNew), IntegerEntry(usdcUsdtWeightKEY, usdcUsdtWeightNew), IntegerEntry(keyPoolToWeightHistory(btcPoolAddress, 0), btcWeight), IntegerEntry(keyPoolToWeightHistory(ethPoolAddress, 0), ethWeight), IntegerEntry(keyPoolToWeightHistory(ethBtcPoolAddress, 0), ethBtcWeightNew), IntegerEntry(keyPoolToWeightHistory(usdcUsdtPoolAddress, 0), usdcUsdtWeightNew)] | |
520 | 470 | else throw("Strict value is not equal to itself.") | |
521 | 471 | } | |
522 | 472 | else throw("Strict value is not equal to itself.") | |
523 | 473 | } | |
524 | 474 | else throw("Strict value is not equal to itself.") | |
525 | 475 | } | |
526 | 476 | else throw("Strict value is not equal to itself.") | |
527 | 477 | } | |
528 | 478 | } | |
529 | 479 | else throw("Strict value is not equal to itself.") | |
530 | 480 | } | |
531 | 481 | ||
532 | 482 | ||
533 | 483 | @Verifier(tx) | |
534 | 484 | func verify () = { | |
535 | 485 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
536 | 486 | case pk: ByteVector => | |
537 | 487 | pk | |
538 | 488 | case _: Unit => | |
539 | 489 | tx.senderPublicKey | |
540 | 490 | case _ => | |
541 | 491 | throw("Match error") | |
542 | 492 | } | |
543 | 493 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
544 | 494 | } | |
545 | 495 |
github/deemru/w8io/169f3d6 114.60 ms ◑