tx · 74ZhAmfi8xk6M8z9Gv8fQfDwQCGo2nYy6BjWwbCHoMUu

3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ:  -0.03400000 Waves

2022.10.20 21:53 [2281118] smart account 3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ > SELF 0.00000000 Waves

{ "type": 13, "id": "74ZhAmfi8xk6M8z9Gv8fQfDwQCGo2nYy6BjWwbCHoMUu", "fee": 3400000, "feeAssetId": null, "timestamp": 1666291999669, "version": 2, "chainId": 84, "sender": "3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ", "senderPublicKey": "Dhf95pPhxwKtWsqgf6tyeDW2xpQA7TvM8nTwbwgqKjkd", "proofs": [ "4M6VfSJQof6spRWGAT1L7cjy9sU7UG4wQdYxn8XZGwrSm8isqNFevk8RqtjTQhg9jz6mkVBDeEE2gWFKYPhetcL8" ], "script": "base64:BgJFCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSBAoCCAgSAwoBCBIDCgEIFgATa19pbnN1cmFuY2VfYWRkcmVzcwITa19pbnN1cmFuY2VfYWRkcmVzcwAPa19hZG1pbl9hZGRyZXNzAg9rX2FkbWluX2FkZHJlc3MAEmtfYWRtaW5fcHVibGljX2tleQISa19hZG1pbl9wdWJsaWNfa2V5AA1rX3F1b3RlX2Fzc2V0Ag1rX3F1b3RlX2Fzc2V0AA9rX3F1b3RlX3N0YWtpbmcCD2tfcXVvdGVfc3Rha2luZwARa19zdGFraW5nX2FkZHJlc3MCEWtfc3Rha2luZ19hZGRyZXNzABFrX2Zhcm1pbmdfYWRkcmVzcwIRa19mYXJtaW5nX2FkZHJlc3MAFWtfaG91c2VrZWVwZXJfYWRkcmVzcwIVa19ob3VzZWtlZXBlcl9hZGRyZXNzAAVrX2FtbQIFa19hbW0ACmtfYW1tX2RhdGECCmtfYW1tX2RhdGEAEmtfZ292ZXJuYW5jZV9hc3NldAILa19nb3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HlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBDmFkbWluUHVibGljS2V5ABECG0Y=", "height": 2281118, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Di95zRm7SS5Azo1Ajt2y4pBpxCTjtL6pUdDmuZ3bPiv Next: Atujbkv7E2XksrY1XPzZ2U3C5VrLfbh4EGrAjzoTCvbM Diff:
OldNewDifferences
1414 let k_staking_address = "k_staking_address"
1515
1616 let k_farming_address = "k_farming_address"
17+
18+let k_housekeeper_address = "k_housekeeper_address"
1719
1820 let k_amm = "k_amm"
1921
114116
115117
116118 @Callable(i)
119+func setHousekeeper (_housekeeper) = valueOrElse(isAdmin(i), {
120+ let address = getAddressIfValid(_housekeeper)
121+[StringEntry(k_housekeeper_address, address)]
122+ })
123+
124+
125+
126+@Callable(i)
117127 func setQuoteAsset (_assetId,_stakingAddress) = valueOrElse(isAdmin(i), {
118128 let stakingAddress = getAddressIfValid(_stakingAddress)
119129 [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"
17+
18+let k_housekeeper_address = "k_housekeeper_address"
1719
1820 let k_amm = "k_amm"
1921
2022 let k_amm_data = "k_amm_data"
2123
2224 let k_governance_asset = "k_gov_asset"
2325
2426 let k_miner_address = "k_miner_address"
2527
2628 let k_orders_address = "k_orders_address"
2729
2830 let k_referral_address = "k_referral_address"
2931
3032 let k_manager_address = "k_manager_address"
3133
3234 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
3335
3436
3537 func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse \"" + address) + "\" as address")))
3638
3739
3840 func adminPublicKey () = getStringValue(this, k_admin_public_key)
3941
4042
4143 func isNoAdmin () = (getString(this, k_admin_address) == unit)
4244
4345
4446 func admin () = addressFromStringValue(valueOrErrorMessage(getString(this, k_admin_address), "Admin not defined"))
4547
4648
4749 func isNoAdminOrAdmin (i) = if (if (isNoAdmin())
4850 then true
4951 else (i.caller == admin()))
5052 then unit
5153 else throw("Only the Admin itself can invoke this function")
5254
5355
5456 func isAdmin (i) = if ((i.caller == admin()))
5557 then unit
5658 else throw("Only the Admin itself can invoke this function")
5759
5860
5961 @Callable(i)
6062 func setAdmin (_adminPublicKey) = valueOrElse(isNoAdminOrAdmin(i), {
6163 let bytes = fromBase58String(_adminPublicKey)
6264 let address = addressFromPublicKey(bytes)
6365 [StringEntry(k_admin_address, toString(address)), StringEntry(k_admin_public_key, _adminPublicKey)]
6466 })
6567
6668
6769
6870 @Callable(i)
6971 func setInsuranceFund (_insuranceFund) = valueOrElse(isAdmin(i), {
7072 let address = getAddressIfValid(_insuranceFund)
7173 [StringEntry(k_insurance_address, address)]
7274 })
7375
7476
7577
7678 @Callable(i)
7779 func setLiquidityMiner (_liquidityMiner) = valueOrElse(isAdmin(i), {
7880 let address = getAddressIfValid(_liquidityMiner)
7981 [StringEntry(k_miner_address, address)]
8082 })
8183
8284
8385
8486 @Callable(i)
8587 func setOrders (_orders) = valueOrElse(isAdmin(i), {
8688 let address = getAddressIfValid(_orders)
8789 [StringEntry(k_orders_address, address)]
8890 })
8991
9092
9193
9294 @Callable(i)
9395 func setReferral (_referral) = valueOrElse(isAdmin(i), {
9496 let address = getAddressIfValid(_referral)
9597 [StringEntry(k_referral_address, address)]
9698 })
9799
98100
99101
100102 @Callable(i)
101103 func setFarming (_farming) = valueOrElse(isAdmin(i), {
102104 let address = getAddressIfValid(_farming)
103105 [StringEntry(k_farming_address, address)]
104106 })
105107
106108
107109
108110 @Callable(i)
109111 func setManager (_manager) = valueOrElse(isAdmin(i), {
110112 let address = getAddressIfValid(_manager)
111113 [StringEntry(k_manager_address, address)]
112114 })
113115
114116
115117
116118 @Callable(i)
119+func setHousekeeper (_housekeeper) = valueOrElse(isAdmin(i), {
120+ let address = getAddressIfValid(_housekeeper)
121+[StringEntry(k_housekeeper_address, address)]
122+ })
123+
124+
125+
126+@Callable(i)
117127 func setQuoteAsset (_assetId,_stakingAddress) = valueOrElse(isAdmin(i), {
118128 let stakingAddress = getAddressIfValid(_stakingAddress)
119129 [StringEntry(k_quote_asset, _assetId), StringEntry(k_quote_staking, _stakingAddress)]
120130 })
121131
122132
123133
124134 @Callable(i)
125135 func setStakingAddress (_stakingAddress) = valueOrElse(isAdmin(i), {
126136 let stakingAddress = getAddressIfValid(_stakingAddress)
127137 [StringEntry(k_staking_address, _stakingAddress)]
128138 })
129139
130140
131141
132142 @Callable(i)
133143 func addAmm (_ammAddress,_data) = valueOrElse(isAdmin(i), {
134144 let ammAddress = getAddressIfValid(_ammAddress)
135145 [BooleanEntry(toCompositeKey(k_amm, _ammAddress), true), StringEntry(toCompositeKey(k_amm_data, _ammAddress), _data)]
136146 })
137147
138148
139149
140150 @Callable(i)
141151 func removeAmm (_ammAddress) = valueOrElse(isAdmin(i), [DeleteEntry(toCompositeKey(k_amm, _ammAddress))])
142152
143153
144154
145155 @Callable(i)
146156 func setGovernanceAsset (_assetId) = valueOrElse(isAdmin(i), {
147157 let assetBytes = fromBase58String(_assetId)
148158 match assetInfo(assetBytes) {
149159 case asset: Asset =>
150160 if ((asset.decimals != 8))
151161 then throw("Invalid asset decimals, should be 8")
152162 else [StringEntry(k_governance_asset, _assetId)]
153163 case _ =>
154164 throw("Can't find asset")
155165 }
156166 })
157167
158168
159169 @Verifier(tx)
160170 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(adminPublicKey()))
161171

github/deemru/w8io/169f3d6 
33.18 ms