tx · HWedUDuC3tTJDKKz4VaZQcbAQnNpxhMp9rL1WG3eiGLR

3MzdomR4UkWKtVXq6YGouPJsYXDunjCvSJ8:  -0.03400000 Waves

2022.10.06 10:19 [2260148] smart account 3MzdomR4UkWKtVXq6YGouPJsYXDunjCvSJ8 > SELF 0.00000000 Waves

{ "type": 13, "id": "HWedUDuC3tTJDKKz4VaZQcbAQnNpxhMp9rL1WG3eiGLR", "fee": 3400000, "feeAssetId": null, "timestamp": 1665040782809, "version": 2, "chainId": 84, "sender": "3MzdomR4UkWKtVXq6YGouPJsYXDunjCvSJ8", "senderPublicKey": "HjRpGGPsru1jMvZDVG83rQfzQRHCWNnrpMaqTpHogxyn", "proofs": [ "3wf9KdXwZTpoYdUgPhAv7KLN1jwJzpj3y8MjYC9MXrkCgLJQLC6DqH6tRWBf3PHATTRKWowCScmxiBP1LgMYd2YG" ], "script": "base64:BgJACAISAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIECgIICBIDCgEIEgQKAggIEgMKAQgSAwoBCBUAE2tfaW5zdXJhbmNlX2FkZHJlc3MCE2tfaW5zdXJhbmNlX2FkZHJlc3MAD2tfYWRtaW5fYWRkcmVzcwIPa19hZG1pbl9hZGRyZXNzABJrX2FkbWluX3B1YmxpY19rZXkCEmtfYWRtaW5fcHVibGljX2tleQANa19xdW90ZV9hc3NldAINa19xdW90ZV9hc3NldAAPa19xdW90ZV9zdGFraW5nAg9rX3F1b3RlX3N0YWtpbmcAEWtfc3Rha2luZ19hZGRyZXNzAhFrX3N0YWtpbmdfYWRkcmVzcwARa19mYXJtaW5nX2FkZHJlc3MCEWtfZmFybWluZ19hZGRyZXNzAAVrX2FtbQIFa19hbW0ACmtfYW1tX2RhdGECCmtfYW1tX2RhdGEAEmtfZ292ZXJuYW5jZV9hc3NldAILa19nb3ZfYXNzZXQAD2tfbWluZXJfYWRkcmVzcwIPa19taW5lcl9hZGRyZXNzABBrX29yZGVyc19hZGRyZXNzAhBrX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YW5FbnRyeQIJAQ50b0NvbXBvc2l0ZUtleQIFBWtfYW1tBQtfYW1tQWRkcmVzcwYJAMwIAgkBC1N0cmluZ0VudHJ5AgkBDnRvQ29tcG9zaXRlS2V5AgUKa19hbW1fZGF0YQULX2FtbUFkZHJlc3MFBV9kYXRhBQNuaWwBaQEJcmVtb3ZlQW1tAQtfYW1tQWRkcmVzcwkBC3ZhbHVlT3JFbHNlAgkBB2lzQWRtaW4BBQFpCQDMCAIJAQtEZWxldGVFbnRyeQEJAQ50b0NvbXBvc2l0ZUtleQIFBWtfYW1tBQtfYW1tQWRkcmVzcwUDbmlsAWkBEnNldEdvdmVybmFuY2VBc3NldAEIX2Fzc2V0SWQJAQt2YWx1ZU9yRWxzZQIJAQdpc0FkbWluAQUBaQQKYXNzZXRCeXRlcwkA2QQBBQhfYXNzZXRJZAQHJG1hdGNoMAkA7AcBBQphc3NldEJ5dGVzAwkAAQIFByRtYXRjaDACBUFzc2V0BAVhc3NldAUHJG1hdGNoMAMJAQIhPQIIBQVhc3NldAhkZWNpbWFscwAICQACAQIjSW52YWxpZCBhc3NldCBkZWNpbWFscywgc2hvdWxkIGJlIDgJAMwIAgkBC1N0cmluZ0VudHJ5AgUSa19nb3Zlcm5hbmNlX2Fzc2V0BQhfYXNzZXRJZAUDbmlsCQACAQIQQ2FuJ3QgZmluZCBhc3NldAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBDmFkbWluUHVibGljS2V5AGi3JUE=", "height": 2260148, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2yqCwgLXcMhHFWYByTydAEe1QGPEsjCbk5nfRNTT1dkj Next: 7BKd4VHsgVNBy2irbQzGudQoqtzU6xqLcAmS7hFHJKuK Diff:
OldNewDifferences
2626 let k_orders_address = "k_orders_address"
2727
2828 let k_referral_address = "k_referral_address"
29+
30+let k_manager_address = "k_manager_address"
2931
3032 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
3133
104106
105107
106108 @Callable(i)
109+func setManager (_manager) = valueOrElse(isAdmin(i), {
110+ let address = getAddressIfValid(_manager)
111+[StringEntry(k_manager_address, address)]
112+ })
113+
114+
115+
116+@Callable(i)
107117 func setQuoteAsset (_assetId,_stakingAddress) = valueOrElse(isAdmin(i), {
108118 let stakingAddress = getAddressIfValid(_stakingAddress)
109119 [StringEntry(k_quote_asset, _assetId), StringEntry(k_quote_staking, _stakingAddress)]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let k_insurance_address = "k_insurance_address"
55
66 let k_admin_address = "k_admin_address"
77
88 let k_admin_public_key = "k_admin_public_key"
99
1010 let k_quote_asset = "k_quote_asset"
1111
1212 let k_quote_staking = "k_quote_staking"
1313
1414 let k_staking_address = "k_staking_address"
1515
1616 let k_farming_address = "k_farming_address"
1717
1818 let k_amm = "k_amm"
1919
2020 let k_amm_data = "k_amm_data"
2121
2222 let k_governance_asset = "k_gov_asset"
2323
2424 let k_miner_address = "k_miner_address"
2525
2626 let k_orders_address = "k_orders_address"
2727
2828 let k_referral_address = "k_referral_address"
29+
30+let k_manager_address = "k_manager_address"
2931
3032 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
3133
3234
3335 func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse \"" + address) + "\" as address")))
3436
3537
3638 func adminPublicKey () = getStringValue(this, k_admin_public_key)
3739
3840
3941 func isNoAdmin () = (getString(this, k_admin_address) == unit)
4042
4143
4244 func admin () = addressFromStringValue(valueOrErrorMessage(getString(this, k_admin_address), "Admin not defined"))
4345
4446
4547 func isNoAdminOrAdmin (i) = if (if (isNoAdmin())
4648 then true
4749 else (i.caller == admin()))
4850 then unit
4951 else throw("Only the Admin itself can invoke this function")
5052
5153
5254 func isAdmin (i) = if ((i.caller == admin()))
5355 then unit
5456 else throw("Only the Admin itself can invoke this function")
5557
5658
5759 @Callable(i)
5860 func setAdmin (_adminPublicKey) = valueOrElse(isNoAdminOrAdmin(i), {
5961 let bytes = fromBase58String(_adminPublicKey)
6062 let address = addressFromPublicKey(bytes)
6163 [StringEntry(k_admin_address, toString(address)), StringEntry(k_admin_public_key, _adminPublicKey)]
6264 })
6365
6466
6567
6668 @Callable(i)
6769 func setInsuranceFund (_insuranceFund) = valueOrElse(isAdmin(i), {
6870 let address = getAddressIfValid(_insuranceFund)
6971 [StringEntry(k_insurance_address, address)]
7072 })
7173
7274
7375
7476 @Callable(i)
7577 func setLiquidityMiner (_liquidityMiner) = valueOrElse(isAdmin(i), {
7678 let address = getAddressIfValid(_liquidityMiner)
7779 [StringEntry(k_miner_address, address)]
7880 })
7981
8082
8183
8284 @Callable(i)
8385 func setOrders (_orders) = valueOrElse(isAdmin(i), {
8486 let address = getAddressIfValid(_orders)
8587 [StringEntry(k_orders_address, address)]
8688 })
8789
8890
8991
9092 @Callable(i)
9193 func setReferral (_referral) = valueOrElse(isAdmin(i), {
9294 let address = getAddressIfValid(_referral)
9395 [StringEntry(k_referral_address, address)]
9496 })
9597
9698
9799
98100 @Callable(i)
99101 func setFarming (_farming) = valueOrElse(isAdmin(i), {
100102 let address = getAddressIfValid(_farming)
101103 [StringEntry(k_farming_address, address)]
102104 })
103105
104106
105107
106108 @Callable(i)
109+func setManager (_manager) = valueOrElse(isAdmin(i), {
110+ let address = getAddressIfValid(_manager)
111+[StringEntry(k_manager_address, address)]
112+ })
113+
114+
115+
116+@Callable(i)
107117 func setQuoteAsset (_assetId,_stakingAddress) = valueOrElse(isAdmin(i), {
108118 let stakingAddress = getAddressIfValid(_stakingAddress)
109119 [StringEntry(k_quote_asset, _assetId), StringEntry(k_quote_staking, _stakingAddress)]
110120 })
111121
112122
113123
114124 @Callable(i)
115125 func setStakingAddress (_stakingAddress) = valueOrElse(isAdmin(i), {
116126 let stakingAddress = getAddressIfValid(_stakingAddress)
117127 [StringEntry(k_staking_address, _stakingAddress)]
118128 })
119129
120130
121131
122132 @Callable(i)
123133 func addAmm (_ammAddress,_data) = valueOrElse(isAdmin(i), {
124134 let ammAddress = getAddressIfValid(_ammAddress)
125135 [BooleanEntry(toCompositeKey(k_amm, _ammAddress), true), StringEntry(toCompositeKey(k_amm_data, _ammAddress), _data)]
126136 })
127137
128138
129139
130140 @Callable(i)
131141 func removeAmm (_ammAddress) = valueOrElse(isAdmin(i), [DeleteEntry(toCompositeKey(k_amm, _ammAddress))])
132142
133143
134144
135145 @Callable(i)
136146 func setGovernanceAsset (_assetId) = valueOrElse(isAdmin(i), {
137147 let assetBytes = fromBase58String(_assetId)
138148 match assetInfo(assetBytes) {
139149 case asset: Asset =>
140150 if ((asset.decimals != 8))
141151 then throw("Invalid asset decimals, should be 8")
142152 else [StringEntry(k_governance_asset, _assetId)]
143153 case _ =>
144154 throw("Can't find asset")
145155 }
146156 })
147157
148158
149159 @Verifier(tx)
150160 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(adminPublicKey()))
151161

github/deemru/w8io/169f3d6 
38.47 ms