tx · 12ijDMCR8vmzMvKh55XhYcZ3h8CKvfyZGNbmWUS3uXvs 3N7wWWKanrFEwjmAV8pkz9wVaoQRyojbKDG: -0.05000000 Waves 2021.08.27 17:22 [1676869] smart account 3N7wWWKanrFEwjmAV8pkz9wVaoQRyojbKDG > SELF 0.00000000 Waves
{ "type": 13, "id": "12ijDMCR8vmzMvKh55XhYcZ3h8CKvfyZGNbmWUS3uXvs", "fee": 5000000, "feeAssetId": null, "timestamp": 1630074164581, "version": 2, "chainId": 84, "sender": "3N7wWWKanrFEwjmAV8pkz9wVaoQRyojbKDG", "senderPublicKey": "AadUBjiNREkwKN4X9VfxDrUvWp3gd2rhUpRw7BR2YUAP", "proofs": [ "4DkLUt36ap1jQNfCcjhgniBLypzgz6sVqJMmCdZ2fr8GoqTTncshoVkg5UavBMTq6JJZkVAXJ4Yr7LJMXiMDVLzN" ], "script": "base64:AAIFAAAAAAAAAB0IAhIJCgcICAgICAEIEgQKAggBEgMKAQESAwoBAQAAAB0AAAAAA1NFUAIAAAACX18AAAAAClBvb2xBY3RpdmUAAAAAAAAAAAEAAAAAD1Bvb2xQdXREaXNhYmxlZAAAAAAAAAAAAgAAAAATUG9vbE1hdGNoZXJEaXNhYmxlZAAAAAAAAAAAAwAAAAAMUG9vbFNodXRkb3duAAAAAAAAAAAEAAAAABJpZHhJbnRlcm5hbEFzc2V0SWQAAAAAAAAAAAEAAAAAD2lkeFJlc3V0QWN0aW9ucwAAAAAAAAAAAgAAAAAgaWR4SWZBc3NldElkQ2FsY3VsYXRpb25QZXJmb3JtZWQAAAAAAAAAAAMBAAAAE2tleU1hdGNoZXJQdWJsaWNLZXkAAAAAAgAAABQlc19fbWF0Y2hlclB1YmxpY0tleQEAAAARa2V5UG9vbFNjcmlwdEhhc2gAAAAAAgAAABYlcyVzX19wb29sX19zY3JpcHRIYXNoAQAAABBrZXlQcmljZURlY2ltYWxzAAAAAAIAAAARJXNfX3ByaWNlRGVjaW1hbHMBAAAAE2tleUFsbFBvb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5TWFwcGluZ1Bvb2xDb250cmFjVG9MUEFzc2V0AAAAAQkABCUAAAABBQAAAAZjYWxsZXICAAAAHUludmFsaWQgTFAgYWRkcmVzcyBjYWxsZWQgbWUuBAAAAAdscEFzc2V0CQACWQAAAAEFAAAAGmxwQXNzZXRSZXF1ZXN0ZWRGb3JCdXJuaW5nCQAFFAAAAAIJAARMAAAAAgkBAAAABEJ1cm4AAAACBQAAAAdscEFzc2V0BQAAAAxhbW91bnRUb0J1cm4FAAAAA25pbAIAAAAHc3VjY2VzcwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V59K1pxQ==", "height": 1676869, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BjZEgSNmugabg3LBYLicoeaC5LMQhWh3KwCXei4kfdqM Next: none Diff:
Old | New | Differences | |
---|---|---|---|
138 | 138 | func emit (amountToEmit) = { | |
139 | 139 | let caller = i.caller | |
140 | 140 | let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContracToLPAsset(toString(caller))), "Invalid LP address called me.") | |
141 | - | if (true) | |
142 | - | then throw(("Error here " + lpAssetRequested)) | |
143 | - | else { | |
144 | - | let lpAsset = fromBase58String(lpAssetRequested) | |
145 | - | $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success") | |
146 | - | } | |
141 | + | let lpAsset = fromBase58String(lpAssetRequested) | |
142 | + | $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success") | |
147 | 143 | } | |
148 | 144 | ||
149 | 145 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let PoolActive = 1 | |
7 | 7 | ||
8 | 8 | let PoolPutDisabled = 2 | |
9 | 9 | ||
10 | 10 | let PoolMatcherDisabled = 3 | |
11 | 11 | ||
12 | 12 | let PoolShutdown = 4 | |
13 | 13 | ||
14 | 14 | let idxInternalAssetId = 1 | |
15 | 15 | ||
16 | 16 | let idxResutActions = 2 | |
17 | 17 | ||
18 | 18 | let idxIfAssetIdCalculationPerformed = 3 | |
19 | 19 | ||
20 | 20 | func keyMatcherPublicKey () = "%s__matcherPublicKey" | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func keyPoolScriptHash () = "%s%s__pool__scriptHash" | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func keyPriceDecimals () = "%s__priceDecimals" | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func keyAllPoolsShutdown () = "%s__shutdown" | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func keyNextInternalAssetId () = "%s__nextInternalAssetId" | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func keyPoolToWeight (poolAddress) = ("%s%d__poolWeight__" + poolAddress) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset)) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config") | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool") | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset") | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets") | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract") | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func keyMappingPoolContracToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%d%d%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract") | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key)) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key)) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key)) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func dataPoolCfg (poolAddress,poolStatus,lpAssetId,amountAssetStr,priceAssetStr,amountAssetDecimals,priceAssetDecimals,amountAssetInternalId,priceAssetInternalId,lpAssetDecimals,matcherPublicKey) = 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), matcherPublicKey], SEP) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getInternalAssetIdOrCreate (assetIdStr,incrementor) = { | |
81 | 81 | let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0) | |
82 | 82 | let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0) | |
83 | 83 | let result = if ((internalAssetId == 0)) | |
84 | 84 | then { | |
85 | 85 | let newInternalAssetId = (currentIndexOfInternalId + incrementor) | |
86 | 86 | $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true) | |
87 | 87 | } | |
88 | 88 | else $Tuple3(internalAssetId, nil, false) | |
89 | 89 | result | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | @Callable(i) | |
94 | 94 | func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,matcherPublicKey) = if ((i.caller != this)) | |
95 | 95 | then throw("permissions denied") | |
96 | 96 | else if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress)))) | |
97 | 97 | then throw((("Pool address " + poolAddress) + " already registered.")) | |
98 | 98 | else { | |
99 | 99 | let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1) | |
100 | 100 | let internalAmountAssetId = internalAmountAssetData._1 | |
101 | 101 | let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3) | |
102 | 102 | then 2 | |
103 | 103 | else 1) | |
104 | 104 | let internalPriceAssetId = internalPriceAssetData._1 | |
105 | 105 | let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress)) | |
106 | 106 | let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash()) | |
107 | 107 | let poolConfig = getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))) | |
108 | 108 | if (isDefined(poolConfig)) | |
109 | 109 | then throw((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated.")) | |
110 | 110 | else { | |
111 | 111 | let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)))) | |
112 | 112 | let amountAssetsDecimals = if ((amountAssetStr == "WAVES")) | |
113 | 113 | then 8 | |
114 | 114 | else value(assetInfo(fromBase58String(amountAssetStr))).decimals | |
115 | 115 | let priceAssetsDecimals = value(assetInfo(fromBase58String(priceAssetStr))).decimals | |
116 | 116 | let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true) | |
117 | 117 | let lpAssetId = calculateAssetId(lpAssetIssueAction) | |
118 | 118 | let lpAssetIdStr = toBase58String(lpAssetId) | |
119 | 119 | let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil) | |
120 | 120 | if ((poolActivateInvokeResult == poolActivateInvokeResult)) | |
121 | 121 | then if ((poolActivateInvokeResult != "success")) | |
122 | 122 | then throw("Pool initialisation error happened.") | |
123 | 123 | 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, 8, matcherPublicKey)), 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(keyMappingPoolContracToLPAsset(poolAddress), lpAssetIdStr), StringEntry(keyMappingPoolLPAssetToPoolContractAddress(lpAssetIdStr), poolAddress), IntegerEntry(keyPoolToWeight(poolAddress), poolWeight)]), "success") | |
124 | 124 | else throw("Strict value is not equal to itself.") | |
125 | 125 | } | |
126 | 126 | } | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | ||
130 | 130 | @Callable(i) | |
131 | 131 | func managePool (lpContractAddress,newStatus) = if ((i.caller != this)) | |
132 | 132 | then throw("permissions denied") | |
133 | 133 | else nil | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | ||
137 | 137 | @Callable(i) | |
138 | 138 | func emit (amountToEmit) = { | |
139 | 139 | let caller = i.caller | |
140 | 140 | let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContracToLPAsset(toString(caller))), "Invalid LP address called me.") | |
141 | - | if (true) | |
142 | - | then throw(("Error here " + lpAssetRequested)) | |
143 | - | else { | |
144 | - | let lpAsset = fromBase58String(lpAssetRequested) | |
145 | - | $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success") | |
146 | - | } | |
141 | + | let lpAsset = fromBase58String(lpAssetRequested) | |
142 | + | $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success") | |
147 | 143 | } | |
148 | 144 | ||
149 | 145 | ||
150 | 146 | ||
151 | 147 | @Callable(i) | |
152 | 148 | func burn (amountToBurn) = { | |
153 | 149 | let caller = i.caller | |
154 | 150 | let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContracToLPAsset(toString(caller))), "Invalid LP address called me.") | |
155 | 151 | let lpAsset = fromBase58String(lpAssetRequestedForBurning) | |
156 | 152 | $Tuple2([Burn(lpAsset, amountToBurn)], "success") | |
157 | 153 | } | |
158 | 154 | ||
159 | 155 | ||
160 | 156 | @Verifier(tx) | |
161 | 157 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
162 | 158 |
github/deemru/w8io/026f985 32.14 ms ◑