tx · BxcDeKntCMNSJJsxTJN7uMfyupWa9QFPJeA9DcGUKcgg

3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz:  -0.14000000 Waves

2023.01.19 15:54 [2411840] smart account 3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz > SELF 0.00000000 Waves

{ "type": 13, "id": "BxcDeKntCMNSJJsxTJN7uMfyupWa9QFPJeA9DcGUKcgg", "fee": 14000000, "feeAssetId": null, "timestamp": 1674132915641, "version": 2, "chainId": 84, "sender": "3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz", "senderPublicKey": "C3v9sfZTmGuW7YXwjUKypU41QpFcHCoJxLpvdR4d3iSv", "proofs": [ "2tZXjjuhWBEb11ypGVwCkGe3DpwWgNzRoumweckuZCX2QcNZ6XWftFXXm1PvpKE9EKr5UmkLEuMWnzErpxU6B3wB", "4oh89VVrjPdGYU1uqiDiQBrMz1oSxoyBPSH5yo1xiES4MHEGmB8ocF1rtM1o8PmuaaoxcmeNMPbquqhtWpKcknKw" ], "script": "base64:BgImCAISBAoCAQgSBAoCCAgSAwoBCBIDCgEEEgMKAQgSAwoBCBIAEgAUAA9rUHJlZml4UG9vbE5hbWUCBXBvb2xfABFrUHJlZml4RGVwcmVjYXRlZAILZGVwcmVjYXRlZF8ABWtQYWlyAgVwYWlyXwAJa0Fzc2V0SWRBAgpBX2Fzc2V0X2lkAAlrQXNzZXRJZEICCkJfYXNzZXRfaWQAH2tMYXVuY2hwYWREYXRhVHJhbnNhY3Rpb25TdGF0dXMCIWxhdW5jaHBhZF9kYXRhX3RyYW5zYWN0aW9uX3N0YXR1cwATa0FjdGl2ZUFsbENvbnRyYWN0cwIUYWN0aXZlX2FsbF9jb250cmFjdHMADGtBZG1pblB1YktleQIKYWRtaW5fcHViXwANa0FkbWluUHViS2V5MQILYWRtaW5fcHViXzEADWtBZG1pblB1YktleTICC2FkbWluX3B1Yl8yAA1rQWRtaW5QdWJLZXkzAgthZG1pbl9wdWJfMwAUa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kA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkxAAEAAAQSYWRtaW5QdWJLZXkyU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAQUMYWRtaW5QdWJLZXkyAAEAAAQSYWRtaW5QdWJLZXkzU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUMYWRtaW5QdWJLZXkzAAEAAAkAZwIJAGQCCQBkAgUSYWRtaW5QdWJLZXkxU2lnbmVkBRJhZG1pblB1YktleTJTaWduZWQFEmFkbWluUHViS2V5M1NpZ25lZAACwuXPeA==", "height": 2411840, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3yA1EuqYkrXyJZh5XbKiYtGssX6WEaWCkJv5G6uJ1v1S Next: FrP56cxjZNATfjujbn7kzAhisDaj5PVYtcNB3dVr4nhz Diff:
OldNewDifferences
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let kPrefixPoolName = "pool_"
5+
6+let kPrefixDeprecated = "deprecated_"
57
68 let kPair = "pair_"
79
8486
8587
8688 @Callable(i)
89+func setDeprecated (poolAddress) = valueOrElse(isAdminCall(i), {
90+ let keyName = (kPrefixPoolName + poolAddress)
91+ if (!(isDefined(getString(this, keyName))))
92+ then throw(("Couldn't found pool with address " + poolAddress))
93+ else [BooleanEntry((kPrefixDeprecated + poolAddress), true)]
94+ })
95+
96+
97+
98+@Callable(i)
8799 func launchpadDataTransactionStatus (status) = valueOrElse(isAdminCall(i), [BooleanEntry(kLaunchpadDataTransactionStatus, status)])
88100
89101
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let kPrefixPoolName = "pool_"
5+
6+let kPrefixDeprecated = "deprecated_"
57
68 let kPair = "pair_"
79
810 let kAssetIdA = "A_asset_id"
911
1012 let kAssetIdB = "B_asset_id"
1113
1214 let kLaunchpadDataTransactionStatus = "launchpad_data_transaction_status"
1315
1416 let kActiveAllContracts = "active_all_contracts"
1517
1618 let kAdminPubKey = "admin_pub_"
1719
1820 let kAdminPubKey1 = "admin_pub_1"
1921
2022 let kAdminPubKey2 = "admin_pub_2"
2123
2224 let kAdminPubKey3 = "admin_pub_3"
2325
2426 let kAchievementsWriters = "achievements_writers"
2527
2628 let adminPubKey1 = fromBase58String(getStringValue(this, kAdminPubKey1))
2729
2830 let adminPubKey2 = fromBase58String(getStringValue(this, kAdminPubKey2))
2931
3032 let adminPubKey3 = fromBase58String(getStringValue(this, kAdminPubKey3))
3133
3234 let activeAllContracts = getBooleanValue(this, kActiveAllContracts)
3335
3436 func isSelfCall (i) = if ((i.caller == this))
3537 then unit
3638 else throw("Only the Oracle itself can invoke this function")
3739
3840
3941 func getPoolType (poolAddress) = {
4042 let version = valueOrErrorMessage(getString(poolAddress, "version"), "Pool is not initialized")
4143 if ((version == "1.0.0"))
4244 then "cpmm"
4345 else if ((version == "2.0.0"))
4446 then "flat"
4547 else if ((version == "3.0.0"))
4648 then "multycurve"
4749 else throw("Unknown version of pool")
4850 }
4951
5052
5153 func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse \"" + address) + "\" as address")))
5254
5355
5456 func isAdminCall (i) = if (containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey))
5557 then unit
5658 else throw("Only admin can call this function")
5759
5860
5961 @Callable(i)
6062 func setAdmin (adminId,adminPubKey) = valueOrElse(isSelfCall(i), if (if ((0 > adminId))
6163 then (adminId > 3)
6264 else false)
6365 then throw("Wrong admin id")
6466 else [StringEntry((kAdminPubKey + toString(adminId)), adminPubKey)])
6567
6668
6769
6870 @Callable(i)
6971 func addPool (poolAddress,poolName) = valueOrElse(isAdminCall(i), {
7072 let validatedAddress = getAddressIfValid(poolAddress)
7173 let keyName = (kPrefixPoolName + validatedAddress)
7274 let possiblyAlreadyAddedPool = getString(this, keyName)
7375 if (isDefined(possiblyAlreadyAddedPool))
7476 then throw((((("Pool with address \"" + validatedAddress) + "\" is already defined with name \"") + value(possiblyAlreadyAddedPool)) + "\""))
7577 else ([StringEntry(keyName, poolName)] ++ (if ((getPoolType(value(addressFromString(poolAddress))) == "multycurve"))
7678 then nil
7779 else {
7880 let assetIdA = valueOrErrorMessage(getString(value(addressFromString(poolAddress)), kAssetIdA), "Asset id A is incorrect")
7981 let assetIdB = valueOrErrorMessage(getString(value(addressFromString(poolAddress)), kAssetIdB), "Asset id B is incorrect")
8082 [StringEntry((((kPair + assetIdA) + "_") + assetIdB), poolAddress)]
8183 }))
8284 })
8385
8486
8587
8688 @Callable(i)
89+func setDeprecated (poolAddress) = valueOrElse(isAdminCall(i), {
90+ let keyName = (kPrefixPoolName + poolAddress)
91+ if (!(isDefined(getString(this, keyName))))
92+ then throw(("Couldn't found pool with address " + poolAddress))
93+ else [BooleanEntry((kPrefixDeprecated + poolAddress), true)]
94+ })
95+
96+
97+
98+@Callable(i)
8799 func launchpadDataTransactionStatus (status) = valueOrElse(isAdminCall(i), [BooleanEntry(kLaunchpadDataTransactionStatus, status)])
88100
89101
90102
91103 @Callable(i)
92104 func addAchievementsWriter (address) = valueOrElse(isAdminCall(i), {
93105 let writers = valueOrElse(getString(this, kAchievementsWriters), "")
94106 let data = if ((writers == ""))
95107 then nil
96108 else split(writers, ",")
97109 [StringEntry(kAchievementsWriters, makeString((data :+ address), ","))]
98110 })
99111
100112
101113
102114 @Callable(i)
103115 func removeAchievementsWriter (address) = valueOrElse(isAdminCall(i), {
104116 let writers = split(valueOrElse(getString(this, kAchievementsWriters), ""), ",")
105117 let index = valueOrErrorMessage(indexOf(writers, address), "Can't find address in the list")
106118 [StringEntry(kAchievementsWriters, makeString(removeByIndex(writers, index), ","))]
107119 })
108120
109121
110122
111123 @Callable(i)
112124 func shutdownAllContracts () = valueOrElse(isAdminCall(i), if (!(activeAllContracts))
113125 then throw("All contracts already shutdown")
114126 else [BooleanEntry(kActiveAllContracts, false)])
115127
116128
117129
118130 @Callable(i)
119131 func activateAllContracts () = valueOrElse(isAdminCall(i), if (activeAllContracts)
120132 then throw("All contracts already active")
121133 else [BooleanEntry(kActiveAllContracts, true)])
122134
123135
124136 @Verifier(tx)
125137 func verify () = {
126138 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
127139 then 1
128140 else 0
129141 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
130142 then 1
131143 else 0
132144 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
133145 then 1
134146 else 0
135147 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
136148 }
137149

github/deemru/w8io/026f985 
46.37 ms