From 28030df5ccb24ccbc22a38044954c6e626259665 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Wed, 31 Jul 2024 00:26:10 +0300 Subject: [PATCH] legacy contracts sc error text change --- legacy-contracts/farm-v12/src/lib.rs | 72 +++++++++--------- .../farm-v13-custom-rewards/src/lib.rs | 76 +++++++++---------- .../farm-v13-locked-rewards/src/lib.rs | 36 ++++----- legacy-contracts/farm-v13/src/lib.rs | 44 +++++------ .../price-discovery-v1/src/lib.rs | 14 ++-- .../price-discovery-v2/src/lib.rs | 14 ++-- 6 files changed, 128 insertions(+), 128 deletions(-) diff --git a/legacy-contracts/farm-v12/src/lib.rs b/legacy-contracts/farm-v12/src/lib.rs index 2623c773f..c126c2135 100644 --- a/legacy-contracts/farm-v12/src/lib.rs +++ b/legacy-contracts/farm-v12/src/lib.rs @@ -22,7 +22,7 @@ pub trait FarmV12 { #[payable("*")] #[endpoint(acceptFee)] fn accept_fee(&self, _token_in: TokenIdentifier, _amount: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(calculateRewardsForGivenPosition)] @@ -31,12 +31,12 @@ pub trait FarmV12 { _amount: BigUint, _attributes_raw: ManagedBuffer, ) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(end_produce_rewards_as_owner)] fn end_produce_rewards_as_owner(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -45,167 +45,167 @@ pub trait FarmV12 { &self, _opt_accept_funds_func: OptionalValue, ) -> ExitFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getBurnedTokenAmount)] fn burned_tokens(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getCurrentBlockFee)] fn current_block_fee_storage(&self) -> Option<(Nonce, BigUint)> { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getDivisionSafetyConstant)] fn division_safety_constant(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmTokenId)] fn farm_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmTokenSupply)] fn get_farm_token_supply(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmingTokenId)] fn farming_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmingTokenReserve)] fn farming_token_reserve(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLastErrorMessage)] fn last_error_message(&self) -> ManagedBuffer { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLastRewardBlockNonce)] fn last_reward_block_nonce(&self) -> Nonce { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLockedAssetFactoryManagedAddress)] fn locked_asset_factory_address(&self) -> ManagedAddress { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLockedRewardAprMuliplier)] fn locked_rewards_apr_multiplier(&self) -> u8 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getMinimumFarmingEpoch)] fn minimum_farming_epoch(&self) -> u8 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getOwner)] fn owner(&self) -> ManagedAddress { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getPairContractManagedAddress)] fn pair_contract_address(&self) -> ManagedAddress { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getPenaltyPercent)] fn penalty_percent(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getPerBlockRewardAmount)] fn per_block_reward_amount(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardPerShare)] fn reward_per_share(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardReserve)] fn reward_reserve(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardTokenId)] fn reward_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRouterManagedAddress)] fn router_address(&self) -> ManagedAddress { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getState)] fn state(&self) -> State { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getTransferExecGasLimit)] fn transfer_exec_gas_limit(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getUndistributedFees)] fn undistributed_fee_storage(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(pause)] fn pause(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(resume)] fn resume(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setPerBlockRewardAmount)] fn set_per_block_reward_amount(&self, _per_block_amount: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setTransferRoleFarmToken)] fn set_transfer_role_farm_token(&self, _opt_address: OptionalValue) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_locked_rewards_apr_multiplier)] fn set_locked_rewards_apr_multiplier(&self, _muliplier: u8) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_minimum_farming_epochs)] fn set_minimum_farming_epochs(&self, _epochs: u8) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_penalty_percent)] fn set_penalty_percent(&self, _percent: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_transfer_exec_gas_limit)] fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(start_produce_rewards)] fn start_produce_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } } diff --git a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs index 81a4d4e5a..4708be991 100644 --- a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs +++ b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs @@ -34,7 +34,7 @@ pub trait FarmV13LockedRewards { #[only_owner] #[endpoint(addAddressToWhitelist)] fn add_address_to_whitelist(&self, _address: ManagedAddress) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(calculateRewardsForGivenPosition)] @@ -43,7 +43,7 @@ pub trait FarmV13LockedRewards { _amount: BigUint, _attributes: FarmTokenAttributes, ) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -52,19 +52,19 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> ClaimRewardsResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[payable("*")] #[endpoint(depositRewards)] fn deposit_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(end_produce_rewards)] fn end_produce_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -73,7 +73,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> EnterFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -82,97 +82,97 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> ExitFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getBlockForEndRewards)] fn block_for_end_rewards(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getBurnGasLimit)] fn burn_gas_limit(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getDivisionSafetyConstant)] fn division_safety_constant(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmTokenId)] fn farm_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmTokenSupply)] fn farm_token_supply(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmingTokenId)] fn farming_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLastErrorMessage)] fn last_error_message(&self) -> ManagedBuffer { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLastRewardBlockNonce)] fn last_reward_block_nonce(&self) -> Nonce { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getMinimumFarmingEpoch)] fn minimum_farming_epochs(&self) -> u8 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getOwner)] fn owner(&self) -> ManagedAddress { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getPenaltyPercent)] fn penalty_percent(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getPerBlockRewardAmount)] fn per_block_reward_amount(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardPerShare)] fn reward_per_share(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardReserve)] fn reward_reserve(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardTokenId)] fn reward_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getState)] fn state(&self) -> State { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getTransferExecGasLimit)] fn transfer_exec_gas_limit(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getWhitelist)] fn whitelist(&self) -> UnorderedSetMapper { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -181,12 +181,12 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(pause)] fn pause(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("EGLD")] @@ -197,58 +197,58 @@ pub trait FarmV13LockedRewards { _token_ticker: ManagedBuffer, _num_decimals: usize, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(removeAddressFromWhitelist)] fn remove_address_from_whitelist(&self, _address: ManagedAddress) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(resume)] fn resume(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setBlockForEndRewards)] fn set_block_for_end_rewards(&self, _block_end: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setLocalRolesFarmToken)] fn set_local_roles_farm_token(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setPerBlockRewardAmount)] fn set_per_block_reward_amount(&self, _per_block_amount: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_burn_gas_limit)] fn set_burn_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_minimum_farming_epochs)] fn set_minimum_farming_epochs(&self, _epochs: u8) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_penalty_percent)] fn set_penalty_percent(&self, _percent: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_transfer_exec_gas_limit)] fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(startProduceRewards)] fn start_produce_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } } diff --git a/legacy-contracts/farm-v13-locked-rewards/src/lib.rs b/legacy-contracts/farm-v13-locked-rewards/src/lib.rs index 7dc899f89..af7864b21 100644 --- a/legacy-contracts/farm-v13-locked-rewards/src/lib.rs +++ b/legacy-contracts/farm-v13-locked-rewards/src/lib.rs @@ -73,7 +73,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> ExitFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -82,7 +82,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(calculateRewardsForGivenPosition)] @@ -91,71 +91,71 @@ pub trait FarmV13LockedRewards { _amount: BigUint, _attributes: FarmTokenAttributes, ) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn end_produce_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setPerBlockRewardAmount)] fn set_per_block_rewards(&self, _per_block_amount: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_penalty_percent(&self, _percent: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_minimum_farming_epochs(&self, _epochs: u8) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_burn_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setRpsAndStartRewards)] fn set_rps_and_start_rewards(&self, _rps: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn pause(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn resume(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(startProduceRewards)] fn start_produce_rewards_as_owner(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setFarmTokenSupply)] fn set_farm_token_supply(&self, _supply: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -167,7 +167,7 @@ pub trait FarmV13LockedRewards { _new_farm_address: ManagedAddress, _new_farm_with_lock_address: ManagedAddress, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -179,13 +179,13 @@ pub trait FarmV13LockedRewards { _token_ticker: ManagedBuffer, _num_decimals: usize, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setLocalRolesFarmToken)] fn set_local_roles_farm_token(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -195,7 +195,7 @@ pub trait FarmV13LockedRewards { _old_attrs: FarmTokenAttributesV1_2, _orig_caller: ManagedAddress, ) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmMigrationConfiguration)] diff --git a/legacy-contracts/farm-v13/src/lib.rs b/legacy-contracts/farm-v13/src/lib.rs index 204a3cfb1..047d6923a 100644 --- a/legacy-contracts/farm-v13/src/lib.rs +++ b/legacy-contracts/farm-v13/src/lib.rs @@ -77,7 +77,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> EnterFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -86,7 +86,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> ExitFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -95,7 +95,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> ClaimRewardsResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -104,7 +104,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> CompoundRewardsResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -113,7 +113,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(calculateRewardsForGivenPosition)] @@ -122,66 +122,66 @@ pub trait FarmV13LockedRewards { _amount: BigUint, _attributes: FarmTokenAttributes, ) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn end_produce_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setPerBlockRewardAmount)] fn set_per_block_rewards(&self, _per_block_amount: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_penalty_percent(&self, _percent: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_minimum_farming_epochs(&self, _epochs: u8) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_burn_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn pause(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn resume(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(startProduceRewards)] fn start_produce_rewards_as_owner(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } - + #[only_owner] #[endpoint(setFarmTokenSupply)] fn set_farm_token_supply(&self, _supply: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -193,7 +193,7 @@ pub trait FarmV13LockedRewards { _new_farm_address: ManagedAddress, _new_farm_with_lock_address: ManagedAddress, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -205,18 +205,18 @@ pub trait FarmV13LockedRewards { _token_ticker: ManagedBuffer, _num_decimals: usize, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setLocalRolesFarmToken)] fn set_local_roles_farm_token(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setRpsAndStartRewards)] fn set_rps_and_start_rewards(&self, _rps: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -226,7 +226,7 @@ pub trait FarmV13LockedRewards { _old_attrs: FarmTokenAttributesV1_2, _orig_caller: ManagedAddress, ) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmMigrationConfiguration)] diff --git a/legacy-contracts/price-discovery-v1/src/lib.rs b/legacy-contracts/price-discovery-v1/src/lib.rs index 1f4852e54..065cfecec 100644 --- a/legacy-contracts/price-discovery-v1/src/lib.rs +++ b/legacy-contracts/price-discovery-v1/src/lib.rs @@ -20,29 +20,29 @@ pub trait PriceDiscoveryV1 { #[payable("*")] #[endpoint] fn deposit(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] #[endpoint] fn withdraw(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] #[endpoint] fn redeem(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getCurrentPrice)] fn calculate_price(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getCurrentPhase)] fn get_current_phase(&self) -> Phase { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -54,13 +54,13 @@ pub trait PriceDiscoveryV1 { _token_ticker: ManagedBuffer, _nr_decimals: usize, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(createInitialRedeemTokens)] fn create_initial_redeem_tokens(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLaunchedTokenId)] diff --git a/legacy-contracts/price-discovery-v2/src/lib.rs b/legacy-contracts/price-discovery-v2/src/lib.rs index 77563ae78..cf63515a3 100644 --- a/legacy-contracts/price-discovery-v2/src/lib.rs +++ b/legacy-contracts/price-discovery-v2/src/lib.rs @@ -20,29 +20,29 @@ pub trait PriceDiscoveryV2 { #[payable("*")] #[endpoint] fn deposit(&self) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] #[endpoint] fn withdraw(&self) -> EgldOrEsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] #[endpoint] fn redeem(&self) -> EgldOrEsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getCurrentPrice)] fn calculate_price(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getCurrentPhase)] fn get_current_phase(&self) -> Phase { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -54,13 +54,13 @@ pub trait PriceDiscoveryV2 { _token_ticker: ManagedBuffer, _nr_decimals: usize, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(createInitialRedeemTokens)] fn create_initial_redeem_tokens(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLaunchedTokenId)]