tx · 5Hby5paWZK9a5daJyVhbjTCzEaTBCxP2nb4h9L9ZGFf2

3Mtko7KtZDyt532TGHjRUoVahuviQKwbBFt:  -0.01400000 Waves

2021.10.07 13:30 [1735693] smart account 3Mtko7KtZDyt532TGHjRUoVahuviQKwbBFt > SELF 0.00000000 Waves

{ "type": 13, "id": "5Hby5paWZK9a5daJyVhbjTCzEaTBCxP2nb4h9L9ZGFf2", "fee": 1400000, "feeAssetId": null, "timestamp": 1633602688031, "version": 1, "sender": "3Mtko7KtZDyt532TGHjRUoVahuviQKwbBFt", "senderPublicKey": "GptvgtKyc2q5oyNw5gDtNYbcX6wsDyRMVRaAuFUZmzfy", "proofs": [ "5otpJjmnvNwiAP2aYnRSDagotXwVZbZndq9YfmfTGfbqWQFJjZErUu2q6oTRbhys7NVJyQUu6MitvHzHUeyo4gzE" ], "script": "base64:AAIFAAAAAAAAACgIAhIKCggICAgICAgIARIICgYICAgICAESBAoCCAESAwoBARIDCgEBAAAAIQAAAAARZGVjaW1hbHNNdWx0UHJpY2UJAABoAAAAAgkAAGgAAAACAAAAAAAAAABkAAAAAAAAAAPoAAAAAAAAAAPoAAAAAANTRVACAAAAAl9fAAAAAApQb29sQWN0aXZlAAAAAAAAAAABAAAAAA9Qb29sUHV0RGlzYWJsZWQAAAAAAAAAAAIAAAAAE1Bvb2xNYXRjaGVyRGlzYWJsZWQAAAAAAAAAAAMAAAAADFBvb2xTaHV0ZG93bgAAAAAAAAAABAAAAAASaWR4SW50ZXJuYWxBc3NldElkAAAAAAAAAAABAAAAAA9pZHhSZXN1dEFjdGlvbnMAAAAAAAAAAAIAAAAAIGlkeElmQXNzZXRJZENhbGN1bGF0aW9uUGVyZm9ybWVkAAAAAAAAAAADAQAAABBrZXlGYWN0b3J5Q29uZmlnAAAAAAIAAAARJXNfX2ZhY3RvcnlDb25maWcBAAAAD2tleUxwVG9rZW5zTGlzdAAAAAACAAAAECVzX19scFRva2Vuc0xpc3QBAAAAEWtleVBvb2xTY3JpcHR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GYW1vdW50BAAAAA9pbkFtb3VudEFzc2V0SWQJAAJYAAAAAQkBAAAABXZhbHVlAAAAAQgFAAAAB3BheW1lbnQAAAAHYXNzZXRJZAQAAAAabHBBc3NldFJlcXVlc3RlZEZvckJ1cm5pbmcJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABCIAAAABCQEAAAAea2V5TWFwcGluZ1Bvb2xDb250cmFjVG9MUEFzc2V0AAAAAQkABCUAAAABBQAAAAZjYWxsZXICAAAAHUludmFsaWQgTFAgYWRkcmVzcyBjYWxsZWQgbWUuAwkBAAAAAiE9AAAAAgUAAAAPaW5BbW91bnRBc3NldElkBQAAABpscEFzc2V0UmVxdWVzdGVkRm9yQnVybmluZwkAAAIAAAABAgAAABVJbnZhbGlkIGFzc2V0IHBhc3NlZC4DCQEAAAACIT0AAAACBQAAAAxhbW91bnRUb0J1cm4FAAAADXBheW1lbnRBbW91bnQJAAACAAAAAQIAAAAWSW52YWxpZCBhbW91bnQgcGFzc2VkLgQAAAAHbHBBc3NldAkAAlkAAAABBQAAABpscEFzc2V0UmVxdWVzdGVkRm9yQnVybmluZwkABRQAAAACCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAHbHBBc3NldAUAAAAMYW1vdW50VG9CdXJuBQAAAANuaWwCAAAAB3N1Y2Nlc3MAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlebRz8+k=", "chainId": 84, "height": 1735693, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FbdNVGTqCJ2DbJG2rj3fqtPQtL8mmHcpkoqEyhrCi6oZ Next: none Diff:
OldNewDifferences
2020 let idxIfAssetIdCalculationPerformed = 3
2121
2222 func keyFactoryConfig () = "%s__factoryConfig"
23+
24+
25+func keyLpTokensList () = "%s__lpTokensList"
2326
2427
2528 func keyPoolScriptHash () = "%s%s__pool__scriptHash"
7376 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key))
7477
7578
76-func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract], SEP)
79+func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP)
7780
7881
79-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)
82+func dataPoolCfg (poolAddress,poolStatus,lpAssetId,amountAssetStr,priceAssetStr,amountAssetDecimals,priceAssetDecimals,amountAssetInternalId,priceAssetInternalId,lpAssetDecimals) = 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)], SEP)
8083
8184
8285 func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP)
9598 }
9699
97100
101+func createLpTokensListEntry (newLpToken) = {
102+ let lpTokens = getString(this, keyLpTokensList())
103+ if (isDefined(lpTokens))
104+ then ((value(lpTokens) + SEP) + newLpToken)
105+ else newLpToken
106+ }
107+
108+
98109 @Callable(i)
99-func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,priceDecimals) = if ((i.caller != this))
110+func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = if ((i.caller != this))
100111 then throw("permissions denied")
101- else [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
112+ else [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
102113
103114
104115
105116 @Callable(i)
106-func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,matcherPublicKey) = if ((i.caller != this))
117+func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight) = if ((i.caller != this))
107118 then throw("permissions denied")
108119 else if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
109120 then throw((("Pool address " + poolAddress) + " already registered."))
134145 if ((poolActivateInvokeResult == poolActivateInvokeResult))
135146 then if ((poolActivateInvokeResult != "success"))
136147 then throw("Pool initialisation error happened.")
137- 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, 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(keyMappingPoolLPAssetToPoolContractAddress(lpAssetIdStr), poolAddress), StringEntry(keyMappingPoolContracToLPAsset(poolAddress), lpAssetIdStr), IntegerEntry(keyPoolToWeight(poolAddress), poolWeight)]), "success")
148+ 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)), 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")
138149 else throw("Strict value is not equal to itself.")
139150 }
140151 }
154165 let originCaller = i.originCaller
155166 let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContracToLPAsset(toString(caller))), "Invalid LP address called me.")
156167 let lpAsset = fromBase58String(lpAssetRequested)
157- $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
168+ if ((amountToEmit > 0))
169+ then $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
170+ else nil
158171 }
159172
160173
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let decimalsMultPrice = ((100 * 1000) * 1000)
55
66 let SEP = "__"
77
88 let PoolActive = 1
99
1010 let PoolPutDisabled = 2
1111
1212 let PoolMatcherDisabled = 3
1313
1414 let PoolShutdown = 4
1515
1616 let idxInternalAssetId = 1
1717
1818 let idxResutActions = 2
1919
2020 let idxIfAssetIdCalculationPerformed = 3
2121
2222 func keyFactoryConfig () = "%s__factoryConfig"
23+
24+
25+func keyLpTokensList () = "%s__lpTokensList"
2326
2427
2528 func keyPoolScriptHash () = "%s%s__pool__scriptHash"
2629
2730
2831 func keyPriceDecimals () = "%s__priceDecimals"
2932
3033
3134 func keyAllPoolsShutdown () = "%s__shutdown"
3235
3336
3437 func keyNextInternalAssetId () = "%s__nextInternalAssetId"
3538
3639
3740 func keyPoolToWeight (poolAddress) = ("%s%s__poolWeight__" + poolAddress)
3841
3942
4043 func keyMappingsInternal2baseAssetId (internalBaseAsset) = ("%s%s%d__mappings__internal2baseAssetId__" + toString(internalBaseAsset))
4144
4245
4346 func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr)
4447
4548
4649 func keyPoolConfig (amountAssetInternal,priceAssetInternal) = (((("%d%d%s__" + amountAssetInternal) + "__") + priceAssetInternal) + "__config")
4750
4851
4952 func keyMappingLpAssetToPoolAssets (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2Pool")
5053
5154
5255 func keyMappingPoolAssetsToLpasset (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + internalAmountAssetIdStr) + "__") + internalPriceAssetIdStr) + "__mappings__PoolAssets2LpAsset")
5356
5457
5558 func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2PoolAssets")
5659
5760
5861 func keyMappingPoolAssetsToPoolContractAddress (internalAmountAssetIdStr,internalPriceAssetIdStr) = (((("%d%d%s%s__" + toString(internalAmountAssetIdStr)) + "__") + toString(internalPriceAssetIdStr)) + "__mappings__poolAssets2PoolContract")
5962
6063
6164 func keyMappingPoolContracToLPAsset (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset")
6265
6366
6467 func keyMappingPoolLPAssetToPoolContractAddress (lpAssetStr) = (("%s%s%s__" + lpAssetStr) + "__mappings__lpAsset2PoolContract")
6568
6669
6770 func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), ("No data for this.key=" + key))
6871
6972
7073 func getBooleanOrFail (key) = valueOrErrorMessage(getBoolean(this, key), ("No data for this.key=" + key))
7174
7275
7376 func getIntOrFail (key) = valueOrErrorMessage(getInteger(this, key), ("No data for this.key=" + key))
7477
7578
76-func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract], SEP)
79+func dataFactoryCfg (stakingAddress,boostingAddress,idoContract,teamContract,emissionContract,restContract,slippageContract) = makeString(["%s%s%s%s%s%s", stakingAddress, boostingAddress, idoContract, teamContract, emissionContract, restContract, slippageContract], SEP)
7780
7881
79-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)
82+func dataPoolCfg (poolAddress,poolStatus,lpAssetId,amountAssetStr,priceAssetStr,amountAssetDecimals,priceAssetDecimals,amountAssetInternalId,priceAssetInternalId,lpAssetDecimals) = 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)], SEP)
8083
8184
8285 func dataMappingPoolAssets (internalAmountAssetStr,internalPriceAssetStr) = makeString(["%d%d", toString(internalAmountAssetStr), toString(internalPriceAssetStr)], SEP)
8386
8487
8588 func getInternalAssetIdOrCreate (assetIdStr,incrementor) = {
8689 let internalAssetId = valueOrElse(getInteger(this, keyMappingsBaseAsset2internalId(assetIdStr)), 0)
8790 let currentIndexOfInternalId = valueOrElse(getInteger(this, keyNextInternalAssetId()), 0)
8891 let result = if ((internalAssetId == 0))
8992 then {
9093 let newInternalAssetId = (currentIndexOfInternalId + incrementor)
9194 $Tuple3(newInternalAssetId, [IntegerEntry(keyNextInternalAssetId(), newInternalAssetId), IntegerEntry(keyMappingsBaseAsset2internalId(assetIdStr), newInternalAssetId), StringEntry(keyMappingsInternal2baseAssetId(newInternalAssetId), assetIdStr)], true)
9295 }
9396 else $Tuple3(internalAssetId, nil, false)
9497 result
9598 }
9699
97100
101+func createLpTokensListEntry (newLpToken) = {
102+ let lpTokens = getString(this, keyLpTokensList())
103+ if (isDefined(lpTokens))
104+ then ((value(lpTokens) + SEP) + newLpToken)
105+ else newLpToken
106+ }
107+
108+
98109 @Callable(i)
99-func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,priceDecimals) = if ((i.caller != this))
110+func constructor (stakingContract,boostingContract,idoContract,teamContract,emissionContract,restContract,slpipageContract,priceDecimals) = if ((i.caller != this))
100111 then throw("permissions denied")
101- else [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
112+ else [StringEntry(keyFactoryConfig(), dataFactoryCfg(stakingContract, boostingContract, idoContract, teamContract, emissionContract, restContract, slpipageContract)), IntegerEntry(keyPriceDecimals(), priceDecimals)]
102113
103114
104115
105116 @Callable(i)
106-func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight,matcherPublicKey) = if ((i.caller != this))
117+func activateNewPool (poolAddress,amountAssetStr,priceAssetStr,lpAssetName,lpAssetDescr,poolWeight) = if ((i.caller != this))
107118 then throw("permissions denied")
108119 else if (isDefined(getString(keyMappingPoolContractAddressToPoolAssets(poolAddress))))
109120 then throw((("Pool address " + poolAddress) + " already registered."))
110121 else {
111122 let internalAmountAssetData = getInternalAssetIdOrCreate(amountAssetStr, 1)
112123 let internalAmountAssetId = internalAmountAssetData._1
113124 let internalPriceAssetData = getInternalAssetIdOrCreate(priceAssetStr, if (internalAmountAssetData._3)
114125 then 2
115126 else 1)
116127 let internalPriceAssetId = internalPriceAssetData._1
117128 let poolAccountScriptHash = valueOrErrorMessage(scriptHash(addressFromStringValue(poolAddress)), ("No script has been found on pool account " + poolAddress))
118129 let ethalonPoolAccountScriptHash = getBinaryValue(keyPoolScriptHash())
119130 let poolConfig = getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId)))
120131 if (isDefined(poolConfig))
121132 then throw((((("Pool " + amountAssetStr) + "/") + priceAssetStr) + " has already been activated."))
122133 else {
123134 let poolConfigValue = value(getString(this, keyPoolConfig(toString(internalAmountAssetId), toString(internalPriceAssetId))))
124135 let amountAssetsDecimals = if ((amountAssetStr == "WAVES"))
125136 then decimalsMultPrice
126137 else pow(10, 0, value(assetInfo(fromBase58String(amountAssetStr))).decimals, 0, 0, DOWN)
127138 let priceAssetsDecimals = if ((priceAssetStr == "WAVES"))
128139 then decimalsMultPrice
129140 else pow(10, 0, value(assetInfo(fromBase58String(priceAssetStr))).decimals, 0, 0, DOWN)
130141 let lpAssetIssueAction = Issue(lpAssetName, lpAssetDescr, 1, 8, true)
131142 let lpAssetId = calculateAssetId(lpAssetIssueAction)
132143 let lpAssetIdStr = toBase58String(lpAssetId)
133144 let poolActivateInvokeResult = invoke(addressFromStringValue(poolAddress), "activate", [amountAssetStr, priceAssetStr], nil)
134145 if ((poolActivateInvokeResult == poolActivateInvokeResult))
135146 then if ((poolActivateInvokeResult != "success"))
136147 then throw("Pool initialisation error happened.")
137- 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, 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(keyMappingPoolLPAssetToPoolContractAddress(lpAssetIdStr), poolAddress), StringEntry(keyMappingPoolContracToLPAsset(poolAddress), lpAssetIdStr), IntegerEntry(keyPoolToWeight(poolAddress), poolWeight)]), "success")
148+ 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)), 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")
138149 else throw("Strict value is not equal to itself.")
139150 }
140151 }
141152
142153
143154
144155 @Callable(i)
145156 func managePool (lpContractAddress,newStatus) = if ((i.caller != this))
146157 then throw("permissions denied")
147158 else nil
148159
149160
150161
151162 @Callable(i)
152163 func emit (amountToEmit) = {
153164 let caller = i.caller
154165 let originCaller = i.originCaller
155166 let lpAssetRequested = valueOrErrorMessage(getString(keyMappingPoolContracToLPAsset(toString(caller))), "Invalid LP address called me.")
156167 let lpAsset = fromBase58String(lpAssetRequested)
157- $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
168+ if ((amountToEmit > 0))
169+ then $Tuple2([Reissue(lpAsset, amountToEmit, true), ScriptTransfer(i.caller, amountToEmit, lpAsset)], "success")
170+ else nil
158171 }
159172
160173
161174
162175 @Callable(i)
163176 func burn (amountToBurn) = {
164177 let caller = i.caller
165178 let originCaller = i.originCaller
166179 let payment = value(i.payments[0])
167180 let paymentAmount = value(payment.amount)
168181 let inAmountAssetId = toBase58String(value(payment.assetId))
169182 let lpAssetRequestedForBurning = valueOrErrorMessage(getString(keyMappingPoolContracToLPAsset(toString(caller))), "Invalid LP address called me.")
170183 if ((inAmountAssetId != lpAssetRequestedForBurning))
171184 then throw("Invalid asset passed.")
172185 else if ((amountToBurn != paymentAmount))
173186 then throw("Invalid amount passed.")
174187 else {
175188 let lpAsset = fromBase58String(lpAssetRequestedForBurning)
176189 $Tuple2([Burn(lpAsset, amountToBurn)], "success")
177190 }
178191 }
179192
180193
181194 @Verifier(tx)
182195 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
183196

github/deemru/w8io/026f985 
45.27 ms