tx · CpDsHpT6TGNofqk5mfFCLfBXPS3EHugUkb4X3UwXz7Vc

3MzdomR4UkWKtVXq6YGouPJsYXDunjCvSJ8:  -0.03400000 Waves

2022.09.02 16:53 [2211591] smart account 3MzdomR4UkWKtVXq6YGouPJsYXDunjCvSJ8 > SELF 0.00000000 Waves

{ "type": 13, "id": "CpDsHpT6TGNofqk5mfFCLfBXPS3EHugUkb4X3UwXz7Vc", "fee": 3400000, "feeAssetId": null, "timestamp": 1662126827541, "version": 2, "chainId": 84, "sender": "3MzdomR4UkWKtVXq6YGouPJsYXDunjCvSJ8", "senderPublicKey": "HjRpGGPsru1jMvZDVG83rQfzQRHCWNnrpMaqTpHogxyn", "proofs": [ "5ZRbG7eArfPuvRjXF5Vf8dyc1QdEDgHKWqhwSmS9bA1ysTudKUemrLiqp4WV6V1wEbHqCgk3EwFdxhRmiSc3CgRV" ], "script": "base64:BgIxCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIECgIICBIDCgEIEgQKAggIEgMKAQgSAwoBCBIAE2tfaW5zdXJhbmNlX2FkZHJlc3MCE2tfaW5zdXJhbmNlX2FkZHJlc3MAD2tfYWRtaW5fYWRkcmVzcwIPa19hZG1pbl9hZGRyZXNzABJrX2FkbWluX3B1YmxpY19rZXkCEmtfYWRtaW5fcHVibGljX2tleQANa19xdW90ZV9hc3NldAINa19xdW90ZV9hc3NldAAPa19xdW90ZV9zdGFraW5nAg9rX3F1b3RlX3N0YWtpbmcAEWtfc3Rha2luZ19hZGRyZXNzAhFrX3N0YWtpbmdfYWRkcmVzcwAFa19hbW0CBWtfYW1tAAprX2FtbV9kYXRhAgprX2FtbV9kYXRhABJrX2dvdmVybmFuY2VfYXNzZXQCC2tfZ292X2Fzc2V0AA9rX21pbmVyX2FkZHJlc3MCD2tfbWluZXJfYWRkcmVzcwAQa19vcmRlcnNfYWRkcmVzcwIQa19vcmRlcnNfYWRkcmVzcwEOdG9Db21wb3NpdGVLZXkCBF9rZXkIX2FkZHJlc3MJAK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kAkQMCCAUCdHgGcHJvb2ZzAAAJANkEAQkBDmFkbWluUHVibGljS2V5AKS9cJc=", "height": 2211591, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DS2NAq89AD9G1GiwvHTHruxb8Ru4ymHHeZx2ioB6hPth Next: E14XpEgHZ8rQ9vwEhiqp7TCTUF8zwYHcZ2TVsQwdVqSb Diff:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let k_insurance_address = "k_insurance_address"
2020 let k_governance_asset = "k_gov_asset"
2121
2222 let k_miner_address = "k_miner_address"
23+
24+let k_orders_address = "k_orders_address"
2325
2426 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
2527
7476
7577
7678 @Callable(i)
79+func setOrders (_orders) = valueOrElse(isAdmin(i), {
80+ let address = getAddressIfValid(_orders)
81+[StringEntry(k_orders_address, address)]
82+ })
83+
84+
85+
86+@Callable(i)
7787 func setQuoteAsset (_assetId,_stakingAddress) = valueOrElse(isAdmin(i), {
7888 let stakingAddress = getAddressIfValid(_stakingAddress)
7989 [StringEntry(k_quote_asset, _assetId), StringEntry(k_quote_staking, _stakingAddress)]
Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# 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_amm = "k_amm"
1717
1818 let k_amm_data = "k_amm_data"
1919
2020 let k_governance_asset = "k_gov_asset"
2121
2222 let k_miner_address = "k_miner_address"
23+
24+let k_orders_address = "k_orders_address"
2325
2426 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
2527
2628
2729 func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse \"" + address) + "\" as address")))
2830
2931
3032 func adminPublicKey () = getStringValue(this, k_admin_public_key)
3133
3234
3335 func isNoAdmin () = (getString(this, k_admin_address) == unit)
3436
3537
3638 func admin () = addressFromStringValue(valueOrErrorMessage(getString(this, k_admin_address), "Admin not defined"))
3739
3840
3941 func isNoAdminOrAdmin (i) = if (if (isNoAdmin())
4042 then true
4143 else (i.caller == admin()))
4244 then unit
4345 else throw("Only the Admin itself can invoke this function")
4446
4547
4648 func isAdmin (i) = if ((i.caller == admin()))
4749 then unit
4850 else throw("Only the Admin itself can invoke this function")
4951
5052
5153 @Callable(i)
5254 func setAdmin (_adminPublicKey) = valueOrElse(isNoAdminOrAdmin(i), {
5355 let bytes = fromBase58String(_adminPublicKey)
5456 let address = addressFromPublicKey(bytes)
5557 [StringEntry(k_admin_address, toString(address)), StringEntry(k_admin_public_key, _adminPublicKey)]
5658 })
5759
5860
5961
6062 @Callable(i)
6163 func setInsuranceFund (_insuranceFund) = valueOrElse(isAdmin(i), {
6264 let address = getAddressIfValid(_insuranceFund)
6365 [StringEntry(k_insurance_address, address)]
6466 })
6567
6668
6769
6870 @Callable(i)
6971 func setLiquidityMiner (_liquidityMiner) = valueOrElse(isAdmin(i), {
7072 let address = getAddressIfValid(_liquidityMiner)
7173 [StringEntry(k_miner_address, address)]
7274 })
7375
7476
7577
7678 @Callable(i)
79+func setOrders (_orders) = valueOrElse(isAdmin(i), {
80+ let address = getAddressIfValid(_orders)
81+[StringEntry(k_orders_address, address)]
82+ })
83+
84+
85+
86+@Callable(i)
7787 func setQuoteAsset (_assetId,_stakingAddress) = valueOrElse(isAdmin(i), {
7888 let stakingAddress = getAddressIfValid(_stakingAddress)
7989 [StringEntry(k_quote_asset, _assetId), StringEntry(k_quote_staking, _stakingAddress)]
8090 })
8191
8292
8393
8494 @Callable(i)
8595 func setStakingAddress (_stakingAddress) = valueOrElse(isAdmin(i), {
8696 let stakingAddress = getAddressIfValid(_stakingAddress)
8797 [StringEntry(k_staking_address, _stakingAddress)]
8898 })
8999
90100
91101
92102 @Callable(i)
93103 func addAmm (_ammAddress,_data) = valueOrElse(isAdmin(i), {
94104 let ammAddress = getAddressIfValid(_ammAddress)
95105 [BooleanEntry(toCompositeKey(k_amm, _ammAddress), true), StringEntry(toCompositeKey(k_amm_data, _ammAddress), _data)]
96106 })
97107
98108
99109
100110 @Callable(i)
101111 func removeAmm (_ammAddress) = valueOrElse(isAdmin(i), [DeleteEntry(toCompositeKey(k_amm, _ammAddress))])
102112
103113
104114
105115 @Callable(i)
106116 func setGovernanceAsset (_assetId) = valueOrElse(isAdmin(i), {
107117 let assetBytes = fromBase58String(_assetId)
108118 match assetInfo(assetBytes) {
109119 case asset: Asset =>
110120 if ((asset.decimals != 8))
111121 then throw("Invalid asset decimals, should be 8")
112122 else [StringEntry(k_governance_asset, _assetId)]
113123 case _ =>
114124 throw("Can't find asset")
115125 }
116126 })
117127
118128
119129 @Verifier(tx)
120130 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(adminPublicKey()))
121131

github/deemru/w8io/026f985 
36.60 ms