tx · A3mnHrz5EAHBdCBSS3ZV2Rm3q7dFFkrRjcNoV3M3NSkU

3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ:  -0.03400000 Waves

2023.03.06 22:41 [2478659] smart account 3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ > SELF 0.00000000 Waves

{ "type": 13, "id": "A3mnHrz5EAHBdCBSS3ZV2Rm3q7dFFkrRjcNoV3M3NSkU", "fee": 3400000, "feeAssetId": null, "timestamp": 1678131668686, "version": 2, "chainId": 84, "sender": "3MxXA443AARoS3rQ9RNdPeBur74yBTCTyxJ", "senderPublicKey": "Dhf95pPhxwKtWsqgf6tyeDW2xpQA7TvM8nTwbwgqKjkd", "proofs": [ "4ATw6Cjy73U34Y6oCSTThrJCTJJr9gxtsZjji46QNCBRuU5BPmAGLGJQ4yB3uyUgg95PhSeDQA2YwtvXBHFJQTVb" ], "script": "base64:BgJiCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSAwoBCBIECgIICBIDCgEIEgMKAQgZABNrX2luc3VyYW5jZV9hZGRyZXNzAhNrX2luc3VyYW5jZV9hZGRyZXNzAA9rX3ZhdWx0X2FkZHJlc3MCD2tfdmF1bHRfYWRkcmVzcwAPa19hZG1pbl9hZGRyZXNzAg9rX2FkbWluX2FkZHJlc3MADWtfcXVvdGVfYXNzZXQCDWtfcXVvdGVfYXNzZXQADmtfcmV3YXJkX2Fzc2V0Ag5rX3Jld2FyZF9hc3NldAAOa19zd2FwX2FkZHJlc3MCDmtfc3dhcF9hZGRyZXNzABFrX3N0YWtpbmdfYWRkcmVzcwIRa19zdGFraW5nX2FkZHJlc3MAEWtfZmFybWluZ19hZGRyZXNzAhFrX2Zhcm1pbmdfYWRkcmVzcwAQa19wcml6ZXNfYWRkcmVzcwIQa19wcml6ZXNfYWRkcmVzcwAVa19ob3VzZWtlZXBlc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NuaWwJAAIBAhBDYW4ndCBmaW5kIGFzc2V0AQJ0eAEGdmVyaWZ5AAQHJG1hdGNoMAkAnQgCBQR0aGlzBQ9rX2FkbWluX2FkZHJlc3MDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAh2ZXJpZmllcgUHJG1hdGNoMAkBC3ZhbHVlT3JFbHNlAgkAmwgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQh2ZXJpZmllcgkArAICCQCsAgIJAKwCAgIHc3RhdHVzXwkApQgBBQR0aGlzAgFfCQDYBAEIBQJ0eAJpZAcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmJcs8p", "height": 2478659, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gq3wnqz1kuA29QcKk11eXYWU9X7NFgExjmPDNWj5ptTA Next: BCFxDKf8SdvMJgTPVuQite3YhH73AJS2MbE1KdbVPjJV Diff:
OldNewDifferences
3737
3838 let k_nft_manager_address = "k_nft_manager_address"
3939
40-let k_collateral_address = "k_collateral_address"
41-
42-let k_exchange_address = "k_exchange_address"
40+let k_child = "k_child"
4341
4442 func toCompositeKey (_key,_address) = ((_key + "_") + _address)
4543
174172
175173
176174 @Callable(i)
177-func setCollateralAddress (_collateralAddress) = valueOrElse(isAdmin(i), {
178- let collateralAddress = getAddressIfValid(_collateralAddress)
179-[StringEntry(k_collateral_address, _collateralAddress)]
175+func setVaultAddress (_vaultAddress) = valueOrElse(isAdmin(i), {
176+ let exchangeAddress = getAddressIfValid(_vaultAddress)
177+[StringEntry(k_vault_address, _vaultAddress)]
180178 })
181179
182180
183181
184182 @Callable(i)
185-func setExchangeAddress (_exchangeAddress) = valueOrElse(isAdmin(i), {
186- let exchangeAddress = getAddressIfValid(_exchangeAddress)
187-[StringEntry(k_exchange_address, _exchangeAddress)]
188- })
189-
190-
191-
192-@Callable(i)
193-func setVaultAddress (_vaultAddress) = valueOrElse(isAdmin(i), {
194- let exchangeAddress = getAddressIfValid(_vaultAddress)
195-[StringEntry(k_vault_address, _vaultAddress)]
183+func addChild (_childAddress) = valueOrElse(isAdmin(i), {
184+ let childAddress = getAddressIfValid(_childAddress)
185+[BooleanEntry(toCompositeKey(k_child, _childAddress), true)]
196186 })
197187
198188
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"
99
1010 let k_quote_asset = "k_quote_asset"
1111
1212 let k_reward_asset = "k_reward_asset"
1313
1414 let k_swap_address = "k_swap_address"
1515
1616 let k_staking_address = "k_staking_address"
1717
1818 let k_farming_address = "k_farming_address"
1919
2020 let k_prizes_address = "k_prizes_address"
2121
2222 let k_housekeeper_address = "k_housekeeper_address"
2323
2424 let k_amm = "k_amm"
2525
2626 let k_amm_data = "k_amm_data"
2727
2828 let k_governance_asset = "k_gov_asset"
2929
3030 let k_miner_address = "k_miner_address"
3131
3232 let k_orders_address = "k_orders_address"
3333
3434 let k_referral_address = "k_referral_address"
3535
3636 let k_manager_address = "k_manager_address"
3737
3838 let k_nft_manager_address = "k_nft_manager_address"
3939
40-let k_collateral_address = "k_collateral_address"
41-
42-let k_exchange_address = "k_exchange_address"
40+let k_child = "k_child"
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
5048 func isNoAdmin () = (getString(this, k_admin_address) == unit)
5149
5250
5351 func admin () = addressFromStringValue(valueOrErrorMessage(getString(this, k_admin_address), "Admin not defined"))
5452
5553
5654 func isNoAdminOrAdmin (i) = if (if (if (isNoAdmin())
5755 then (i.caller == this)
5856 else false)
5957 then true
6058 else (i.caller == admin()))
6159 then unit
6260 else throw("Only the Admin itself can invoke this function")
6361
6462
6563 func isAdmin (i) = if ((i.caller == admin()))
6664 then unit
6765 else throw("Only the Admin itself can invoke this function")
6866
6967
7068 @Callable(i)
7169 func setAdmin (_adminAddress) = valueOrElse(isNoAdminOrAdmin(i), {
7270 let address = addressFromStringValue(_adminAddress)
7371 [StringEntry(k_admin_address, toString(address))]
7472 })
7573
7674
7775
7876 @Callable(i)
7977 func setInsuranceFund (_insuranceFund) = valueOrElse(isAdmin(i), {
8078 let address = getAddressIfValid(_insuranceFund)
8179 [StringEntry(k_insurance_address, address)]
8280 })
8381
8482
8583
8684 @Callable(i)
8785 func setLiquidityMiner (_liquidityMiner) = valueOrElse(isAdmin(i), {
8886 let address = getAddressIfValid(_liquidityMiner)
8987 [StringEntry(k_miner_address, address)]
9088 })
9189
9290
9391
9492 @Callable(i)
9593 func setOrders (_orders) = valueOrElse(isAdmin(i), {
9694 let address = getAddressIfValid(_orders)
9795 [StringEntry(k_orders_address, address)]
9896 })
9997
10098
10199
102100 @Callable(i)
103101 func setReferral (_referral) = valueOrElse(isAdmin(i), {
104102 let address = getAddressIfValid(_referral)
105103 [StringEntry(k_referral_address, address)]
106104 })
107105
108106
109107
110108 @Callable(i)
111109 func setFarming (_farming) = valueOrElse(isAdmin(i), {
112110 let address = getAddressIfValid(_farming)
113111 [StringEntry(k_farming_address, address)]
114112 })
115113
116114
117115
118116 @Callable(i)
119117 func setManager (_manager) = valueOrElse(isAdmin(i), {
120118 let address = getAddressIfValid(_manager)
121119 [StringEntry(k_manager_address, address)]
122120 })
123121
124122
125123
126124 @Callable(i)
127125 func setHousekeeper (_housekeeper) = valueOrElse(isAdmin(i), {
128126 let address = getAddressIfValid(_housekeeper)
129127 [StringEntry(k_housekeeper_address, address)]
130128 })
131129
132130
133131
134132 @Callable(i)
135133 func setPrizes (_prizes) = valueOrElse(isAdmin(i), {
136134 let address = getAddressIfValid(_prizes)
137135 [StringEntry(k_prizes_address, address)]
138136 })
139137
140138
141139
142140 @Callable(i)
143141 func setNftManager (_nftManager) = valueOrElse(isAdmin(i), {
144142 let address = getAddressIfValid(_nftManager)
145143 [StringEntry(k_nft_manager_address, address)]
146144 })
147145
148146
149147
150148 @Callable(i)
151149 func setSwap (_swap) = valueOrElse(isAdmin(i), {
152150 let address = getAddressIfValid(_swap)
153151 [StringEntry(k_swap_address, address)]
154152 })
155153
156154
157155
158156 @Callable(i)
159157 func setQuoteAsset (_assetId) = valueOrElse(isAdmin(i), [StringEntry(k_quote_asset, _assetId)])
160158
161159
162160
163161 @Callable(i)
164162 func setRewardAsset (_assetId) = valueOrElse(isAdmin(i), [StringEntry(k_reward_asset, _assetId)])
165163
166164
167165
168166 @Callable(i)
169167 func setStakingAddress (_stakingAddress) = valueOrElse(isAdmin(i), {
170168 let stakingAddress = getAddressIfValid(_stakingAddress)
171169 [StringEntry(k_staking_address, _stakingAddress)]
172170 })
173171
174172
175173
176174 @Callable(i)
177-func setCollateralAddress (_collateralAddress) = valueOrElse(isAdmin(i), {
178- let collateralAddress = getAddressIfValid(_collateralAddress)
179-[StringEntry(k_collateral_address, _collateralAddress)]
175+func setVaultAddress (_vaultAddress) = valueOrElse(isAdmin(i), {
176+ let exchangeAddress = getAddressIfValid(_vaultAddress)
177+[StringEntry(k_vault_address, _vaultAddress)]
180178 })
181179
182180
183181
184182 @Callable(i)
185-func setExchangeAddress (_exchangeAddress) = valueOrElse(isAdmin(i), {
186- let exchangeAddress = getAddressIfValid(_exchangeAddress)
187-[StringEntry(k_exchange_address, _exchangeAddress)]
188- })
189-
190-
191-
192-@Callable(i)
193-func setVaultAddress (_vaultAddress) = valueOrElse(isAdmin(i), {
194- let exchangeAddress = getAddressIfValid(_vaultAddress)
195-[StringEntry(k_vault_address, _vaultAddress)]
183+func addChild (_childAddress) = valueOrElse(isAdmin(i), {
184+ let childAddress = getAddressIfValid(_childAddress)
185+[BooleanEntry(toCompositeKey(k_child, _childAddress), true)]
196186 })
197187
198188
199189
200190 @Callable(i)
201191 func addAmm (_ammAddress,_data) = valueOrElse(isAdmin(i), {
202192 let ammAddress = getAddressIfValid(_ammAddress)
203193 [BooleanEntry(toCompositeKey(k_amm, _ammAddress), true), StringEntry(toCompositeKey(k_amm_data, _ammAddress), _data)]
204194 })
205195
206196
207197
208198 @Callable(i)
209199 func removeAmm (_ammAddress) = valueOrElse(isAdmin(i), [DeleteEntry(toCompositeKey(k_amm, _ammAddress))])
210200
211201
212202
213203 @Callable(i)
214204 func setGovernanceAsset (_assetId) = valueOrElse(isAdmin(i), {
215205 let assetBytes = fromBase58String(_assetId)
216206 match assetInfo(assetBytes) {
217207 case asset: Asset =>
218208 if ((asset.decimals != 8))
219209 then throw("Invalid asset decimals, should be 8")
220210 else [StringEntry(k_governance_asset, _assetId)]
221211 case _ =>
222212 throw("Can't find asset")
223213 }
224214 })
225215
226216
227217 @Verifier(tx)
228218 func verify () = match getString(this, k_admin_address) {
229219 case verifier: String =>
230220 valueOrElse(getBoolean(addressFromStringValue(verifier), ((("status_" + toString(this)) + "_") + toBase58String(tx.id))), false)
231221 case _ =>
232222 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
233223 }
234224

github/deemru/w8io/169f3d6 
52.92 ms