tx · GKcv2oYdn8wCF25xBedSsBRTsuUioj6NnBDzBdMNYQDy

3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ:  -0.03400000 Waves

2023.02.04 14:52 [2434846] smart account 3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ > SELF 0.00000000 Waves

{ "type": 13, "id": "GKcv2oYdn8wCF25xBedSsBRTsuUioj6NnBDzBdMNYQDy", "fee": 3400000, "feeAssetId": null, "timestamp": 1675511550171, "version": 2, "chainId": 84, "sender": "3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ", "senderPublicKey": "Dhf95pPhxwKtWsqgf6tyeDW2xpQA7TvM8nTwbwgqKjkd", "proofs": [ "2GWxi5RwFrzxxBZDUaXdPUzXH46Y8h1jbikvkNdz6YHbQEKSSg3Bv8PRBGgYwT8ULor4MpnREW5Zw6ZrKMQkhVQM" ], "script": "base64:BgJeCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIECgIICBIDCgEIEgMKAQgSAwoBCBIDCgEIEgQKAggIEgMKAQgSAwoBCBkAE2tfaW5zdXJhbmNlX2FkZHJlc3MCE2tfaW5zdXJhbmNlX2FkZHJlc3MAD2tfdmF1bHRfYWRkcmVzcwIPa192YXVsdF9hZGRyZXNzAA9rX2FkbWluX2FkZHJlc3MCD2tfYWRtaW5fYWRkcmVzcwANa19xdW90ZV9hc3NldAINa19xdW90ZV9hc3NldAAPa19xdW90ZV9zdGFraW5nAg9rX3F1b3RlX3N0YWtpbmcAEWtfc3Rha2luZ19hZGRyZXNzAhFrX3N0YWtpbmdfYWRkcmVzcwARa19mYXJtaW5nX2FkZHJlc3MCEWtfZmFybWluZ19hZGRyZXNzABBrX3ByaXplc19hZGRyZXNzAhBrX3ByaXplc19hZGRyZXNzABVrX2hvdXNla2VlcGVyX2FkZHJlc3MCFWtfaG91c2VrZWVwZXJfYWRkcmVzcwAFa19hbW0CBWtfYW1tAAprX2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IIBQVhc3NldAhkZWNpbWFscwAICQACAQIjSW52YWxpZCBhc3NldCBkZWNpbWFscywgc2hvdWxkIGJlIDgJAMwIAgkBC1N0cmluZ0VudHJ5AgUSa19nb3Zlcm5hbmNlX2Fzc2V0BQhfYXNzZXRJZAUDbmlsCQACAQIQQ2FuJ3QgZmluZCBhc3NldAECdHgBBnZlcmlmeQAEByRtYXRjaDAJAJ0IAgUEdGhpcwUPa19hZG1pbl9hZGRyZXNzAwkAAQIFByRtYXRjaDACBlN0cmluZwQIdmVyaWZpZXIFByRtYXRjaDAJAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUIdmVyaWZpZXIJAKwCAgkArAICCQCsAgICB3N0YXR1c18JAKUIAQUEdGhpcwIBXwkA2AQBCAUCdHgCaWQHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V55dUkTQ==", "height": 2434846, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FR9hkoL5DYtMkN9PmCmvHF2wymRKksghPECaUoje9zQS Next: Gq3wnqz1kuA29QcKk11eXYWU9X7NFgExjmPDNWj5ptTA Diff:
OldNewDifferences
66 let k_vault_address = "k_vault_address"
77
88 let k_admin_address = "k_admin_address"
9-
10-let k_admin_public_key = "k_admin_public_key"
119
1210 let k_quote_asset = "k_quote_asset"
1311
4745 func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse \"" + address) + "\" as address")))
4846
4947
50-func adminPublicKey () = getStringValue(this, k_admin_public_key)
51-
52-
5348 func isNoAdmin () = (getString(this, k_admin_address) == unit)
5449
5550
5651 func admin () = addressFromStringValue(valueOrErrorMessage(getString(this, k_admin_address), "Admin not defined"))
5752
5853
59-func isNoAdminOrAdmin (i) = if (if (isNoAdmin())
54+func isNoAdminOrAdmin (i) = if (if (if (isNoAdmin())
55+ then (i.caller == this)
56+ else false)
6057 then true
6158 else (i.caller == admin()))
6259 then unit
6966
7067
7168 @Callable(i)
72-func setAdmin (_adminPublicKey) = valueOrElse(isNoAdminOrAdmin(i), {
73- let bytes = fromBase58String(_adminPublicKey)
74- let address = addressFromPublicKey(bytes)
75-[StringEntry(k_admin_address, toString(address)), StringEntry(k_admin_public_key, _adminPublicKey)]
69+func setAdmin (_adminAddress) = valueOrElse(isNoAdminOrAdmin(i), {
70+ let address = addressFromStringValue(_adminAddress)
71+[StringEntry(k_admin_address, toString(address))]
7672 })
7773
7874
217213
218214
219215 @Verifier(tx)
220-func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(adminPublicKey()))
216+func verify () = match getString(this, k_admin_address) {
217+ case verifier: String =>
218+ valueOrElse(getBoolean(addressFromStringValue(verifier), ((("status_" + toString(this)) + "_") + toBase58String(tx.id))), false)
219+ case _ =>
220+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
221+}
221222
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_vault_address = "k_vault_address"
77
88 let k_admin_address = "k_admin_address"
9-
10-let k_admin_public_key = "k_admin_public_key"
119
1210 let k_quote_asset = "k_quote_asset"
1311
1412 let k_quote_staking = "k_quote_staking"
1513
1614 let k_staking_address = "k_staking_address"
1715
1816 let k_farming_address = "k_farming_address"
1917
2018 let k_prizes_address = "k_prizes_address"
2119
2220 let k_housekeeper_address = "k_housekeeper_address"
2321
2422 let k_amm = "k_amm"
2523
2624 let k_amm_data = "k_amm_data"
2725
2826 let k_governance_asset = "k_gov_asset"
2927
3028 let k_miner_address = "k_miner_address"
3129
3230 let k_orders_address = "k_orders_address"
3331
3432 let k_referral_address = "k_referral_address"
3533
3634 let k_manager_address = "k_manager_address"
3735
3836 let k_nft_manager_address = "k_nft_manager_address"
3937
4038 let k_collateral_address = "k_collateral_address"
4139
4240 let k_exchange_address = "k_exchange_address"
4341
4442 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
4543
4644
4745 func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse \"" + address) + "\" as address")))
4846
4947
50-func adminPublicKey () = getStringValue(this, k_admin_public_key)
51-
52-
5348 func isNoAdmin () = (getString(this, k_admin_address) == unit)
5449
5550
5651 func admin () = addressFromStringValue(valueOrErrorMessage(getString(this, k_admin_address), "Admin not defined"))
5752
5853
59-func isNoAdminOrAdmin (i) = if (if (isNoAdmin())
54+func isNoAdminOrAdmin (i) = if (if (if (isNoAdmin())
55+ then (i.caller == this)
56+ else false)
6057 then true
6158 else (i.caller == admin()))
6259 then unit
6360 else throw("Only the Admin itself can invoke this function")
6461
6562
6663 func isAdmin (i) = if ((i.caller == admin()))
6764 then unit
6865 else throw("Only the Admin itself can invoke this function")
6966
7067
7168 @Callable(i)
72-func setAdmin (_adminPublicKey) = valueOrElse(isNoAdminOrAdmin(i), {
73- let bytes = fromBase58String(_adminPublicKey)
74- let address = addressFromPublicKey(bytes)
75-[StringEntry(k_admin_address, toString(address)), StringEntry(k_admin_public_key, _adminPublicKey)]
69+func setAdmin (_adminAddress) = valueOrElse(isNoAdminOrAdmin(i), {
70+ let address = addressFromStringValue(_adminAddress)
71+[StringEntry(k_admin_address, toString(address))]
7672 })
7773
7874
7975
8076 @Callable(i)
8177 func setInsuranceFund (_insuranceFund) = valueOrElse(isAdmin(i), {
8278 let address = getAddressIfValid(_insuranceFund)
8379 [StringEntry(k_insurance_address, address)]
8480 })
8581
8682
8783
8884 @Callable(i)
8985 func setLiquidityMiner (_liquidityMiner) = valueOrElse(isAdmin(i), {
9086 let address = getAddressIfValid(_liquidityMiner)
9187 [StringEntry(k_miner_address, address)]
9288 })
9389
9490
9591
9692 @Callable(i)
9793 func setOrders (_orders) = valueOrElse(isAdmin(i), {
9894 let address = getAddressIfValid(_orders)
9995 [StringEntry(k_orders_address, address)]
10096 })
10197
10298
10399
104100 @Callable(i)
105101 func setReferral (_referral) = valueOrElse(isAdmin(i), {
106102 let address = getAddressIfValid(_referral)
107103 [StringEntry(k_referral_address, address)]
108104 })
109105
110106
111107
112108 @Callable(i)
113109 func setFarming (_farming) = valueOrElse(isAdmin(i), {
114110 let address = getAddressIfValid(_farming)
115111 [StringEntry(k_farming_address, address)]
116112 })
117113
118114
119115
120116 @Callable(i)
121117 func setManager (_manager) = valueOrElse(isAdmin(i), {
122118 let address = getAddressIfValid(_manager)
123119 [StringEntry(k_manager_address, address)]
124120 })
125121
126122
127123
128124 @Callable(i)
129125 func setHousekeeper (_housekeeper) = valueOrElse(isAdmin(i), {
130126 let address = getAddressIfValid(_housekeeper)
131127 [StringEntry(k_housekeeper_address, address)]
132128 })
133129
134130
135131
136132 @Callable(i)
137133 func setPrizes (_prizes) = valueOrElse(isAdmin(i), {
138134 let address = getAddressIfValid(_prizes)
139135 [StringEntry(k_prizes_address, address)]
140136 })
141137
142138
143139
144140 @Callable(i)
145141 func setNftManager (_nftManager) = valueOrElse(isAdmin(i), {
146142 let address = getAddressIfValid(_nftManager)
147143 [StringEntry(k_nft_manager_address, address)]
148144 })
149145
150146
151147
152148 @Callable(i)
153149 func setQuoteAsset (_assetId,_stakingAddress) = valueOrElse(isAdmin(i), {
154150 let stakingAddress = getAddressIfValid(_stakingAddress)
155151 [StringEntry(k_quote_asset, _assetId), StringEntry(k_quote_staking, _stakingAddress)]
156152 })
157153
158154
159155
160156 @Callable(i)
161157 func setStakingAddress (_stakingAddress) = valueOrElse(isAdmin(i), {
162158 let stakingAddress = getAddressIfValid(_stakingAddress)
163159 [StringEntry(k_staking_address, _stakingAddress)]
164160 })
165161
166162
167163
168164 @Callable(i)
169165 func setCollateralAddress (_collateralAddress) = valueOrElse(isAdmin(i), {
170166 let collateralAddress = getAddressIfValid(_collateralAddress)
171167 [StringEntry(k_collateral_address, _collateralAddress)]
172168 })
173169
174170
175171
176172 @Callable(i)
177173 func setExchangeAddress (_exchangeAddress) = valueOrElse(isAdmin(i), {
178174 let exchangeAddress = getAddressIfValid(_exchangeAddress)
179175 [StringEntry(k_exchange_address, _exchangeAddress)]
180176 })
181177
182178
183179
184180 @Callable(i)
185181 func setVaultAddress (_vaultAddress) = valueOrElse(isAdmin(i), {
186182 let exchangeAddress = getAddressIfValid(_vaultAddress)
187183 [StringEntry(k_vault_address, _vaultAddress)]
188184 })
189185
190186
191187
192188 @Callable(i)
193189 func addAmm (_ammAddress,_data) = valueOrElse(isAdmin(i), {
194190 let ammAddress = getAddressIfValid(_ammAddress)
195191 [BooleanEntry(toCompositeKey(k_amm, _ammAddress), true), StringEntry(toCompositeKey(k_amm_data, _ammAddress), _data)]
196192 })
197193
198194
199195
200196 @Callable(i)
201197 func removeAmm (_ammAddress) = valueOrElse(isAdmin(i), [DeleteEntry(toCompositeKey(k_amm, _ammAddress))])
202198
203199
204200
205201 @Callable(i)
206202 func setGovernanceAsset (_assetId) = valueOrElse(isAdmin(i), {
207203 let assetBytes = fromBase58String(_assetId)
208204 match assetInfo(assetBytes) {
209205 case asset: Asset =>
210206 if ((asset.decimals != 8))
211207 then throw("Invalid asset decimals, should be 8")
212208 else [StringEntry(k_governance_asset, _assetId)]
213209 case _ =>
214210 throw("Can't find asset")
215211 }
216212 })
217213
218214
219215 @Verifier(tx)
220-func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(adminPublicKey()))
216+func verify () = match getString(this, k_admin_address) {
217+ case verifier: String =>
218+ valueOrElse(getBoolean(addressFromStringValue(verifier), ((("status_" + toString(this)) + "_") + toBase58String(tx.id))), false)
219+ case _ =>
220+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
221+}
221222

github/deemru/w8io/026f985 
54.30 ms