diff --git a/common/modules/farm/config/src/config.rs b/common/modules/farm/config/src/config.rs index 1f26eed6a..88858153e 100644 --- a/common/modules/farm/config/src/config.rs +++ b/common/modules/farm/config/src/config.rs @@ -11,12 +11,6 @@ pub const DEFAULT_FARM_POSITION_MIGRATION_NONCE: u64 = 1; #[multiversx_sc::module] pub trait ConfigModule: pausable::PausableModule + permissions_module::PermissionsModule { - #[endpoint(setAllowExternalClaimBoostedRewards)] - fn set_allow_external_claim(&self, allow_external_claim: bool) { - let caller = self.blockchain().get_caller(); - self.allow_external_claim(&caller).set(allow_external_claim); - } - #[inline] fn is_active(&self) -> bool { let state = self.state().get(); @@ -77,6 +71,7 @@ pub trait ConfigModule: pausable::PausableModule + permissions_module::Permissio #[storage_mapper("userTotalFarmPosition")] fn user_total_farm_position(&self, user: &ManagedAddress) -> SingleValueMapper; + // Update for this storage disabled for this version of the exchange #[view(getAllowExternalClaim)] #[storage_mapper("allowExternalClaim")] fn allow_external_claim(&self, user: &ManagedAddress) -> SingleValueMapper; diff --git a/dex/farm-with-locked-rewards/wasm/src/lib.rs b/dex/farm-with-locked-rewards/wasm/src/lib.rs index 9efe33713..e8aa3099f 100644 --- a/dex/farm-with-locked-rewards/wasm/src/lib.rs +++ b/dex/farm-with-locked-rewards/wasm/src/lib.rs @@ -6,9 +6,9 @@ // Init: 1 // Upgrade: 1 -// Endpoints: 67 +// Endpoints: 66 // Async Callback: 1 -// Total number of exported functions: 70 +// Total number of exported functions: 69 #![no_std] @@ -32,7 +32,6 @@ multiversx_sc_wasm_adapter::endpoints! { calculateRewardsForGivenPosition => calculate_rewards_for_given_position getRewardPerShare => reward_per_share getRewardReserve => reward_reserve - setAllowExternalClaimBoostedRewards => set_allow_external_claim getFarmingTokenId => farming_token_id getRewardTokenId => reward_token_id getPerBlockRewardAmount => per_block_reward_amount diff --git a/dex/farm/wasm/src/lib.rs b/dex/farm/wasm/src/lib.rs index a4b92d26e..525d76239 100644 --- a/dex/farm/wasm/src/lib.rs +++ b/dex/farm/wasm/src/lib.rs @@ -6,9 +6,9 @@ // Init: 1 // Upgrade: 1 -// Endpoints: 64 +// Endpoints: 63 // Async Callback: 1 -// Total number of exported functions: 67 +// Total number of exported functions: 66 #![no_std] @@ -33,7 +33,6 @@ multiversx_sc_wasm_adapter::endpoints! { calculateRewardsForGivenPosition => calculate_rewards_for_given_position getRewardPerShare => reward_per_share getRewardReserve => reward_reserve - setAllowExternalClaimBoostedRewards => set_allow_external_claim getFarmingTokenId => farming_token_id getRewardTokenId => reward_token_id getPerBlockRewardAmount => per_block_reward_amount diff --git a/energy-integration/fees-collector/src/config.rs b/energy-integration/fees-collector/src/config.rs index a21dc6d6b..72fa1fc70 100644 --- a/energy-integration/fees-collector/src/config.rs +++ b/energy-integration/fees-collector/src/config.rs @@ -60,13 +60,6 @@ pub trait ConfigModule { self.all_tokens().set(&all_tokens_vec); } - #[endpoint(setAllowExternalClaimRewards)] - fn set_allow_external_claim_rewards(&self, allow_external_claim_rewards: bool) { - let caller = self.blockchain().get_caller(); - self.allow_external_claim_rewards(&caller) - .set(allow_external_claim_rewards); - } - #[view(getLockedTokenId)] #[storage_mapper("lockedTokenId")] fn locked_token_id(&self) -> SingleValueMapper; @@ -86,6 +79,7 @@ pub trait ConfigModule { #[storage_mapper("allTokens")] fn all_tokens(&self) -> SingleValueMapper>; + // Update for this storage disabled for this version of the exchange #[view(getAllowExternalClaimRewards)] #[storage_mapper("allowExternalClaimRewards")] fn allow_external_claim_rewards(&self, user: &ManagedAddress) -> SingleValueMapper; diff --git a/energy-integration/fees-collector/wasm/src/lib.rs b/energy-integration/fees-collector/wasm/src/lib.rs index 283f21a67..77034bd4a 100644 --- a/energy-integration/fees-collector/wasm/src/lib.rs +++ b/energy-integration/fees-collector/wasm/src/lib.rs @@ -6,9 +6,9 @@ // Init: 1 // Upgrade: 1 -// Endpoints: 38 +// Endpoints: 37 // Async Callback (empty): 1 -// Total number of exported functions: 41 +// Total number of exported functions: 40 #![no_std] @@ -26,7 +26,6 @@ multiversx_sc_wasm_adapter::endpoints! { removeKnownContracts => remove_known_contracts addKnownTokens => add_known_tokens removeKnownTokens => remove_known_tokens - setAllowExternalClaimRewards => set_allow_external_claim_rewards getLockedTokenId => locked_token_id getAllTokens => get_all_tokens getAllKnownContracts => known_contracts diff --git a/farm-staking/farm-staking-proxy/tests/staking_farm_with_lp.rs b/farm-staking/farm-staking-proxy/tests/staking_farm_with_lp.rs index 1321443ee..50b62cb93 100644 --- a/farm-staking/farm-staking-proxy/tests/staking_farm_with_lp.rs +++ b/farm-staking/farm-staking-proxy/tests/staking_farm_with_lp.rs @@ -773,7 +773,8 @@ fn claim_for_others_positive_test() { &setup.lp_farm_wrapper, &rust_biguint!(0), |sc| { - sc.set_allow_external_claim(true); + sc.allow_external_claim(&managed_address!(&user_address)) + .set(true); }, ) .assert_ok(); @@ -785,7 +786,8 @@ fn claim_for_others_positive_test() { &setup.staking_farm_wrapper, &rust_biguint!(0), |sc| { - sc.set_allow_external_claim(true); + sc.allow_external_claim(&managed_address!(&user_address)) + .set(true); }, ) .assert_ok(); diff --git a/farm-staking/farm-staking/tests/farm_staking_setup/mod.rs b/farm-staking/farm-staking/tests/farm_staking_setup/mod.rs index 0d0cd74f4..90513e2d6 100644 --- a/farm-staking/farm-staking/tests/farm_staking_setup/mod.rs +++ b/farm-staking/farm-staking/tests/farm_staking_setup/mod.rs @@ -569,7 +569,8 @@ where pub fn allow_external_claim_rewards(&mut self, user: &Address, allow_claim: bool) { self.b_mock .execute_tx(user, &self.farm_wrapper, &rust_biguint!(0), |sc| { - sc.set_allow_external_claim(allow_claim); + sc.allow_external_claim(&managed_address!(user)) + .set(allow_claim); }) .assert_ok(); } diff --git a/farm-staking/farm-staking/wasm/src/lib.rs b/farm-staking/farm-staking/wasm/src/lib.rs index a5dfd5522..9489b1d7e 100644 --- a/farm-staking/farm-staking/wasm/src/lib.rs +++ b/farm-staking/farm-staking/wasm/src/lib.rs @@ -6,9 +6,9 @@ // Init: 1 // Upgrade: 1 -// Endpoints: 70 +// Endpoints: 69 // Async Callback: 1 -// Total number of exported functions: 73 +// Total number of exported functions: 72 #![no_std] @@ -36,7 +36,6 @@ multiversx_sc_wasm_adapter::endpoints! { getMinUnbondEpochs => min_unbond_epochs getRewardPerShare => reward_per_share getRewardReserve => reward_reserve - setAllowExternalClaimBoostedRewards => set_allow_external_claim getFarmingTokenId => farming_token_id getRewardTokenId => reward_token_id getPerBlockRewardAmount => per_block_reward_amount