From 33fde01d3c7666357906c876c9c4e98982f468b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Fri, 14 Jun 2024 17:06:03 +0300 Subject: [PATCH] Fix rebranding issues on legacy contract --- legacy-contracts/farm-staking-proxy-v1.3/meta/src/main.rs | 2 +- .../farm-staking-proxy-v1.3/src/custom_rewards.rs | 6 +++--- .../farm-staking-proxy-v1.3/src/farm_token_merge.rs | 6 +++--- legacy-contracts/farm-staking-proxy-v1.3/src/lib.rs | 6 +++--- legacy-contracts/farm-staking-proxy-v1.3/src/whitelist.rs | 4 ++-- .../farm-staking-proxy-v1.3/tests/farm_staking_test.rs | 6 +++--- legacy-contracts/farm-staking-proxy-v1.3/wasm/src/lib.rs | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/legacy-contracts/farm-staking-proxy-v1.3/meta/src/main.rs b/legacy-contracts/farm-staking-proxy-v1.3/meta/src/main.rs index c43e5beb5..de7773d55 100644 --- a/legacy-contracts/farm-staking-proxy-v1.3/meta/src/main.rs +++ b/legacy-contracts/farm-staking-proxy-v1.3/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - elrond_wasm_debug::meta::perform::(); + multiversx_sc_meta::cli_main::(); } diff --git a/legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs b/legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs index 26a98c9ea..34bfa95e1 100644 --- a/legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs +++ b/legacy-contracts/farm-staking-proxy-v1.3/src/custom_rewards.rs @@ -1,12 +1,12 @@ -elrond_wasm::imports!(); -elrond_wasm::derive_imports!(); +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); use common_structs_old::Nonce; use config::MAX_PERCENT; pub const BLOCKS_IN_YEAR: u64 = 31_536_000 / 6; // seconds_in_year / 6_seconds_per_block -#[elrond_wasm::module] +#[multiversx_sc::module] pub trait CustomRewardsModule: config::ConfigModule + token_send::TokenSendModule + farm_token::FarmTokenModule { diff --git a/legacy-contracts/farm-staking-proxy-v1.3/src/farm_token_merge.rs b/legacy-contracts/farm-staking-proxy-v1.3/src/farm_token_merge.rs index fc8918b77..25dd4e41e 100644 --- a/legacy-contracts/farm-staking-proxy-v1.3/src/farm_token_merge.rs +++ b/legacy-contracts/farm-staking-proxy-v1.3/src/farm_token_merge.rs @@ -1,5 +1,5 @@ -elrond_wasm::imports!(); -elrond_wasm::derive_imports!(); +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); use token_merge_old::ValueWeight; @@ -26,7 +26,7 @@ pub struct StakingFarmToken { pub attributes: StakingFarmTokenAttributes, } -#[elrond_wasm::module] +#[multiversx_sc::module] pub trait FarmTokenMergeModule: token_send::TokenSendModule + farm_token::FarmTokenModule diff --git a/legacy-contracts/farm-staking-proxy-v1.3/src/lib.rs b/legacy-contracts/farm-staking-proxy-v1.3/src/lib.rs index 412c198a7..d6aca4865 100644 --- a/legacy-contracts/farm-staking-proxy-v1.3/src/lib.rs +++ b/legacy-contracts/farm-staking-proxy-v1.3/src/lib.rs @@ -9,8 +9,8 @@ pub mod whitelist; use common_structs_old::Nonce; use config::State; -elrond_wasm::imports!(); -elrond_wasm::derive_imports!(); +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); use crate::farm_token_merge::StakingFarmTokenAttributes; use config::{ @@ -31,7 +31,7 @@ pub struct UnbondSftAttributes { pub unlock_epoch: u64, } -#[elrond_wasm::contract] +#[multiversx_sc::contract] pub trait Farm: custom_rewards::CustomRewardsModule + config::ConfigModule diff --git a/legacy-contracts/farm-staking-proxy-v1.3/src/whitelist.rs b/legacy-contracts/farm-staking-proxy-v1.3/src/whitelist.rs index a4c8ee8ce..7bc40b5b0 100644 --- a/legacy-contracts/farm-staking-proxy-v1.3/src/whitelist.rs +++ b/legacy-contracts/farm-staking-proxy-v1.3/src/whitelist.rs @@ -1,8 +1,8 @@ -elrond_wasm::imports!(); +multiversx_sc::imports!(); use common_errors_old::ERROR_PERMISSIONS; -#[elrond_wasm::module] +#[multiversx_sc::module] pub trait WhitelistModule { #[only_owner] #[endpoint(addAddressToWhitelist)] diff --git a/legacy-contracts/farm-staking-proxy-v1.3/tests/farm_staking_test.rs b/legacy-contracts/farm-staking-proxy-v1.3/tests/farm_staking_test.rs index f7cb4d4a0..c39e5c62c 100644 --- a/legacy-contracts/farm-staking-proxy-v1.3/tests/farm_staking_test.rs +++ b/legacy-contracts/farm-staking-proxy-v1.3/tests/farm_staking_test.rs @@ -1,6 +1,6 @@ -use elrond_wasm::types::{Address, EsdtLocalRole}; -use elrond_wasm_debug::tx_mock::{TxContextStack, TxInputESDT}; -use elrond_wasm_debug::{ +use multiversx_sc::tx_mock::{TxContextStack, TxInputESDT}; +use multiversx_sc::types::{Address, EsdtLocalRole}; +use multiversx_sc::{ managed_biguint, managed_token_id, rust_biguint, testing_framework::*, DebugApi, }; diff --git a/legacy-contracts/farm-staking-proxy-v1.3/wasm/src/lib.rs b/legacy-contracts/farm-staking-proxy-v1.3/wasm/src/lib.rs index a8880a11c..20748251d 100644 --- a/legacy-contracts/farm-staking-proxy-v1.3/wasm/src/lib.rs +++ b/legacy-contracts/farm-staking-proxy-v1.3/wasm/src/lib.rs @@ -4,7 +4,7 @@ #![no_std] -elrond_wasm_node::wasm_endpoints! { +multiversx_sc_wasm_adapter::endpoints! { farm_staking ( callBack