diff --git a/Cargo.lock b/Cargo.lock index afe5fbff4..d7e21d7f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -885,32 +885,59 @@ dependencies = [ ] [[package]] -name = "farm-staking-proxy-legacy" +name = "farm-staking-proxy-meta" +version = "0.0.0" +dependencies = [ + "farm-staking-proxy", + "multiversx-sc-meta", +] + +[[package]] +name = "farm-staking-proxy-v-13" version = "0.0.0" dependencies = [ "common_structs", + "energy-factory", + "energy-query", + "farm-staking", + "farm-v-13", + "farm_token", "hex", + "locking_module", "multiversx-sc", "multiversx-sc-modules", "multiversx-sc-scenario", "num-bigint", "num-traits", + "pair", + "pausable", + "sc_whitelist_module", + "simple-lock", "token_merge_helper", ] [[package]] -name = "farm-staking-proxy-legacy-meta" +name = "farm-staking-proxy-v-13-meta" version = "0.0.0" dependencies = [ - "farm-staking-proxy-legacy", + "farm-staking-proxy-v-13", "multiversx-sc-meta", ] [[package]] -name = "farm-staking-proxy-meta" +name = "farm-v-13" version = "0.0.0" dependencies = [ - "farm-staking-proxy", + "multiversx-sc", + "multiversx-sc-scenario", + "num-bigint", +] + +[[package]] +name = "farm-v-13-meta" +version = "0.0.0" +dependencies = [ + "farm-v-13", "multiversx-sc-meta", ] diff --git a/Cargo.toml b/Cargo.toml index 1b7132c07..88a66788f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,8 +39,10 @@ members = [ "legacy-contracts/simple-lock-legacy", "legacy-contracts/simple-lock-legacy/meta", - "legacy-contracts/farm-staking-proxy-legacy", - "legacy-contracts/farm-staking-proxy-legacy/meta", + "legacy-contracts/farm-staking-proxy-v-13", + "legacy-contracts/farm-staking-proxy-v-13/meta", + "legacy-contracts/farm-v-13", + "legacy-contracts/farm-v-13/meta", "locked-asset/", "locked-asset/distribution", diff --git a/legacy-contracts/farm-staking-proxy-legacy/Cargo.toml b/legacy-contracts/farm-staking-proxy-legacy/Cargo.toml deleted file mode 100644 index 2a75332c5..000000000 --- a/legacy-contracts/farm-staking-proxy-legacy/Cargo.toml +++ /dev/null @@ -1,30 +0,0 @@ -[package] -name = "farm-staking-proxy-legacy" -version = "0.0.0" -authors = ["MultiversX "] -edition = "2021" -publish = false - -[lib] -path = "src/lib.rs" - -[dependencies.multiversx-sc] -version = "=0.50.5" -features = ["esdt-token-payment-legacy-decode"] - -[dependencies.multiversx-sc-modules] -version = "=0.50.5" - -[dependencies.token_merge_helper] -path = "../../common/modules/token_merge_helper" - -[dependencies.common_structs] -path = "../../common/common_structs" - -[dev-dependencies] -num-bigint = "0.4.2" -num-traits = "0.2" -hex = "0.4" - -[dev-dependencies.multiversx-sc-scenario] -version = "=0.50.5" diff --git a/legacy-contracts/farm-staking-proxy-legacy/meta/src/main.rs b/legacy-contracts/farm-staking-proxy-legacy/meta/src/main.rs deleted file mode 100644 index 98ff6943a..000000000 --- a/legacy-contracts/farm-staking-proxy-legacy/meta/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - multiversx_sc_meta::cli_main::(); -} diff --git a/legacy-contracts/farm-staking-proxy-legacy/.gitignore b/legacy-contracts/farm-staking-proxy-v-13/.gitignore similarity index 100% rename from legacy-contracts/farm-staking-proxy-legacy/.gitignore rename to legacy-contracts/farm-staking-proxy-v-13/.gitignore diff --git a/legacy-contracts/farm-staking-proxy-v-13/Cargo.toml b/legacy-contracts/farm-staking-proxy-v-13/Cargo.toml new file mode 100644 index 000000000..8fdeaefb2 --- /dev/null +++ b/legacy-contracts/farm-staking-proxy-v-13/Cargo.toml @@ -0,0 +1,60 @@ +[package] +name = "farm-staking-proxy-v-13" +version = "0.0.0" +authors = ["MultiversX "] +edition = "2021" +publish = false + +[lib] +path = "src/lib.rs" + +[dependencies.multiversx-sc] +version = "=0.50.5" +features = ["esdt-token-payment-legacy-decode"] + +[dependencies.multiversx-sc-modules] +version = "=0.50.5" + +[dependencies.token_merge_helper] +path = "../../common/modules/token_merge_helper" + +[dependencies.common_structs] +path = "../../common/common_structs" + +[dependencies.farm-staking] +path = "../../farm-staking/farm-staking" + +[dependencies.pair] +path = "../../dex/pair" + +[dependencies.farm-v-13] +path = "../farm-v-13" + +[dev-dependencies.energy-factory] +path = "../../locked-asset/energy-factory" + +[dev-dependencies.energy-query] +path = "../../energy-integration/common-modules/energy-query" + +[dev-dependencies.simple-lock] +path = "../../locked-asset/simple-lock" + +[dev-dependencies.farm_token] +path = "../../common/modules/farm/farm_token" + +[dev-dependencies.locking_module] +path = "../../common/modules/locking_module" + +[dev-dependencies.pausable] +path = "../../common/modules/pausable" + +[dev-dependencies.sc_whitelist_module] +path = "../../common/modules/sc_whitelist_module" + +[dev-dependencies] +num-bigint = "0.4.2" +num-traits = "0.2" +hex = "0.4" + +[dev-dependencies.multiversx-sc-scenario] +version = "=0.50.5" diff --git a/legacy-contracts/farm-staking-proxy-legacy/meta/Cargo.toml b/legacy-contracts/farm-staking-proxy-v-13/meta/Cargo.toml similarity index 71% rename from legacy-contracts/farm-staking-proxy-legacy/meta/Cargo.toml rename to legacy-contracts/farm-staking-proxy-v-13/meta/Cargo.toml index 8e33ff17a..f2075e1a4 100644 --- a/legacy-contracts/farm-staking-proxy-legacy/meta/Cargo.toml +++ b/legacy-contracts/farm-staking-proxy-v-13/meta/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "farm-staking-proxy-legacy-meta" +name = "farm-staking-proxy-v-13-meta" version = "0.0.0" edition = "2021" publish = false authors = ["MultiversX "] -[dependencies.farm-staking-proxy-legacy] +[dependencies.farm-staking-proxy-v-13] path = ".." [dependencies.multiversx-sc-meta] diff --git a/legacy-contracts/farm-staking-proxy-v-13/meta/src/main.rs b/legacy-contracts/farm-staking-proxy-v-13/meta/src/main.rs new file mode 100644 index 000000000..0c5fc84db --- /dev/null +++ b/legacy-contracts/farm-staking-proxy-v-13/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} diff --git a/legacy-contracts/farm-staking-proxy-legacy/multiversx.json b/legacy-contracts/farm-staking-proxy-v-13/multiversx.json similarity index 100% rename from legacy-contracts/farm-staking-proxy-legacy/multiversx.json rename to legacy-contracts/farm-staking-proxy-v-13/multiversx.json diff --git a/legacy-contracts/farm-staking-proxy-legacy/src/dual_yield_token.rs b/legacy-contracts/farm-staking-proxy-v-13/src/dual_yield_token.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-legacy/src/dual_yield_token.rs rename to legacy-contracts/farm-staking-proxy-v-13/src/dual_yield_token.rs diff --git a/legacy-contracts/farm-staking-proxy-legacy/src/external_contracts_interactions.rs b/legacy-contracts/farm-staking-proxy-v-13/src/external_contracts_interactions.rs similarity index 67% rename from legacy-contracts/farm-staking-proxy-legacy/src/external_contracts_interactions.rs rename to legacy-contracts/farm-staking-proxy-v-13/src/external_contracts_interactions.rs index a6826771b..11c226cb8 100644 --- a/legacy-contracts/farm-staking-proxy-legacy/src/external_contracts_interactions.rs +++ b/legacy-contracts/farm-staking-proxy-v-13/src/external_contracts_interactions.rs @@ -1,57 +1,13 @@ multiversx_sc::imports!(); use common_structs::{RawResultWrapper, RawResultsType}; +use farm_staking::unstake_farm::ProxyTrait as _; +use multiversx_sc::storage::StorageKey; +use pair::pair_actions::remove_liq::ProxyTrait as _; use crate::result_types::*; -mod farm_proxy { - multiversx_sc::imports!(); - - #[multiversx_sc::proxy] - pub trait FarmProxy { - #[payable("*")] - #[endpoint(exitFarm)] - fn exit_farm(&self) -> MultiValue2; - - #[view(getFarmingTokenId)] - fn farming_token_id(&self) -> TokenIdentifier; - } -} - -mod farm_staking_proxy { - multiversx_sc::imports!(); - - #[multiversx_sc::proxy] - pub trait FarmStakingProxy { - #[payable("*")] - #[endpoint(unstakeFarmThroughProxy)] - fn unstake_farm_through_proxy( - &self, - original_caller: ManagedAddress, - ) -> MultiValue2; - } -} - -mod pair_proxy { - multiversx_sc::imports!(); - - #[multiversx_sc::proxy] - pub trait PairProxy { - #[payable("*")] - #[endpoint(removeLiquidity)] - fn remove_liquidity( - &self, - first_token_amount_min: BigUint, - second_token_amount_min: BigUint, - ) -> MultiValue2; - - #[endpoint(updateAndGetTokensForGivenPositionWithSafePrice)] - fn update_and_get_tokens_for_given_position_with_safe_price( - &self, - liquidity: BigUint, - ) -> MultiValue2; - } -} +pub static FARMING_TOKEN_STORAGE_KEY: &[u8] = b"farming_token_id"; #[multiversx_sc::module] pub trait ExternalContractsInteractionsModule: @@ -68,7 +24,7 @@ pub trait ExternalContractsInteractionsModule: let lp_farm_address = self.lp_farm_address().get(); let raw_results: RawResultsType = self .lp_farm_proxy_obj(lp_farm_address) - .exit_farm() + .exit_farm(OptionalValue::::None) .with_esdt_transfer((lp_farm_token_id, lp_farm_token_nonce, lp_farm_token_amount)) .execute_on_dest_context(); @@ -93,9 +49,13 @@ pub trait ExternalContractsInteractionsModule: fn get_lp_farming_token_identifier(&self) -> TokenIdentifier { let lp_farm_address = self.lp_farm_address().get(); - self.lp_farm_proxy_obj(lp_farm_address) - .farming_token_id() - .execute_on_dest_context() + + let farming_token_mapper = SingleValueMapper::<_, _, ManagedAddress>::new_from_address( + lp_farm_address, + StorageKey::new(FARMING_TOKEN_STORAGE_KEY), + ); + + farming_token_mapper.get() } // staking farm @@ -175,42 +135,16 @@ pub trait ExternalContractsInteractionsModule: } } - fn get_lp_tokens_safe_price(&self, lp_tokens_amount: BigUint) -> BigUint { - let pair_address = self.pair_address().get(); - let raw_results: RawResultsType = self - .pair_proxy_obj(pair_address) - .update_and_get_tokens_for_given_position_with_safe_price(lp_tokens_amount) - .execute_on_dest_context(); - - let mut results_wrapper = RawResultWrapper::new(raw_results); - results_wrapper.trim_results_front(2); - - let first_token_info: EsdtTokenPayment = results_wrapper.decode_next_result(); - let second_token_info: EsdtTokenPayment = results_wrapper.decode_next_result(); - - let staking_token_id = self.staking_token_id().get(); - if first_token_info.token_identifier == staking_token_id { - first_token_info.amount - } else if second_token_info.token_identifier == staking_token_id { - second_token_info.amount - } else { - sc_panic!("Invalid Pair contract called"); - } - } - // proxies #[proxy] - fn staking_farm_proxy_obj( - &self, - sc_address: ManagedAddress, - ) -> farm_staking_proxy::Proxy; + fn staking_farm_proxy_obj(&self, sc_address: ManagedAddress) -> farm_staking::Proxy; #[proxy] - fn lp_farm_proxy_obj(&self, sc_address: ManagedAddress) -> farm_proxy::Proxy; + fn lp_farm_proxy_obj(&self, sc_address: ManagedAddress) -> farm_v_13::Proxy; #[proxy] - fn pair_proxy_obj(&self, sc_address: ManagedAddress) -> pair_proxy::Proxy; + fn pair_proxy_obj(&self, sc_address: ManagedAddress) -> pair::Proxy; // storage diff --git a/legacy-contracts/farm-staking-proxy-legacy/src/lib.rs b/legacy-contracts/farm-staking-proxy-v-13/src/lib.rs similarity index 98% rename from legacy-contracts/farm-staking-proxy-legacy/src/lib.rs rename to legacy-contracts/farm-staking-proxy-v-13/src/lib.rs index 957285429..361338441 100644 --- a/legacy-contracts/farm-staking-proxy-legacy/src/lib.rs +++ b/legacy-contracts/farm-staking-proxy-v-13/src/lib.rs @@ -19,6 +19,9 @@ pub trait FarmStakingProxy: #[init] fn init(&self) {} + #[upgrade] + fn upgrade(&self) {} + #[payable("*")] #[endpoint(unstakeFarmTokens)] fn unstake_farm_tokens( diff --git a/legacy-contracts/farm-staking-proxy-legacy/src/lp_farm_token.rs b/legacy-contracts/farm-staking-proxy-v-13/src/lp_farm_token.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-legacy/src/lp_farm_token.rs rename to legacy-contracts/farm-staking-proxy-v-13/src/lp_farm_token.rs diff --git a/legacy-contracts/farm-staking-proxy-legacy/src/result_types.rs b/legacy-contracts/farm-staking-proxy-v-13/src/result_types.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-legacy/src/result_types.rs rename to legacy-contracts/farm-staking-proxy-v-13/src/result_types.rs diff --git a/legacy-contracts/farm-staking-proxy-v-13/tests/constants/mod.rs b/legacy-contracts/farm-staking-proxy-v-13/tests/constants/mod.rs new file mode 100644 index 000000000..f59a14a45 --- /dev/null +++ b/legacy-contracts/farm-staking-proxy-v-13/tests/constants/mod.rs @@ -0,0 +1,48 @@ +// // Pair constants + +// pub const PAIR_WASM_PATH: &str = "pair/output/pair.wasm"; +// pub const WEGLD_TOKEN_ID: &[u8] = b"WEGLD-abcdef"; +// pub const RIDE_TOKEN_ID: &[u8] = b"RIDE-abcdef"; +// pub const LP_TOKEN_ID: &[u8] = b"LPTOK-abcdef"; // also farming token ID for LP farm + +// pub const USER_TOTAL_WEGLD_TOKENS: u64 = 2_000_000_000; +// pub const USER_TOTAL_RIDE_TOKENS: u64 = 2_000_000_000; +// pub const USER_TOTAL_LP_TOKENS: u64 = 1_001_000_000; + +// pub const BLOCK_NONCE_FIRST_ADD_LIQ: u64 = 5; +// pub const BLOCK_NONCE_SECOND_ADD_LIQ: u64 = 6; +// pub const BLOCK_NONCE_AFTER_PAIR_SETUP: u64 = 100; + +// // LP farm constants + +// pub const FARM_WASM_PATH: &str = "farm/output/farm.wasm"; +// pub const LP_FARM_TOKEN_ID: &[u8] = b"LPFARM-abcdef"; +// pub const DIVISION_SAFETY_CONSTANT: u64 = 1_000_000_000_000; +// pub const MIN_FARMING_EPOCHS: u8 = 2; +// pub const PENALTY_PERCENT: u64 = 10; +// pub const LP_FARM_PER_BLOCK_REWARD_AMOUNT: u64 = 5_000; + +// // Energy factory constants + +// pub const EPOCHS_IN_YEAR: u64 = 360; +// pub static MEX_TOKEN_ID: &[u8] = b"MEX-123456"; +// pub static LOCKED_TOKEN_ID: &[u8] = b"LOCKED-123456"; +// pub static LEGACY_LOCKED_TOKEN_ID: &[u8] = b"LEGACY-123456"; +// pub static LOCK_OPTIONS: &[u64] = &[EPOCHS_IN_YEAR, 5 * EPOCHS_IN_YEAR, 10 * EPOCHS_IN_YEAR]; // 1, 5 or 10 years +// pub static PENALTY_PERCENTAGES: &[u64] = &[4_000, 6_000, 8_000]; + +// // Staking farm constants + +// pub const STAKING_FARM_WASM_PATH: &str = "farm-staking/output/farm-staking.wasm"; +// pub const STAKING_REWARD_TOKEN_ID: &[u8] = RIDE_TOKEN_ID; +// pub const STAKING_TOKEN_ID: &[u8] = RIDE_TOKEN_ID; +// pub const STAKING_FARM_TOKEN_ID: &[u8] = b"STKFARM-abcdef"; +// pub const MAX_APR: u64 = 5_000; // 50% +// pub const UNBOND_EPOCHS: u64 = 10; +// pub const STAKING_FARM_PER_BLOCK_REWARD_AMOUNT: u64 = 1_000; +// pub const REWARD_CAPACITY: u64 = 1_000_000_000_000; + +// // Proxy constants + +// pub const PROXY_WASM_PATH: &str = "farm-staking-proxy/output/farm-staking-proxy"; +// pub const DUAL_YIELD_TOKEN_ID: &[u8] = b"DYIELD-abcdef"; diff --git a/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp.rs b/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp.rs new file mode 100644 index 000000000..faad624a7 --- /dev/null +++ b/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp.rs @@ -0,0 +1,147 @@ +// #![allow(deprecated)] + +// pub mod constants; +// pub mod staking_farm_with_lp_external_contracts; +// pub mod staking_farm_with_lp_staking_contract_interactions; +// pub mod staking_farm_with_lp_staking_contract_setup; + +// multiversx_sc::imports!(); + +// use common_structs::FarmTokenAttributes; +// use constants::*; +// use farm_staking_proxy_legacy::dual_yield_token::DualYieldTokenAttributes; + +// use farm_staking::stake_farm::StakeFarmModule; +// use farm_with_locked_rewards::Farm; +// use multiversx_sc_scenario::{ +// imports::TxTokenTransfer, managed_address, managed_biguint, rust_biguint, DebugApi, +// }; +// use pair::pair_actions::add_liq::AddLiquidityModule; +// use staking_farm_with_lp_staking_contract_interactions::*; + +// #[test] +// fn test_all_setup() { +// let _ = FarmStakingSetup::new( +// pair::contract_obj, +// farm_with_locked_rewards::contract_obj, +// energy_factory::contract_obj, +// farm_staking::contract_obj, +// farm_staking_proxy_legacy::contract_obj, +// ); +// } + +// #[test] +// fn test_unstake_from_legacy_proxy() { +// let mut setup = FarmStakingSetup::new( +// pair::contract_obj, +// farm_with_locked_rewards::contract_obj, +// energy_factory::contract_obj, +// farm_staking::contract_obj, +// farm_staking_proxy_legacy::contract_obj, +// ); + +// DebugApi::dummy(); +// setup +// .b_mock +// .set_block_nonce(BLOCK_NONCE_AFTER_PAIR_SETUP + 20); +// setup.b_mock.set_block_epoch(20); + +// let token_amount = 1_000_000_000u64; + +// let payments = vec![ +// TxTokenTransfer { +// token_identifier: WEGLD_TOKEN_ID.to_vec(), +// nonce: 0, +// value: rust_biguint!(token_amount), +// }, +// TxTokenTransfer { +// token_identifier: RIDE_TOKEN_ID.to_vec(), +// nonce: 0, +// value: rust_biguint!(token_amount), +// }, +// ]; +// setup +// .b_mock +// .execute_esdt_multi_transfer(&setup.user_addr, &setup.pair_wrapper, &payments, |sc| { +// sc.add_liquidity(managed_biguint!(1u64), managed_biguint!(1u64)); +// }) +// .assert_ok(); + +// setup +// .b_mock +// .execute_esdt_transfer( +// &setup.user_addr, +// &setup.lp_farm_wrapper, +// LP_TOKEN_ID, +// 0, +// &rust_biguint!(token_amount), +// |sc| { +// sc.enter_farm_endpoint(OptionalValue::None); +// }, +// ) +// .assert_ok(); + +// // Simulate enter proxy staking contract +// let lp_farm_token_attributes: FarmTokenAttributes = FarmTokenAttributes { +// reward_per_share: managed_biguint!(0), +// entering_epoch: 20, +// compounded_reward: managed_biguint!(0), +// current_farm_amount: managed_biguint!(token_amount), +// original_owner: managed_address!(&setup.user_addr), +// }; +// setup.b_mock.set_nft_balance( +// setup.proxy_wrapper.address_ref(), +// LP_FARM_TOKEN_ID, +// 1, +// &rust_biguint!(token_amount), +// &lp_farm_token_attributes, +// ); +// setup.b_mock.set_esdt_balance( +// setup.proxy_wrapper.address_ref(), +// RIDE_TOKEN_ID, +// &rust_biguint!(token_amount), +// ); + +// setup +// .b_mock +// .execute_tx( +// setup.proxy_wrapper.address_ref(), +// &setup.staking_farm_wrapper, +// &rust_biguint!(0u64), +// |sc| { +// sc.stake_farm_through_proxy( +// managed_biguint!(token_amount), +// managed_address!(&setup.user_addr), +// ); +// }, +// ) +// .assert_ok(); + +// let dual_yield_token_amount = token_amount; +// let dual_yield_token_attributes: DualYieldTokenAttributes = +// DualYieldTokenAttributes { +// lp_farm_token_nonce: 1, +// lp_farm_token_amount: managed_biguint!(dual_yield_token_amount), +// staking_farm_token_nonce: 1, +// staking_farm_token_amount: managed_biguint!(dual_yield_token_amount), +// }; +// setup.b_mock.set_nft_balance( +// &setup.user_addr, +// DUAL_YIELD_TOKEN_ID, +// 1, +// &rust_biguint!(dual_yield_token_amount), +// &dual_yield_token_attributes, +// ); + +// let expected_token_amount = 990_000_000u64; +// setup.unstake_proxy( +// 1, +// dual_yield_token_amount, +// expected_token_amount, +// expected_token_amount, +// 30, +// ); + +// setup.b_mock.set_block_epoch(30); +// setup.unbond_proxy(2, expected_token_amount, expected_token_amount); +// } diff --git a/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_external_contracts/mod.rs b/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_external_contracts/mod.rs new file mode 100644 index 000000000..ffd3c9313 --- /dev/null +++ b/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_external_contracts/mod.rs @@ -0,0 +1,253 @@ +// use energy_factory::token_whitelist::TokenWhitelistModule; +// use energy_factory::SimpleLockEnergy; +// use energy_query::EnergyQueryModule; +// use farm_token::FarmTokenModule; +// use farm_with_locked_rewards::Farm; +// use multiversx_sc::imports::StorageTokenWrapper; +// use multiversx_sc::types::{Address, EsdtLocalRole, MultiValueEncoded}; +// use multiversx_sc_modules::pause::PauseModule; +// use multiversx_sc_scenario::{ +// managed_address, managed_biguint, managed_token_id, rust_biguint, testing_framework::*, +// DebugApi, +// }; + +// use pair::config as pair_config; +// use pair::*; +// use pair_actions::add_liq::AddLiquidityModule; +// use pair_actions::initial_liq::InitialLiquidityModule; +// use pair_config::ConfigModule as _; + +// use pausable::{PausableModule, State}; +// use simple_lock::locked_token::LockedTokenModule as _; + +// use crate::constants::*; + +// pub fn setup_pair( +// owner_addr: &Address, +// user_addr: &Address, +// b_mock: &mut BlockchainStateWrapper, +// pair_builder: PairObjBuilder, +// ) -> ContractObjWrapper, PairObjBuilder> +// where +// PairObjBuilder: 'static + Copy + Fn() -> pair::ContractObj, +// { +// let rust_zero = rust_biguint!(0u64); +// let pair_wrapper = +// b_mock.create_sc_account(&rust_zero, Some(owner_addr), pair_builder, PAIR_WASM_PATH); + +// b_mock +// .execute_tx(owner_addr, &pair_wrapper, &rust_zero, |sc| { +// let first_token_id = managed_token_id!(WEGLD_TOKEN_ID); +// let second_token_id = managed_token_id!(RIDE_TOKEN_ID); +// let router_address = managed_address!(owner_addr); +// let router_owner_address = managed_address!(owner_addr); +// let initial_liquidity_adder = managed_address!(owner_addr); +// let total_fee_percent = 300u64; +// let special_fee_percent = 50u64; + +// sc.init( +// first_token_id, +// second_token_id, +// router_address, +// router_owner_address, +// total_fee_percent, +// special_fee_percent, +// initial_liquidity_adder, +// MultiValueEncoded::new(), +// ); + +// let lp_token_id = managed_token_id!(LP_TOKEN_ID); +// sc.lp_token_identifier().set(&lp_token_id); +// }) +// .assert_ok(); + +// let lp_token_roles = [EsdtLocalRole::Mint, EsdtLocalRole::Burn]; +// b_mock.set_esdt_local_roles(pair_wrapper.address_ref(), LP_TOKEN_ID, &lp_token_roles[..]); + +// // set user balance +// b_mock.set_esdt_balance( +// user_addr, +// WEGLD_TOKEN_ID, +// &rust_biguint!(USER_TOTAL_WEGLD_TOKENS), +// ); +// b_mock.set_esdt_balance( +// user_addr, +// RIDE_TOKEN_ID, +// &rust_biguint!(USER_TOTAL_RIDE_TOKENS), +// ); + +// b_mock.set_block_nonce(BLOCK_NONCE_FIRST_ADD_LIQ); + +// b_mock.set_esdt_balance( +// owner_addr, +// WEGLD_TOKEN_ID, +// &rust_biguint!(USER_TOTAL_WEGLD_TOKENS), +// ); +// b_mock.set_esdt_balance( +// owner_addr, +// RIDE_TOKEN_ID, +// &rust_biguint!(USER_TOTAL_RIDE_TOKENS), +// ); + +// let payments = vec![ +// TxTokenTransfer { +// token_identifier: WEGLD_TOKEN_ID.to_vec(), +// nonce: 0, +// value: rust_biguint!(1_000_000_000), +// }, +// TxTokenTransfer { +// token_identifier: RIDE_TOKEN_ID.to_vec(), +// nonce: 0, +// value: rust_biguint!(1_000_000_000), +// }, +// ]; +// b_mock +// .execute_esdt_multi_transfer(owner_addr, &pair_wrapper, &payments, |sc| { +// sc.add_initial_liquidity(); +// }) +// .assert_ok(); + +// b_mock.set_block_nonce(BLOCK_NONCE_SECOND_ADD_LIQ); + +// b_mock +// .execute_esdt_multi_transfer(owner_addr, &pair_wrapper, &payments, |sc| { +// sc.add_liquidity(managed_biguint!(1u64), managed_biguint!(1u64)); +// }) +// .assert_ok(); + +// b_mock.set_block_nonce(BLOCK_NONCE_AFTER_PAIR_SETUP); + +// pair_wrapper +// } + +// pub fn setup_lp_farm( +// owner_addr: &Address, +// energy_factory_address: &Address, +// b_mock: &mut BlockchainStateWrapper, +// farm_builder: FarmObjBuilder, +// ) -> ContractObjWrapper, FarmObjBuilder> +// where +// FarmObjBuilder: 'static + Copy + Fn() -> farm_with_locked_rewards::ContractObj, +// { +// let rust_zero = rust_biguint!(0u64); +// let farm_wrapper = +// b_mock.create_sc_account(&rust_zero, Some(owner_addr), farm_builder, FARM_WASM_PATH); + +// // init farm contract + +// b_mock +// .execute_tx(owner_addr, &farm_wrapper, &rust_zero, |sc| { +// let reward_token_id = managed_token_id!(RIDE_TOKEN_ID); +// let farming_token_id = managed_token_id!(LP_TOKEN_ID); +// let division_safety_constant = managed_biguint!(DIVISION_SAFETY_CONSTANT); +// let pair_address = managed_address!(&Address::zero()); + +// sc.init( +// reward_token_id, +// farming_token_id, +// division_safety_constant, +// pair_address, +// managed_address!(owner_addr), +// MultiValueEncoded::new(), +// ); + +// let farm_token_id = managed_token_id!(LP_FARM_TOKEN_ID); +// sc.farm_token().set_token_id(farm_token_id); + +// sc.energy_factory_address() +// .set(managed_address!(energy_factory_address)); + +// sc.state().set(State::Active); +// }) +// .assert_ok(); + +// let farm_token_roles = [ +// EsdtLocalRole::NftCreate, +// EsdtLocalRole::NftAddQuantity, +// EsdtLocalRole::NftBurn, +// ]; +// b_mock.set_esdt_local_roles( +// farm_wrapper.address_ref(), +// LP_FARM_TOKEN_ID, +// &farm_token_roles[..], +// ); + +// let farming_token_roles = [EsdtLocalRole::Burn]; +// b_mock.set_esdt_local_roles( +// farm_wrapper.address_ref(), +// LP_TOKEN_ID, +// &farming_token_roles[..], +// ); + +// let reward_token_roles = [EsdtLocalRole::Mint]; +// b_mock.set_esdt_local_roles( +// farm_wrapper.address_ref(), +// RIDE_TOKEN_ID, +// &reward_token_roles[..], +// ); + +// farm_wrapper +// } + +// pub fn setup_energy_factory( +// owner_addr: &Address, +// b_mock: &mut BlockchainStateWrapper, +// energy_factory_builder: EnergyFactoryObjBuilder, +// ) -> ContractObjWrapper, EnergyFactoryObjBuilder> +// where +// EnergyFactoryObjBuilder: 'static + Copy + Fn() -> energy_factory::ContractObj, +// { +// let rust_zero = rust_biguint!(0u64); +// let energy_factory_wrapper = b_mock.create_sc_account( +// &rust_zero, +// Some(owner_addr), +// energy_factory_builder, +// "energy factory", +// ); + +// b_mock +// .execute_tx(owner_addr, &energy_factory_wrapper, &rust_zero, |sc| { +// let mut lock_options = MultiValueEncoded::new(); +// for (option, penalty) in LOCK_OPTIONS.iter().zip(PENALTY_PERCENTAGES.iter()) { +// lock_options.push((*option, *penalty).into()); +// } + +// sc.init( +// managed_token_id!(LOCKED_TOKEN_ID), +// managed_token_id!(LEGACY_LOCKED_TOKEN_ID), +// managed_address!(energy_factory_wrapper.address_ref()), +// 0, +// lock_options, +// ); + +// sc.base_asset_token_id() +// .set(managed_token_id!(MEX_TOKEN_ID)); +// sc.locked_token() +// .set_token_id(managed_token_id!(LOCKED_TOKEN_ID)); +// sc.set_paused(false); +// }) +// .assert_ok(); + +// b_mock.set_esdt_local_roles( +// energy_factory_wrapper.address_ref(), +// MEX_TOKEN_ID, +// &[EsdtLocalRole::Mint, EsdtLocalRole::Burn], +// ); +// b_mock.set_esdt_local_roles( +// energy_factory_wrapper.address_ref(), +// LOCKED_TOKEN_ID, +// &[ +// EsdtLocalRole::NftCreate, +// EsdtLocalRole::NftAddQuantity, +// EsdtLocalRole::NftBurn, +// EsdtLocalRole::Transfer, +// ], +// ); +// b_mock.set_esdt_local_roles( +// energy_factory_wrapper.address_ref(), +// LEGACY_LOCKED_TOKEN_ID, +// &[EsdtLocalRole::NftBurn], +// ); + +// energy_factory_wrapper +// } diff --git a/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_staking_contract_interactions/mod.rs b/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_staking_contract_interactions/mod.rs new file mode 100644 index 000000000..7073690b5 --- /dev/null +++ b/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_staking_contract_interactions/mod.rs @@ -0,0 +1,201 @@ +// use multiversx_sc::types::Address; +// use multiversx_sc_scenario::{ +// managed_biguint, rust_biguint, +// testing_framework::{BlockchainStateWrapper, ContractObjWrapper}, +// DebugApi, +// }; + +// use farm_staking::*; +// use farm_staking_proxy_legacy::*; +// use token_attributes::UnbondSftAttributes; +// use unbond_farm::UnbondFarmModule; + +// use crate::{ +// constants::*, +// staking_farm_with_lp_external_contracts::{setup_energy_factory, setup_lp_farm, setup_pair}, +// staking_farm_with_lp_staking_contract_setup::{ +// add_proxy_to_whitelist, setup_proxy, setup_staking_farm, +// }, +// }; + +// pub struct FarmStakingSetup< +// PairObjBuilder, +// FarmObjBuilder, +// EnergyFactoryObjBuilder, +// StakingContractObjBuilder, +// ProxyContractObjBuilder, +// > where +// PairObjBuilder: 'static + Copy + Fn() -> pair::ContractObj, +// FarmObjBuilder: 'static + Copy + Fn() -> farm_with_locked_rewards::ContractObj, +// EnergyFactoryObjBuilder: 'static + Copy + Fn() -> energy_factory::ContractObj, +// StakingContractObjBuilder: 'static + Copy + Fn() -> farm_staking::ContractObj, +// ProxyContractObjBuilder: +// 'static + Copy + Fn() -> farm_staking_proxy_legacy::ContractObj, +// { +// pub owner_addr: Address, +// pub user_addr: Address, +// pub b_mock: BlockchainStateWrapper, +// pub pair_wrapper: ContractObjWrapper, PairObjBuilder>, +// pub lp_farm_wrapper: +// ContractObjWrapper, FarmObjBuilder>, +// pub energy_factory_wrapper: +// ContractObjWrapper, EnergyFactoryObjBuilder>, +// pub staking_farm_wrapper: +// ContractObjWrapper, StakingContractObjBuilder>, +// pub proxy_wrapper: ContractObjWrapper< +// farm_staking_proxy_legacy::ContractObj, +// ProxyContractObjBuilder, +// >, +// } + +// impl< +// PairObjBuilder, +// FarmObjBuilder, +// EnergyFactoryObjBuilder, +// StakingContractObjBuilder, +// ProxyContractObjBuilder, +// > +// FarmStakingSetup< +// PairObjBuilder, +// FarmObjBuilder, +// EnergyFactoryObjBuilder, +// StakingContractObjBuilder, +// ProxyContractObjBuilder, +// > +// where +// PairObjBuilder: 'static + Copy + Fn() -> pair::ContractObj, +// FarmObjBuilder: 'static + Copy + Fn() -> farm_with_locked_rewards::ContractObj, +// EnergyFactoryObjBuilder: 'static + Copy + Fn() -> energy_factory::ContractObj, +// StakingContractObjBuilder: 'static + Copy + Fn() -> farm_staking::ContractObj, +// ProxyContractObjBuilder: +// 'static + Copy + Fn() -> farm_staking_proxy_legacy::ContractObj, +// { +// pub fn new( +// pair_builder: PairObjBuilder, +// lp_farm_builder: FarmObjBuilder, +// energy_factory_builder: EnergyFactoryObjBuilder, +// staking_farm_builder: StakingContractObjBuilder, +// proxy_builder: ProxyContractObjBuilder, +// ) -> Self { +// let rust_zero = rust_biguint!(0u64); +// let mut b_mock = BlockchainStateWrapper::new(); +// let owner_addr = b_mock.create_user_account(&rust_zero); +// let user_addr = b_mock.create_user_account(&rust_biguint!(100_000_000)); + +// let pair_wrapper = setup_pair(&owner_addr, &user_addr, &mut b_mock, pair_builder); +// let energy_factory_wrapper = +// setup_energy_factory(&owner_addr, &mut b_mock, energy_factory_builder); +// let lp_farm_wrapper = setup_lp_farm( +// &owner_addr, +// energy_factory_wrapper.address_ref(), +// &mut b_mock, +// lp_farm_builder, +// ); + +// let staking_farm_wrapper = +// setup_staking_farm(&owner_addr, &mut b_mock, staking_farm_builder); +// let proxy_wrapper = setup_proxy( +// &owner_addr, +// lp_farm_wrapper.address_ref(), +// staking_farm_wrapper.address_ref(), +// pair_wrapper.address_ref(), +// &mut b_mock, +// proxy_builder, +// ); + +// add_proxy_to_whitelist( +// &owner_addr, +// proxy_wrapper.address_ref(), +// &mut b_mock, +// &lp_farm_wrapper, +// &staking_farm_wrapper, +// ); + +// FarmStakingSetup { +// owner_addr, +// user_addr, +// b_mock, +// pair_wrapper, +// lp_farm_wrapper, +// energy_factory_wrapper, +// staking_farm_wrapper, +// proxy_wrapper, +// } +// } + +// pub fn unstake_proxy( +// &mut self, +// dual_yield_token_nonce: u64, +// dual_yield_token_amount: u64, +// expected_wegld_amount: u64, +// expected_unbond_token_amount: u64, +// expected_unbond_token_unlock_epoch: u64, +// ) -> u64 { +// let mut unbond_token_nonce = 0; + +// self.b_mock +// .execute_esdt_transfer( +// &self.user_addr, +// &self.proxy_wrapper, +// DUAL_YIELD_TOKEN_ID, +// dual_yield_token_nonce, +// &rust_biguint!(dual_yield_token_amount), +// |sc| { +// let received_tokens = sc +// .unstake_farm_tokens(managed_biguint!(1), managed_biguint!(1)) +// .to_vec(); +// let mut vec_index = 0; + +// if expected_wegld_amount > 0 { +// let wegld_payment = received_tokens.get(vec_index); +// assert_eq!(wegld_payment.amount, expected_wegld_amount); + +// vec_index += 1; +// } + +// let unbond_tokens = received_tokens.get(vec_index); +// assert_eq!(unbond_tokens.amount, expected_unbond_token_amount); + +// unbond_token_nonce = unbond_tokens.token_nonce; +// }, +// ) +// .assert_ok(); + +// self.b_mock.execute_in_managed_environment(|| { +// let expected_attributes = UnbondSftAttributes { +// unlock_epoch: expected_unbond_token_unlock_epoch, +// }; + +// self.b_mock.check_nft_balance( +// &self.user_addr, +// STAKING_FARM_TOKEN_ID, +// unbond_token_nonce, +// &rust_biguint!(expected_unbond_token_amount), +// Some(&expected_attributes), +// ); +// }); + +// unbond_token_nonce +// } + +// pub fn unbond_proxy( +// &mut self, +// unbond_token_nonce: u64, +// unbond_token_amount: u64, +// expected_token_out_amount: u64, +// ) { +// self.b_mock +// .execute_esdt_transfer( +// &self.user_addr, +// &self.staking_farm_wrapper, +// STAKING_FARM_TOKEN_ID, +// unbond_token_nonce, +// &rust_biguint!(unbond_token_amount), +// |sc| { +// let received_tokens = sc.unbond_farm(); +// assert_eq!(received_tokens.amount, expected_token_out_amount); +// }, +// ) +// .assert_ok(); +// } +// } diff --git a/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_staking_contract_setup/mod.rs b/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_staking_contract_setup/mod.rs new file mode 100644 index 000000000..2cb4d6e97 --- /dev/null +++ b/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_staking_contract_setup/mod.rs @@ -0,0 +1,153 @@ +// use external_contracts_interactions::ExternalContractsInteractionsModule; +// use farm_token::FarmTokenModule; +// use lp_farm_token::LpFarmTokenModule; +// use multiversx_sc::{ +// imports::StorageTokenWrapper, +// types::{Address, EsdtLocalRole, MultiValueEncoded}, +// }; +// use multiversx_sc_scenario::{ +// managed_address, managed_biguint, managed_token_id, rust_biguint, +// testing_framework::{BlockchainStateWrapper, ContractObjWrapper}, +// DebugApi, +// }; + +// use farm_staking::*; + +// use farm_staking_proxy_legacy::dual_yield_token::DualYieldTokenModule; +// use farm_staking_proxy_legacy::*; +// use pausable::{PausableModule, State}; +// use sc_whitelist_module::SCWhitelistModule; + +// use crate::constants::*; + +// pub fn setup_staking_farm( +// owner_addr: &Address, +// b_mock: &mut BlockchainStateWrapper, +// builder: StakingContractObjBuilder, +// ) -> ContractObjWrapper, StakingContractObjBuilder> +// where +// StakingContractObjBuilder: 'static + Copy + Fn() -> farm_staking::ContractObj, +// { +// let rust_zero = rust_biguint!(0u64); +// let farm_staking_wrapper = +// b_mock.create_sc_account(&rust_zero, Some(owner_addr), builder, PROXY_WASM_PATH); + +// b_mock +// .execute_tx(owner_addr, &farm_staking_wrapper, &rust_zero, |sc| { +// let farming_token_id = managed_token_id!(STAKING_TOKEN_ID); +// let div_const = managed_biguint!(DIVISION_SAFETY_CONSTANT); +// let max_apr = managed_biguint!(MAX_APR); + +// sc.init( +// farming_token_id, +// div_const, +// max_apr, +// UNBOND_EPOCHS, +// managed_address!(owner_addr), +// MultiValueEncoded::new(), +// ); + +// sc.farm_token() +// .set_token_id(managed_token_id!(STAKING_FARM_TOKEN_ID)); + +// sc.state().set(State::Active); +// }) +// .assert_ok(); + +// b_mock.set_esdt_balance( +// farm_staking_wrapper.address_ref(), +// STAKING_REWARD_TOKEN_ID, +// &rust_biguint!(REWARD_CAPACITY), +// ); + +// let farm_token_roles = [ +// EsdtLocalRole::NftCreate, +// EsdtLocalRole::NftAddQuantity, +// EsdtLocalRole::NftBurn, +// ]; +// b_mock.set_esdt_local_roles( +// farm_staking_wrapper.address_ref(), +// STAKING_FARM_TOKEN_ID, +// &farm_token_roles[..], +// ); + +// farm_staking_wrapper +// } + +// pub fn add_proxy_to_whitelist( +// owner_addr: &Address, +// proxy_address: &Address, +// b_mock: &mut BlockchainStateWrapper, +// lp_farm_builder: &ContractObjWrapper< +// farm_with_locked_rewards::ContractObj, +// FarmObjBuilder, +// >, +// staking_farm_builder: &ContractObjWrapper< +// farm_staking::ContractObj, +// StakingContractObjBuilder, +// >, +// ) where +// FarmObjBuilder: 'static + Copy + Fn() -> farm_with_locked_rewards::ContractObj, +// StakingContractObjBuilder: 'static + Copy + Fn() -> farm_staking::ContractObj, +// { +// let rust_zero = rust_biguint!(0u64); +// b_mock +// .execute_tx(owner_addr, lp_farm_builder, &rust_zero, |sc| { +// sc.add_sc_address_to_whitelist(managed_address!(proxy_address)); +// }) +// .assert_ok(); +// b_mock +// .execute_tx(owner_addr, staking_farm_builder, &rust_zero, |sc| { +// sc.add_sc_address_to_whitelist(managed_address!(proxy_address)); +// }) +// .assert_ok(); +// } + +// pub fn setup_proxy( +// owner_addr: &Address, +// lp_farm_address: &Address, +// staking_farm_address: &Address, +// pair_address: &Address, +// b_mock: &mut BlockchainStateWrapper, +// builder: ProxyContractObjBuilder, +// ) -> ContractObjWrapper, ProxyContractObjBuilder> +// where +// ProxyContractObjBuilder: +// 'static + Copy + Fn() -> farm_staking_proxy_legacy::ContractObj, +// { +// let rust_zero = rust_biguint!(0u64); +// let proxy_wrapper = +// b_mock.create_sc_account(&rust_zero, Some(owner_addr), builder, PROXY_WASM_PATH); + +// b_mock +// .execute_tx(owner_addr, &proxy_wrapper, &rust_zero, |sc| { +// sc.init(); + +// sc.pair_address().set(managed_address!(pair_address)); +// sc.lp_farm_address().set(managed_address!(lp_farm_address)); +// sc.lp_farm_token_id() +// .set(managed_token_id!(LP_FARM_TOKEN_ID)); +// sc.staking_farm_address() +// .set(managed_address!(staking_farm_address)); +// sc.staking_token_id() +// .set(managed_token_id!(STAKING_TOKEN_ID)); +// sc.staking_farm_token_id() +// .set(managed_token_id!(STAKING_FARM_TOKEN_ID)); +// sc.dual_yield_token_id() +// .set(&managed_token_id!(DUAL_YIELD_TOKEN_ID)); +// }) +// .assert_ok(); + +// let dual_yield_token_roles = [ +// EsdtLocalRole::NftCreate, +// EsdtLocalRole::NftAddQuantity, +// EsdtLocalRole::NftBurn, +// ]; +// b_mock.set_esdt_local_roles( +// proxy_wrapper.address_ref(), +// DUAL_YIELD_TOKEN_ID, +// &dual_yield_token_roles[..], +// ); + +// proxy_wrapper +// } diff --git a/legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.lock b/legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.lock new file mode 100644 index 000000000..1c37aeb5b --- /dev/null +++ b/legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.lock @@ -0,0 +1,597 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "common-types" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "common_errors" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "common_structs" +version = "0.0.0" +dependencies = [ + "fixed-supply-token", + "math", + "mergeable", + "multiversx-sc", + "unwrappable", +] + +[[package]] +name = "config" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "multiversx-sc", + "pausable", + "permissions_module", + "token_send", +] + +[[package]] +name = "contexts" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "config", + "farm_token", + "multiversx-sc", + "multiversx-sc-modules", + "pausable", + "permissions_module", + "rewards", + "token_merge_helper", + "token_send", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "energy-factory" +version = "0.0.0" +dependencies = [ + "common_structs", + "legacy_token_decode_module", + "math", + "mergeable", + "multiversx-sc", + "multiversx-sc-modules", + "sc_whitelist_module", + "simple-lock", + "unwrappable", + "utils", +] + +[[package]] +name = "energy-query" +version = "0.0.0" +dependencies = [ + "energy-factory", + "multiversx-sc", +] + +[[package]] +name = "events" +version = "0.0.0" +dependencies = [ + "common_structs", + "contexts", + "multiversx-sc", +] + +[[package]] +name = "farm" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "config", + "contexts", + "energy-query", + "events", + "farm-boosted-yields", + "farm_base_impl", + "farm_token", + "fixed-supply-token", + "mergeable", + "multiversx-sc", + "multiversx-sc-modules", + "pair", + "pausable", + "permissions_module", + "rewards", + "sc_whitelist_module", + "token_send", + "utils", + "week-timekeeping", + "weekly-rewards-splitting", +] + +[[package]] +name = "farm-boosted-yields" +version = "0.0.0" +dependencies = [ + "common-types", + "config", + "energy-query", + "multiversx-sc", + "pausable", + "permissions_module", + "week-timekeeping", + "weekly-rewards-splitting", +] + +[[package]] +name = "farm-staking" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "config", + "contexts", + "energy-factory", + "energy-query", + "events", + "farm", + "farm-boosted-yields", + "farm_base_impl", + "farm_token", + "fixed-supply-token", + "math", + "mergeable", + "multiversx-sc", + "multiversx-sc-modules", + "pair", + "pausable", + "permissions_module", + "rewards", + "sc_whitelist_module", + "token_send", + "utils", + "week-timekeeping", + "weekly-rewards-splitting", +] + +[[package]] +name = "farm-staking-proxy-v-13" +version = "0.0.0" +dependencies = [ + "common_structs", + "farm-staking", + "farm-v-13", + "multiversx-sc", + "multiversx-sc-modules", + "pair", + "token_merge_helper", +] + +[[package]] +name = "farm-staking-proxy-v-13-wasm" +version = "0.0.0" +dependencies = [ + "farm-staking-proxy-v-13", + "multiversx-sc-wasm-adapter", +] + +[[package]] +name = "farm-v-13" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "farm_base_impl" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "config", + "contexts", + "events", + "farm_token", + "fixed-supply-token", + "mergeable", + "multiversx-sc", + "multiversx-sc-modules", + "pausable", + "permissions_module", + "rewards", + "token_merge_helper", + "token_send", + "utils", +] + +[[package]] +name = "farm_token" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "config", + "multiversx-sc", + "multiversx-sc-modules", + "pausable", + "permissions_module", + "token_send", +] + +[[package]] +name = "fees-collector" +version = "0.0.0" +dependencies = [ + "common-types", + "common_errors", + "energy-factory", + "energy-query", + "locking_module", + "multiversx-sc", + "multiversx-sc-modules", + "sc_whitelist_module", + "simple-lock", + "utils", + "week-timekeeping", + "weekly-rewards-splitting", +] + +[[package]] +name = "fixed-supply-token" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "legacy_token_decode_module" +version = "0.0.0" +dependencies = [ + "common_structs", + "multiversx-sc", + "utils", +] + +[[package]] +name = "locking_module" +version = "0.0.0" +dependencies = [ + "energy-factory", + "multiversx-sc", + "simple-lock", +] + +[[package]] +name = "math" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "mergeable" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "multiversx-sc" +version = "0.50.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38a802d6cfa67748145a9e729336f4e6390eba702b5f14360ed01fcff14faa4" +dependencies = [ + "bitflags", + "hex-literal", + "multiversx-sc-codec", + "multiversx-sc-derive", + "num-traits", + "unwrap-infallible", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c94397b2fba14e40edfa55905b3f453ed57aa06c9b1960ad6a0ca6bfb7a236" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive", + "unwrap-infallible", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf72a8042da0bc19da0b8f0d4f61b4c66ae853560fefc69cd8fea87bf1aa8c14" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.50.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dc53ddcbd71948d2e8d3d6b814da866e2920b24e6c0cbfa643922f781897476" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn", +] + +[[package]] +name = "multiversx-sc-modules" +version = "0.50.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea1ae09db9cac18669b85d50932410df6082e1a575975ba5224e3b7ae33cbe7d" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "multiversx-sc-wasm-adapter" +version = "0.50.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99a090365b4483b4ea955ba1322f986f6821be88144291f0013c03f59b4de753" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "pair" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "fees-collector", + "itertools", + "multiversx-sc", + "pausable", + "permissions_module", + "simple-lock", + "token_send", + "utils", +] + +[[package]] +name = "pausable" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "permissions_module", +] + +[[package]] +name = "permissions_module" +version = "0.0.0" +dependencies = [ + "bitflags", + "common_errors", + "multiversx-sc", +] + +[[package]] +name = "proc-macro2" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "rewards" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "config", + "farm_token", + "multiversx-sc", + "multiversx-sc-modules", + "pausable", + "permissions_module", + "token_send", +] + +[[package]] +name = "sc_whitelist_module" +version = "0.0.0" +dependencies = [ + "common_errors", + "multiversx-sc", +] + +[[package]] +name = "simple-lock" +version = "0.0.0" +dependencies = [ + "common_structs", + "multiversx-sc", + "multiversx-sc-modules", +] + +[[package]] +name = "smallvec" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" + +[[package]] +name = "syn" +version = "2.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "token_merge_helper" +version = "0.0.0" +dependencies = [ + "common_errors", + "multiversx-sc", +] + +[[package]] +name = "token_send" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "multiversx-sc", +] + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + +[[package]] +name = "unwrappable" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "utils" +version = "0.0.0" +dependencies = [ + "common_structs", + "fixed-supply-token", + "mergeable", + "multiversx-sc", +] + +[[package]] +name = "week-timekeeping" +version = "0.0.0" +dependencies = [ + "common-types", + "multiversx-sc", +] + +[[package]] +name = "weekly-rewards-splitting" +version = "0.0.0" +dependencies = [ + "common-types", + "energy-query", + "math", + "multiversx-sc", + "unwrappable", + "week-timekeeping", +] diff --git a/legacy-contracts/farm-staking-proxy-legacy/wasm/Cargo.toml b/legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.toml similarity index 87% rename from legacy-contracts/farm-staking-proxy-legacy/wasm/Cargo.toml rename to legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.toml index 8851e6be6..37ccbf235 100644 --- a/legacy-contracts/farm-staking-proxy-legacy/wasm/Cargo.toml +++ b/legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.toml @@ -5,7 +5,7 @@ # ########################################## [package] -name = "farm-staking-proxy-legacy-wasm" +name = "farm-staking-proxy-v-13-wasm" version = "0.0.0" edition = "2021" publish = false @@ -24,7 +24,7 @@ overflow-checks = false [profile.dev] panic = "abort" -[dependencies.farm-staking-proxy-legacy] +[dependencies.farm-staking-proxy-v-13] path = ".." [dependencies.multiversx-sc-wasm-adapter] diff --git a/legacy-contracts/farm-staking-proxy-legacy/wasm/src/lib.rs b/legacy-contracts/farm-staking-proxy-v-13/wasm/src/lib.rs similarity index 88% rename from legacy-contracts/farm-staking-proxy-legacy/wasm/src/lib.rs rename to legacy-contracts/farm-staking-proxy-v-13/wasm/src/lib.rs index 2ed024e96..f926207ed 100644 --- a/legacy-contracts/farm-staking-proxy-legacy/wasm/src/lib.rs +++ b/legacy-contracts/farm-staking-proxy-v-13/wasm/src/lib.rs @@ -5,9 +5,10 @@ //////////////////////////////////////////////////// // Init: 1 +// Upgrade: 1 // Endpoints: 9 // Async Callback (empty): 1 -// Total number of exported functions: 11 +// Total number of exported functions: 12 #![no_std] @@ -15,9 +16,10 @@ multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { - farm_staking_proxy_legacy + farm_staking_proxy_v_13 ( init => init + upgrade => upgrade unstakeFarmTokens => unstake_farm_tokens setTransferRoleDualYieldToken => set_transfer_role_dual_yield_token getDualYieldTokenId => dual_yield_token_id diff --git a/legacy-contracts/farm-v-13/Cargo.lock b/legacy-contracts/farm-v-13/Cargo.lock new file mode 100644 index 000000000..07b1eab79 --- /dev/null +++ b/legacy-contracts/farm-v-13/Cargo.lock @@ -0,0 +1,2593 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[package]] +name = "addr2line" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anstream" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" + +[[package]] +name = "anstyle-parse" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + +[[package]] +name = "anyhow" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "backtrace" +version = "0.3.73" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + +[[package]] +name = "bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "rand_core 0.6.4", + "serde", + "unicode-normalization", +] + +[[package]] +name = "bitcoin_hashes" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bstr" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" + +[[package]] +name = "cc" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74b6a57f98764a267ff415d50a25e6e166f3831a5071af4995296ea97d210490" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "4.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84b3edb18336f4df585bc9aa31dd99c036dfa5dc5e9a2939a722a188f3a8970d" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1c09dd5ada6c6c78075d6fd0da3f90d8080651e2d6cc8eb2f1aaa4034ced708" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" + +[[package]] +name = "colorchoice" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" + +[[package]] +name = "colored" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +dependencies = [ + "lazy_static", + "windows-sys 0.48.0", +] + +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "copy_dir" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "543d1dd138ef086e2ff05e3a48cf9da045da2033d16f8538fd76b86cd49b2ca3" +dependencies = [ + "walkdir", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b9fdf9972b2bd6af2d913799d9ebc165ea4d2e65878e329d9c6b372c4491b61" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] + +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ed25519" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" +dependencies = [ + "signature", +] + +[[package]] +name = "ed25519-dalek" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +dependencies = [ + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "encoding_rs" +version = "0.8.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "farm-v-13" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "multiversx-sc-scenario", + "num-bigint", +] + +[[package]] +name = "farm-v-13-meta" +version = "0.0.0" +dependencies = [ + "farm-v-13", + "multiversx-sc-meta", +] + +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "gimli" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" + +[[package]] +name = "globset" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "serde", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" + +[[package]] +name = "hyper" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4fe55fb7a772d59a5ff1dfbff4fe0258d19b89fec4b233e75d35d5d2316badc" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "ignore" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + +[[package]] +name = "indexmap" +version = "2.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +dependencies = [ + "equivalent", + "hashbrown", + "serde", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.155" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + +[[package]] +name = "multiversx-chain-scenario-format" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a9190bdd56300e801e7793fc4ee7dc0c76c1149aac019da8c71cc58254966fe" +dependencies = [ + "bech32", + "hex", + "num-bigint", + "num-traits", + "serde", + "serde_json", + "sha3", +] + +[[package]] +name = "multiversx-chain-vm" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f69520691466bc184475320c27db21137e68be5e959df25c1a14b09e055d0d58" +dependencies = [ + "bitflags 2.5.0", + "colored", + "ed25519-dalek", + "hex", + "hex-literal", + "itertools", + "multiversx-chain-vm-executor", + "num-bigint", + "num-traits", + "rand 0.8.5", + "rand_seeder", + "sha2 0.10.8", + "sha3", +] + +[[package]] +name = "multiversx-chain-vm-executor" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b59072fa0624b55ae5ae3fa6bfa91515bbeb4ac440214bc4a509e2c8806d6e9f" + +[[package]] +name = "multiversx-sc" +version = "0.50.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38a802d6cfa67748145a9e729336f4e6390eba702b5f14360ed01fcff14faa4" +dependencies = [ + "bitflags 2.5.0", + "hex-literal", + "multiversx-sc-codec", + "multiversx-sc-derive", + "num-traits", + "unwrap-infallible", +] + +[[package]] +name = "multiversx-sc-codec" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c94397b2fba14e40edfa55905b3f453ed57aa06c9b1960ad6a0ca6bfb7a236" +dependencies = [ + "arrayvec", + "multiversx-sc-codec-derive", + "num-bigint", + "unwrap-infallible", +] + +[[package]] +name = "multiversx-sc-codec-derive" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf72a8042da0bc19da0b8f0d4f61b4c66ae853560fefc69cd8fea87bf1aa8c14" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "multiversx-sc-derive" +version = "0.50.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dc53ddcbd71948d2e8d3d6b814da866e2920b24e6c0cbfa643922f781897476" +dependencies = [ + "hex", + "proc-macro2", + "quote", + "radix_trie", + "syn", +] + +[[package]] +name = "multiversx-sc-meta" +version = "0.50.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca792ba887b76270d5d6c975e349f2e7e037af2db25a78fe855ceb70eed473dd" +dependencies = [ + "clap", + "colored", + "common-path", + "convert_case", + "copy_dir", + "hex", + "lazy_static", + "multiversx-sc", + "pathdiff", + "reqwest", + "ruplacer", + "rustc_version", + "semver", + "serde", + "serde_json", + "toml", + "wasmparser", + "wasmprinter", + "zip", +] + +[[package]] +name = "multiversx-sc-scenario" +version = "0.50.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9916e196bbe87d5d46e4c9fd8ea00283660a97be44e6628c2cfbc9df5f8befcb" +dependencies = [ + "base64", + "bech32", + "clap", + "colored", + "hex", + "itertools", + "log", + "multiversx-chain-scenario-format", + "multiversx-chain-vm", + "multiversx-chain-vm-executor", + "multiversx-sc", + "multiversx-sc-meta", + "multiversx-sdk", + "num-bigint", + "num-traits", + "pathdiff", + "serde", + "serde_json", + "sha2 0.10.8", + "tokio", + "unwrap-infallible", +] + +[[package]] +name = "multiversx-sdk" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cb2f8dd4a17ce9c9fa1ab3d80152929702968be6536499f32bd7e2278c2e0fb" +dependencies = [ + "anyhow", + "base64", + "bech32", + "bip39", + "hex", + "hmac", + "itertools", + "pbkdf2", + "pem", + "rand 0.8.5", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "sha2 0.10.8", + "sha3", + "tokio", + "zeroize", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + +[[package]] +name = "num-bigint" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "object" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl" +version = "0.10.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" +dependencies = [ + "bitflags 2.5.0", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.5", +] + +[[package]] +name = "pathdiff" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "pem" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" +dependencies = [ + "base64", + "serde", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro2" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_seeder" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf2890aaef0aa82719a50e808de264f9484b74b442e1a3a0e5ee38243ac40bdb" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "redox_syscall" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +dependencies = [ + "bitflags 2.5.0", +] + +[[package]] +name = "regex" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "reqwest" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.15", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "ruplacer" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58a26a1b15ff113d31d139357f7422708312978ed69cd5dd47e36d1b80b7eaf3" +dependencies = [ + "Inflector", + "anyhow", + "clap", + "colored", + "ignore", + "regex", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.5.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustls" +version = "0.23.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "rustls-webpki" +version = "0.102.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "security-framework" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +dependencies = [ + "bitflags 2.5.0", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "serde" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.203" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8eddb61f0697cc3989c5d64b452f5488e2b8a60fd7d5076a3045076ffef8cb0" +dependencies = [ + "indexmap", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_spanned" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +dependencies = [ + "cfg-if", + "fastrand", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "thiserror" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.61" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tinyvec" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] + +[[package]] +name = "toml_datetime" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.22.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + +[[package]] +name = "url" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "wasmparser" +version = "0.208.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd921789c9dcc495f589cb37d200155dee65b4a4beeb853323b5e24e0a5f9c58" +dependencies = [ + "ahash", + "bitflags 2.5.0", + "hashbrown", + "indexmap", + "semver", + "serde", +] + +[[package]] +name = "wasmprinter" +version = "0.208.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700bdace4821e6c694617938500ae9999946df464bb13219c16570f8b6f202f" +dependencies = [ + "anyhow", + "wasmparser", +] + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi-util" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.5", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +dependencies = [ + "windows_aarch64_gnullvm 0.52.5", + "windows_aarch64_msvc 0.52.5", + "windows_i686_gnu 0.52.5", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.5", + "windows_x86_64_gnu 0.52.5", + "windows_x86_64_gnullvm 0.52.5", + "windows_x86_64_msvc 0.52.5", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" + +[[package]] +name = "winnow" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "zerocopy" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zip" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775a2b471036342aa69bc5a602bc889cb0a06cda00477d0c69566757d5553d39" +dependencies = [ + "arbitrary", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "flate2", + "indexmap", + "memchr", + "thiserror", + "zopfli", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", +] diff --git a/legacy-contracts/farm-v-13/Cargo.toml b/legacy-contracts/farm-v-13/Cargo.toml new file mode 100644 index 000000000..c5e7940db --- /dev/null +++ b/legacy-contracts/farm-v-13/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "farm-v-13" +version = "0.0.0" +authors = ["you"] +edition = "2021" +publish = false + +[lib] +path = "src/lib.rs" + +[dependencies.multiversx-sc] +version = "0.50.5" + +[dev-dependencies] +num-bigint = "0.4" + +[dev-dependencies.multiversx-sc-scenario] +version = "0.50.5" diff --git a/legacy-contracts/farm-v-13/meta/Cargo.toml b/legacy-contracts/farm-v-13/meta/Cargo.toml new file mode 100644 index 000000000..7caffff1e --- /dev/null +++ b/legacy-contracts/farm-v-13/meta/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "farm-v-13-meta" +version = "0.0.0" +edition = "2021" +publish = false + +[dependencies.farm-v-13] +path = ".." + +[dependencies.multiversx-sc-meta] +version = "0.50.5" +default-features = false diff --git a/legacy-contracts/farm-v-13/meta/src/main.rs b/legacy-contracts/farm-v-13/meta/src/main.rs new file mode 100644 index 000000000..11be3279d --- /dev/null +++ b/legacy-contracts/farm-v-13/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} diff --git a/legacy-contracts/farm-v-13/multiversx.json b/legacy-contracts/farm-v-13/multiversx.json new file mode 100644 index 000000000..736553962 --- /dev/null +++ b/legacy-contracts/farm-v-13/multiversx.json @@ -0,0 +1,3 @@ +{ + "language": "rust" +} \ No newline at end of file diff --git a/legacy-contracts/farm-v-13/src/lib.rs b/legacy-contracts/farm-v-13/src/lib.rs new file mode 100644 index 000000000..50f3bed11 --- /dev/null +++ b/legacy-contracts/farm-v-13/src/lib.rs @@ -0,0 +1,58 @@ +#![no_std] + +use multiversx_sc::derive_imports::*; +use multiversx_sc::imports::*; + +type ExitFarmResultType = + MultiValue2, EsdtTokenPayment>; + +#[derive( + ManagedVecItem, + TopEncode, + TopDecode, + NestedEncode, + NestedDecode, + TypeAbi, + Clone, + PartialEq, + Debug, +)] +pub struct FarmTokenAttributes { + pub reward_per_share: BigUint, + pub original_entering_epoch: u64, + pub entering_epoch: u64, + pub initial_farming_amount: BigUint, + pub compounded_reward: BigUint, + pub current_farm_amount: BigUint, +} + +#[multiversx_sc::contract] +pub trait FarmV13 { + #[init] + fn init(&self) {} + + #[upgrade] + fn upgrade(&self) {} + + #[payable("*")] + #[endpoint(exitFarm)] + fn exit_farm( + &self, + _opt_accept_funds_func: OptionalValue, + ) -> ExitFarmResultType { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(calculateRewardsForGivenPosition)] + fn calculate_rewards_for_given_position( + &self, + _amount: BigUint, + _attributes: FarmTokenAttributes, + ) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn end_produce_rewards(&self) {} +} diff --git a/legacy-contracts/farm-staking-proxy-legacy/wasm/Cargo.lock b/legacy-contracts/farm-v-13/wasm/Cargo.lock similarity index 77% rename from legacy-contracts/farm-staking-proxy-legacy/wasm/Cargo.lock rename to legacy-contracts/farm-v-13/wasm/Cargo.lock index f5b4cc341..3913dc656 100644 --- a/legacy-contracts/farm-staking-proxy-legacy/wasm/Cargo.lock +++ b/legacy-contracts/farm-v-13/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "bitflags" @@ -20,24 +20,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" -[[package]] -name = "common_errors" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - -[[package]] -name = "common_structs" -version = "0.0.0" -dependencies = [ - "fixed-supply-token", - "math", - "mergeable", - "multiversx-sc", - "unwrappable", -] - [[package]] name = "endian-type" version = "0.1.2" @@ -45,30 +27,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] -name = "farm-staking-proxy-legacy" +name = "farm-v-13" version = "0.0.0" dependencies = [ - "common_structs", "multiversx-sc", - "multiversx-sc-modules", - "token_merge_helper", ] [[package]] -name = "farm-staking-proxy-legacy-wasm" +name = "farm-v-13-wasm" version = "0.0.0" dependencies = [ - "farm-staking-proxy-legacy", + "farm-v-13", "multiversx-sc-wasm-adapter", ] -[[package]] -name = "fixed-supply-token" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "hex" version = "0.4.3" @@ -81,20 +53,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" -[[package]] -name = "math" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - -[[package]] -name = "mergeable" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "multiversx-sc" version = "0.50.5" @@ -145,15 +103,6 @@ dependencies = [ "syn", ] -[[package]] -name = "multiversx-sc-modules" -version = "0.50.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea1ae09db9cac18669b85d50932410df6082e1a575975ba5224e3b7ae33cbe7d" -dependencies = [ - "multiversx-sc", -] - [[package]] name = "multiversx-sc-wasm-adapter" version = "0.50.5" @@ -211,9 +160,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "syn" @@ -226,14 +175,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "token_merge_helper" -version = "0.0.0" -dependencies = [ - "common_errors", - "multiversx-sc", -] - [[package]] name = "unicode-ident" version = "1.0.12" @@ -245,10 +186,3 @@ name = "unwrap-infallible" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" - -[[package]] -name = "unwrappable" -version = "0.0.0" -dependencies = [ - "multiversx-sc", -] diff --git a/legacy-contracts/farm-v-13/wasm/Cargo.toml b/legacy-contracts/farm-v-13/wasm/Cargo.toml new file mode 100644 index 000000000..d1cba483c --- /dev/null +++ b/legacy-contracts/farm-v-13/wasm/Cargo.toml @@ -0,0 +1,34 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + +[package] +name = "farm-v-13-wasm" +version = "0.0.0" +edition = "2021" +publish = false + +[lib] +crate-type = ["cdylib"] + +[profile.release] +codegen-units = 1 +opt-level = "z" +lto = true +debug = false +panic = "abort" +overflow-checks = false + +[profile.dev] +panic = "abort" + +[dependencies.farm-v-13] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "0.50.5" + +[workspace] +members = ["."] diff --git a/legacy-contracts/farm-v-13/wasm/src/lib.rs b/legacy-contracts/farm-v-13/wasm/src/lib.rs new file mode 100644 index 000000000..850923617 --- /dev/null +++ b/legacy-contracts/farm-v-13/wasm/src/lib.rs @@ -0,0 +1,29 @@ +// Code generated by the multiversx-sc build system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Upgrade: 1 +// Endpoints: 3 +// Async Callback (empty): 1 +// Total number of exported functions: 6 + +#![no_std] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + farm_v_13 + ( + init => init + upgrade => upgrade + exitFarm => exit_farm + calculateRewardsForGivenPosition => calculate_rewards_for_given_position + end_produce_rewards => end_produce_rewards + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {}