tx · CPg5SDyvgavNYjfiuHqFe5673zTJGLPKJCE61HBrWc4S

3NBPbSmScU4UfqVrnYc79wvxjtivfmgnSgG:  -0.01000000 Waves

2021.08.24 18:04 [1672561] smart account 3NBPbSmScU4UfqVrnYc79wvxjtivfmgnSgG > SELF 0.00000000 Waves

{ "type": 13, "id": "CPg5SDyvgavNYjfiuHqFe5673zTJGLPKJCE61HBrWc4S", "fee": 1000000, "feeAssetId": null, "timestamp": 1629817520015, "version": 2, "chainId": 84, "sender": "3NBPbSmScU4UfqVrnYc79wvxjtivfmgnSgG", "senderPublicKey": "9fAgVgqqBXvhU4AHgH1dUeXAVzGPhHV7iiKYkW2RUth2", "proofs": [ "beM395Nox4t3tqW4DFV8Nv4tv5Ae6xvDMQ8AK6RC9WXH3dKFG89rr2QXcf8kHP6ZWoLceyWsxF74F545G3bwDQS" ], "script": "base64:AAIFAAAAAAAAABMIAhIJCgcICAgICAEBEgQKAggBAAAAGgAAAAADU0VQAgAAAAJfXwAAAAAKUG9vbEFjdGl2ZQAAAAAAAAAAAQAAAAAPUG9vbFB1dERpc2FibGVkAAAAAAAAAAACAAAAABNQb29sTWF0Y2hlckRpc2FibGVkAAAAAAAAAAADAAAAAAxQb29sU2h1dGRvd24AAAAAAAAAAAQAAAAAEmlkeEludGVybmFsQXNzZXRJZAAAAAAAAAAAAQAAAAAPaWR4UmVzdXRBY3Rpb25zAAAAAAAAAAACAAAAACBpZHhJZkFzc2V0SWRDYWxjdWxhdGlvblBlcmZvcm1lZAAAAAAAAAAAAwEAAAATa2V5TWF0Y2hlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYXRjaGVyUHVibGljS2V5AQAAABFrZXlQb29sU2NyaXB0SGFzaAAAAAACAAAAFiVzJXNfX3Bvb2xfX3NjcmlwdEhhc2gBAAAAEGtleVByaWNlRGVjaW1hbHMAAAAAAgAAABElc19fcHJpY2VEZWNpbWFscwEAAAATa2V5QWxsUG9vbHNTaHV0ZG93bgAAAAACAAAADCVzX19za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NzZXRJZAkAAaQAAAABBQAAABRpbnRlcm5hbFByaWNlQXNzZXRJZAkAASwAAAACAgAAAAQlc19fBQAAAAxscEFzc2V0SWRTdHIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAAKWtleU1hcHBpbmdQb29sQ29udHJhY3RBZGRyZXNzVG9Qb29sQXNzZXRzAAAAAQUAAAALcG9vbEFkZHJlc3MJAQAAABVkYXRhTWFwcGluZ1Bvb2xBc3NldHMAAAACBQAAABVpbnRlcm5hbEFtb3VudEFzc2V0SWQFAAAAFGludGVybmFsUHJpY2VBc3NldElkBQAAAANuaWwCAAAAB3N1Y2Nlc3MJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAWkBAAAACm1hbmFnZVBvb2wAAAACAAAAEWxwQ29udHJhY3RBZGRyZXNzAAAACW5ld1N0YXR1cwMJAQAAAAIhPQAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAEdGhpcwkAAAIAAAABAgAAABJwZXJtaXNzaW9ucyBkZW5pZWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5RvabNg==", "height": 1672561, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let SEP = "__"
5+
6+let PoolActive = 1
7+
8+let PoolPutDisabled = 2
9+
10+let PoolMatcherDisabled = 3
11+
12+let PoolShutdown = 4
13+
14+let idxInternalAssetId = 1
15+
16+let idxResutActions = 2
17+
18+let idxIfAssetIdCalculationPerformed = 3
19+
20+func keyMatcherPublicKey () = "%s__matcherPublicKey"
21+
22+
23+func keyPoolScriptHash () = "%s%s__pool__scriptHash"
24+
25+
26+func keyPriceDecimals () = "%s__priceDecimals"
27+
28+
29+func keyAllPoolsShutdown () = "%s__shutdown"
30+
31+
32+func keyNextInternalAssetId () = "%s__nextInternalAssetId"
33+
34+
35+func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset))
36+
37+
38+func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
39+
40+
41+func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config")
42+
43+
44+func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool")
45+
46+
47+func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset")
48+
49+
50+func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
51+
52+
53+func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__lpAsset2PoolContract")
54+
55+
56+func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
57+
58+
59+func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
60+
61+
62+func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key))
63+
64+
65+func dataPoolCfg (poolAddress,poolStatus,lpAssetId,amountAssetStr,priceAssetStr,amountAssetDecimals,priceAssetDecimals,amountAssetInternalId,priceAssetInternalId,poolWeight,lpAssetDecimals,matcherPublicKey,maxAllowedOrderPriceDifferencePct) = makeString(["%s%d%s%s%s%d%d%d%d%d%d%s", poolAddress, poolStatus, lpAssetId, amountAssetStr, priceAssetStr, toString(amountAssetDecimals), toString(priceAssetDecimals), toString(amountAssetInternalId), toString(priceAssetInternalId), toString(poolWeight), toString(lpAssetDecimals), matcherPublicKey, toString(maxAllowedOrderPriceDifferencePct)], SEP)
66+
67+
68+func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP)
69+
70+
71+func getInternalAssetIdOrCreate (assetIdStr,incrementor) = {
72+ let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0)
73+ let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
74+ let result = if ((internalAssetId == 0))
75+ then {
76+ let newInternalAssetId = (currentIndexOfInternalId + incrementor)
77+ $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true)
78+ }
79+ else $Tuple3(internalAssetId, nil, false)
80+ result
81+ }
82+
83+
84+@Callable(i)
85+func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,maxAllowedFundsInOrderUtilisationPct) = if ((i.caller != this))
86+ then throw("permissions denied")
87+ else if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
88+ then throw((("Pool address " + poolAddress) + " already registered."))
89+ else {
90+ let matcherPublicKey = valueOrErrorMessage(getString(keyMatcherPublicKey()), "No matcher public key injected to factory state.")
91+ let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
92+ let internalAmountAssetId = internalAmountAssetData._1
93+ let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3)
94+ then 2
95+ else 1)
96+ let internalPriceAssetId = internalPriceAssetData._1
97+ let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress))
98+ let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
99+ let poolConfig = getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)))
100+ if (isDefined(poolConfig))
101+ then throw((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
102+ else {
103+ let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
104+ let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr, lpAssetName, lpAssetDescr, poolWeight], nil)
105+ if ((poolActivateInvokeResult == poolActivateInvokeResult))
106+ then {
107+ let lpAssetIdStr = valueOrElse(poolActivateInvokeResult, "")
108+ if ((lpAssetIdStr == ""))
109+ then throw("Failure during dapp2dapp call activate on Pool.")
110+ else {
111+ let amountAssetsDecimals = if ((amountAssetStr == ""))
112+ then 8
113+ else value(assetInfo(fromBase58String(amountAssetStr))).decimals
114+ let priceAssetsDecimals = value(assetInfo(fromBase58String(priceAssetStr))).decimals
115+ $Tuple2(((internalAmountAssetData._2 ++ internalPriceAssetData._2) ++ [StringEntry(keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)), dataPoolCfg(poolAddress, toString(PoolActive), lpAssetIdStr, amountAssetStr, priceAssetStr, amountAssetsDecimals, priceAssetsDecimals, internalAmountAssetId, internalPriceAssetId, poolWeight, 8, matcherPublicKey, maxAllowedFundsInOrderUtilisationPct)), StringEntry(keyMappingLpAssetToPoolAssets(lpAssetIdStr), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId)), StringEntry(keyMappingPoolAssetsToLpasset(toString(internalAmountAssetId), toString(internalPriceAssetId)), ("%s__" + lpAssetIdStr)), StringEntry(keyMappingPoolContractAddressToPoolAssets(poolAddress), dataMappingPoolAssets(internalAmountAssetId, internalPriceAssetId))]), "success")
116+ }
117+ }
118+ else throw("Strict value is not equal to itself.")
119+ }
120+ }
121+
122+
123+
124+@Callable(i)
125+func managePool (lpContractAddress,newStatus) = if ((i.caller != this))
126+ then throw("permissions denied")
127+ else nil
128+
129+
130+@Verifier(tx)
131+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
132+

github/deemru/w8io/169f3d6 
26.60 ms