From d2919367360fa647c065bb7f320a3168fbe6bcfe Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Tue, 16 Jul 2024 23:51:54 +0300 Subject: [PATCH 01/13] Proxy dex legacy contract --- Cargo.lock | 19 + Cargo.toml | 2 + legacy-contracts/proxy-dex-legacy/.gitignore | 7 + legacy-contracts/proxy-dex-legacy/Cargo.toml | 24 ++ legacy-contracts/proxy-dex-legacy/README.md | 24 ++ .../proxy-dex-legacy/meta/Cargo.toml | 14 + .../proxy-dex-legacy/meta/src/main.rs | 3 + .../proxy-dex-legacy/multiversx.json | 4 + .../proxy-dex-legacy/src/energy.rs | 109 +++++ .../proxy-dex-legacy/src/energy_update.rs | 135 ++++++ .../proxy-dex-legacy/src/events.rs | 149 +++++++ legacy-contracts/proxy-dex-legacy/src/lib.rs | 31 ++ .../src/migration_from_v1_2.rs | 116 +++++ .../proxy-dex-legacy/src/proxy_common.rs | 129 ++++++ .../proxy-dex-legacy/src/proxy_farm.rs | 159 +++++++ .../proxy-dex-legacy/src/proxy_pair.rs | 220 ++++++++++ .../proxy-dex-legacy/src/transfer_role.rs | 90 ++++ .../proxy-dex-legacy/testnet.toml | 0 .../proxy-dex-legacy/wasm/Cargo.lock | 398 ++++++++++++++++++ .../proxy-dex-legacy/wasm/Cargo.toml | 34 ++ .../proxy-dex-legacy/wasm/src/lib.rs | 44 ++ locked-asset/factory/src/lib.rs | 2 +- 22 files changed, 1712 insertions(+), 1 deletion(-) create mode 100644 legacy-contracts/proxy-dex-legacy/.gitignore create mode 100644 legacy-contracts/proxy-dex-legacy/Cargo.toml create mode 100644 legacy-contracts/proxy-dex-legacy/README.md create mode 100644 legacy-contracts/proxy-dex-legacy/meta/Cargo.toml create mode 100644 legacy-contracts/proxy-dex-legacy/meta/src/main.rs create mode 100644 legacy-contracts/proxy-dex-legacy/multiversx.json create mode 100644 legacy-contracts/proxy-dex-legacy/src/energy.rs create mode 100644 legacy-contracts/proxy-dex-legacy/src/energy_update.rs create mode 100644 legacy-contracts/proxy-dex-legacy/src/events.rs create mode 100644 legacy-contracts/proxy-dex-legacy/src/lib.rs create mode 100644 legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs create mode 100644 legacy-contracts/proxy-dex-legacy/src/proxy_common.rs create mode 100644 legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs create mode 100644 legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs create mode 100644 legacy-contracts/proxy-dex-legacy/src/transfer_role.rs create mode 100644 legacy-contracts/proxy-dex-legacy/testnet.toml create mode 100644 legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock create mode 100644 legacy-contracts/proxy-dex-legacy/wasm/Cargo.toml create mode 100644 legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index d7e21d7f3..97f3c2e89 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2242,6 +2242,25 @@ dependencies = [ "proxy-deployer", ] +[[package]] +name = "proxy-dex-legacy" +version = "0.0.0" +dependencies = [ + "common_structs", + "factory", + "multiversx-sc", + "multiversx-sc-scenario", + "token_merge_helper", +] + +[[package]] +name = "proxy-dex-legacy-meta" +version = "0.0.0" +dependencies = [ + "multiversx-sc-meta", + "proxy-dex-legacy", +] + [[package]] name = "proxy_dex" version = "0.0.0" diff --git a/Cargo.toml b/Cargo.toml index 88a66788f..db13e51b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,6 +43,8 @@ members = [ "legacy-contracts/farm-staking-proxy-v-13/meta", "legacy-contracts/farm-v-13", "legacy-contracts/farm-v-13/meta", + "legacy-contracts/proxy-dex-legacy", + "legacy-contracts/proxy-dex-legacy/meta", "locked-asset/", "locked-asset/distribution", diff --git a/legacy-contracts/proxy-dex-legacy/.gitignore b/legacy-contracts/proxy-dex-legacy/.gitignore new file mode 100644 index 000000000..eaf5915bd --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/.gitignore @@ -0,0 +1,7 @@ +# Generated by Cargo +# will have compiled files and executables +/target/ +*/target/ + +# The erdpy output +output diff --git a/legacy-contracts/proxy-dex-legacy/Cargo.toml b/legacy-contracts/proxy-dex-legacy/Cargo.toml new file mode 100644 index 000000000..cb6801e13 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "proxy-dex-legacy" +version = "0.0.0" +edition = "2018" +publish = false + +[lib] +path = "src/lib.rs" + +[dependencies.multiversx-sc] +version = "=0.50.5" +features = ["esdt-token-payment-legacy-decode"] + +[dev-dependencies.multiversx-sc-scenario] +version = "=0.50.5" + +[dependencies.common_structs] +path = "../../common/common_structs" + +[dependencies.token_merge_helper] +path = "../../common/modules/token_merge_helper" + +[dependencies.factory] +path = "../../locked-asset/factory" diff --git a/legacy-contracts/proxy-dex-legacy/README.md b/legacy-contracts/proxy-dex-legacy/README.md new file mode 100644 index 000000000..cfa338037 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/README.md @@ -0,0 +1,24 @@ +# DEX Proxy Smart Contract + +This document presents how one can deploy and configure a DEX Proxy Contract. +The bigger picture about what a DEX Proxy Contract can do can be found in the Repository's Root Readme. + +## Deployment + +The DEX Proxy contract can be deployed using `erdpy` and using the interraction snippets. + +The init parameters are: + +- asset_token_id. The TokenId of the asset that a locked asset represents. In case of Maiar Exchange it will be MEX. + +- locked_asset_token_id. The TokenId of the locked asset represents. In case of Maiar Exchange it will be Locked MEX. + +## Configuration workflow + +1. In order to complete the setup of the dex proxy contracts, Wrapped LP Token and Wrapped Farm token must be issued via `issueSftProxyPair` and `issueSftProxyFarm`. After this, setLocalRoles has to be called once for each of the two tokens, using for address the Proxy Address itself. + +2. In order to add a pair to intermediate, meaning a pair that is eligible to function with MEX, the admin should use `addPairToIntermediate` and `removeIntermediatedPair`. + +3. In order to add a farm to intermediate, meaning a farm that is eligible to function with MEX or with Wrapped LP Tokens, the admin should use `addFarmToIntermediate` and `removeIntermediatedFarm`. + +4. In order for the Setup to be complete, LocalMint + LocalBurn roles for MEX and NftBurn role for Locked MEX should be granted to the Proxy Contract. diff --git a/legacy-contracts/proxy-dex-legacy/meta/Cargo.toml b/legacy-contracts/proxy-dex-legacy/meta/Cargo.toml new file mode 100644 index 000000000..38efa5f0d --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/meta/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "proxy-dex-legacy-meta" + +version = "0.0.0" +authors = [ "you",] +edition = "2018" +publish = false + +[dependencies.proxy-dex-legacy] +path = ".." + +[dependencies.multiversx-sc-meta] +version = "0.50.5" +default-features = false diff --git a/legacy-contracts/proxy-dex-legacy/meta/src/main.rs b/legacy-contracts/proxy-dex-legacy/meta/src/main.rs new file mode 100644 index 000000000..c282d1ab7 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} \ No newline at end of file diff --git a/legacy-contracts/proxy-dex-legacy/multiversx.json b/legacy-contracts/proxy-dex-legacy/multiversx.json new file mode 100644 index 000000000..c2cab7433 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/multiversx.json @@ -0,0 +1,4 @@ +{ + "language": "rust" +} + diff --git a/legacy-contracts/proxy-dex-legacy/src/energy.rs b/legacy-contracts/proxy-dex-legacy/src/energy.rs new file mode 100644 index 000000000..651bbf544 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/src/energy.rs @@ -0,0 +1,109 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::Epoch; + +#[derive(TypeAbi, TopEncode, TopDecode, NestedEncode, NestedDecode, Clone, PartialEq, Debug)] +pub struct Energy { + amount: BigInt, + last_update_epoch: Epoch, + total_locked_tokens: BigUint, +} + +impl Default for Energy { + fn default() -> Self { + Self { + amount: BigInt::zero(), + last_update_epoch: 0, + total_locked_tokens: BigUint::zero(), + } + } +} + +impl Energy { + #[inline] + pub fn new( + amount: BigInt, + last_update_epoch: Epoch, + total_locked_tokens: BigUint, + ) -> Self { + Energy { + amount, + last_update_epoch, + total_locked_tokens, + } + } + + pub fn new_zero_energy(current_epoch: Epoch) -> Self { + Self::new(BigInt::zero(), current_epoch, BigUint::zero()) + } + + fn add(&mut self, future_epoch: Epoch, current_epoch: Epoch, amount_per_epoch: &BigUint) { + if current_epoch >= future_epoch { + return; + } + + let epochs_diff = future_epoch - current_epoch; + let energy_added = amount_per_epoch * epochs_diff; + self.amount += BigInt::from(energy_added); + } + + fn subtract(&mut self, past_epoch: Epoch, current_epoch: Epoch, amount_per_epoch: &BigUint) { + if past_epoch >= current_epoch { + return; + } + + let epoch_diff = current_epoch - past_epoch; + let energy_decrease = amount_per_epoch * epoch_diff; + self.amount -= BigInt::from(energy_decrease); + } + + pub fn deplete(&mut self, current_epoch: Epoch) { + if self.last_update_epoch == current_epoch { + return; + } + + if self.total_locked_tokens > 0 { + self.subtract( + self.last_update_epoch, + current_epoch, + &self.total_locked_tokens.clone(), + ); + } + + self.last_update_epoch = current_epoch; + } + + pub fn refund_after_token_unlock( + &mut self, + unlock_amount: &BigUint, + unlock_epoch: Epoch, + current_epoch: Epoch, + ) { + self.add(current_epoch, unlock_epoch, unlock_amount); + self.total_locked_tokens -= unlock_amount; + } + + pub fn deplete_after_early_unlock( + &mut self, + unlock_amount: &BigUint, + unlock_epoch: Epoch, + current_epoch: Epoch, + ) { + self.subtract(current_epoch, unlock_epoch, unlock_amount); + self.total_locked_tokens -= unlock_amount; + } + + pub fn update_after_unlock_any( + &mut self, + unlock_amount: &BigUint, + unlock_epoch: Epoch, + current_epoch: Epoch, + ) { + if unlock_epoch < current_epoch { + self.refund_after_token_unlock(unlock_amount, unlock_epoch, current_epoch); + } else { + self.deplete_after_early_unlock(unlock_amount, unlock_epoch, current_epoch); + } + } +} diff --git a/legacy-contracts/proxy-dex-legacy/src/energy_update.rs b/legacy-contracts/proxy-dex-legacy/src/energy_update.rs new file mode 100644 index 000000000..06921dd35 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/src/energy_update.rs @@ -0,0 +1,135 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::LockedAssetTokenAttributesEx; +use factory::attr_ex_helper; + +use crate::{energy::Energy, proxy_common}; + +static LEGACY_LOCKED_TOKEN_ID_STORAGE_KEY: &[u8] = b"legacyLockedTokenId"; +static USER_ENERGY_STORAGE_KEY: &[u8] = b"userEnergy"; +static EXTENDED_ATTRIBUTES_ACTIVATION_NONCE_KEY: &[u8] = b"extended_attributes_activation_nonce"; + +mod energy_factory_proxy { + multiversx_sc::imports!(); + use crate::energy_update::Energy; + + #[multiversx_sc::proxy] + pub trait LockedTokenTransferModule { + #[endpoint(setUserEnergyAfterLockedTokenTransfer)] + fn set_user_energy_after_locked_token_transfer( + &self, + user: ManagedAddress, + energy: Energy, + ); + } +} + +#[multiversx_sc::module] +pub trait EnergyUpdateModule: + proxy_common::ProxyCommonModule + attr_ex_helper::AttrExHelper +{ + #[only_owner] + #[endpoint(setEnergyFactoryAddress)] + fn set_energy_factory_address(&self, sc_address: ManagedAddress) { + require!( + self.blockchain().is_smart_contract(&sc_address), + "Invalid address" + ); + + self.energy_factory_address().set(&sc_address); + } + + fn deduct_energy_from_user( + &self, + user: &ManagedAddress, + token_id: &TokenIdentifier, + token_nonce: u64, + token_amount: &BigUint, + ) { + let energy_factory_addr = self.energy_factory_address().get(); + let legacy_locked_token_id = self.get_legacy_locked_token_id(&energy_factory_addr); + if token_id != &legacy_locked_token_id { + return; + } + + let mut energy = self.get_energy_entry(user); + let current_epoch = self.blockchain().get_block_epoch(); + let attributes: LockedAssetTokenAttributesEx = + self.get_attributes_ex(token_id, token_nonce); + let amounts_per_epoch = attributes.get_unlock_amounts_per_epoch(token_amount); + for epoch_amount_pair in &amounts_per_epoch.pairs { + energy.update_after_unlock_any( + &epoch_amount_pair.amount, + epoch_amount_pair.epoch, + current_epoch, + ); + } + + self.set_energy_in_factory(user.clone(), energy, energy_factory_addr); + } + + fn set_energy_in_factory( + &self, + user: ManagedAddress, + energy: Energy, + energy_factory_addr: ManagedAddress, + ) { + let _: () = self + .energy_factory_proxy(energy_factory_addr) + .set_user_energy_after_locked_token_transfer(user, energy) + .execute_on_dest_context(); + } + + fn get_energy_entry(&self, user: &ManagedAddress) -> Energy { + let current_epoch = self.blockchain().get_block_epoch(); + if self.energy_factory_address().is_empty() { + return Energy::new_zero_energy(current_epoch); + } + + let energy_buffer: ManagedBuffer = self.read_storage_from_energy_factory(user); + if !energy_buffer.is_empty() { + let mut user_energy: Energy = Energy::top_decode(energy_buffer) + .unwrap_or_else(|_| sc_panic!("Failed decoding result from energy factory")); + user_energy.deplete(current_epoch); + + user_energy + } else { + Energy::new_zero_energy(current_epoch) + } + } + + fn read_storage_from_energy_factory(&self, user: &ManagedAddress) -> T { + let energy_factory_address = self.energy_factory_address().get(); + let mut key_buffer = ManagedBuffer::new_from_bytes(USER_ENERGY_STORAGE_KEY); + key_buffer.append(user.as_managed_buffer()); + + self.storage_raw() + .read_from_address(&energy_factory_address, key_buffer) + } + + fn get_legacy_locked_token_id(&self, energy_factory_addr: &ManagedAddress) -> TokenIdentifier { + self.storage_raw().read_from_address( + energy_factory_addr, + ManagedBuffer::new_from_bytes(LEGACY_LOCKED_TOKEN_ID_STORAGE_KEY), + ) + } + + fn get_extended_attributes_activation_nonce(&self) -> u64 { + let sc_address = self.locked_asset_factory_address().get(); + self.storage_raw().read_from_address( + &sc_address, + ManagedBuffer::new_from_bytes(EXTENDED_ATTRIBUTES_ACTIVATION_NONCE_KEY), + ) + } + + #[proxy] + fn energy_factory_proxy( + &self, + sc_address: ManagedAddress, + ) -> energy_factory_proxy::Proxy; + + #[view(getEnergyFactoryAddress)] + #[storage_mapper("energyFactoryAddress")] + fn energy_factory_address(&self) -> SingleValueMapper; +} diff --git a/legacy-contracts/proxy-dex-legacy/src/events.rs b/legacy-contracts/proxy-dex-legacy/src/events.rs new file mode 100644 index 000000000..3fefd8fb1 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/src/events.rs @@ -0,0 +1,149 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use crate::proxy_common::{WrappedFarmTokenAttributes, WrappedLpTokenAttributes}; + +#[derive(TypeAbi, TopEncode)] +pub struct RemoveLiquidityProxyEvent { + caller: ManagedAddress, + pair_address: ManagedAddress, + wrapped_lp_token_id: TokenIdentifier, + wrapped_lp_token_nonce: u64, + wrapped_lp_token_amount: BigUint, + wrapped_lp_attributes: WrappedLpTokenAttributes, + first_token_id: TokenIdentifier, + first_token_nonce: u64, + first_token_amount: BigUint, + second_token_id: TokenIdentifier, + second_token_nonce: u64, + second_token_amount: BigUint, + block: u64, + epoch: u64, + timestamp: u64, +} + +#[derive(TypeAbi, TopEncode)] +pub struct ExitFarmProxyEvent { + caller: ManagedAddress, + farm_address: ManagedAddress, + wrapped_farm_token_id: TokenIdentifier, + wrapped_farm_token_nonce: u64, + wrapped_farm_token_amount: BigUint, + wrapped_farm_attributes: WrappedFarmTokenAttributes, + farming_token_id: TokenIdentifier, + farming_token_nonce: u64, + farming_token_amount: BigUint, + reward_token_id: TokenIdentifier, + reward_token_nonce: u64, + reward_token_amount: BigUint, + block: u64, + epoch: u64, + timestamp: u64, +} + +#[multiversx_sc::module] +pub trait EventsModule { + fn emit_remove_liquidity_proxy_event( + self, + caller: &ManagedAddress, + pair_address: &ManagedAddress, + wrapped_lp_token_id: &TokenIdentifier, + wrapped_lp_token_nonce: u64, + wrapped_lp_token_amount: &BigUint, + wrapped_lp_attributes: &WrappedLpTokenAttributes, + first_token_id: &TokenIdentifier, + first_token_nonce: u64, + first_token_amount: &BigUint, + second_token_id: &TokenIdentifier, + second_token_nonce: u64, + second_token_amount: &BigUint, + ) { + let epoch = self.blockchain().get_block_epoch(); + self.remove_liquidity_proxy_event( + first_token_id, + second_token_id, + caller, + pair_address, + epoch, + &RemoveLiquidityProxyEvent { + caller: caller.clone(), + pair_address: pair_address.clone(), + first_token_id: first_token_id.clone(), + first_token_nonce, + first_token_amount: first_token_amount.clone(), + second_token_id: second_token_id.clone(), + second_token_nonce, + second_token_amount: second_token_amount.clone(), + wrapped_lp_token_id: wrapped_lp_token_id.clone(), + wrapped_lp_token_nonce, + wrapped_lp_token_amount: wrapped_lp_token_amount.clone(), + wrapped_lp_attributes: wrapped_lp_attributes.clone(), + block: self.blockchain().get_block_nonce(), + epoch, + timestamp: self.blockchain().get_block_timestamp(), + }, + ) + } + + fn emit_exit_farm_proxy_event( + self, + caller: &ManagedAddress, + farm_address: &ManagedAddress, + wrapped_farm_token_id: &TokenIdentifier, + wrapped_farm_token_nonce: u64, + wrapped_farm_token_amount: &BigUint, + wrapped_farm_attributes: &WrappedFarmTokenAttributes, + farming_token_id: &TokenIdentifier, + farming_token_nonce: u64, + farming_token_amount: &BigUint, + reward_token_id: &TokenIdentifier, + reward_token_nonce: u64, + reward_token_amount: &BigUint, + ) { + let epoch = self.blockchain().get_block_epoch(); + self.exit_farm_proxy_event( + farming_token_id, + caller, + farm_address, + epoch, + &ExitFarmProxyEvent { + caller: caller.clone(), + farm_address: farm_address.clone(), + farming_token_id: farming_token_id.clone(), + farming_token_nonce, + farming_token_amount: farming_token_amount.clone(), + wrapped_farm_token_id: wrapped_farm_token_id.clone(), + wrapped_farm_token_nonce, + wrapped_farm_token_amount: wrapped_farm_token_amount.clone(), + wrapped_farm_attributes: wrapped_farm_attributes.clone(), + reward_token_id: reward_token_id.clone(), + reward_token_nonce, + reward_token_amount: reward_token_amount.clone(), + block: self.blockchain().get_block_nonce(), + epoch, + timestamp: self.blockchain().get_block_timestamp(), + }, + ) + } + + #[event("remove_liquidity_proxy")] + fn remove_liquidity_proxy_event( + self, + #[indexed] first_token: &TokenIdentifier, + #[indexed] second_token: &TokenIdentifier, + #[indexed] caller: &ManagedAddress, + #[indexed] pair_address: &ManagedAddress, + #[indexed] epoch: u64, + remove_liquidity_proxy_event: &RemoveLiquidityProxyEvent, + ); + + #[event("exit_farm_proxy")] + fn exit_farm_proxy_event( + self, + #[indexed] farm_token: &TokenIdentifier, + #[indexed] caller: &ManagedAddress, + #[indexed] farm_address: &ManagedAddress, + #[indexed] epoch: u64, + exit_farm_proxy_event: &ExitFarmProxyEvent, + ); +} diff --git a/legacy-contracts/proxy-dex-legacy/src/lib.rs b/legacy-contracts/proxy-dex-legacy/src/lib.rs new file mode 100644 index 000000000..32305f10f --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/src/lib.rs @@ -0,0 +1,31 @@ +#![no_std] + +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +mod energy; +mod energy_update; +mod events; +pub mod migration_from_v1_2; +pub mod proxy_common; +pub mod proxy_farm; +mod proxy_pair; +pub mod transfer_role; + +use factory::attr_ex_helper; + +#[multiversx_sc::contract] +pub trait ProxyDexImpl: + proxy_common::ProxyCommonModule + + proxy_pair::ProxyPairModule + + proxy_farm::ProxyFarmModule + + token_merge_helper::TokenMergeHelperModule + + events::EventsModule + + energy_update::EnergyUpdateModule + + migration_from_v1_2::MigrationModule + + transfer_role::TransferRoleModule + + attr_ex_helper::AttrExHelper +{ + #[init] + fn init(&self) {} +} diff --git a/legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs b/legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs new file mode 100644 index 000000000..838954dd8 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs @@ -0,0 +1,116 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::RawResultWrapper; +use common_structs::RawResultsType; +use factory::attr_ex_helper; + +use super::events; +use super::proxy_common; +use super::proxy_pair; +use crate::energy_update; +use crate::proxy_common::WrappedFarmTokenAttributes; +use crate::proxy_farm; + +mod farm_v1_2_contract_proxy { + multiversx_sc::imports!(); + + #[multiversx_sc::proxy] + pub trait Farm { + #[payable("*")] + #[endpoint(migrateToNewFarm)] + fn migrate_to_new_farm( + &self, + orig_caller: ManagedAddress, + ) -> MultiValue2, EsdtTokenPayment>; + } +} + +#[multiversx_sc::module] +pub trait MigrationModule: + proxy_farm::ProxyFarmModule + + proxy_common::ProxyCommonModule + + proxy_pair::ProxyPairModule + + token_merge_helper::TokenMergeHelperModule + + events::EventsModule + + energy_update::EnergyUpdateModule + + attr_ex_helper::AttrExHelper +{ + #[payable("*")] + #[endpoint(migrateV1_2Position)] + fn migrate_v1_2_position(&self, farm_address: ManagedAddress) { + self.require_is_intermediated_farm(&farm_address); + self.require_wrapped_farm_token_id_not_empty(); + self.require_wrapped_lp_token_id_not_empty(); + + let (payment_token_id, payment_token_nonce, payment_amount) = + self.call_value().single_esdt().into_tuple(); + let wrapped_farm_token = self.wrapped_farm_token_id().get(); + require!( + payment_token_id == wrapped_farm_token, + "Should only be used with wrapped farm tokens" + ); + require!(payment_amount != 0u64, "Payment amount cannot be zero"); + + // The actual work starts here + let wrapped_farm_token_attrs = + self.get_wrapped_farm_token_attributes(&payment_token_id, payment_token_nonce); + let farm_token_id = wrapped_farm_token_attrs.farm_token_id.clone(); + let farm_token_nonce = wrapped_farm_token_attrs.farm_token_nonce; + let farm_amount = payment_amount.clone(); + + // Get the new farm position from the new contract. + let raw_results: RawResultsType = self + .farm_v1_2_contract_proxy(farm_address) + .migrate_to_new_farm(self.blockchain().get_sc_address()) + .with_esdt_transfer((farm_token_id, farm_token_nonce, farm_amount)) + .execute_on_dest_context(); + + let mut results_wrapper = RawResultWrapper::new(raw_results); + results_wrapper.trim_results_front(2); + + let new_pos: EsdtTokenPayment = results_wrapper.decode_next_result(); + let reward: EsdtTokenPayment = results_wrapper.decode_next_result(); + + // Burn the old proxy farm position + self.send() + .esdt_local_burn(&payment_token_id, payment_token_nonce, &payment_amount); + + // Create a new proxy farm position based on the new farm position. + let new_attrs = WrappedFarmTokenAttributes { + farm_token_id: new_pos.token_identifier.clone(), + farm_token_nonce: new_pos.token_nonce, + farm_token_amount: new_pos.amount.clone(), + farming_token_id: wrapped_farm_token_attrs.farming_token_id, + farming_token_nonce: wrapped_farm_token_attrs.farming_token_nonce, + farming_token_amount: self.rule_of_three_non_zero_result( + &payment_amount, + &wrapped_farm_token_attrs.farm_token_amount, + &wrapped_farm_token_attrs.farming_token_amount, + ), + }; + let new_nonce = + self.send() + .esdt_nft_create_compact(&wrapped_farm_token, &new_pos.amount, &new_attrs); + + let mut payments = ManagedVec::new(); + payments.push(EsdtTokenPayment::new( + wrapped_farm_token, + new_nonce, + new_pos.amount, + )); + + if reward.amount != 0u64 { + payments.push(reward); + } + + let caller = self.blockchain().get_caller(); + self.send().direct_multi(&caller, &payments); + } + + #[proxy] + fn farm_v1_2_contract_proxy( + &self, + to: ManagedAddress, + ) -> farm_v1_2_contract_proxy::Proxy; +} diff --git a/legacy-contracts/proxy-dex-legacy/src/proxy_common.rs b/legacy-contracts/proxy-dex-legacy/src/proxy_common.rs new file mode 100644 index 000000000..105f3cbc1 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/src/proxy_common.rs @@ -0,0 +1,129 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::Nonce; + +#[derive(ManagedVecItem, TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi, Clone)] +pub struct WrappedLpTokenAttributes { + pub lp_token_id: TokenIdentifier, + pub lp_token_total_amount: BigUint, + pub locked_assets_invested: BigUint, + pub locked_assets_nonce: Nonce, +} + +#[derive(ManagedVecItem, TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi, Clone)] +pub struct WrappedFarmTokenAttributes { + pub farm_token_id: TokenIdentifier, + pub farm_token_nonce: Nonce, + pub farm_token_amount: BigUint, + pub farming_token_id: TokenIdentifier, + pub farming_token_nonce: Nonce, + pub farming_token_amount: BigUint, +} + +#[multiversx_sc::module] +pub trait ProxyCommonModule { + fn get_wrapped_lp_token_attributes( + &self, + token_id: &TokenIdentifier, + token_nonce: Nonce, + ) -> WrappedLpTokenAttributes { + let token_info = self.blockchain().get_esdt_token_data( + &self.blockchain().get_sc_address(), + token_id, + token_nonce, + ); + + token_info.decode_attributes() + } + + fn get_wrapped_farm_token_attributes( + &self, + token_id: &TokenIdentifier, + token_nonce: Nonce, + ) -> WrappedFarmTokenAttributes { + let token_info = self.blockchain().get_esdt_token_data( + &self.blockchain().get_sc_address(), + token_id, + token_nonce, + ); + + token_info.decode_attributes() + } + + fn burn_payment_tokens( + &self, + payments: ManagedVecRefIterator>, + ) { + for payment in payments { + self.send().esdt_local_burn( + &payment.token_identifier, + payment.token_nonce, + &payment.amount, + ); + } + } + + fn send_multiple_tokens_if_not_zero( + &self, + destination: &ManagedAddress, + payments: &ManagedVec>, + ) { + let mut non_zero_payments = ManagedVec::new(); + for payment in payments { + if payment.amount > 0u32 { + non_zero_payments.push(payment); + } + } + + if !non_zero_payments.is_empty() { + self.send().direct_multi(destination, &non_zero_payments) + } + } + + #[storage_mapper("current_tx_accepted_funds")] + fn current_tx_accepted_funds(&self) -> MapMapper<(TokenIdentifier, Nonce), BigUint>; + + #[view(getAssetTokenId)] + #[storage_mapper("asset_token_id")] + fn asset_token_id(&self) -> SingleValueMapper; + + #[view(getLockedAssetTokenId)] + #[storage_mapper("locked_asset_token_id")] + fn locked_asset_token_id(&self) -> SingleValueMapper; + + #[view(getWrappedLpTokenId)] + #[storage_mapper("wrapped_lp_token_id")] + fn wrapped_lp_token_id(&self) -> SingleValueMapper; + + #[view(getWrappedFarmTokenId)] + #[storage_mapper("wrapped_farm_token_id")] + fn wrapped_farm_token_id(&self) -> SingleValueMapper; + + #[storage_mapper("locked_asset_factory_address")] + fn locked_asset_factory_address(&self) -> SingleValueMapper; + + #[storage_mapper("intermediated_farms")] + fn intermediated_farms(&self) -> SetMapper; + + #[view(getIntermediatedFarms)] + fn get_intermediated_farms(&self) -> MultiValueEncoded { + let mut result = MultiValueEncoded::new(); + for pair in self.intermediated_farms().iter() { + result.push(pair); + } + result + } + + #[storage_mapper("intermediated_pairs")] + fn intermediated_pairs(&self) -> SetMapper; + + #[view(getIntermediatedPairs)] + fn get_intermediated_pairs(&self) -> MultiValueEncoded { + let mut result = MultiValueEncoded::new(); + for pair in self.intermediated_pairs().iter() { + result.push(pair); + } + result + } +} diff --git a/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs b/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs new file mode 100644 index 000000000..bd39605e6 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs @@ -0,0 +1,159 @@ +#![allow(clippy::too_many_arguments)] + +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::Nonce; +use common_structs::{RawResultWrapper, RawResultsType}; +use factory::attr_ex_helper; + +use crate::energy_update; +use crate::proxy_common::WrappedFarmTokenAttributes; + +use super::events; +use super::proxy_common; +use super::proxy_pair; + +type ExitFarmResultType = + MultiValue2, EsdtTokenPayment>; + +mod farm_proxy { + multiversx_sc::imports!(); + + #[multiversx_sc::proxy] + pub trait FarmProxy { + #[payable("*")] + #[endpoint(exitFarm)] + fn exit_farm(&self) -> super::ExitFarmResultType; + } +} + +#[derive(ManagedVecItem, Clone)] +pub struct WrappedFarmToken { + pub token_amount: EsdtTokenPayment, + pub attributes: WrappedFarmTokenAttributes, +} + +#[multiversx_sc::module] +pub trait ProxyFarmModule: + proxy_common::ProxyCommonModule + + proxy_pair::ProxyPairModule + + token_merge_helper::TokenMergeHelperModule + + events::EventsModule + + energy_update::EnergyUpdateModule + + attr_ex_helper::AttrExHelper +{ + #[only_owner] + #[endpoint(addFarmToIntermediate)] + fn add_farm_to_intermediate(&self, farm_address: ManagedAddress) { + self.intermediated_farms().insert(farm_address); + } + + #[only_owner] + #[endpoint(removeIntermediatedFarm)] + fn remove_intermediated_farm(&self, farm_address: ManagedAddress) { + self.require_is_intermediated_farm(&farm_address); + self.intermediated_farms().remove(&farm_address); + } + + #[payable("*")] + #[endpoint(exitFarmProxy)] + fn exit_farm_proxy(&self, farm_address: &ManagedAddress) { + self.require_is_intermediated_farm(farm_address); + self.require_wrapped_farm_token_id_not_empty(); + self.require_wrapped_lp_token_id_not_empty(); + + let (token_id, token_nonce, amount) = self.call_value().single_esdt().into_tuple(); + + require!(amount != 0, "Payment amount cannot be zero"); + require!( + token_id == self.wrapped_farm_token_id().get(), + "Should only be used with wrapped farm tokens" + ); + + let wrapped_farm_token_attrs = + self.get_wrapped_farm_token_attributes(&token_id, token_nonce); + let farm_token_id = wrapped_farm_token_attrs.farm_token_id.clone(); + let farm_token_nonce = wrapped_farm_token_attrs.farm_token_nonce; + + let farm_result = self + .actual_exit_farm(farm_address, &farm_token_id, farm_token_nonce, &amount) + .into_tuple(); + let farming_token_returned = farm_result.0; + let reward_token_returned = farm_result.1; + + let caller = self.blockchain().get_caller(); + let mut payments_vec = ManagedVec::new(); + payments_vec.push(EsdtTokenPayment::new( + wrapped_farm_token_attrs.farming_token_id.clone(), + wrapped_farm_token_attrs.farming_token_nonce, + farming_token_returned.amount.clone(), + )); + payments_vec.push(EsdtTokenPayment::new( + reward_token_returned.token_identifier.clone(), + reward_token_returned.token_nonce, + reward_token_returned.amount.clone(), + )); + self.send_multiple_tokens_if_not_zero(&caller, &payments_vec); + self.send().esdt_local_burn(&token_id, token_nonce, &amount); + + if farming_token_returned.token_identifier == self.asset_token_id().get() { + self.send().esdt_local_burn( + &farming_token_returned.token_identifier, + 0, + &farming_token_returned.amount, + ); + } + + self.emit_exit_farm_proxy_event( + &caller, + farm_address, + &token_id, + token_nonce, + &amount, + &wrapped_farm_token_attrs, + &wrapped_farm_token_attrs.farming_token_id, + wrapped_farm_token_attrs.farming_token_nonce, + &farming_token_returned.amount, + &reward_token_returned.token_identifier, + reward_token_returned.token_nonce, + &reward_token_returned.amount, + ); + } + + fn actual_exit_farm( + &self, + farm_address: &ManagedAddress, + farm_token_id: &TokenIdentifier, + farm_token_nonce: Nonce, + amount: &BigUint, + ) -> ExitFarmResultType { + let raw_results: RawResultsType = self + .farm_contract_proxy(farm_address.clone()) + .exit_farm() + .with_esdt_transfer((farm_token_id.clone(), farm_token_nonce, amount.clone())) + .execute_on_dest_context(); + + let mut results_wrapper = RawResultWrapper::new(raw_results); + results_wrapper.trim_results_front(2); + + let farming_tokens = results_wrapper.decode_next_result(); + let reward_tokens = results_wrapper.decode_next_result(); + + (farming_tokens, reward_tokens).into() + } + + fn require_is_intermediated_farm(&self, address: &ManagedAddress) { + require!( + self.intermediated_farms().contains(address), + "Not an intermediated farm" + ); + } + + fn require_wrapped_farm_token_id_not_empty(&self) { + require!(!self.wrapped_farm_token_id().is_empty(), "Empty token id"); + } + + #[proxy] + fn farm_contract_proxy(&self, to: ManagedAddress) -> farm_proxy::Proxy; +} diff --git a/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs b/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs new file mode 100644 index 000000000..d0bc68b4a --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs @@ -0,0 +1,220 @@ +#![allow(clippy::too_many_arguments)] +#![allow(clippy::comparison_chain)] +#![allow(clippy::vec_init_then_push)] + +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::{RawResultWrapper, RawResultsType}; +use factory::attr_ex_helper; + +use crate::energy_update; +use crate::proxy_common::WrappedLpTokenAttributes; + +use super::events; +use super::proxy_common; + +type RemoveLiquidityResultType = + MultiValue2, EsdtTokenPayment>; + +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, + ) -> super::RemoveLiquidityResultType; + + #[view(getLpTokenIdentifier)] + fn get_lp_token_identifier(&self) -> TokenIdentifier; + } +} + +#[derive(ManagedVecItem, Clone)] +pub struct WrappedLpToken { + pub token_amount: EsdtTokenPayment, + pub attributes: WrappedLpTokenAttributes, +} + +#[multiversx_sc::module] +pub trait ProxyPairModule: + proxy_common::ProxyCommonModule + + token_merge_helper::TokenMergeHelperModule + + events::EventsModule + + energy_update::EnergyUpdateModule + + attr_ex_helper::AttrExHelper +{ + #[only_owner] + #[endpoint(addPairToIntermediate)] + fn add_pair_to_intermediate(&self, pair_address: ManagedAddress) { + self.intermediated_pairs().insert(pair_address); + } + + #[only_owner] + #[endpoint(removeIntermediatedPair)] + fn remove_intermediated_pair(&self, pair_address: ManagedAddress) { + self.require_is_intermediated_pair(&pair_address); + self.intermediated_pairs().remove(&pair_address); + } + + #[payable("*")] + #[endpoint(removeLiquidityProxy)] + fn remove_liquidity_proxy( + &self, + pair_address: ManagedAddress, + first_token_amount_min: BigUint, + second_token_amount_min: BigUint, + ) { + self.require_is_intermediated_pair(&pair_address); + self.require_wrapped_lp_token_id_not_empty(); + + let (token_id, token_nonce, amount) = self.call_value().single_esdt().into_tuple(); + require!(token_nonce != 0, "Can only be called with an SFT"); + require!(amount != 0, "Payment amount cannot be zero"); + + let wrapped_lp_token_id = self.wrapped_lp_token_id().get(); + require!(token_id == wrapped_lp_token_id, "Wrong input token"); + + let caller = self.blockchain().get_caller(); + let lp_token_id = self.ask_for_lp_token_id(&pair_address); + let attributes = self.get_wrapped_lp_token_attributes(&token_id, token_nonce); + require!(lp_token_id == attributes.lp_token_id, "Bad input address"); + + let locked_asset_token_id = self.locked_asset_token_id().get(); + let asset_token_id = self.asset_token_id().get(); + + let tokens_for_position = self + .actual_remove_liquidity( + &pair_address, + &lp_token_id, + &amount, + &first_token_amount_min, + &second_token_amount_min, + ) + .into_tuple(); + + let fungible_token_id: TokenIdentifier; + let fungible_token_amount: BigUint; + let assets_received: BigUint; + let locked_assets_invested = self.rule_of_three_non_zero_result( + &amount, + &attributes.lp_token_total_amount, + &attributes.locked_assets_invested, + ); + + if tokens_for_position.1.token_identifier == asset_token_id { + assets_received = tokens_for_position.1.amount.clone(); + fungible_token_id = tokens_for_position.0.token_identifier.clone(); + fungible_token_amount = tokens_for_position.0.amount.clone(); + } else { + sc_panic!("Bad tokens received from pair SC"); + } + + // Send back the tokens removed from pair sc. + let locked_assets_to_send = + core::cmp::min(assets_received.clone(), locked_assets_invested.clone()); + let mut payments_vec = ManagedVec::new(); + payments_vec.push(EsdtTokenPayment::new( + fungible_token_id.clone(), + 0, + fungible_token_amount.clone(), + )); + payments_vec.push(EsdtTokenPayment::new( + locked_asset_token_id.clone(), + attributes.locked_assets_nonce, + locked_assets_to_send.clone(), + )); + self.send_multiple_tokens_if_not_zero(&caller, &payments_vec); + + // Do cleanup + if assets_received > locked_assets_invested { + let difference = assets_received - locked_assets_invested; + self.send() + .direct_esdt(&caller, &asset_token_id, 0, &difference); + } else if assets_received < locked_assets_invested { + let difference = locked_assets_invested - assets_received; + self.deduct_energy_from_user( + &caller, + &locked_asset_token_id, + attributes.locked_assets_nonce, + &difference, + ); + self.send().esdt_local_burn( + &locked_asset_token_id, + attributes.locked_assets_nonce, + &difference, + ); + } + + self.send() + .esdt_local_burn(&asset_token_id, 0, &locked_assets_to_send); + self.send() + .esdt_local_burn(&wrapped_lp_token_id, token_nonce, &amount); + + self.emit_remove_liquidity_proxy_event( + &caller, + &pair_address, + &token_id, + token_nonce, + &amount, + &attributes, + &tokens_for_position.0.token_identifier, + 0, + &tokens_for_position.0.amount, + &tokens_for_position.1.token_identifier, + 0, + &tokens_for_position.1.amount, + ); + } + + fn actual_remove_liquidity( + &self, + pair_address: &ManagedAddress, + lp_token_id: &TokenIdentifier, + liquidity: &BigUint, + first_token_amount_min: &BigUint, + second_token_amount_min: &BigUint, + ) -> RemoveLiquidityResultType { + let raw_results: RawResultsType = self + .pair_contract_proxy(pair_address.clone()) + .remove_liquidity( + first_token_amount_min.clone(), + second_token_amount_min.clone(), + ) + .with_esdt_transfer((lp_token_id.clone(), 0, liquidity.clone())) + .execute_on_dest_context(); + + let mut results_wrapper = RawResultWrapper::new(raw_results); + results_wrapper.trim_results_front(2); + + let first_token = results_wrapper.decode_next_result(); + let second_token = results_wrapper.decode_next_result(); + + (first_token, second_token).into() + } + + fn ask_for_lp_token_id(&self, pair_address: &ManagedAddress) -> TokenIdentifier { + self.pair_contract_proxy(pair_address.clone()) + .get_lp_token_identifier() + .execute_on_dest_context() + } + + fn require_is_intermediated_pair(&self, address: &ManagedAddress) { + require!( + self.intermediated_pairs().contains(address), + "Not an intermediated pair" + ); + } + + fn require_wrapped_lp_token_id_not_empty(&self) { + require!(!self.wrapped_lp_token_id().is_empty(), "Empty token id"); + } + + #[proxy] + fn pair_contract_proxy(&self, to: ManagedAddress) -> pair_proxy::Proxy; +} diff --git a/legacy-contracts/proxy-dex-legacy/src/transfer_role.rs b/legacy-contracts/proxy-dex-legacy/src/transfer_role.rs new file mode 100644 index 000000000..ad0787e4e --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/src/transfer_role.rs @@ -0,0 +1,90 @@ +multiversx_sc::imports!(); + +use super::proxy_common; + +#[multiversx_sc::module] +pub trait TransferRoleModule: proxy_common::ProxyCommonModule { + /// Sets the transfer role for the given address. Defaults to own SC address. + #[only_owner] + #[endpoint(setTransferRoleLockedLpToken)] + fn set_transfer_role_locked_lp_token(&self, opt_address: OptionalValue) { + let locked_lp_token_id = self.wrapped_lp_token_id().get(); + let role_dest_address = match opt_address { + OptionalValue::Some(addr) => addr, + OptionalValue::None => self.blockchain().get_sc_address(), + }; + let roles = [EsdtLocalRole::Transfer]; + + self.send() + .esdt_system_sc_proxy() + .set_special_roles( + &role_dest_address, + &locked_lp_token_id, + roles.iter().cloned(), + ) + .async_call_and_exit() + } + + /// Removes the transfer role for the given address. Defaults to own SC address. + #[only_owner] + #[endpoint(unsetTransferRoleLockedLpToken)] + fn unset_transfer_role_locked_lp_token(&self, opt_address: OptionalValue) { + let locked_lp_token_id = self.wrapped_lp_token_id().get(); + let role_dest_address = match opt_address { + OptionalValue::Some(addr) => addr, + OptionalValue::None => self.blockchain().get_sc_address(), + }; + let roles = [EsdtLocalRole::Transfer]; + + self.send() + .esdt_system_sc_proxy() + .unset_special_roles( + &role_dest_address, + &locked_lp_token_id, + roles.iter().cloned(), + ) + .async_call_and_exit() + } + + /// Sets the transfer role for the given address. Defaults to own SC address. + #[only_owner] + #[endpoint(setTransferRoleLockedFarmToken)] + fn set_transfer_role_locked_farm_token(&self, opt_address: OptionalValue) { + let locked_farm_token_id = self.wrapped_farm_token_id().get(); + let role_dest_address = match opt_address { + OptionalValue::Some(addr) => addr, + OptionalValue::None => self.blockchain().get_sc_address(), + }; + let roles = [EsdtLocalRole::Transfer]; + + self.send() + .esdt_system_sc_proxy() + .set_special_roles( + &role_dest_address, + &locked_farm_token_id, + roles.iter().cloned(), + ) + .async_call_and_exit() + } + + /// Removes the transfer role for the given address. Defaults to own SC address. + #[only_owner] + #[endpoint(unsetTransferRoleLockedFarmToken)] + fn unset_transfer_role_locked_farm_token(&self, opt_address: OptionalValue) { + let locked_farm_token_id = self.wrapped_farm_token_id().get(); + let role_dest_address = match opt_address { + OptionalValue::Some(addr) => addr, + OptionalValue::None => self.blockchain().get_sc_address(), + }; + let roles = [EsdtLocalRole::Transfer]; + + self.send() + .esdt_system_sc_proxy() + .unset_special_roles( + &role_dest_address, + &locked_farm_token_id, + roles.iter().cloned(), + ) + .async_call_and_exit() + } +} diff --git a/legacy-contracts/proxy-dex-legacy/testnet.toml b/legacy-contracts/proxy-dex-legacy/testnet.toml new file mode 100644 index 000000000..e69de29bb diff --git a/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock b/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock new file mode 100644 index 000000000..a3143553e --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock @@ -0,0 +1,398 @@ +# 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 = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + +[[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 = "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 = "factory" +version = "0.0.0" +dependencies = [ + "arrayvec", + "common_errors", + "common_structs", + "energy-factory", + "itertools", + "multiversx-sc", + "multiversx-sc-modules", + "token_merge_helper", + "token_send", + "wee_alloc", +] + +[[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 = "libc" +version = "0.2.118" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06e509672465a0504304aa87f9f176f2b2b716ed8fb105ebe5c02dc6dce96a94" + +[[package]] +name = "math" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "memory_units" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" + +[[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 = "proc-macro2" +version = "1.0.82" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proxy-dex-legacy" +version = "0.0.0" +dependencies = [ + "common_structs", + "factory", + "multiversx-sc", + "token_merge_helper", +] + +[[package]] +name = "proxy-dex-legacy-wasm" +version = "0.0.0" +dependencies = [ + "multiversx-sc-wasm-adapter", + "proxy-dex-legacy", +] + +[[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 = "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.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[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 = "wee_alloc" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" +dependencies = [ + "cfg-if", + "libc", + "memory_units", + "winapi", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/legacy-contracts/proxy-dex-legacy/wasm/Cargo.toml b/legacy-contracts/proxy-dex-legacy/wasm/Cargo.toml new file mode 100644 index 000000000..fa6f756fe --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/wasm/Cargo.toml @@ -0,0 +1,34 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + +[package] +name = "proxy-dex-legacy-wasm" +version = "0.0.0" +edition = "2018" +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.proxy-dex-legacy] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "=0.50.5" + +[workspace] +members = ["."] diff --git a/legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs b/legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs new file mode 100644 index 000000000..5d418f971 --- /dev/null +++ b/legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs @@ -0,0 +1,44 @@ +// Code generated by the multiversx-sc build system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Endpoints: 20 +// Async Callback (empty): 1 +// Total number of exported functions: 22 + +#![no_std] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + proxy_dex_legacy + ( + init => init + getAssetTokenId => asset_token_id + getLockedAssetTokenId => locked_asset_token_id + getWrappedLpTokenId => wrapped_lp_token_id + getWrappedFarmTokenId => wrapped_farm_token_id + getIntermediatedFarms => get_intermediated_farms + getIntermediatedPairs => get_intermediated_pairs + addPairToIntermediate => add_pair_to_intermediate + removeIntermediatedPair => remove_intermediated_pair + removeLiquidityProxy => remove_liquidity_proxy + addFarmToIntermediate => add_farm_to_intermediate + removeIntermediatedFarm => remove_intermediated_farm + exitFarmProxy => exit_farm_proxy + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address + migrateV1_2Position => migrate_v1_2_position + setTransferRoleLockedLpToken => set_transfer_role_locked_lp_token + unsetTransferRoleLockedLpToken => unset_transfer_role_locked_lp_token + setTransferRoleLockedFarmToken => set_transfer_role_locked_farm_token + unsetTransferRoleLockedFarmToken => unset_transfer_role_locked_farm_token + getExtendedAttributesActivationNonce => extended_attributes_activation_nonce + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/locked-asset/factory/src/lib.rs b/locked-asset/factory/src/lib.rs index bd27c4752..268ff0c05 100644 --- a/locked-asset/factory/src/lib.rs +++ b/locked-asset/factory/src/lib.rs @@ -1,6 +1,6 @@ #![no_std] -mod attr_ex_helper; +pub mod attr_ex_helper; mod cache; mod events; pub mod locked_asset; From 04dbeda70a9daf0874076328f2134b786d6e799d Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Wed, 17 Jul 2024 01:04:54 +0300 Subject: [PATCH 02/13] Factory legacy contract --- Cargo.lock | 22 +- Cargo.toml | 2 + legacy-contracts/factory-legacy/.gitignore | 7 + legacy-contracts/factory-legacy/Cargo.toml | 27 ++ legacy-contracts/factory-legacy/README.md | 26 ++ .../factory-legacy/meta/Cargo.toml | 14 + .../factory-legacy/meta/src/main.rs | 3 + .../factory-legacy/multiversx.json | 4 + .../factory-legacy/src/attr_ex_helper.rs | 68 ++++ legacy-contracts/factory-legacy/src/cache.rs | 49 +++ legacy-contracts/factory-legacy/src/events.rs | 123 ++++++ legacy-contracts/factory-legacy/src/lib.rs | 363 ++++++++++++++++++ .../factory-legacy/src/locked_asset.rs | 209 ++++++++++ .../src/locked_asset_token_merge.rs | 162 ++++++++ .../factory-legacy/src/migration.rs | 61 +++ legacy-contracts/factory-legacy/testnet.toml | 0 .../factory-legacy/wasm/Cargo.lock | 255 ++++++++++++ .../factory-legacy/wasm/Cargo.toml | 34 ++ .../factory-legacy/wasm/src/lib.rs | 45 +++ legacy-contracts/farm-v-13/wasm/src/lib.rs | 5 +- legacy-contracts/proxy-dex-legacy/Cargo.toml | 4 +- .../proxy-dex-legacy/src/energy_update.rs | 5 +- legacy-contracts/proxy-dex-legacy/src/lib.rs | 2 +- .../src/migration_from_v1_2.rs | 2 +- .../proxy-dex-legacy/src/proxy_farm.rs | 2 +- .../proxy-dex-legacy/src/proxy_pair.rs | 2 +- .../proxy-dex-legacy/wasm/Cargo.lock | 137 +------ 27 files changed, 1487 insertions(+), 146 deletions(-) create mode 100644 legacy-contracts/factory-legacy/.gitignore create mode 100644 legacy-contracts/factory-legacy/Cargo.toml create mode 100644 legacy-contracts/factory-legacy/README.md create mode 100644 legacy-contracts/factory-legacy/meta/Cargo.toml create mode 100644 legacy-contracts/factory-legacy/meta/src/main.rs create mode 100644 legacy-contracts/factory-legacy/multiversx.json create mode 100644 legacy-contracts/factory-legacy/src/attr_ex_helper.rs create mode 100644 legacy-contracts/factory-legacy/src/cache.rs create mode 100644 legacy-contracts/factory-legacy/src/events.rs create mode 100644 legacy-contracts/factory-legacy/src/lib.rs create mode 100644 legacy-contracts/factory-legacy/src/locked_asset.rs create mode 100644 legacy-contracts/factory-legacy/src/locked_asset_token_merge.rs create mode 100644 legacy-contracts/factory-legacy/src/migration.rs create mode 100644 legacy-contracts/factory-legacy/testnet.toml create mode 100644 legacy-contracts/factory-legacy/wasm/Cargo.lock create mode 100644 legacy-contracts/factory-legacy/wasm/Cargo.toml create mode 100644 legacy-contracts/factory-legacy/wasm/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 97f3c2e89..04e8e5188 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -757,6 +757,26 @@ dependencies = [ "multiversx-sc-meta", ] +[[package]] +name = "factory-legacy" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "multiversx-sc", + "multiversx-sc-modules", + "multiversx-sc-scenario", + "token_merge_helper", +] + +[[package]] +name = "factory-legacy-meta" +version = "0.0.0" +dependencies = [ + "factory-legacy", + "multiversx-sc-meta", +] + [[package]] name = "farm" version = "0.0.0" @@ -2247,7 +2267,7 @@ name = "proxy-dex-legacy" version = "0.0.0" dependencies = [ "common_structs", - "factory", + "factory-legacy", "multiversx-sc", "multiversx-sc-scenario", "token_merge_helper", diff --git a/Cargo.toml b/Cargo.toml index db13e51b2..7a6041dc6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,6 +45,8 @@ members = [ "legacy-contracts/farm-v-13/meta", "legacy-contracts/proxy-dex-legacy", "legacy-contracts/proxy-dex-legacy/meta", + "legacy-contracts/factory-legacy", + "legacy-contracts/factory-legacy/meta", "locked-asset/", "locked-asset/distribution", diff --git a/legacy-contracts/factory-legacy/.gitignore b/legacy-contracts/factory-legacy/.gitignore new file mode 100644 index 000000000..eaf5915bd --- /dev/null +++ b/legacy-contracts/factory-legacy/.gitignore @@ -0,0 +1,7 @@ +# Generated by Cargo +# will have compiled files and executables +/target/ +*/target/ + +# The erdpy output +output diff --git a/legacy-contracts/factory-legacy/Cargo.toml b/legacy-contracts/factory-legacy/Cargo.toml new file mode 100644 index 000000000..bff8b6fa4 --- /dev/null +++ b/legacy-contracts/factory-legacy/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "factory-legacy" +publish = false +version = "0.0.0" +edition = "2018" + +[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" + +[dev-dependencies.multiversx-sc-scenario] +version = "=0.50.5" + +[dependencies.common_structs] +path = "../../common/common_structs" + +[dependencies.common_errors] +path = "../../common/common_errors" + +[dependencies.token_merge_helper] +path = "../../common/modules/token_merge_helper" \ No newline at end of file diff --git a/legacy-contracts/factory-legacy/README.md b/legacy-contracts/factory-legacy/README.md new file mode 100644 index 000000000..b61d85ad8 --- /dev/null +++ b/legacy-contracts/factory-legacy/README.md @@ -0,0 +1,26 @@ +# Locked Asset Factory Smart Contract + +This document presents how one can deploy and configure a Locked Asset Factory Contract. +The bigger picture about what a Locked Asset Factory Contract can do can be found in the Repository's Root Readme. + +## Deployment + +The Locked Asset Factory contract can be deployed using `erdpy` and using the interraction snippets. + +The init parameters are: + +- asset_token_id. The TokenId of the asset that a locked asset represents. In case of Maiar Exchange it will be MEX. + +- default_unlock_period. A vector of unlock milestones. This represents a period since each epoch in the vector will be added with a starting epoch. + +The Contract requires LocalMint and LocalBurn for asset token. + +## Creating and Forwarding SFTs + +Before creating LockedAssetLockens, the owner has to issue those tokens using `issueLockedAssetToken` and after this he also has to give the NftCreate, NftAddQuantity and NftBurn roles to the contract unsing `setLocalRolesLockedAssetToken`. + +The Contract has an endpoint `createAndForward` that can be called in order to request an amount of Locked MEX. Only those addresses in the `whitelisted_contracts` set can call this endpoint. This whitelist can be configured by the admin using `whitelist` and `removeWhitelist` endpoints. + +## Unlocking MEX + +A user that has Locked MEX can unlock it and can receive the Locked MEX "remaining" and the unlocked MEX amount. The newly created Locked MEX will have its unlock milestones re-calculated such that the percents unlocking schedule will be updated to the new locked amount. For example: if default_unlock_period is `0x000000000000000232`, `0x000000000000000432` it would mean that after `0000000000000002` epochs, should unlock `32`.to_dec() (`50`) percent of the amount. After the first unlock at epoch 3 let's say, the next unlock milestone will be recalculated as `0x000000000000000464`. Notice the `50%` become `100%`. diff --git a/legacy-contracts/factory-legacy/meta/Cargo.toml b/legacy-contracts/factory-legacy/meta/Cargo.toml new file mode 100644 index 000000000..01027f67e --- /dev/null +++ b/legacy-contracts/factory-legacy/meta/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "factory-legacy-meta" + +version = "0.0.0" +authors = [ "you",] +edition = "2018" +publish = false + +[dependencies.factory-legacy] +path = ".." + +[dependencies.multiversx-sc-meta] +version = "0.50.5" +default-features = false \ No newline at end of file diff --git a/legacy-contracts/factory-legacy/meta/src/main.rs b/legacy-contracts/factory-legacy/meta/src/main.rs new file mode 100644 index 000000000..64a2b3bb3 --- /dev/null +++ b/legacy-contracts/factory-legacy/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} \ No newline at end of file diff --git a/legacy-contracts/factory-legacy/multiversx.json b/legacy-contracts/factory-legacy/multiversx.json new file mode 100644 index 000000000..c2cab7433 --- /dev/null +++ b/legacy-contracts/factory-legacy/multiversx.json @@ -0,0 +1,4 @@ +{ + "language": "rust" +} + diff --git a/legacy-contracts/factory-legacy/src/attr_ex_helper.rs b/legacy-contracts/factory-legacy/src/attr_ex_helper.rs new file mode 100644 index 000000000..322bb0b73 --- /dev/null +++ b/legacy-contracts/factory-legacy/src/attr_ex_helper.rs @@ -0,0 +1,68 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::LockedAssetTokenAttributes; +use common_structs::LockedAssetTokenAttributesEx; +use common_structs::UnlockMilestoneEx; +use common_structs::UnlockScheduleEx; + +// 1% = 1_000; +pub const _PRECISION_EXTENDED: u64 = 100_000u64; + +// From 1 to 1_000; +pub const PRECISION_EX_INCREASE: u64 = 1_000u64; + +#[multiversx_sc::module] +pub trait AttrExHelper { + fn get_attributes_ex( + &self, + token_id: &TokenIdentifier, + token_nonce: u64, + attr_ex_activation: u64, + ) -> LockedAssetTokenAttributesEx { + let token_info = self.blockchain().get_esdt_token_data( + &self.blockchain().get_sc_address(), + token_id, + token_nonce, + ); + + if token_nonce < attr_ex_activation { + let attr = self + .serializer() + .top_decode_from_managed_buffer::>( + &token_info.attributes, + ); + self.convert_attr_to_attr_ex(&attr) + } else { + self.serializer() + .top_decode_from_managed_buffer::>( + &token_info.attributes, + ) + } + } + + fn convert_attr_to_attr_ex( + &self, + attr: &LockedAssetTokenAttributes, + ) -> LockedAssetTokenAttributesEx { + let mut new_milestones: ManagedVec = ManagedVec::new(); + + for milestones in attr.unlock_schedule.unlock_milestones.iter() { + new_milestones.push(UnlockMilestoneEx { + unlock_epoch: milestones.unlock_epoch, + unlock_percent: (milestones.unlock_percent as u64) * PRECISION_EX_INCREASE, + }); + } + + LockedAssetTokenAttributesEx { + unlock_schedule: UnlockScheduleEx { + unlock_milestones: new_milestones, + }, + is_merged: attr.is_merged, + } + } + + #[view(getExtendedAttributesActivationNonce)] + #[storage_mapper("extended_attributes_activation_nonce")] + fn extended_attributes_activation_nonce(&self) -> SingleValueMapper; +} diff --git a/legacy-contracts/factory-legacy/src/cache.rs b/legacy-contracts/factory-legacy/src/cache.rs new file mode 100644 index 000000000..24d1a031d --- /dev/null +++ b/legacy-contracts/factory-legacy/src/cache.rs @@ -0,0 +1,49 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::{Nonce, UnlockScheduleEx}; + +use crate::attr_ex_helper; + +use super::locked_asset; + +#[multiversx_sc::module] +pub trait CacheModule: locked_asset::LockedAssetModule + attr_ex_helper::AttrExHelper { + #[inline(always)] + fn get_sft_nonce_for_unlock_schedule( + &self, + unlock_schedule: &UnlockScheduleEx, + ) -> Option { + self.nonce_cache_ex().get(unlock_schedule) + } + + #[view(getUnlockScheduleForSFTNonce)] + fn get_unlock_schedule_for_sft_nonce( + &self, + nonce: Nonce, + ) -> Option> { + self.unlock_schedule_cache_ex().get(&nonce) + } + + #[inline(always)] + fn cache_unlock_schedule_and_nonce( + &self, + unlock_schedule: &UnlockScheduleEx, + nonce: Nonce, + ) { + self.nonce_cache_ex().insert(unlock_schedule.clone(), nonce); + self.unlock_schedule_cache_ex() + .insert(nonce, unlock_schedule.clone()); + } + + #[view(getCacheSize)] + fn get_cache_size(&self) -> usize { + self.nonce_cache_ex().len() + } + + #[storage_mapper("nonce_cache_ex")] + fn nonce_cache_ex(&self) -> MapMapper, Nonce>; + + #[storage_mapper("unlock_schedule_cache_ex")] + fn unlock_schedule_cache_ex(&self) -> MapMapper>; +} diff --git a/legacy-contracts/factory-legacy/src/events.rs b/legacy-contracts/factory-legacy/src/events.rs new file mode 100644 index 000000000..149c7af5c --- /dev/null +++ b/legacy-contracts/factory-legacy/src/events.rs @@ -0,0 +1,123 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::LockedAssetTokenAttributesEx; + +#[derive(TypeAbi, TopEncode)] +pub struct CreateAndForwardEvent { + caller: ManagedAddress, + destination: ManagedAddress, + locked_asset_token_id: TokenIdentifier, + locked_asset_token_nonce: u64, + locked_asset_token_amount: BigUint, + locked_assets_attributes: LockedAssetTokenAttributesEx, + start_epoch: u64, + block: u64, + epoch: u64, + timestamp: u64, +} + +#[derive(TypeAbi, TopEncode)] +pub struct UnlockAssetsEvent { + caller: ManagedAddress, + input_locked_assets_token_id: TokenIdentifier, + input_locked_assets_token_nonce: u64, + input_locked_assets_token_amount: BigUint, + output_locked_assets_token_id: TokenIdentifier, + output_locked_assets_token_nonce: u64, + output_locked_assets_token_amount: BigUint, + asset_token_id: TokenIdentifier, + asset_token_amount: BigUint, + input_assets_attributes: LockedAssetTokenAttributesEx, + output_assets_attributes: LockedAssetTokenAttributesEx, + block: u64, + epoch: u64, + timestamp: u64, +} + +#[multiversx_sc::module] +pub trait EventsModule { + fn emit_create_and_forward_event( + self, + caller: &ManagedAddress, + destination: &ManagedAddress, + locked_asset_token_id: &TokenIdentifier, + locked_asset_token_nonce: u64, + locked_asset_token_amount: &BigUint, + locked_assets_attributes: &LockedAssetTokenAttributesEx, + start_epoch: u64, + ) { + let epoch = self.blockchain().get_block_epoch(); + self.create_and_forward_event( + caller, + destination, + epoch, + &CreateAndForwardEvent { + caller: caller.clone(), + destination: destination.clone(), + locked_asset_token_id: locked_asset_token_id.clone(), + locked_asset_token_nonce, + locked_asset_token_amount: locked_asset_token_amount.clone(), + locked_assets_attributes: locked_assets_attributes.clone(), + start_epoch, + block: self.blockchain().get_block_nonce(), + epoch, + timestamp: self.blockchain().get_block_timestamp(), + }, + ) + } + + fn emit_unlock_assets_event( + self, + caller: &ManagedAddress, + input_locked_assets_token_id: &TokenIdentifier, + input_locked_assets_token_nonce: u64, + input_locked_assets_token_amount: &BigUint, + output_locked_assets_token_id: &TokenIdentifier, + output_locked_assets_token_nonce: u64, + output_locked_assets_token_amount: &BigUint, + asset_token_id: &TokenIdentifier, + asset_token_amount: &BigUint, + input_assets_attributes: &LockedAssetTokenAttributesEx, + output_assets_attributes: &LockedAssetTokenAttributesEx, + ) { + let epoch = self.blockchain().get_block_epoch(); + self.unlock_assets_event( + caller, + epoch, + &UnlockAssetsEvent { + caller: caller.clone(), + input_locked_assets_token_id: input_locked_assets_token_id.clone(), + input_locked_assets_token_nonce, + input_locked_assets_token_amount: input_locked_assets_token_amount.clone(), + output_locked_assets_token_id: output_locked_assets_token_id.clone(), + output_locked_assets_token_nonce, + output_locked_assets_token_amount: output_locked_assets_token_amount.clone(), + asset_token_id: asset_token_id.clone(), + asset_token_amount: asset_token_amount.clone(), + input_assets_attributes: input_assets_attributes.clone(), + output_assets_attributes: output_assets_attributes.clone(), + block: self.blockchain().get_block_nonce(), + epoch, + timestamp: self.blockchain().get_block_timestamp(), + }, + ) + } + + #[event("create_and_forward")] + fn create_and_forward_event( + self, + #[indexed] caller: &ManagedAddress, + #[indexed] destination: &ManagedAddress, + #[indexed] epoch: u64, + swap_event: &CreateAndForwardEvent, + ); + + #[event("unlock_assets")] + fn unlock_assets_event( + self, + #[indexed] caller: &ManagedAddress, + #[indexed] epoch: u64, + swap_event: &UnlockAssetsEvent, + ); +} diff --git a/legacy-contracts/factory-legacy/src/lib.rs b/legacy-contracts/factory-legacy/src/lib.rs new file mode 100644 index 000000000..56449f8d1 --- /dev/null +++ b/legacy-contracts/factory-legacy/src/lib.rs @@ -0,0 +1,363 @@ +#![no_std] + +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use attr_ex_helper::PRECISION_EX_INCREASE; +use common_structs::{ + Epoch, LockedAssetTokenAttributesEx, UnlockMilestoneEx, UnlockPeriod, UnlockScheduleEx, +}; + +pub mod attr_ex_helper; +mod cache; +mod events; +pub mod locked_asset; +pub mod locked_asset_token_merge; +pub mod migration; + +const ADDITIONAL_AMOUNT_TO_CREATE: u64 = 1; +const EPOCHS_IN_MONTH: u64 = 30; + +#[derive(TypeAbi, TopEncode, TopDecode)] +pub struct OldEsdtTokenPayment { + pub token_type: EsdtTokenType, + pub payment: EsdtTokenPayment, +} + +impl OldEsdtTokenPayment { + pub fn new(payment: EsdtTokenPayment) -> Self { + Self { + token_type: payment.token_type(), + payment, + } + } +} + +#[multiversx_sc::contract] +pub trait LockedAssetFactory: + locked_asset::LockedAssetModule + + cache::CacheModule + + token_merge_helper::TokenMergeHelperModule + + locked_asset_token_merge::LockedAssetTokenMergeModule + + events::EventsModule + + attr_ex_helper::AttrExHelper + + migration::LockedTokenMigrationModule + + multiversx_sc_modules::pause::PauseModule +{ + #[init] + fn init(&self) { + self.set_paused(true); + } + + #[only_owner] + #[endpoint] + fn whitelist(&self, address: ManagedAddress) { + let is_new = self.whitelisted_contracts().insert(address); + require!(is_new, "ManagedAddress already whitelisted"); + } + + #[only_owner] + #[endpoint(removeWhitelist)] + fn remove_whitelist(&self, address: ManagedAddress) { + let is_removed = self.whitelisted_contracts().remove(&address); + require!(is_removed, "ManagedAddresss not whitelisted"); + } + + #[endpoint(createAndForwardCustomPeriod)] + fn create_and_forward_custom_period( + &self, + amount: BigUint, + address: ManagedAddress, + start_epoch: Epoch, + unlock_period: UnlockPeriod, + ) -> OldEsdtTokenPayment { + self.require_not_paused(); + + let caller = self.blockchain().get_caller(); + require!( + self.whitelisted_contracts().contains(&caller), + "Permission denied" + ); + require!(!unlock_period.unlock_milestones.is_empty(), "Empty arg"); + + let month_start_epoch = self.get_month_start_epoch(start_epoch); + let attr = LockedAssetTokenAttributesEx { + unlock_schedule: self.create_unlock_schedule(month_start_epoch, unlock_period), + is_merged: false, + }; + + let new_token = self.produce_tokens_and_send(&amount, &attr, &address); + + self.emit_create_and_forward_event( + &caller, + &address, + &new_token.token_identifier, + new_token.token_nonce, + &new_token.amount, + &attr, + month_start_epoch, + ); + + OldEsdtTokenPayment::new(new_token) + } + + #[endpoint(createAndForward)] + fn create_and_forward( + &self, + amount: BigUint, + address: ManagedAddress, + start_epoch: Epoch, + ) -> OldEsdtTokenPayment { + self.require_not_paused(); + + let caller = self.blockchain().get_caller(); + require!( + self.whitelisted_contracts().contains(&caller), + "Permission denied" + ); + require!( + !self.locked_asset_token_id().is_empty(), + "Locked Asset Token not registered" + ); + require!(amount > 0, "Zero input amount"); + + let month_start_epoch = self.get_month_start_epoch(start_epoch); + let unlock_period = self.default_unlock_period().get(); + let attr = LockedAssetTokenAttributesEx { + unlock_schedule: self.create_unlock_schedule(month_start_epoch, unlock_period), + is_merged: false, + }; + + let new_token = self.produce_tokens_and_send(&amount, &attr, &address); + + self.emit_create_and_forward_event( + &caller, + &address, + &new_token.token_identifier, + new_token.token_nonce, + &new_token.amount, + &attr, + start_epoch, + ); + + OldEsdtTokenPayment::new(new_token) + } + + #[payable("*")] + #[endpoint(unlockAssets)] + fn unlock_assets(&self) { + self.require_not_paused(); + + let (token_id, token_nonce, amount) = self.call_value().single_esdt().into_tuple(); + let locked_token_id = self.locked_asset_token_id().get(); + require!(token_id == locked_token_id, "Bad payment token"); + + let attr_ex_activation = self.extended_attributes_activation_nonce().get(); + let attributes = self.get_attributes_ex(&token_id, token_nonce, attr_ex_activation); + let unlock_schedule = &attributes.unlock_schedule; + + let month_start_epoch = self.get_month_start_epoch(self.blockchain().get_block_epoch()); + let unlock_amount = self.get_unlock_amount( + &amount, + month_start_epoch, + &unlock_schedule.unlock_milestones, + ); + require!(amount >= unlock_amount, "Cannot unlock more than locked"); + require!(unlock_amount > 0u64, "Method called too soon"); + + let caller = self.blockchain().get_caller(); + self.mint_and_send_assets(&caller, &unlock_amount); + + let mut output_locked_assets_token_amount = + EsdtTokenPayment::new(token_id.clone(), 0, BigUint::zero()); + let mut output_locked_asset_attributes = LockedAssetTokenAttributesEx { + unlock_schedule: UnlockScheduleEx { + unlock_milestones: ManagedVec::new(), + }, + is_merged: false, + }; + + let locked_remaining = &amount - &unlock_amount; + if locked_remaining > 0u64 { + let new_unlock_milestones = self.create_new_unlock_milestones( + month_start_epoch, + &unlock_schedule.unlock_milestones, + ); + output_locked_asset_attributes = LockedAssetTokenAttributesEx { + unlock_schedule: UnlockScheduleEx { + unlock_milestones: new_unlock_milestones, + }, + is_merged: attributes.is_merged, + }; + output_locked_assets_token_amount = self.produce_tokens_and_send( + &locked_remaining, + &output_locked_asset_attributes, + &caller, + ); + } + + self.send() + .esdt_local_burn(&locked_token_id, token_nonce, &amount); + + let initial_amounts_per_epoch = attributes.get_unlock_amounts_per_epoch(&amount); + let final_amounts_per_epoch = + output_locked_asset_attributes.get_unlock_amounts_per_epoch(&locked_remaining); + self.update_energy_after_unlock( + caller.clone(), + initial_amounts_per_epoch, + final_amounts_per_epoch, + ); + + self.emit_unlock_assets_event( + &caller, + &token_id, + token_nonce, + &amount, + &output_locked_assets_token_amount.token_identifier, + output_locked_assets_token_amount.token_nonce, + &output_locked_assets_token_amount.amount, + &self.asset_token_id().get(), + &unlock_amount, + &attributes, + &output_locked_asset_attributes, + ); + } + + fn get_month_start_epoch(&self, epoch: Epoch) -> Epoch { + epoch - (epoch - self.init_epoch().get()) % EPOCHS_IN_MONTH + } + + fn produce_tokens_and_send( + &self, + amount: &BigUint, + attributes: &LockedAssetTokenAttributesEx, + address: &ManagedAddress, + ) -> EsdtTokenPayment { + let result = self.get_sft_nonce_for_unlock_schedule(&attributes.unlock_schedule); + let sent_nonce = match result { + Option::Some(cached_nonce) => { + self.add_quantity_and_send_locked_assets(amount, cached_nonce, address); + cached_nonce + } + Option::None => { + let do_cache_result = !attributes.is_merged; + + let additional_amount_to_create = if do_cache_result { + BigUint::from(ADDITIONAL_AMOUNT_TO_CREATE) + } else { + BigUint::zero() + }; + + let new_nonce = self.create_and_send_locked_assets( + amount, + &additional_amount_to_create, + address, + attributes, + ); + + if do_cache_result { + self.cache_unlock_schedule_and_nonce(&attributes.unlock_schedule, new_nonce); + } + new_nonce + } + }; + + let token_id = self.locked_asset_token_id().get(); + EsdtTokenPayment::new(token_id, sent_nonce, amount.clone()) + } + + #[only_owner] + #[endpoint(setTransferRoleForAddress)] + fn set_transfer_role_for_address(&self, opt_address: OptionalValue) { + let address = match opt_address { + OptionalValue::Some(addr) => addr, + OptionalValue::None => self.blockchain().get_sc_address(), + }; + + self.send() + .esdt_system_sc_proxy() + .set_special_roles( + &address, + &self.locked_asset_token_id().get(), + [EsdtLocalRole::Transfer][..].iter().cloned(), + ) + .async_call_and_exit() + } + + #[only_owner] + #[endpoint(unsetTransferRoleForAddress)] + fn unset_transfer_role_for_address(&self, opt_address: OptionalValue) { + let address = match opt_address { + OptionalValue::Some(addr) => addr, + OptionalValue::None => self.blockchain().get_sc_address(), + }; + + self.send() + .esdt_system_sc_proxy() + .unset_special_roles( + &address, + &self.locked_asset_token_id().get(), + [EsdtLocalRole::Transfer][..].iter().cloned(), + ) + .async_call_and_exit() + } + + #[only_owner] + #[endpoint(setBurnRoleForAddress)] + fn set_burn_role_for_address(&self, opt_address: OptionalValue) { + let address = match opt_address { + OptionalValue::Some(addr) => addr, + OptionalValue::None => self.blockchain().get_sc_address(), + }; + + self.send() + .esdt_system_sc_proxy() + .set_special_roles( + &address, + &self.locked_asset_token_id().get(), + [EsdtLocalRole::NftBurn][..].iter().cloned(), + ) + .async_call_and_exit() + } + + fn create_unlock_schedule( + &self, + start_epoch: Epoch, + unlock_period: UnlockPeriod, + ) -> UnlockScheduleEx { + let mut result = ManagedVec::new(); + for milestone in unlock_period.unlock_milestones.iter() { + result.push(UnlockMilestoneEx { + unlock_epoch: milestone.unlock_epoch + start_epoch, + unlock_percent: milestone.unlock_percent as u64 * PRECISION_EX_INCREASE, + }); + } + UnlockScheduleEx { + unlock_milestones: result, + } + } + + #[view(getLastErrorMessage)] + #[storage_mapper("last_error_message")] + fn last_error_message(&self) -> SingleValueMapper; + + #[view(getInitEpoch)] + #[storage_mapper("init_epoch")] + fn init_epoch(&self) -> SingleValueMapper; + + #[storage_mapper("whitelist")] + fn whitelisted_contracts(&self) -> SetMapper; + + #[view(getWhitelistedContracts)] + fn get_whitelisted_contracts(&self) -> MultiValueEncoded { + let mut result = MultiValueEncoded::new(); + for pair in self.whitelisted_contracts().iter() { + result.push(pair); + } + result + } + + #[view(getDefaultUnlockPeriod)] + #[storage_mapper("default_unlock_period")] + fn default_unlock_period(&self) -> SingleValueMapper>; +} diff --git a/legacy-contracts/factory-legacy/src/locked_asset.rs b/legacy-contracts/factory-legacy/src/locked_asset.rs new file mode 100644 index 000000000..a1e02cc8d --- /dev/null +++ b/legacy-contracts/factory-legacy/src/locked_asset.rs @@ -0,0 +1,209 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::*; + +use crate::attr_ex_helper::{self, PRECISION_EX_INCREASE}; + +pub const ONE_MILLION: u64 = 1_000_000u64; +pub const TEN_THOUSAND: u64 = 10_000u64; +pub const PERCENTAGE_TOTAL_EX: u64 = 100_000u64; +pub const MAX_MILESTONES_IN_SCHEDULE: usize = 64; +pub const DOUBLE_MAX_MILESTONES_IN_SCHEDULE: usize = 2 * MAX_MILESTONES_IN_SCHEDULE; + +use core::fmt::Debug; + +#[derive(ManagedVecItem)] +pub struct LockedTokenEx { + pub token_amount: EsdtTokenPayment, + pub attributes: LockedAssetTokenAttributesEx, +} + +#[derive(ManagedVecItem, Clone, Debug)] +pub struct EpochAmountPair { + pub epoch: u64, + pub amount: BigUint, +} + +#[multiversx_sc::module] +pub trait LockedAssetModule: attr_ex_helper::AttrExHelper { + fn create_and_send_locked_assets( + &self, + amount: &BigUint, + additional_amount_to_create: &BigUint, + address: &ManagedAddress, + attributes: &LockedAssetTokenAttributesEx, + ) -> Nonce { + let token_id = self.locked_asset_token_id().get(); + let last_created_nonce = self.send().esdt_nft_create_compact( + &token_id, + &(amount + additional_amount_to_create), + attributes, + ); + self.send() + .direct_esdt(address, &token_id, last_created_nonce, amount); + + last_created_nonce + } + + fn add_quantity_and_send_locked_assets( + &self, + amount: &BigUint, + sft_nonce: Nonce, + address: &ManagedAddress, + ) { + let token_id = self.locked_asset_token_id().get(); + self.send().esdt_local_mint(&token_id, sft_nonce, amount); + + self.send() + .direct_esdt(address, &token_id, sft_nonce, amount); + } + + fn get_unlock_amount( + &self, + amount: &BigUint, + current_epoch: Epoch, + unlock_milestones: &ManagedVec, + ) -> BigUint { + amount * &BigUint::from(self.get_unlock_percent(current_epoch, unlock_milestones)) + / PERCENTAGE_TOTAL_EX + } + + fn get_unlock_percent( + &self, + current_epoch: Epoch, + unlock_milestones: &ManagedVec, + ) -> u64 { + let mut unlock_percent = 0u64; + + for milestone in unlock_milestones.into_iter() { + if milestone.unlock_epoch <= current_epoch { + unlock_percent += milestone.unlock_percent; + } + } + + require!( + unlock_percent <= PERCENTAGE_TOTAL_EX, + "unlock percent greater than max" + ); + + unlock_percent + } + + fn create_new_unlock_milestones( + &self, + current_epoch: Epoch, + old_unlock_milestones: &ManagedVec, + ) -> ManagedVec { + let unlock_percent = self.get_unlock_percent(current_epoch, old_unlock_milestones); + let unlock_percent_remaining = PERCENTAGE_TOTAL_EX - unlock_percent; + + if unlock_percent_remaining == 0 { + return ManagedVec::new(); + } + + let mut unlock_milestones_merged = + ArrayVec::::new(); + for old_milestone in old_unlock_milestones.iter() { + if old_milestone.unlock_epoch > current_epoch { + let new_unlock_percent = + old_milestone.unlock_percent * PRECISION_EX_INCREASE * ONE_MILLION + / unlock_percent_remaining; + unlock_milestones_merged.push(UnlockMilestoneEx { + unlock_epoch: old_milestone.unlock_epoch, + unlock_percent: new_unlock_percent, + }); + } + } + + self.distribute_leftover(&mut unlock_milestones_merged); + self.get_non_zero_percent_milestones_as_vec(&unlock_milestones_merged) + } + + fn distribute_leftover( + &self, + unlock_milestones_merged: &mut ArrayVec, + ) { + let mut sum_of_new_percents = 0u64; + for milestone in unlock_milestones_merged.iter() { + sum_of_new_percents += milestone.unlock_percent / TEN_THOUSAND; + } + let mut leftover = PERCENTAGE_TOTAL_EX - sum_of_new_percents; + + while leftover != 0 { + let mut max_rounding_error = 0; + let mut max_rounding_error_index = 0; + for index in 0..unlock_milestones_merged.len() { + let rounding_error = unlock_milestones_merged[index].unlock_percent % TEN_THOUSAND; + if rounding_error >= max_rounding_error { + max_rounding_error = rounding_error; + max_rounding_error_index = index; + } + } + + leftover -= 1; + unlock_milestones_merged[max_rounding_error_index].unlock_percent = + ((unlock_milestones_merged[max_rounding_error_index].unlock_percent + / TEN_THOUSAND) + + 1) + * TEN_THOUSAND; + } + } + + fn get_non_zero_percent_milestones_as_vec( + &self, + unlock_milestones_merged: &ArrayVec, + ) -> ManagedVec { + let mut new_unlock_milestones = ManagedVec::new(); + + for el in unlock_milestones_merged.iter() { + let percent_rounded = el.unlock_percent / TEN_THOUSAND; + if percent_rounded != 0 { + new_unlock_milestones.push(UnlockMilestoneEx { + unlock_epoch: el.unlock_epoch, + unlock_percent: percent_rounded, + }); + } + } + + new_unlock_milestones + } + + fn validate_unlock_milestones(&self, unlock_milestones: &ManagedVec) { + require!(!unlock_milestones.is_empty(), "Empty param"); + + let mut percents_sum: u8 = 0; + let mut last_milestone_unlock_epoch: u64 = 0; + + for milestone in unlock_milestones.into_iter() { + require!( + milestone.unlock_epoch >= last_milestone_unlock_epoch, + "Unlock epochs not in order" + ); + require!( + milestone.unlock_percent <= 100, + "Unlock percent more than 100" + ); + last_milestone_unlock_epoch = milestone.unlock_epoch; + percents_sum += milestone.unlock_percent; + } + + require!(percents_sum == 100, "Percents do not sum up to 100"); + } + + fn mint_and_send_assets(&self, dest: &ManagedAddress, amount: &BigUint) { + if amount > &0 { + let asset_token_id = self.asset_token_id().get(); + self.send().esdt_local_mint(&asset_token_id, 0, amount); + self.send().direct_esdt(dest, &asset_token_id, 0, amount); + } + } + + #[view(getLockedAssetTokenId)] + #[storage_mapper("locked_asset_token_id")] + fn locked_asset_token_id(&self) -> SingleValueMapper; + + #[view(getAssetTokenId)] + #[storage_mapper("asset_token_id")] + fn asset_token_id(&self) -> SingleValueMapper; +} diff --git a/legacy-contracts/factory-legacy/src/locked_asset_token_merge.rs b/legacy-contracts/factory-legacy/src/locked_asset_token_merge.rs new file mode 100644 index 000000000..8cb637658 --- /dev/null +++ b/legacy-contracts/factory-legacy/src/locked_asset_token_merge.rs @@ -0,0 +1,162 @@ +multiversx_sc::imports!(); +multiversx_sc::derive_imports!(); + +use common_structs::*; + +use crate::attr_ex_helper::{self, PRECISION_EX_INCREASE}; + +use super::locked_asset; +use super::locked_asset::{ + EpochAmountPair, LockedTokenEx, DOUBLE_MAX_MILESTONES_IN_SCHEDULE, MAX_MILESTONES_IN_SCHEDULE, + ONE_MILLION, PERCENTAGE_TOTAL_EX, +}; + +#[multiversx_sc::module] +pub trait LockedAssetTokenMergeModule: + locked_asset::LockedAssetModule + + token_merge_helper::TokenMergeHelperModule + + attr_ex_helper::AttrExHelper +{ + fn burn_tokens_from_payments(&self, payments: &ManagedVec) { + for entry in payments { + self.send() + .esdt_local_burn(&entry.token_identifier, entry.token_nonce, &entry.amount); + } + } + + fn get_merged_locked_asset_token_amount_and_attributes( + &self, + payments: &ManagedVec, + ) -> (BigUint, LockedAssetTokenAttributesEx) { + require!(!payments.is_empty(), "Cannot merge with 0 tokens"); + + let mut tokens = ManagedVec::new(); + let mut sum_amount = BigUint::zero(); + let locked_asset_token_id = self.locked_asset_token_id().get(); + let attr_ex_activation = self.extended_attributes_activation_nonce().get(); + for entry in payments { + require!( + entry.token_identifier == locked_asset_token_id, + "Bad token id" + ); + + tokens.push(LockedTokenEx { + token_amount: EsdtTokenPayment::new( + entry.token_identifier.clone(), + entry.token_nonce, + entry.amount.clone(), + ), + attributes: self.get_attributes_ex( + &entry.token_identifier, + entry.token_nonce, + attr_ex_activation, + ), + }); + sum_amount += &entry.amount; + } + + if tokens.len() == 1 { + let token_0 = tokens.get(0); + return (token_0.token_amount.amount.clone(), token_0.attributes); + } + + let attrs = LockedAssetTokenAttributesEx { + unlock_schedule: self.aggregated_unlock_schedule(&tokens), + is_merged: true, + }; + + (sum_amount, attrs) + } + + fn calculate_new_unlock_milestones( + &self, + unlock_epoch_amount_merged: &ArrayVec< + EpochAmountPair, + DOUBLE_MAX_MILESTONES_IN_SCHEDULE, + >, + amount_total: &BigUint, + ) -> ManagedVec { + let mut unlock_milestones_merged = + ArrayVec::::new(); + + for el in unlock_epoch_amount_merged.iter() { + let unlock_percent = &(&el.amount * PRECISION_EX_INCREASE * ONE_MILLION) / amount_total; + + // Accumulate even the percents of 0 + unlock_milestones_merged.push(UnlockMilestoneEx { + unlock_epoch: el.epoch, + unlock_percent: unlock_percent.to_u64().unwrap(), + }) + } + + self.distribute_leftover(&mut unlock_milestones_merged); + self.get_non_zero_percent_milestones_as_vec(&unlock_milestones_merged) + } + + fn aggregated_unlock_schedule( + &self, + tokens: &ManagedVec>, + ) -> UnlockScheduleEx { + let mut array = + ArrayVec::, DOUBLE_MAX_MILESTONES_IN_SCHEDULE>::new(); + + let mut sum = BigUint::zero(); + for locked_token in tokens.iter() { + for milestone in locked_token + .attributes + .unlock_schedule + .unlock_milestones + .iter() + { + require!( + array.len() < DOUBLE_MAX_MILESTONES_IN_SCHEDULE, + "too many unlock milestones" + ); + array.push(EpochAmountPair { + epoch: milestone.unlock_epoch, + amount: self.rule_of_three( + &BigUint::from(milestone.unlock_percent), + &BigUint::from(PERCENTAGE_TOTAL_EX), + &locked_token.token_amount.amount, + ), + }); + } + sum += &locked_token.token_amount.amount; + } + array.sort_unstable_by(|a, b| a.epoch.cmp(&b.epoch)); + + let default = EpochAmountPair { + epoch: 0u64, + amount: BigUint::zero(), + }; + let mut unlock_epoch_amount_merged = + ArrayVec::, DOUBLE_MAX_MILESTONES_IN_SCHEDULE>::new(); + for elem in array.iter() { + let last = unlock_epoch_amount_merged.last().unwrap_or(&default); + + if elem.epoch == last.epoch || elem.epoch == last.epoch + 1 { + let new_elem = EpochAmountPair { + epoch: elem.epoch, + amount: &last.amount + &elem.amount, + }; + unlock_epoch_amount_merged.pop(); + unlock_epoch_amount_merged.push(new_elem); + } else { + unlock_epoch_amount_merged.push(elem.clone()); + } + } + require!(sum != 0u64, "Sum cannot be zero"); + require!( + unlock_epoch_amount_merged.len() < MAX_MILESTONES_IN_SCHEDULE, + "Too many milestones" + ); + require!(!unlock_epoch_amount_merged.is_empty(), "Empty milestones"); + + let new_unlock_milestones = + self.calculate_new_unlock_milestones(&unlock_epoch_amount_merged, &sum); + + UnlockScheduleEx { + unlock_milestones: new_unlock_milestones, + } + } +} diff --git a/legacy-contracts/factory-legacy/src/migration.rs b/legacy-contracts/factory-legacy/src/migration.rs new file mode 100644 index 000000000..393f82a59 --- /dev/null +++ b/legacy-contracts/factory-legacy/src/migration.rs @@ -0,0 +1,61 @@ +multiversx_sc::imports!(); + +use common_structs::UnlockEpochAmountPairs; + +mod energy_factory_proxy { + use common_structs::UnlockEpochAmountPairs; + + multiversx_sc::imports!(); + + #[multiversx_sc::proxy] + pub trait EnergyFactoryProxy { + #[endpoint(updateEnergyAfterOldTokenUnlock)] + fn update_energy_after_old_token_unlock( + &self, + original_caller: ManagedAddress, + initial_epoch_amount_pairs: UnlockEpochAmountPairs, + final_epoch_amount_pairs: UnlockEpochAmountPairs, + ); + } +} + +#[multiversx_sc::module] +pub trait LockedTokenMigrationModule: + crate::locked_asset::LockedAssetModule + crate::attr_ex_helper::AttrExHelper +{ + #[only_owner] + #[endpoint(setNewFactoryAddress)] + fn set_new_factory_address(&self, sc_address: ManagedAddress) { + require!( + !sc_address.is_zero() && self.blockchain().is_smart_contract(&sc_address), + "Invalid SC address" + ); + self.new_factory_address().set(&sc_address); + } + + fn update_energy_after_unlock( + &self, + caller: ManagedAddress, + initial_epoch_amount_pairs: UnlockEpochAmountPairs, + final_epoch_amount_pairs: UnlockEpochAmountPairs, + ) { + let new_factory_address = self.new_factory_address().get(); + let _: IgnoreValue = self + .new_factory_proxy_builder(new_factory_address) + .update_energy_after_old_token_unlock( + caller, + initial_epoch_amount_pairs, + final_epoch_amount_pairs, + ) + .execute_on_dest_context(); + } + + #[proxy] + fn new_factory_proxy_builder( + &self, + sc_address: ManagedAddress, + ) -> energy_factory_proxy::Proxy; + + #[storage_mapper("newFactoryAddress")] + fn new_factory_address(&self) -> SingleValueMapper; +} diff --git a/legacy-contracts/factory-legacy/testnet.toml b/legacy-contracts/factory-legacy/testnet.toml new file mode 100644 index 000000000..e69de29bb diff --git a/legacy-contracts/factory-legacy/wasm/Cargo.lock b/legacy-contracts/factory-legacy/wasm/Cargo.lock new file mode 100644 index 000000000..50cc43b0b --- /dev/null +++ b/legacy-contracts/factory-legacy/wasm/Cargo.lock @@ -0,0 +1,255 @@ +# 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_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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "factory-legacy" +version = "0.0.0" +dependencies = [ + "common_errors", + "common_structs", + "multiversx-sc", + "multiversx-sc-modules", + "token_merge_helper", +] + +[[package]] +name = "factory-legacy-wasm" +version = "0.0.0" +dependencies = [ + "factory-legacy", + "multiversx-sc-wasm-adapter", +] + +[[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 = "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 = "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 = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[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 = "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", +] diff --git a/legacy-contracts/factory-legacy/wasm/Cargo.toml b/legacy-contracts/factory-legacy/wasm/Cargo.toml new file mode 100644 index 000000000..bd05eac77 --- /dev/null +++ b/legacy-contracts/factory-legacy/wasm/Cargo.toml @@ -0,0 +1,34 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + +[package] +name = "factory-legacy-wasm" +version = "0.0.0" +edition = "2018" +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.factory-legacy] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "=0.50.5" + +[workspace] +members = ["."] diff --git a/legacy-contracts/factory-legacy/wasm/src/lib.rs b/legacy-contracts/factory-legacy/wasm/src/lib.rs new file mode 100644 index 000000000..1ddbeb62c --- /dev/null +++ b/legacy-contracts/factory-legacy/wasm/src/lib.rs @@ -0,0 +1,45 @@ +// Code generated by the multiversx-sc build system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Endpoints: 21 +// Async Callback (empty): 1 +// Total number of exported functions: 23 + +#![no_std] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + factory_legacy + ( + init => init + whitelist => whitelist + removeWhitelist => remove_whitelist + createAndForwardCustomPeriod => create_and_forward_custom_period + createAndForward => create_and_forward + unlockAssets => unlock_assets + setTransferRoleForAddress => set_transfer_role_for_address + unsetTransferRoleForAddress => unset_transfer_role_for_address + setBurnRoleForAddress => set_burn_role_for_address + getLastErrorMessage => last_error_message + getInitEpoch => init_epoch + getWhitelistedContracts => get_whitelisted_contracts + getDefaultUnlockPeriod => default_unlock_period + getLockedAssetTokenId => locked_asset_token_id + getAssetTokenId => asset_token_id + getUnlockScheduleForSFTNonce => get_unlock_schedule_for_sft_nonce + getCacheSize => get_cache_size + getExtendedAttributesActivationNonce => extended_attributes_activation_nonce + setNewFactoryAddress => set_new_factory_address + pause => pause_endpoint + unpause => unpause_endpoint + isPaused => paused_status + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/legacy-contracts/farm-v-13/wasm/src/lib.rs b/legacy-contracts/farm-v-13/wasm/src/lib.rs index 850923617..ad5759863 100644 --- a/legacy-contracts/farm-v-13/wasm/src/lib.rs +++ b/legacy-contracts/farm-v-13/wasm/src/lib.rs @@ -6,9 +6,9 @@ // Init: 1 // Upgrade: 1 -// Endpoints: 3 +// Endpoints: 4 // Async Callback (empty): 1 -// Total number of exported functions: 6 +// Total number of exported functions: 7 #![no_std] @@ -23,6 +23,7 @@ multiversx_sc_wasm_adapter::endpoints! { exitFarm => exit_farm calculateRewardsForGivenPosition => calculate_rewards_for_given_position end_produce_rewards => end_produce_rewards + getFarmingTokenId => farming_token_id ) } diff --git a/legacy-contracts/proxy-dex-legacy/Cargo.toml b/legacy-contracts/proxy-dex-legacy/Cargo.toml index cb6801e13..d91ce9636 100644 --- a/legacy-contracts/proxy-dex-legacy/Cargo.toml +++ b/legacy-contracts/proxy-dex-legacy/Cargo.toml @@ -20,5 +20,5 @@ path = "../../common/common_structs" [dependencies.token_merge_helper] path = "../../common/modules/token_merge_helper" -[dependencies.factory] -path = "../../locked-asset/factory" +[dependencies.factory-legacy] +path = "../factory-legacy" diff --git a/legacy-contracts/proxy-dex-legacy/src/energy_update.rs b/legacy-contracts/proxy-dex-legacy/src/energy_update.rs index 06921dd35..e1bb7725a 100644 --- a/legacy-contracts/proxy-dex-legacy/src/energy_update.rs +++ b/legacy-contracts/proxy-dex-legacy/src/energy_update.rs @@ -2,7 +2,7 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); use common_structs::LockedAssetTokenAttributesEx; -use factory::attr_ex_helper; +use factory_legacy::attr_ex_helper; use crate::{energy::Energy, proxy_common}; @@ -55,8 +55,9 @@ pub trait EnergyUpdateModule: let mut energy = self.get_energy_entry(user); let current_epoch = self.blockchain().get_block_epoch(); + let extended_attributes_activation_nonce = self.get_extended_attributes_activation_nonce(); let attributes: LockedAssetTokenAttributesEx = - self.get_attributes_ex(token_id, token_nonce); + self.get_attributes_ex(token_id, token_nonce, extended_attributes_activation_nonce); let amounts_per_epoch = attributes.get_unlock_amounts_per_epoch(token_amount); for epoch_amount_pair in &amounts_per_epoch.pairs { energy.update_after_unlock_any( diff --git a/legacy-contracts/proxy-dex-legacy/src/lib.rs b/legacy-contracts/proxy-dex-legacy/src/lib.rs index 32305f10f..e62a10190 100644 --- a/legacy-contracts/proxy-dex-legacy/src/lib.rs +++ b/legacy-contracts/proxy-dex-legacy/src/lib.rs @@ -12,7 +12,7 @@ pub mod proxy_farm; mod proxy_pair; pub mod transfer_role; -use factory::attr_ex_helper; +use factory_legacy::attr_ex_helper; #[multiversx_sc::contract] pub trait ProxyDexImpl: diff --git a/legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs b/legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs index 838954dd8..871e42259 100644 --- a/legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs +++ b/legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs @@ -3,7 +3,7 @@ multiversx_sc::derive_imports!(); use common_structs::RawResultWrapper; use common_structs::RawResultsType; -use factory::attr_ex_helper; +use factory_legacy::attr_ex_helper; use super::events; use super::proxy_common; diff --git a/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs b/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs index bd39605e6..d875c5486 100644 --- a/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs +++ b/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs @@ -5,7 +5,7 @@ multiversx_sc::derive_imports!(); use common_structs::Nonce; use common_structs::{RawResultWrapper, RawResultsType}; -use factory::attr_ex_helper; +use factory_legacy::attr_ex_helper; use crate::energy_update; use crate::proxy_common::WrappedFarmTokenAttributes; diff --git a/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs b/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs index d0bc68b4a..c8ec2607c 100644 --- a/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs +++ b/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs @@ -6,7 +6,7 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); use common_structs::{RawResultWrapper, RawResultsType}; -use factory::attr_ex_helper; +use factory_legacy::attr_ex_helper; use crate::energy_update; use crate::proxy_common::WrappedLpTokenAttributes; diff --git a/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock b/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock index a3143553e..df92fe170 100644 --- a/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock +++ b/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock @@ -20,12 +20,6 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "common_errors" version = "0.0.0" @@ -44,12 +38,6 @@ dependencies = [ "unwrappable", ] -[[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" @@ -57,35 +45,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] -name = "energy-factory" +name = "factory-legacy" 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 = "factory" -version = "0.0.0" -dependencies = [ - "arrayvec", "common_errors", "common_structs", - "energy-factory", - "itertools", "multiversx-sc", "multiversx-sc-modules", "token_merge_helper", - "token_send", - "wee_alloc", ] [[package]] @@ -107,30 +74,6 @@ 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 = "libc" -version = "0.2.118" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e509672465a0504304aa87f9f176f2b2b716ed8fb105ebe5c02dc6dce96a94" - [[package]] name = "math" version = "0.0.0" @@ -138,12 +81,6 @@ dependencies = [ "multiversx-sc", ] -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "mergeable" version = "0.0.0" @@ -251,7 +188,7 @@ name = "proxy-dex-legacy" version = "0.0.0" dependencies = [ "common_structs", - "factory", + "factory-legacy", "multiversx-sc", "token_merge_helper", ] @@ -283,23 +220,6 @@ dependencies = [ "nibble_vec", ] -[[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.13.2" @@ -325,15 +245,6 @@ dependencies = [ "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" @@ -352,47 +263,3 @@ 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 = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if", - "libc", - "memory_units", - "winapi", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" From b7fedabb4eeb69ef72d0c27508a1255316ad1971 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Wed, 31 Jul 2024 00:19:01 +0300 Subject: [PATCH 03/13] legacy contracts only with signatures --- Cargo.lock | 99 +- Cargo.toml | 18 +- .../farm-staking-proxy-v-13/meta/src/main.rs | 3 - .../.gitignore | 0 .../Cargo.toml | 6 +- .../meta/Cargo.toml | 4 +- .../farm-staking-proxy-v13/meta/src/main.rs | 3 + .../multiversx.json | 0 .../src/dual_yield_token.rs | 0 .../src/external_contracts_interactions.rs | 2 +- .../src/lib.rs | 0 .../src/lp_farm_token.rs | 0 .../src/result_types.rs | 0 .../tests/constants/mod.rs | 0 .../tests/staking_farm_with_lp.rs | 0 .../mod.rs | 0 .../mod.rs | 0 .../mod.rs | 0 .../wasm/Cargo.lock | 10 +- .../wasm/Cargo.toml | 4 +- .../wasm/src/lib.rs | 2 +- legacy-contracts/farm-v-13/meta/src/main.rs | 3 - legacy-contracts/farm-v-13/src/lib.rs | 62 - legacy-contracts/farm-v-13/wasm/src/lib.rs | 30 - .../{farm-v-13 => farm-v12}/Cargo.lock | 0 .../{farm-v-13 => farm-v12}/Cargo.toml | 2 +- .../{farm-v-13 => farm-v12}/meta/Cargo.toml | 4 +- legacy-contracts/farm-v12/meta/src/main.rs | 3 + .../{farm-v-13 => farm-v12}/multiversx.json | 0 legacy-contracts/farm-v12/src/lib.rs | 211 ++ .../{farm-v-13 => farm-v12}/wasm/Cargo.lock | 6 +- .../{farm-v-13 => farm-v12}/wasm/Cargo.toml | 4 +- legacy-contracts/farm-v12/wasm/src/lib.rs | 60 + .../farm-v13-custom-rewards/Cargo.lock | 2593 +++++++++++++++++ .../farm-v13-custom-rewards/Cargo.toml | 18 + .../farm-v13-custom-rewards/meta/Cargo.toml | 12 + .../farm-v13-custom-rewards/meta/src/main.rs | 3 + .../farm-v13-custom-rewards/multiversx.json | 3 + .../farm-v13-custom-rewards/src/lib.rs | 254 ++ .../farm-v13-custom-rewards/wasm/Cargo.lock | 188 ++ .../farm-v13-custom-rewards/wasm/Cargo.toml | 34 + .../farm-v13-custom-rewards/wasm/src/lib.rs | 62 + .../farm-v13-locked-rewards/Cargo.lock | 2593 +++++++++++++++++ .../farm-v13-locked-rewards/Cargo.toml | 18 + .../farm-v13-locked-rewards/meta/Cargo.toml | 12 + .../farm-v13-locked-rewards/meta/src/main.rs | 3 + .../farm-v13-locked-rewards/multiversx.json | 3 + .../farm-v13-locked-rewards/src/lib.rs | 275 ++ .../farm-v13-locked-rewards/wasm/Cargo.lock | 188 ++ .../farm-v13-locked-rewards/wasm/Cargo.toml | 34 + .../farm-v13-locked-rewards/wasm/src/lib.rs | 62 + legacy-contracts/farm-v13/Cargo.lock | 2593 +++++++++++++++++ legacy-contracts/farm-v13/Cargo.toml | 18 + legacy-contracts/farm-v13/meta/Cargo.toml | 12 + legacy-contracts/farm-v13/meta/src/main.rs | 3 + legacy-contracts/farm-v13/multiversx.json | 3 + legacy-contracts/farm-v13/src/lib.rs | 306 ++ legacy-contracts/farm-v13/wasm/Cargo.lock | 188 ++ legacy-contracts/farm-v13/wasm/Cargo.toml | 34 + legacy-contracts/farm-v13/wasm/src/lib.rs | 65 + .../price-discovery-v1/Cargo.lock | 2593 +++++++++++++++++ .../price-discovery-v1/Cargo.toml | 18 + .../price-discovery-v1/meta/Cargo.toml | 12 + .../price-discovery-v1/meta/src/main.rs | 3 + .../price-discovery-v1/multiversx.json | 3 + .../price-discovery-v1/src/lib.rs | 130 + .../price-discovery-v1/wasm/Cargo.lock | 188 ++ .../price-discovery-v1/wasm/Cargo.toml | 34 + .../price-discovery-v1/wasm/src/lib.rs | 47 + .../price-discovery-v2/Cargo.lock | 2593 +++++++++++++++++ .../price-discovery-v2/Cargo.toml | 18 + .../price-discovery-v2/meta/Cargo.toml | 12 + .../price-discovery-v2/meta/src/main.rs | 3 + .../price-discovery-v2/multiversx.json | 3 + .../price-discovery-v2/src/lib.rs | 130 + .../price-discovery-v2/wasm/Cargo.lock | 188 ++ .../price-discovery-v2/wasm/Cargo.toml | 34 + .../price-discovery-v2/wasm/src/lib.rs | 47 + 78 files changed, 16038 insertions(+), 131 deletions(-) delete mode 100644 legacy-contracts/farm-staking-proxy-v-13/meta/src/main.rs rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/.gitignore (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/Cargo.toml (92%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/meta/Cargo.toml (72%) create mode 100644 legacy-contracts/farm-staking-proxy-v13/meta/src/main.rs rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/multiversx.json (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/src/dual_yield_token.rs (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/src/external_contracts_interactions.rs (99%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/src/lib.rs (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/src/lp_farm_token.rs (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/src/result_types.rs (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/tests/constants/mod.rs (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/tests/staking_farm_with_lp.rs (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/tests/staking_farm_with_lp_external_contracts/mod.rs (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/tests/staking_farm_with_lp_staking_contract_interactions/mod.rs (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/tests/staking_farm_with_lp_staking_contract_setup/mod.rs (100%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/wasm/Cargo.lock (98%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/wasm/Cargo.toml (87%) rename legacy-contracts/{farm-staking-proxy-v-13 => farm-staking-proxy-v13}/wasm/src/lib.rs (97%) delete mode 100644 legacy-contracts/farm-v-13/meta/src/main.rs delete mode 100644 legacy-contracts/farm-v-13/src/lib.rs delete mode 100644 legacy-contracts/farm-v-13/wasm/src/lib.rs rename legacy-contracts/{farm-v-13 => farm-v12}/Cargo.lock (100%) rename legacy-contracts/{farm-v-13 => farm-v12}/Cargo.toml (93%) rename legacy-contracts/{farm-v-13 => farm-v12}/meta/Cargo.toml (75%) create mode 100644 legacy-contracts/farm-v12/meta/src/main.rs rename legacy-contracts/{farm-v-13 => farm-v12}/multiversx.json (100%) create mode 100644 legacy-contracts/farm-v12/src/lib.rs rename legacy-contracts/{farm-v-13 => farm-v12}/wasm/Cargo.lock (98%) rename legacy-contracts/{farm-v-13 => farm-v12}/wasm/Cargo.toml (91%) create mode 100644 legacy-contracts/farm-v12/wasm/src/lib.rs create mode 100644 legacy-contracts/farm-v13-custom-rewards/Cargo.lock create mode 100644 legacy-contracts/farm-v13-custom-rewards/Cargo.toml create mode 100644 legacy-contracts/farm-v13-custom-rewards/meta/Cargo.toml create mode 100644 legacy-contracts/farm-v13-custom-rewards/meta/src/main.rs create mode 100644 legacy-contracts/farm-v13-custom-rewards/multiversx.json create mode 100644 legacy-contracts/farm-v13-custom-rewards/src/lib.rs create mode 100644 legacy-contracts/farm-v13-custom-rewards/wasm/Cargo.lock create mode 100644 legacy-contracts/farm-v13-custom-rewards/wasm/Cargo.toml create mode 100644 legacy-contracts/farm-v13-custom-rewards/wasm/src/lib.rs create mode 100644 legacy-contracts/farm-v13-locked-rewards/Cargo.lock create mode 100644 legacy-contracts/farm-v13-locked-rewards/Cargo.toml create mode 100644 legacy-contracts/farm-v13-locked-rewards/meta/Cargo.toml create mode 100644 legacy-contracts/farm-v13-locked-rewards/meta/src/main.rs create mode 100644 legacy-contracts/farm-v13-locked-rewards/multiversx.json create mode 100644 legacy-contracts/farm-v13-locked-rewards/src/lib.rs create mode 100644 legacy-contracts/farm-v13-locked-rewards/wasm/Cargo.lock create mode 100644 legacy-contracts/farm-v13-locked-rewards/wasm/Cargo.toml create mode 100644 legacy-contracts/farm-v13-locked-rewards/wasm/src/lib.rs create mode 100644 legacy-contracts/farm-v13/Cargo.lock create mode 100644 legacy-contracts/farm-v13/Cargo.toml create mode 100644 legacy-contracts/farm-v13/meta/Cargo.toml create mode 100644 legacy-contracts/farm-v13/meta/src/main.rs create mode 100644 legacy-contracts/farm-v13/multiversx.json create mode 100644 legacy-contracts/farm-v13/src/lib.rs create mode 100644 legacy-contracts/farm-v13/wasm/Cargo.lock create mode 100644 legacy-contracts/farm-v13/wasm/Cargo.toml create mode 100644 legacy-contracts/farm-v13/wasm/src/lib.rs create mode 100644 legacy-contracts/price-discovery-v1/Cargo.lock create mode 100644 legacy-contracts/price-discovery-v1/Cargo.toml create mode 100644 legacy-contracts/price-discovery-v1/meta/Cargo.toml create mode 100644 legacy-contracts/price-discovery-v1/meta/src/main.rs create mode 100644 legacy-contracts/price-discovery-v1/multiversx.json create mode 100644 legacy-contracts/price-discovery-v1/src/lib.rs create mode 100644 legacy-contracts/price-discovery-v1/wasm/Cargo.lock create mode 100644 legacy-contracts/price-discovery-v1/wasm/Cargo.toml create mode 100644 legacy-contracts/price-discovery-v1/wasm/src/lib.rs create mode 100644 legacy-contracts/price-discovery-v2/Cargo.lock create mode 100644 legacy-contracts/price-discovery-v2/Cargo.toml create mode 100644 legacy-contracts/price-discovery-v2/meta/Cargo.toml create mode 100644 legacy-contracts/price-discovery-v2/meta/src/main.rs create mode 100644 legacy-contracts/price-discovery-v2/multiversx.json create mode 100644 legacy-contracts/price-discovery-v2/src/lib.rs create mode 100644 legacy-contracts/price-discovery-v2/wasm/Cargo.lock create mode 100644 legacy-contracts/price-discovery-v2/wasm/Cargo.toml create mode 100644 legacy-contracts/price-discovery-v2/wasm/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 04e8e5188..43e7acf34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -913,14 +913,14 @@ dependencies = [ ] [[package]] -name = "farm-staking-proxy-v-13" +name = "farm-staking-proxy-v13" version = "0.0.0" dependencies = [ "common_structs", "energy-factory", "energy-query", "farm-staking", - "farm-v-13", + "farm-v13-locked-rewards", "farm_token", "hex", "locking_module", @@ -937,15 +937,15 @@ dependencies = [ ] [[package]] -name = "farm-staking-proxy-v-13-meta" +name = "farm-staking-proxy-v13-meta" version = "0.0.0" dependencies = [ - "farm-staking-proxy-v-13", + "farm-staking-proxy-v13", "multiversx-sc-meta", ] [[package]] -name = "farm-v-13" +name = "farm-v12" version = "0.0.0" dependencies = [ "multiversx-sc", @@ -954,10 +954,61 @@ dependencies = [ ] [[package]] -name = "farm-v-13-meta" +name = "farm-v12-meta" version = "0.0.0" dependencies = [ - "farm-v-13", + "farm-v12", + "multiversx-sc-meta", +] + +[[package]] +name = "farm-v13" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "multiversx-sc-scenario", + "num-bigint", +] + +[[package]] +name = "farm-v13-custom-rewards" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "multiversx-sc-scenario", + "num-bigint", +] + +[[package]] +name = "farm-v13-custom-rewards-meta" +version = "0.0.0" +dependencies = [ + "farm-v13-custom-rewards", + "multiversx-sc-meta", +] + +[[package]] +name = "farm-v13-locked-rewards" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "multiversx-sc-scenario", + "num-bigint", +] + +[[package]] +name = "farm-v13-locked-rewards-meta" +version = "0.0.0" +dependencies = [ + "farm-v13-locked-rewards", + "multiversx-sc-meta", +] + +[[package]] +name = "farm-v13-meta" +version = "0.0.0" +dependencies = [ + "farm-v13", "multiversx-sc-meta", ] @@ -2232,6 +2283,40 @@ dependencies = [ "price-discovery", ] +[[package]] +name = "price-discovery-v1" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "multiversx-sc-scenario", + "num-bigint", +] + +[[package]] +name = "price-discovery-v1-meta" +version = "0.0.0" +dependencies = [ + "multiversx-sc-meta", + "price-discovery-v1", +] + +[[package]] +name = "price-discovery-v2" +version = "0.0.0" +dependencies = [ + "multiversx-sc", + "multiversx-sc-scenario", + "num-bigint", +] + +[[package]] +name = "price-discovery-v2-meta" +version = "0.0.0" +dependencies = [ + "multiversx-sc-meta", + "price-discovery-v2", +] + [[package]] name = "proc-macro2" version = "1.0.82" diff --git a/Cargo.toml b/Cargo.toml index 7a6041dc6..6c3af3ab3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,14 +39,24 @@ members = [ "legacy-contracts/simple-lock-legacy", "legacy-contracts/simple-lock-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", + "legacy-contracts/farm-staking-proxy-v13", + "legacy-contracts/farm-staking-proxy-v13/meta", + "legacy-contracts/farm-v12", + "legacy-contracts/farm-v12/meta", + "legacy-contracts/farm-v13", + "legacy-contracts/farm-v13/meta", + "legacy-contracts/farm-v13-locked-rewards", + "legacy-contracts/farm-v13-locked-rewards/meta", + "legacy-contracts/farm-v13-custom-rewards", + "legacy-contracts/farm-v13-custom-rewards/meta", "legacy-contracts/proxy-dex-legacy", "legacy-contracts/proxy-dex-legacy/meta", "legacy-contracts/factory-legacy", "legacy-contracts/factory-legacy/meta", + "legacy-contracts/price-discovery-v1", + "legacy-contracts/price-discovery-v1/meta", + "legacy-contracts/price-discovery-v2", + "legacy-contracts/price-discovery-v2/meta", "locked-asset/", "locked-asset/distribution", 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 deleted file mode 100644 index 0c5fc84db..000000000 --- a/legacy-contracts/farm-staking-proxy-v-13/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-v-13/.gitignore b/legacy-contracts/farm-staking-proxy-v13/.gitignore similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/.gitignore rename to legacy-contracts/farm-staking-proxy-v13/.gitignore diff --git a/legacy-contracts/farm-staking-proxy-v-13/Cargo.toml b/legacy-contracts/farm-staking-proxy-v13/Cargo.toml similarity index 92% rename from legacy-contracts/farm-staking-proxy-v-13/Cargo.toml rename to legacy-contracts/farm-staking-proxy-v13/Cargo.toml index 8fdeaefb2..f530c7e09 100644 --- a/legacy-contracts/farm-staking-proxy-v-13/Cargo.toml +++ b/legacy-contracts/farm-staking-proxy-v13/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "farm-staking-proxy-v-13" +name = "farm-staking-proxy-v13" version = "0.0.0" authors = ["MultiversX "] edition = "2021" @@ -27,8 +27,8 @@ path = "../../farm-staking/farm-staking" [dependencies.pair] path = "../../dex/pair" -[dependencies.farm-v-13] -path = "../farm-v-13" +[dependencies.farm-v13-locked-rewards] +path = "../farm-v13-locked-rewards" [dev-dependencies.energy-factory] path = "../../locked-asset/energy-factory" diff --git a/legacy-contracts/farm-staking-proxy-v-13/meta/Cargo.toml b/legacy-contracts/farm-staking-proxy-v13/meta/Cargo.toml similarity index 72% rename from legacy-contracts/farm-staking-proxy-v-13/meta/Cargo.toml rename to legacy-contracts/farm-staking-proxy-v13/meta/Cargo.toml index f2075e1a4..bd22d73c1 100644 --- a/legacy-contracts/farm-staking-proxy-v-13/meta/Cargo.toml +++ b/legacy-contracts/farm-staking-proxy-v13/meta/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "farm-staking-proxy-v-13-meta" +name = "farm-staking-proxy-v13-meta" version = "0.0.0" edition = "2021" publish = false authors = ["MultiversX "] -[dependencies.farm-staking-proxy-v-13] +[dependencies.farm-staking-proxy-v13] path = ".." [dependencies.multiversx-sc-meta] diff --git a/legacy-contracts/farm-staking-proxy-v13/meta/src/main.rs b/legacy-contracts/farm-staking-proxy-v13/meta/src/main.rs new file mode 100644 index 000000000..d25b3a0c4 --- /dev/null +++ b/legacy-contracts/farm-staking-proxy-v13/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} diff --git a/legacy-contracts/farm-staking-proxy-v-13/multiversx.json b/legacy-contracts/farm-staking-proxy-v13/multiversx.json similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/multiversx.json rename to legacy-contracts/farm-staking-proxy-v13/multiversx.json diff --git a/legacy-contracts/farm-staking-proxy-v-13/src/dual_yield_token.rs b/legacy-contracts/farm-staking-proxy-v13/src/dual_yield_token.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/src/dual_yield_token.rs rename to legacy-contracts/farm-staking-proxy-v13/src/dual_yield_token.rs diff --git a/legacy-contracts/farm-staking-proxy-v-13/src/external_contracts_interactions.rs b/legacy-contracts/farm-staking-proxy-v13/src/external_contracts_interactions.rs similarity index 99% rename from legacy-contracts/farm-staking-proxy-v-13/src/external_contracts_interactions.rs rename to legacy-contracts/farm-staking-proxy-v13/src/external_contracts_interactions.rs index 9e6d3e49e..69f250578 100644 --- a/legacy-contracts/farm-staking-proxy-v-13/src/external_contracts_interactions.rs +++ b/legacy-contracts/farm-staking-proxy-v13/src/external_contracts_interactions.rs @@ -134,7 +134,7 @@ pub trait ExternalContractsInteractionsModule: fn staking_farm_proxy_obj(&self, sc_address: ManagedAddress) -> farm_staking::Proxy; #[proxy] - fn lp_farm_proxy_obj(&self, sc_address: ManagedAddress) -> farm_v_13::Proxy; + fn lp_farm_proxy_obj(&self, sc_address: ManagedAddress) -> farm_v13_locked_rewards::Proxy; #[proxy] fn pair_proxy_obj(&self, sc_address: ManagedAddress) -> pair::Proxy; diff --git a/legacy-contracts/farm-staking-proxy-v-13/src/lib.rs b/legacy-contracts/farm-staking-proxy-v13/src/lib.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/src/lib.rs rename to legacy-contracts/farm-staking-proxy-v13/src/lib.rs diff --git a/legacy-contracts/farm-staking-proxy-v-13/src/lp_farm_token.rs b/legacy-contracts/farm-staking-proxy-v13/src/lp_farm_token.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/src/lp_farm_token.rs rename to legacy-contracts/farm-staking-proxy-v13/src/lp_farm_token.rs diff --git a/legacy-contracts/farm-staking-proxy-v-13/src/result_types.rs b/legacy-contracts/farm-staking-proxy-v13/src/result_types.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/src/result_types.rs rename to legacy-contracts/farm-staking-proxy-v13/src/result_types.rs diff --git a/legacy-contracts/farm-staking-proxy-v-13/tests/constants/mod.rs b/legacy-contracts/farm-staking-proxy-v13/tests/constants/mod.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/tests/constants/mod.rs rename to legacy-contracts/farm-staking-proxy-v13/tests/constants/mod.rs diff --git a/legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp.rs b/legacy-contracts/farm-staking-proxy-v13/tests/staking_farm_with_lp.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp.rs rename to legacy-contracts/farm-staking-proxy-v13/tests/staking_farm_with_lp.rs 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-v13/tests/staking_farm_with_lp_external_contracts/mod.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_external_contracts/mod.rs rename to legacy-contracts/farm-staking-proxy-v13/tests/staking_farm_with_lp_external_contracts/mod.rs 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-v13/tests/staking_farm_with_lp_staking_contract_interactions/mod.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_staking_contract_interactions/mod.rs rename to legacy-contracts/farm-staking-proxy-v13/tests/staking_farm_with_lp_staking_contract_interactions/mod.rs 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-v13/tests/staking_farm_with_lp_staking_contract_setup/mod.rs similarity index 100% rename from legacy-contracts/farm-staking-proxy-v-13/tests/staking_farm_with_lp_staking_contract_setup/mod.rs rename to legacy-contracts/farm-staking-proxy-v13/tests/staking_farm_with_lp_staking_contract_setup/mod.rs diff --git a/legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.lock b/legacy-contracts/farm-staking-proxy-v13/wasm/Cargo.lock similarity index 98% rename from legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.lock rename to legacy-contracts/farm-staking-proxy-v13/wasm/Cargo.lock index 1c37aeb5b..0b23c164b 100644 --- a/legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.lock +++ b/legacy-contracts/farm-staking-proxy-v13/wasm/Cargo.lock @@ -193,12 +193,12 @@ dependencies = [ ] [[package]] -name = "farm-staking-proxy-v-13" +name = "farm-staking-proxy-v13" version = "0.0.0" dependencies = [ "common_structs", "farm-staking", - "farm-v-13", + "farm-v13-locked-rewards", "multiversx-sc", "multiversx-sc-modules", "pair", @@ -206,15 +206,15 @@ dependencies = [ ] [[package]] -name = "farm-staking-proxy-v-13-wasm" +name = "farm-staking-proxy-v13-wasm" version = "0.0.0" dependencies = [ - "farm-staking-proxy-v-13", + "farm-staking-proxy-v13", "multiversx-sc-wasm-adapter", ] [[package]] -name = "farm-v-13" +name = "farm-v13-locked-rewards" version = "0.0.0" dependencies = [ "multiversx-sc", diff --git a/legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.toml b/legacy-contracts/farm-staking-proxy-v13/wasm/Cargo.toml similarity index 87% rename from legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.toml rename to legacy-contracts/farm-staking-proxy-v13/wasm/Cargo.toml index 37ccbf235..8f9b2ad96 100644 --- a/legacy-contracts/farm-staking-proxy-v-13/wasm/Cargo.toml +++ b/legacy-contracts/farm-staking-proxy-v13/wasm/Cargo.toml @@ -5,7 +5,7 @@ # ########################################## [package] -name = "farm-staking-proxy-v-13-wasm" +name = "farm-staking-proxy-v13-wasm" version = "0.0.0" edition = "2021" publish = false @@ -24,7 +24,7 @@ overflow-checks = false [profile.dev] panic = "abort" -[dependencies.farm-staking-proxy-v-13] +[dependencies.farm-staking-proxy-v13] path = ".." [dependencies.multiversx-sc-wasm-adapter] diff --git a/legacy-contracts/farm-staking-proxy-v-13/wasm/src/lib.rs b/legacy-contracts/farm-staking-proxy-v13/wasm/src/lib.rs similarity index 97% rename from legacy-contracts/farm-staking-proxy-v-13/wasm/src/lib.rs rename to legacy-contracts/farm-staking-proxy-v13/wasm/src/lib.rs index f926207ed..28c215d78 100644 --- a/legacy-contracts/farm-staking-proxy-v-13/wasm/src/lib.rs +++ b/legacy-contracts/farm-staking-proxy-v13/wasm/src/lib.rs @@ -16,7 +16,7 @@ multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { - farm_staking_proxy_v_13 + farm_staking_proxy_v13 ( init => init upgrade => upgrade diff --git a/legacy-contracts/farm-v-13/meta/src/main.rs b/legacy-contracts/farm-v-13/meta/src/main.rs deleted file mode 100644 index 11be3279d..000000000 --- a/legacy-contracts/farm-v-13/meta/src/main.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - multiversx_sc_meta::cli_main::(); -} diff --git a/legacy-contracts/farm-v-13/src/lib.rs b/legacy-contracts/farm-v-13/src/lib.rs deleted file mode 100644 index 4f1660e1d..000000000 --- a/legacy-contracts/farm-v-13/src/lib.rs +++ /dev/null @@ -1,62 +0,0 @@ -#![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) {} - - #[view(getFarmingTokenId)] - #[storage_mapper("farming_token_id")] - fn farming_token_id(&self) -> SingleValueMapper; -} diff --git a/legacy-contracts/farm-v-13/wasm/src/lib.rs b/legacy-contracts/farm-v-13/wasm/src/lib.rs deleted file mode 100644 index ad5759863..000000000 --- a/legacy-contracts/farm-v-13/wasm/src/lib.rs +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by the multiversx-sc build system. DO NOT EDIT. - -//////////////////////////////////////////////////// -////////////////// AUTO-GENERATED ////////////////// -//////////////////////////////////////////////////// - -// Init: 1 -// Upgrade: 1 -// Endpoints: 4 -// Async Callback (empty): 1 -// Total number of exported functions: 7 - -#![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 - getFarmingTokenId => farming_token_id - ) -} - -multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/legacy-contracts/farm-v-13/Cargo.lock b/legacy-contracts/farm-v12/Cargo.lock similarity index 100% rename from legacy-contracts/farm-v-13/Cargo.lock rename to legacy-contracts/farm-v12/Cargo.lock diff --git a/legacy-contracts/farm-v-13/Cargo.toml b/legacy-contracts/farm-v12/Cargo.toml similarity index 93% rename from legacy-contracts/farm-v-13/Cargo.toml rename to legacy-contracts/farm-v12/Cargo.toml index c5e7940db..3aa922b85 100644 --- a/legacy-contracts/farm-v-13/Cargo.toml +++ b/legacy-contracts/farm-v12/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "farm-v-13" +name = "farm-v12" version = "0.0.0" authors = ["you"] edition = "2021" diff --git a/legacy-contracts/farm-v-13/meta/Cargo.toml b/legacy-contracts/farm-v12/meta/Cargo.toml similarity index 75% rename from legacy-contracts/farm-v-13/meta/Cargo.toml rename to legacy-contracts/farm-v12/meta/Cargo.toml index 7caffff1e..3a195e0ed 100644 --- a/legacy-contracts/farm-v-13/meta/Cargo.toml +++ b/legacy-contracts/farm-v12/meta/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "farm-v-13-meta" +name = "farm-v12-meta" version = "0.0.0" edition = "2021" publish = false -[dependencies.farm-v-13] +[dependencies.farm-v12] path = ".." [dependencies.multiversx-sc-meta] diff --git a/legacy-contracts/farm-v12/meta/src/main.rs b/legacy-contracts/farm-v12/meta/src/main.rs new file mode 100644 index 000000000..bfef42f9b --- /dev/null +++ b/legacy-contracts/farm-v12/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-v12/multiversx.json similarity index 100% rename from legacy-contracts/farm-v-13/multiversx.json rename to legacy-contracts/farm-v12/multiversx.json diff --git a/legacy-contracts/farm-v12/src/lib.rs b/legacy-contracts/farm-v12/src/lib.rs new file mode 100644 index 000000000..2623c773f --- /dev/null +++ b/legacy-contracts/farm-v12/src/lib.rs @@ -0,0 +1,211 @@ +#![no_std] + +use multiversx_sc::derive_imports::*; +use multiversx_sc::imports::*; + +type Nonce = u64; +type ExitFarmResultType = + MultiValue2, EsdtTokenPayment>; + +#[derive(TopEncode, TopDecode, PartialEq, TypeAbi)] +pub enum State { + Inactive, + Active, + Migrate, +} + +#[multiversx_sc::contract] +pub trait FarmV12 { + #[init] + fn init(&self) {} + + #[payable("*")] + #[endpoint(acceptFee)] + fn accept_fee(&self, _token_in: TokenIdentifier, _amount: BigUint) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(calculateRewardsForGivenPosition)] + fn calculate_rewards_for_given_position( + &self, + _amount: BigUint, + _attributes_raw: ManagedBuffer, + ) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(end_produce_rewards_as_owner)] + fn end_produce_rewards_as_owner(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[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(getBurnedTokenAmount)] + fn burned_tokens(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getCurrentBlockFee)] + fn current_block_fee_storage(&self) -> Option<(Nonce, BigUint)> { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getDivisionSafetyConstant)] + fn division_safety_constant(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getFarmTokenId)] + fn farm_token_id(&self) -> TokenIdentifier { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getFarmTokenSupply)] + fn get_farm_token_supply(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getFarmingTokenId)] + fn farming_token_id(&self) -> TokenIdentifier { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getFarmingTokenReserve)] + fn farming_token_reserve(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getLastErrorMessage)] + fn last_error_message(&self) -> ManagedBuffer { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getLastRewardBlockNonce)] + fn last_reward_block_nonce(&self) -> Nonce { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getLockedAssetFactoryManagedAddress)] + fn locked_asset_factory_address(&self) -> ManagedAddress { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getLockedRewardAprMuliplier)] + fn locked_rewards_apr_multiplier(&self) -> u8 { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getMinimumFarmingEpoch)] + fn minimum_farming_epoch(&self) -> u8 { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getOwner)] + fn owner(&self) -> ManagedAddress { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getPairContractManagedAddress)] + fn pair_contract_address(&self) -> ManagedAddress { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getPenaltyPercent)] + fn penalty_percent(&self) -> u64 { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getPerBlockRewardAmount)] + fn per_block_reward_amount(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getRewardPerShare)] + fn reward_per_share(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getRewardReserve)] + fn reward_reserve(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getRewardTokenId)] + fn reward_token_id(&self) -> TokenIdentifier { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getRouterManagedAddress)] + fn router_address(&self) -> ManagedAddress { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getState)] + fn state(&self) -> State { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getTransferExecGasLimit)] + fn transfer_exec_gas_limit(&self) -> u64 { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getUndistributedFees)] + fn undistributed_fee_storage(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(pause)] + fn pause(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(resume)] + fn resume(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(setPerBlockRewardAmount)] + fn set_per_block_reward_amount(&self, _per_block_amount: BigUint) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(setTransferRoleFarmToken)] + fn set_transfer_role_farm_token(&self, _opt_address: OptionalValue) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(set_locked_rewards_apr_multiplier)] + fn set_locked_rewards_apr_multiplier(&self, _muliplier: u8) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(set_minimum_farming_epochs)] + fn set_minimum_farming_epochs(&self, _epochs: u8) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(set_penalty_percent)] + fn set_penalty_percent(&self, _percent: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(set_transfer_exec_gas_limit)] + fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(start_produce_rewards)] + fn start_produce_rewards(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } +} diff --git a/legacy-contracts/farm-v-13/wasm/Cargo.lock b/legacy-contracts/farm-v12/wasm/Cargo.lock similarity index 98% rename from legacy-contracts/farm-v-13/wasm/Cargo.lock rename to legacy-contracts/farm-v12/wasm/Cargo.lock index 3913dc656..aedadbc26 100644 --- a/legacy-contracts/farm-v-13/wasm/Cargo.lock +++ b/legacy-contracts/farm-v12/wasm/Cargo.lock @@ -27,17 +27,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] -name = "farm-v-13" +name = "farm-v12" version = "0.0.0" dependencies = [ "multiversx-sc", ] [[package]] -name = "farm-v-13-wasm" +name = "farm-v12-wasm" version = "0.0.0" dependencies = [ - "farm-v-13", + "farm-v12", "multiversx-sc-wasm-adapter", ] diff --git a/legacy-contracts/farm-v-13/wasm/Cargo.toml b/legacy-contracts/farm-v12/wasm/Cargo.toml similarity index 91% rename from legacy-contracts/farm-v-13/wasm/Cargo.toml rename to legacy-contracts/farm-v12/wasm/Cargo.toml index d1cba483c..00f6566ac 100644 --- a/legacy-contracts/farm-v-13/wasm/Cargo.toml +++ b/legacy-contracts/farm-v12/wasm/Cargo.toml @@ -5,7 +5,7 @@ # ########################################## [package] -name = "farm-v-13-wasm" +name = "farm-v12-wasm" version = "0.0.0" edition = "2021" publish = false @@ -24,7 +24,7 @@ overflow-checks = false [profile.dev] panic = "abort" -[dependencies.farm-v-13] +[dependencies.farm-v12] path = ".." [dependencies.multiversx-sc-wasm-adapter] diff --git a/legacy-contracts/farm-v12/wasm/src/lib.rs b/legacy-contracts/farm-v12/wasm/src/lib.rs new file mode 100644 index 000000000..90db50ccf --- /dev/null +++ b/legacy-contracts/farm-v12/wasm/src/lib.rs @@ -0,0 +1,60 @@ +// Code generated by the multiversx-sc build system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Endpoints: 36 +// Async Callback (empty): 1 +// Total number of exported functions: 38 + +#![no_std] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + farm_v12 + ( + init => init + acceptFee => accept_fee + calculateRewardsForGivenPosition => calculate_rewards_for_given_position + end_produce_rewards_as_owner => end_produce_rewards_as_owner + exitFarm => exit_farm + getBurnedTokenAmount => burned_tokens + getCurrentBlockFee => current_block_fee_storage + getDivisionSafetyConstant => division_safety_constant + getFarmTokenId => farm_token_id + getFarmTokenSupply => get_farm_token_supply + getFarmingTokenId => farming_token_id + getFarmingTokenReserve => farming_token_reserve + getLastErrorMessage => last_error_message + getLastRewardBlockNonce => last_reward_block_nonce + getLockedAssetFactoryManagedAddress => locked_asset_factory_address + getLockedRewardAprMuliplier => locked_rewards_apr_multiplier + getMinimumFarmingEpoch => minimum_farming_epoch + getOwner => owner + getPairContractManagedAddress => pair_contract_address + getPenaltyPercent => penalty_percent + getPerBlockRewardAmount => per_block_reward_amount + getRewardPerShare => reward_per_share + getRewardReserve => reward_reserve + getRewardTokenId => reward_token_id + getRouterManagedAddress => router_address + getState => state + getTransferExecGasLimit => transfer_exec_gas_limit + getUndistributedFees => undistributed_fee_storage + pause => pause + resume => resume + setPerBlockRewardAmount => set_per_block_reward_amount + setTransferRoleFarmToken => set_transfer_role_farm_token + set_locked_rewards_apr_multiplier => set_locked_rewards_apr_multiplier + set_minimum_farming_epochs => set_minimum_farming_epochs + set_penalty_percent => set_penalty_percent + set_transfer_exec_gas_limit => set_transfer_exec_gas_limit + start_produce_rewards => start_produce_rewards + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/legacy-contracts/farm-v13-custom-rewards/Cargo.lock b/legacy-contracts/farm-v13-custom-rewards/Cargo.lock new file mode 100644 index 000000000..07b1eab79 --- /dev/null +++ b/legacy-contracts/farm-v13-custom-rewards/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-v13-custom-rewards/Cargo.toml b/legacy-contracts/farm-v13-custom-rewards/Cargo.toml new file mode 100644 index 000000000..c0a35e39c --- /dev/null +++ b/legacy-contracts/farm-v13-custom-rewards/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "farm-v13-custom-rewards" +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-v13-custom-rewards/meta/Cargo.toml b/legacy-contracts/farm-v13-custom-rewards/meta/Cargo.toml new file mode 100644 index 000000000..a5038c44a --- /dev/null +++ b/legacy-contracts/farm-v13-custom-rewards/meta/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "farm-v13-custom-rewards-meta" +version = "0.0.0" +edition = "2021" +publish = false + +[dependencies.farm-v13-custom-rewards] +path = ".." + +[dependencies.multiversx-sc-meta] +version = "0.50.5" +default-features = false diff --git a/legacy-contracts/farm-v13-custom-rewards/meta/src/main.rs b/legacy-contracts/farm-v13-custom-rewards/meta/src/main.rs new file mode 100644 index 000000000..d5a799634 --- /dev/null +++ b/legacy-contracts/farm-v13-custom-rewards/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} diff --git a/legacy-contracts/farm-v13-custom-rewards/multiversx.json b/legacy-contracts/farm-v13-custom-rewards/multiversx.json new file mode 100644 index 000000000..736553962 --- /dev/null +++ b/legacy-contracts/farm-v13-custom-rewards/multiversx.json @@ -0,0 +1,3 @@ +{ + "language": "rust" +} \ No newline at end of file diff --git a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs new file mode 100644 index 000000000..81a4d4e5a --- /dev/null +++ b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs @@ -0,0 +1,254 @@ +#![no_std] + +use multiversx_sc::derive_imports::*; +use multiversx_sc::imports::*; + +type Nonce = u64; +type EnterFarmResultType = EsdtTokenPayment; +type ClaimRewardsResultType = + MultiValue2, EsdtTokenPayment>; +type ExitFarmResultType = + MultiValue2, EsdtTokenPayment>; + +#[derive(TopEncode, TopDecode, PartialEq, TypeAbi)] +pub enum State { + Inactive, + Active, +} + +#[derive(ManagedVecItem, TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi, Clone)] +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 FarmV13LockedRewards { + #[init] + fn init(&self) {} + + #[only_owner] + #[endpoint(addAddressToWhitelist)] + fn add_address_to_whitelist(&self, _address: ManagedAddress) { + 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"); + } + + #[payable("*")] + #[endpoint(claimRewards)] + fn claim_rewards( + &self, + _opt_accept_funds_func: OptionalValue, + ) -> ClaimRewardsResultType { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[payable("*")] + #[endpoint(depositRewards)] + fn deposit_rewards(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(end_produce_rewards)] + fn end_produce_rewards(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("*")] + #[endpoint(enterFarm)] + fn enter_farm( + &self, + _opt_accept_funds_func: OptionalValue, + ) -> EnterFarmResultType { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[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(getBlockForEndRewards)] + fn block_for_end_rewards(&self) -> u64 { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getBurnGasLimit)] + fn burn_gas_limit(&self) -> u64 { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getDivisionSafetyConstant)] + fn division_safety_constant(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getFarmTokenId)] + fn farm_token_id(&self) -> TokenIdentifier { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getFarmTokenSupply)] + fn farm_token_supply(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getFarmingTokenId)] + fn farming_token_id(&self) -> TokenIdentifier { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getLastErrorMessage)] + fn last_error_message(&self) -> ManagedBuffer { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getLastRewardBlockNonce)] + fn last_reward_block_nonce(&self) -> Nonce { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getMinimumFarmingEpoch)] + fn minimum_farming_epochs(&self) -> u8 { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getOwner)] + fn owner(&self) -> ManagedAddress { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getPenaltyPercent)] + fn penalty_percent(&self) -> u64 { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getPerBlockRewardAmount)] + fn per_block_reward_amount(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getRewardPerShare)] + fn reward_per_share(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getRewardReserve)] + fn reward_reserve(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getRewardTokenId)] + fn reward_token_id(&self) -> TokenIdentifier { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getState)] + fn state(&self) -> State { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getTransferExecGasLimit)] + fn transfer_exec_gas_limit(&self) -> u64 { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getWhitelist)] + fn whitelist(&self) -> UnorderedSetMapper { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("*")] + #[endpoint(mergeFarmTokens)] + fn merge_farm_tokens( + &self, + _opt_accept_funds_func: OptionalValue, + ) -> EsdtTokenPayment { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(pause)] + fn pause(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("EGLD")] + #[endpoint(registerFarmToken)] + fn register_farm_token( + &self, + _token_display_name: ManagedBuffer, + _token_ticker: ManagedBuffer, + _num_decimals: usize, + ) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(removeAddressFromWhitelist)] + fn remove_address_from_whitelist(&self, _address: ManagedAddress) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(resume)] + fn resume(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(setBlockForEndRewards)] + fn set_block_for_end_rewards(&self, _block_end: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(setLocalRolesFarmToken)] + fn set_local_roles_farm_token(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(setPerBlockRewardAmount)] + fn set_per_block_reward_amount(&self, _per_block_amount: BigUint) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(set_burn_gas_limit)] + fn set_burn_gas_limit(&self, _gas_limit: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(set_minimum_farming_epochs)] + fn set_minimum_farming_epochs(&self, _epochs: u8) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(set_penalty_percent)] + fn set_penalty_percent(&self, _percent: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(set_transfer_exec_gas_limit)] + fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(startProduceRewards)] + fn start_produce_rewards(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } +} diff --git a/legacy-contracts/farm-v13-custom-rewards/wasm/Cargo.lock b/legacy-contracts/farm-v13-custom-rewards/wasm/Cargo.lock new file mode 100644 index 000000000..fd532c2d9 --- /dev/null +++ b/legacy-contracts/farm-v13-custom-rewards/wasm/Cargo.lock @@ -0,0 +1,188 @@ +# 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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "farm-v13-custom-rewards" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "farm-v13-custom-rewards-wasm" +version = "0.0.0" +dependencies = [ + "farm-v13-custom-rewards", + "multiversx-sc-wasm-adapter", +] + +[[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 = "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-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 = "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 = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[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 = "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" diff --git a/legacy-contracts/farm-v13-custom-rewards/wasm/Cargo.toml b/legacy-contracts/farm-v13-custom-rewards/wasm/Cargo.toml new file mode 100644 index 000000000..2a05d93a7 --- /dev/null +++ b/legacy-contracts/farm-v13-custom-rewards/wasm/Cargo.toml @@ -0,0 +1,34 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + +[package] +name = "farm-v13-custom-rewards-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-v13-custom-rewards] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "0.50.5" + +[workspace] +members = ["."] diff --git a/legacy-contracts/farm-v13-custom-rewards/wasm/src/lib.rs b/legacy-contracts/farm-v13-custom-rewards/wasm/src/lib.rs new file mode 100644 index 000000000..1c377fcbd --- /dev/null +++ b/legacy-contracts/farm-v13-custom-rewards/wasm/src/lib.rs @@ -0,0 +1,62 @@ +// Code generated by the multiversx-sc build system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Endpoints: 38 +// Async Callback (empty): 1 +// Total number of exported functions: 40 + +#![no_std] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + farm_v13_custom_rewards + ( + init => init + addAddressToWhitelist => add_address_to_whitelist + calculateRewardsForGivenPosition => calculate_rewards_for_given_position + claimRewards => claim_rewards + depositRewards => deposit_rewards + end_produce_rewards => end_produce_rewards + enterFarm => enter_farm + exitFarm => exit_farm + getBlockForEndRewards => block_for_end_rewards + getBurnGasLimit => burn_gas_limit + getDivisionSafetyConstant => division_safety_constant + getFarmTokenId => farm_token_id + getFarmTokenSupply => farm_token_supply + getFarmingTokenId => farming_token_id + getLastErrorMessage => last_error_message + getLastRewardBlockNonce => last_reward_block_nonce + getMinimumFarmingEpoch => minimum_farming_epochs + getOwner => owner + getPenaltyPercent => penalty_percent + getPerBlockRewardAmount => per_block_reward_amount + getRewardPerShare => reward_per_share + getRewardReserve => reward_reserve + getRewardTokenId => reward_token_id + getState => state + getTransferExecGasLimit => transfer_exec_gas_limit + getWhitelist => whitelist + mergeFarmTokens => merge_farm_tokens + pause => pause + registerFarmToken => register_farm_token + removeAddressFromWhitelist => remove_address_from_whitelist + resume => resume + setBlockForEndRewards => set_block_for_end_rewards + setLocalRolesFarmToken => set_local_roles_farm_token + setPerBlockRewardAmount => set_per_block_reward_amount + set_burn_gas_limit => set_burn_gas_limit + set_minimum_farming_epochs => set_minimum_farming_epochs + set_penalty_percent => set_penalty_percent + set_transfer_exec_gas_limit => set_transfer_exec_gas_limit + startProduceRewards => start_produce_rewards + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/legacy-contracts/farm-v13-locked-rewards/Cargo.lock b/legacy-contracts/farm-v13-locked-rewards/Cargo.lock new file mode 100644 index 000000000..07b1eab79 --- /dev/null +++ b/legacy-contracts/farm-v13-locked-rewards/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-v13-locked-rewards/Cargo.toml b/legacy-contracts/farm-v13-locked-rewards/Cargo.toml new file mode 100644 index 000000000..315ac407f --- /dev/null +++ b/legacy-contracts/farm-v13-locked-rewards/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "farm-v13-locked-rewards" +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-v13-locked-rewards/meta/Cargo.toml b/legacy-contracts/farm-v13-locked-rewards/meta/Cargo.toml new file mode 100644 index 000000000..2fe5738aa --- /dev/null +++ b/legacy-contracts/farm-v13-locked-rewards/meta/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "farm-v13-locked-rewards-meta" +version = "0.0.0" +edition = "2021" +publish = false + +[dependencies.farm-v13-locked-rewards] +path = ".." + +[dependencies.multiversx-sc-meta] +version = "0.50.5" +default-features = false diff --git a/legacy-contracts/farm-v13-locked-rewards/meta/src/main.rs b/legacy-contracts/farm-v13-locked-rewards/meta/src/main.rs new file mode 100644 index 000000000..09e0655ed --- /dev/null +++ b/legacy-contracts/farm-v13-locked-rewards/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} diff --git a/legacy-contracts/farm-v13-locked-rewards/multiversx.json b/legacy-contracts/farm-v13-locked-rewards/multiversx.json new file mode 100644 index 000000000..736553962 --- /dev/null +++ b/legacy-contracts/farm-v13-locked-rewards/multiversx.json @@ -0,0 +1,3 @@ +{ + "language": "rust" +} \ No newline at end of file diff --git a/legacy-contracts/farm-v13-locked-rewards/src/lib.rs b/legacy-contracts/farm-v13-locked-rewards/src/lib.rs new file mode 100644 index 000000000..7dc899f89 --- /dev/null +++ b/legacy-contracts/farm-v13-locked-rewards/src/lib.rs @@ -0,0 +1,275 @@ +#![no_std] + +use multiversx_sc::derive_imports::*; +use multiversx_sc::imports::*; + +type Nonce = u64; +type ExitFarmResultType = + MultiValue2, EsdtTokenPayment>; + +#[derive(TopEncode, TopDecode, PartialEq, TypeAbi)] +pub enum State { + Inactive, + Active, +} + +#[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, +} + +#[derive(ManagedVecItem, TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi, Clone)] +pub struct FarmTokenAttributesV1_2 { + pub reward_per_share: BigUint, + pub original_entering_epoch: u64, + pub entering_epoch: u64, + pub apr_multiplier: u8, + pub with_locked_rewards: bool, + pub initial_farming_amount: BigUint, + pub compounded_reward: BigUint, + pub current_farm_amount: BigUint, +} + +#[derive(TypeAbi, TopEncode, TopDecode, NestedEncode, NestedDecode, PartialEq)] +pub enum FarmMigrationRole { + Old, + New, + NewWithLock, +} + +#[derive(TypeAbi, TopEncode, TopDecode)] +pub struct FarmMigrationConfig { + migration_role: FarmMigrationRole, + old_farm_address: ManagedAddress, + old_farm_token_id: TokenIdentifier, +} + +#[multiversx_sc::contract] +pub trait FarmV13LockedRewards { + #[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"); + } + + #[payable("*")] + #[endpoint(mergeFarmTokens)] + fn merge_farm_tokens( + &self, + _opt_accept_funds_func: OptionalValue, + ) -> EsdtTokenPayment { + 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) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(setPerBlockRewardAmount)] + fn set_per_block_rewards(&self, _per_block_amount: BigUint) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn set_penalty_percent(&self, _percent: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn set_minimum_farming_epochs(&self, _epochs: u8) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn set_burn_gas_limit(&self, _gas_limit: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(setRpsAndStartRewards)] + fn set_rps_and_start_rewards(&self, _rps: BigUint) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn pause(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn resume(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(startProduceRewards)] + fn start_produce_rewards_as_owner(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(setFarmTokenSupply)] + fn set_farm_token_supply(&self, _supply: BigUint) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(setFarmMigrationConfig)] + fn set_farm_migration_config( + &self, + _old_farm_address: ManagedAddress, + _old_farm_token_id: TokenIdentifier, + _new_farm_address: ManagedAddress, + _new_farm_with_lock_address: ManagedAddress, + ) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[payable("EGLD")] + #[endpoint(registerFarmToken)] + fn register_farm_token( + &self, + _token_display_name: ManagedBuffer, + _token_ticker: ManagedBuffer, + _num_decimals: usize, + ) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(setLocalRolesFarmToken)] + fn set_local_roles_farm_token(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("*")] + #[endpoint(migrateFromV1_2Farm)] + fn migrate_from_v1_2_farm( + &self, + _old_attrs: FarmTokenAttributesV1_2, + _orig_caller: ManagedAddress, + ) -> EsdtTokenPayment { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getFarmMigrationConfiguration)] + #[storage_mapper("farm_migration_config")] + fn farm_migration_config(&self) -> SingleValueMapper>; + + #[view(getFarmTokenSupply)] + #[storage_mapper("farm_token_supply")] + fn farm_token_supply(&self) -> SingleValueMapper; + + #[view(getLastErrorMessage)] + #[storage_mapper("last_error_message")] + fn last_error_message(&self) -> SingleValueMapper; + + #[view(getState)] + #[storage_mapper("state")] + fn state(&self) -> SingleValueMapper; + + #[view(getFarmingTokenId)] + #[storage_mapper("farming_token_id")] + fn farming_token_id(&self) -> SingleValueMapper; + + #[view(getRewardTokenId)] + #[storage_mapper("reward_token_id")] + fn reward_token_id(&self) -> SingleValueMapper; + + #[view(getPenaltyPercent)] + #[storage_mapper("penalty_percent")] + fn penalty_percent(&self) -> SingleValueMapper; + + #[view(getMinimumFarmingEpoch)] + #[storage_mapper("minimum_farming_epochs")] + fn minimum_farming_epochs(&self) -> SingleValueMapper; + + #[view(getPerBlockRewardAmount)] + #[storage_mapper("per_block_reward_amount")] + fn per_block_reward_amount(&self) -> SingleValueMapper; + + #[storage_mapper("produce_rewards_enabled")] + fn produce_rewards_enabled(&self) -> SingleValueMapper; + + #[view(getLastRewardBlockNonce)] + #[storage_mapper("last_reward_block_nonce")] + fn last_reward_block_nonce(&self) -> SingleValueMapper; + + #[view(getFarmTokenId)] + #[storage_mapper("farm_token_id")] + fn farm_token_id(&self) -> SingleValueMapper; + + #[view(getDivisionSafetyConstant)] + #[storage_mapper("division_safety_constant")] + fn division_safety_constant(&self) -> SingleValueMapper; + + #[view(getPairContractManagedAddress)] + #[storage_mapper("pair_contract_address")] + fn pair_contract_address(&self) -> SingleValueMapper; + + #[view(getBurnGasLimit)] + #[storage_mapper("burn_gas_limit")] + fn burn_gas_limit(&self) -> SingleValueMapper; + + #[view(getLockedAssetFactoryManagedAddress)] + #[storage_mapper("locked_asset_factory_address")] + fn locked_asset_factory_address(&self) -> SingleValueMapper; + + #[view(getRewardPerShare)] + #[storage_mapper("reward_per_share")] + fn reward_per_share(&self) -> SingleValueMapper; + + #[view(getRewardReserve)] + #[storage_mapper("reward_reserve")] + fn reward_reserve(&self) -> SingleValueMapper; + + #[view(getTransferExecGasLimit)] + #[storage_mapper("transfer_exec_gas_limit")] + fn transfer_exec_gas_limit(&self) -> SingleValueMapper; +} diff --git a/legacy-contracts/farm-v13-locked-rewards/wasm/Cargo.lock b/legacy-contracts/farm-v13-locked-rewards/wasm/Cargo.lock new file mode 100644 index 000000000..32f373d1c --- /dev/null +++ b/legacy-contracts/farm-v13-locked-rewards/wasm/Cargo.lock @@ -0,0 +1,188 @@ +# 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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "farm-v13-locked-rewards" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "farm-v13-locked-rewards-wasm" +version = "0.0.0" +dependencies = [ + "farm-v13-locked-rewards", + "multiversx-sc-wasm-adapter", +] + +[[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 = "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-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 = "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 = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[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 = "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" diff --git a/legacy-contracts/farm-v13-locked-rewards/wasm/Cargo.toml b/legacy-contracts/farm-v13-locked-rewards/wasm/Cargo.toml new file mode 100644 index 000000000..83789310d --- /dev/null +++ b/legacy-contracts/farm-v13-locked-rewards/wasm/Cargo.toml @@ -0,0 +1,34 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + +[package] +name = "farm-v13-locked-rewards-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-v13-locked-rewards] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "0.50.5" + +[workspace] +members = ["."] diff --git a/legacy-contracts/farm-v13-locked-rewards/wasm/src/lib.rs b/legacy-contracts/farm-v13-locked-rewards/wasm/src/lib.rs new file mode 100644 index 000000000..c51ed969b --- /dev/null +++ b/legacy-contracts/farm-v13-locked-rewards/wasm/src/lib.rs @@ -0,0 +1,62 @@ +// Code generated by the multiversx-sc build system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Upgrade: 1 +// Endpoints: 36 +// Async Callback (empty): 1 +// Total number of exported functions: 39 + +#![no_std] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + farm_v13_locked_rewards + ( + init => init + upgrade => upgrade + exitFarm => exit_farm + mergeFarmTokens => merge_farm_tokens + calculateRewardsForGivenPosition => calculate_rewards_for_given_position + end_produce_rewards => end_produce_rewards + setPerBlockRewardAmount => set_per_block_rewards + set_penalty_percent => set_penalty_percent + set_minimum_farming_epochs => set_minimum_farming_epochs + set_transfer_exec_gas_limit => set_transfer_exec_gas_limit + set_burn_gas_limit => set_burn_gas_limit + setRpsAndStartRewards => set_rps_and_start_rewards + pause => pause + resume => resume + startProduceRewards => start_produce_rewards_as_owner + setFarmTokenSupply => set_farm_token_supply + setFarmMigrationConfig => set_farm_migration_config + registerFarmToken => register_farm_token + setLocalRolesFarmToken => set_local_roles_farm_token + migrateFromV1_2Farm => migrate_from_v1_2_farm + getFarmMigrationConfiguration => farm_migration_config + getFarmTokenSupply => farm_token_supply + getLastErrorMessage => last_error_message + getState => state + getFarmingTokenId => farming_token_id + getRewardTokenId => reward_token_id + getPenaltyPercent => penalty_percent + getMinimumFarmingEpoch => minimum_farming_epochs + getPerBlockRewardAmount => per_block_reward_amount + getLastRewardBlockNonce => last_reward_block_nonce + getFarmTokenId => farm_token_id + getDivisionSafetyConstant => division_safety_constant + getPairContractManagedAddress => pair_contract_address + getBurnGasLimit => burn_gas_limit + getLockedAssetFactoryManagedAddress => locked_asset_factory_address + getRewardPerShare => reward_per_share + getRewardReserve => reward_reserve + getTransferExecGasLimit => transfer_exec_gas_limit + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/legacy-contracts/farm-v13/Cargo.lock b/legacy-contracts/farm-v13/Cargo.lock new file mode 100644 index 000000000..07b1eab79 --- /dev/null +++ b/legacy-contracts/farm-v13/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-v13/Cargo.toml b/legacy-contracts/farm-v13/Cargo.toml new file mode 100644 index 000000000..a72ce8f75 --- /dev/null +++ b/legacy-contracts/farm-v13/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "farm-v13" +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-v13/meta/Cargo.toml b/legacy-contracts/farm-v13/meta/Cargo.toml new file mode 100644 index 000000000..c1db07489 --- /dev/null +++ b/legacy-contracts/farm-v13/meta/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "farm-v13-meta" +version = "0.0.0" +edition = "2021" +publish = false + +[dependencies.farm-v13] +path = ".." + +[dependencies.multiversx-sc-meta] +version = "0.50.5" +default-features = false diff --git a/legacy-contracts/farm-v13/meta/src/main.rs b/legacy-contracts/farm-v13/meta/src/main.rs new file mode 100644 index 000000000..e5e10c77e --- /dev/null +++ b/legacy-contracts/farm-v13/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} diff --git a/legacy-contracts/farm-v13/multiversx.json b/legacy-contracts/farm-v13/multiversx.json new file mode 100644 index 000000000..736553962 --- /dev/null +++ b/legacy-contracts/farm-v13/multiversx.json @@ -0,0 +1,3 @@ +{ + "language": "rust" +} \ No newline at end of file diff --git a/legacy-contracts/farm-v13/src/lib.rs b/legacy-contracts/farm-v13/src/lib.rs new file mode 100644 index 000000000..204a3cfb1 --- /dev/null +++ b/legacy-contracts/farm-v13/src/lib.rs @@ -0,0 +1,306 @@ +#![no_std] + +use multiversx_sc::derive_imports::*; +use multiversx_sc::imports::*; + +type Nonce = u64; +type EnterFarmResultType = EsdtTokenPayment; +type CompoundRewardsResultType = EsdtTokenPayment; +type ClaimRewardsResultType = + MultiValue2, EsdtTokenPayment>; +type ExitFarmResultType = + MultiValue2, EsdtTokenPayment>; + +#[derive(TopEncode, TopDecode, PartialEq, TypeAbi)] +pub enum State { + Inactive, + Active, +} + +#[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, +} + +#[derive(ManagedVecItem, TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi, Clone)] +pub struct FarmTokenAttributesV1_2 { + pub reward_per_share: BigUint, + pub original_entering_epoch: u64, + pub entering_epoch: u64, + pub apr_multiplier: u8, + pub with_locked_rewards: bool, + pub initial_farming_amount: BigUint, + pub compounded_reward: BigUint, + pub current_farm_amount: BigUint, +} + +#[derive(TypeAbi, TopEncode, TopDecode, NestedEncode, NestedDecode, PartialEq)] +pub enum FarmMigrationRole { + Old, + New, + NewWithLock, +} + +#[derive(TypeAbi, TopEncode, TopDecode)] +pub struct FarmMigrationConfig { + migration_role: FarmMigrationRole, + old_farm_address: ManagedAddress, + old_farm_token_id: TokenIdentifier, +} + +#[multiversx_sc::contract] +pub trait FarmV13LockedRewards { + #[init] + fn init(&self) {} + + #[upgrade] + fn upgrade(&self) {} + + #[payable("*")] + #[endpoint(enterFarm)] + fn enter_farm( + &self, + _opt_accept_funds_func: OptionalValue, + ) -> EnterFarmResultType { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[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"); + } + + #[payable("*")] + #[endpoint(claimRewards)] + fn claim_rewards( + &self, + _opt_accept_funds_func: OptionalValue, + ) -> ClaimRewardsResultType { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("*")] + #[endpoint(compoundRewards)] + fn compound_rewards( + &self, + _opt_accept_funds_func: OptionalValue, + ) -> CompoundRewardsResultType { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("*")] + #[endpoint(mergeFarmTokens)] + fn merge_farm_tokens( + &self, + _opt_accept_funds_func: OptionalValue, + ) -> EsdtTokenPayment { + 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) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(setPerBlockRewardAmount)] + fn set_per_block_rewards(&self, _per_block_amount: BigUint) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn set_penalty_percent(&self, _percent: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn set_minimum_farming_epochs(&self, _epochs: u8) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn set_burn_gas_limit(&self, _gas_limit: u64) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn pause(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint] + fn resume(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(startProduceRewards)] + fn start_produce_rewards_as_owner(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(setFarmTokenSupply)] + fn set_farm_token_supply(&self, _supply: BigUint) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(setFarmMigrationConfig)] + fn set_farm_migration_config( + &self, + _old_farm_address: ManagedAddress, + _old_farm_token_id: TokenIdentifier, + _new_farm_address: ManagedAddress, + _new_farm_with_lock_address: ManagedAddress, + ) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[payable("EGLD")] + #[endpoint(registerFarmToken)] + fn register_farm_token( + &self, + _token_display_name: ManagedBuffer, + _token_ticker: ManagedBuffer, + _num_decimals: usize, + ) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(setLocalRolesFarmToken)] + fn set_local_roles_farm_token(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[endpoint(setRpsAndStartRewards)] + fn set_rps_and_start_rewards(&self, _rps: BigUint) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("*")] + #[endpoint(migrateFromV1_2Farm)] + fn migrate_from_v1_2_farm( + &self, + _old_attrs: FarmTokenAttributesV1_2, + _orig_caller: ManagedAddress, + ) -> EsdtTokenPayment { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getFarmMigrationConfiguration)] + #[storage_mapper("farm_migration_config")] + fn farm_migration_config(&self) -> SingleValueMapper>; + + #[view(getFarmTokenSupply)] + #[storage_mapper("farm_token_supply")] + fn farm_token_supply(&self) -> SingleValueMapper; + + #[view(getLastErrorMessage)] + #[storage_mapper("last_error_message")] + fn last_error_message(&self) -> SingleValueMapper; + + #[view(getState)] + #[storage_mapper("state")] + fn state(&self) -> SingleValueMapper; + + #[view(getFarmingTokenId)] + #[storage_mapper("farming_token_id")] + fn farming_token_id(&self) -> SingleValueMapper; + + #[view(getRewardTokenId)] + #[storage_mapper("reward_token_id")] + fn reward_token_id(&self) -> SingleValueMapper; + + #[view(getPenaltyPercent)] + #[storage_mapper("penalty_percent")] + fn penalty_percent(&self) -> SingleValueMapper; + + #[view(getMinimumFarmingEpoch)] + #[storage_mapper("minimum_farming_epochs")] + fn minimum_farming_epochs(&self) -> SingleValueMapper; + + #[view(getPerBlockRewardAmount)] + #[storage_mapper("per_block_reward_amount")] + fn per_block_reward_amount(&self) -> SingleValueMapper; + + #[storage_mapper("produce_rewards_enabled")] + fn produce_rewards_enabled(&self) -> SingleValueMapper; + + #[view(getLastRewardBlockNonce)] + #[storage_mapper("last_reward_block_nonce")] + fn last_reward_block_nonce(&self) -> SingleValueMapper; + + #[view(getFarmTokenId)] + #[storage_mapper("farm_token_id")] + fn farm_token_id(&self) -> SingleValueMapper; + + #[view(getDivisionSafetyConstant)] + #[storage_mapper("division_safety_constant")] + fn division_safety_constant(&self) -> SingleValueMapper; + + #[view(getPairContractManagedAddress)] + #[storage_mapper("pair_contract_address")] + fn pair_contract_address(&self) -> SingleValueMapper; + + #[view(getBurnGasLimit)] + #[storage_mapper("burn_gas_limit")] + fn burn_gas_limit(&self) -> SingleValueMapper; + + #[view(getLockedAssetFactoryManagedAddress)] + #[storage_mapper("locked_asset_factory_address")] + fn locked_asset_factory_address(&self) -> SingleValueMapper; + + #[view(getRewardPerShare)] + #[storage_mapper("reward_per_share")] + fn reward_per_share(&self) -> SingleValueMapper; + + #[view(getRewardReserve)] + #[storage_mapper("reward_reserve")] + fn reward_reserve(&self) -> SingleValueMapper; + + #[view(getTransferExecGasLimit)] + #[storage_mapper("transfer_exec_gas_limit")] + fn transfer_exec_gas_limit(&self) -> SingleValueMapper; +} diff --git a/legacy-contracts/farm-v13/wasm/Cargo.lock b/legacy-contracts/farm-v13/wasm/Cargo.lock new file mode 100644 index 000000000..a294288ec --- /dev/null +++ b/legacy-contracts/farm-v13/wasm/Cargo.lock @@ -0,0 +1,188 @@ +# 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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[package]] +name = "farm-v13" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "farm-v13-wasm" +version = "0.0.0" +dependencies = [ + "farm-v13", + "multiversx-sc-wasm-adapter", +] + +[[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 = "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-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 = "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 = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[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 = "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" diff --git a/legacy-contracts/farm-v13/wasm/Cargo.toml b/legacy-contracts/farm-v13/wasm/Cargo.toml new file mode 100644 index 000000000..a334d9dbc --- /dev/null +++ b/legacy-contracts/farm-v13/wasm/Cargo.toml @@ -0,0 +1,34 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + +[package] +name = "farm-v13-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-v13] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "0.50.5" + +[workspace] +members = ["."] diff --git a/legacy-contracts/farm-v13/wasm/src/lib.rs b/legacy-contracts/farm-v13/wasm/src/lib.rs new file mode 100644 index 000000000..d589b7dbf --- /dev/null +++ b/legacy-contracts/farm-v13/wasm/src/lib.rs @@ -0,0 +1,65 @@ +// Code generated by the multiversx-sc build system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Upgrade: 1 +// Endpoints: 39 +// Async Callback (empty): 1 +// Total number of exported functions: 42 + +#![no_std] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + farm_v13 + ( + init => init + upgrade => upgrade + enterFarm => enter_farm + exitFarm => exit_farm + claimRewards => claim_rewards + compoundRewards => compound_rewards + mergeFarmTokens => merge_farm_tokens + calculateRewardsForGivenPosition => calculate_rewards_for_given_position + end_produce_rewards => end_produce_rewards + setPerBlockRewardAmount => set_per_block_rewards + set_penalty_percent => set_penalty_percent + set_minimum_farming_epochs => set_minimum_farming_epochs + set_transfer_exec_gas_limit => set_transfer_exec_gas_limit + set_burn_gas_limit => set_burn_gas_limit + pause => pause + resume => resume + startProduceRewards => start_produce_rewards_as_owner + setFarmTokenSupply => set_farm_token_supply + setFarmMigrationConfig => set_farm_migration_config + registerFarmToken => register_farm_token + setLocalRolesFarmToken => set_local_roles_farm_token + setRpsAndStartRewards => set_rps_and_start_rewards + migrateFromV1_2Farm => migrate_from_v1_2_farm + getFarmMigrationConfiguration => farm_migration_config + getFarmTokenSupply => farm_token_supply + getLastErrorMessage => last_error_message + getState => state + getFarmingTokenId => farming_token_id + getRewardTokenId => reward_token_id + getPenaltyPercent => penalty_percent + getMinimumFarmingEpoch => minimum_farming_epochs + getPerBlockRewardAmount => per_block_reward_amount + getLastRewardBlockNonce => last_reward_block_nonce + getFarmTokenId => farm_token_id + getDivisionSafetyConstant => division_safety_constant + getPairContractManagedAddress => pair_contract_address + getBurnGasLimit => burn_gas_limit + getLockedAssetFactoryManagedAddress => locked_asset_factory_address + getRewardPerShare => reward_per_share + getRewardReserve => reward_reserve + getTransferExecGasLimit => transfer_exec_gas_limit + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/legacy-contracts/price-discovery-v1/Cargo.lock b/legacy-contracts/price-discovery-v1/Cargo.lock new file mode 100644 index 000000000..07b1eab79 --- /dev/null +++ b/legacy-contracts/price-discovery-v1/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/price-discovery-v1/Cargo.toml b/legacy-contracts/price-discovery-v1/Cargo.toml new file mode 100644 index 000000000..48a77d04f --- /dev/null +++ b/legacy-contracts/price-discovery-v1/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "price-discovery-v1" +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/price-discovery-v1/meta/Cargo.toml b/legacy-contracts/price-discovery-v1/meta/Cargo.toml new file mode 100644 index 000000000..1c78eb1f1 --- /dev/null +++ b/legacy-contracts/price-discovery-v1/meta/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "price-discovery-v1-meta" +version = "0.0.0" +edition = "2021" +publish = false + +[dependencies.price-discovery-v1] +path = ".." + +[dependencies.multiversx-sc-meta] +version = "0.50.5" +default-features = false diff --git a/legacy-contracts/price-discovery-v1/meta/src/main.rs b/legacy-contracts/price-discovery-v1/meta/src/main.rs new file mode 100644 index 000000000..e9b6d8d7e --- /dev/null +++ b/legacy-contracts/price-discovery-v1/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} diff --git a/legacy-contracts/price-discovery-v1/multiversx.json b/legacy-contracts/price-discovery-v1/multiversx.json new file mode 100644 index 000000000..736553962 --- /dev/null +++ b/legacy-contracts/price-discovery-v1/multiversx.json @@ -0,0 +1,3 @@ +{ + "language": "rust" +} \ No newline at end of file diff --git a/legacy-contracts/price-discovery-v1/src/lib.rs b/legacy-contracts/price-discovery-v1/src/lib.rs new file mode 100644 index 000000000..1f4852e54 --- /dev/null +++ b/legacy-contracts/price-discovery-v1/src/lib.rs @@ -0,0 +1,130 @@ +#![no_std] + +use multiversx_sc::derive_imports::*; +use multiversx_sc::imports::*; + +#[derive(TypeAbi, TopEncode, TopDecode, NestedEncode, PartialEq)] +pub enum Phase { + Idle, + NoPenalty, + LinearIncreasingPenalty { penalty_percentage: BigUint }, + OnlyWithdrawFixedPenalty { penalty_percentage: BigUint }, + Redeem, +} + +#[multiversx_sc::contract] +pub trait PriceDiscoveryV1 { + #[init] + fn init(&self) {} + + #[payable("*")] + #[endpoint] + fn deposit(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("*")] + #[endpoint] + fn withdraw(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("*")] + #[endpoint] + fn redeem(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getCurrentPrice)] + fn calculate_price(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getCurrentPhase)] + fn get_current_phase(&self) -> Phase { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[payable("EGLD")] + #[endpoint(issueRedeemToken)] + fn issue_redeem_token( + &self, + _token_name: ManagedBuffer, + _token_ticker: ManagedBuffer, + _nr_decimals: usize, + ) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(createInitialRedeemTokens)] + fn create_initial_redeem_tokens(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getLaunchedTokenId)] + #[storage_mapper("launchedTokenId")] + fn launched_token_id(&self) -> SingleValueMapper; + + #[view(getAcceptedTokenId)] + #[storage_mapper("acceptedTokenId")] + fn accepted_token_id(&self) -> SingleValueMapper; + + #[view(getLaunchedTokenBalance)] + #[storage_mapper("launchedTokenBalance")] + fn launched_token_balance(&self) -> SingleValueMapper; + + #[view(getAcceptedTokenBalance)] + #[storage_mapper("acceptedTokenBalance")] + fn accepted_token_balance(&self) -> SingleValueMapper; + + #[view(getStartBlock)] + #[storage_mapper("startBlock")] + fn start_block(&self) -> SingleValueMapper; + + #[view(getEndBlock)] + #[storage_mapper("endBlock")] + fn end_block(&self) -> SingleValueMapper; + + #[view(getRedeemTokenId)] + #[storage_mapper("redeemTokenId")] + fn redeem_token_id(&self) -> SingleValueMapper; + + #[view(getRedeemTokenTotalCirculatingSupply)] + #[storage_mapper("totalCirculatingSupply")] + fn redeem_token_total_circulating_supply(&self, token_nonce: u64) + -> SingleValueMapper; + + #[view(getMinLaunchedTokenPrice)] + #[storage_mapper("minLaunchedTokenPrice")] + fn min_launched_token_price(&self) -> SingleValueMapper; + + #[view(getPricePrecision)] + #[storage_mapper("pricePrecision")] + fn price_precision(&self) -> SingleValueMapper; + + #[view(getNoLimitPhaseDurationBlocks)] + #[storage_mapper("noLimitPhaseDurationBlocks")] + fn no_limit_phase_duration_blocks(&self) -> SingleValueMapper; + + #[view(getLinearPenaltyPhaseDurationBlocks)] + #[storage_mapper("linearPenaltyPhaseDurationBlocks")] + fn linear_penalty_phase_duration_blocks(&self) -> SingleValueMapper; + + #[view(getFixedPenaltyPhaseDurationBlocks)] + #[storage_mapper("fixedPenaltyPhaseDurationBlocks")] + fn fixed_penalty_phase_duration_blocks(&self) -> SingleValueMapper; + + #[view(getPenaltyMinPercentage)] + #[storage_mapper("penaltyMinPercentage")] + fn penalty_min_percentage(&self) -> SingleValueMapper; + + #[view(getPenaltyMaxPercentage)] + #[storage_mapper("penaltyMaxPercentage")] + fn penalty_max_percentage(&self) -> SingleValueMapper; + + #[view(getFixedPenaltyPercentage)] + #[storage_mapper("fixedPenaltyPercentage")] + fn fixed_penalty_percentage(&self) -> SingleValueMapper; +} diff --git a/legacy-contracts/price-discovery-v1/wasm/Cargo.lock b/legacy-contracts/price-discovery-v1/wasm/Cargo.lock new file mode 100644 index 000000000..82df55d0c --- /dev/null +++ b/legacy-contracts/price-discovery-v1/wasm/Cargo.lock @@ -0,0 +1,188 @@ +# 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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[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 = "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-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 = "price-discovery-v1" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "price-discovery-v1-wasm" +version = "0.0.0" +dependencies = [ + "multiversx-sc-wasm-adapter", + "price-discovery-v1", +] + +[[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 = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[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 = "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" diff --git a/legacy-contracts/price-discovery-v1/wasm/Cargo.toml b/legacy-contracts/price-discovery-v1/wasm/Cargo.toml new file mode 100644 index 000000000..458d208f7 --- /dev/null +++ b/legacy-contracts/price-discovery-v1/wasm/Cargo.toml @@ -0,0 +1,34 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + +[package] +name = "price-discovery-v1-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.price-discovery-v1] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "0.50.5" + +[workspace] +members = ["."] diff --git a/legacy-contracts/price-discovery-v1/wasm/src/lib.rs b/legacy-contracts/price-discovery-v1/wasm/src/lib.rs new file mode 100644 index 000000000..638f4282c --- /dev/null +++ b/legacy-contracts/price-discovery-v1/wasm/src/lib.rs @@ -0,0 +1,47 @@ +// Code generated by the multiversx-sc build system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Endpoints: 23 +// Async Callback (empty): 1 +// Total number of exported functions: 25 + +#![no_std] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + price_discovery_v1 + ( + init => init + deposit => deposit + withdraw => withdraw + redeem => redeem + getCurrentPrice => calculate_price + getCurrentPhase => get_current_phase + issueRedeemToken => issue_redeem_token + createInitialRedeemTokens => create_initial_redeem_tokens + getLaunchedTokenId => launched_token_id + getAcceptedTokenId => accepted_token_id + getLaunchedTokenBalance => launched_token_balance + getAcceptedTokenBalance => accepted_token_balance + getStartBlock => start_block + getEndBlock => end_block + getRedeemTokenId => redeem_token_id + getRedeemTokenTotalCirculatingSupply => redeem_token_total_circulating_supply + getMinLaunchedTokenPrice => min_launched_token_price + getPricePrecision => price_precision + getNoLimitPhaseDurationBlocks => no_limit_phase_duration_blocks + getLinearPenaltyPhaseDurationBlocks => linear_penalty_phase_duration_blocks + getFixedPenaltyPhaseDurationBlocks => fixed_penalty_phase_duration_blocks + getPenaltyMinPercentage => penalty_min_percentage + getPenaltyMaxPercentage => penalty_max_percentage + getFixedPenaltyPercentage => fixed_penalty_percentage + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/legacy-contracts/price-discovery-v2/Cargo.lock b/legacy-contracts/price-discovery-v2/Cargo.lock new file mode 100644 index 000000000..07b1eab79 --- /dev/null +++ b/legacy-contracts/price-discovery-v2/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/price-discovery-v2/Cargo.toml b/legacy-contracts/price-discovery-v2/Cargo.toml new file mode 100644 index 000000000..ab0dddc4b --- /dev/null +++ b/legacy-contracts/price-discovery-v2/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "price-discovery-v2" +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/price-discovery-v2/meta/Cargo.toml b/legacy-contracts/price-discovery-v2/meta/Cargo.toml new file mode 100644 index 000000000..bb8a32afb --- /dev/null +++ b/legacy-contracts/price-discovery-v2/meta/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "price-discovery-v2-meta" +version = "0.0.0" +edition = "2021" +publish = false + +[dependencies.price-discovery-v2] +path = ".." + +[dependencies.multiversx-sc-meta] +version = "0.50.5" +default-features = false diff --git a/legacy-contracts/price-discovery-v2/meta/src/main.rs b/legacy-contracts/price-discovery-v2/meta/src/main.rs new file mode 100644 index 000000000..49e9a3810 --- /dev/null +++ b/legacy-contracts/price-discovery-v2/meta/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + multiversx_sc_meta::cli_main::(); +} diff --git a/legacy-contracts/price-discovery-v2/multiversx.json b/legacy-contracts/price-discovery-v2/multiversx.json new file mode 100644 index 000000000..736553962 --- /dev/null +++ b/legacy-contracts/price-discovery-v2/multiversx.json @@ -0,0 +1,3 @@ +{ + "language": "rust" +} \ No newline at end of file diff --git a/legacy-contracts/price-discovery-v2/src/lib.rs b/legacy-contracts/price-discovery-v2/src/lib.rs new file mode 100644 index 000000000..77563ae78 --- /dev/null +++ b/legacy-contracts/price-discovery-v2/src/lib.rs @@ -0,0 +1,130 @@ +#![no_std] + +use multiversx_sc::derive_imports::*; +use multiversx_sc::imports::*; + +#[derive(TypeAbi, TopEncode, TopDecode, NestedEncode, PartialEq)] +pub enum Phase { + Idle, + NoPenalty, + LinearIncreasingPenalty { penalty_percentage: BigUint }, + OnlyWithdrawFixedPenalty { penalty_percentage: BigUint }, + Redeem, +} + +#[multiversx_sc::contract] +pub trait PriceDiscoveryV2 { + #[init] + fn init(&self) {} + + #[payable("*")] + #[endpoint] + fn deposit(&self) -> EsdtTokenPayment { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("*")] + #[endpoint] + fn withdraw(&self) -> EgldOrEsdtTokenPayment { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[payable("*")] + #[endpoint] + fn redeem(&self) -> EgldOrEsdtTokenPayment { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getCurrentPrice)] + fn calculate_price(&self) -> BigUint { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getCurrentPhase)] + fn get_current_phase(&self) -> Phase { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[payable("EGLD")] + #[endpoint(issueRedeemToken)] + fn issue_redeem_token( + &self, + _token_name: ManagedBuffer, + _token_ticker: ManagedBuffer, + _nr_decimals: usize, + ) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[only_owner] + #[endpoint(createInitialRedeemTokens)] + fn create_initial_redeem_tokens(&self) { + sc_panic!("This is a legacy contract, should not be interacted with"); + } + + #[view(getLaunchedTokenId)] + #[storage_mapper("launchedTokenId")] + fn launched_token_id(&self) -> SingleValueMapper; + + #[view(getAcceptedTokenId)] + #[storage_mapper("acceptedTokenId")] + fn accepted_token_id(&self) -> SingleValueMapper; + + #[view(getLaunchedTokenBalance)] + #[storage_mapper("launchedTokenBalance")] + fn launched_token_balance(&self) -> SingleValueMapper; + + #[view(getAcceptedTokenBalance)] + #[storage_mapper("acceptedTokenBalance")] + fn accepted_token_balance(&self) -> SingleValueMapper; + + #[view(getStartBlock)] + #[storage_mapper("startBlock")] + fn start_block(&self) -> SingleValueMapper; + + #[view(getEndBlock)] + #[storage_mapper("endBlock")] + fn end_block(&self) -> SingleValueMapper; + + #[view(getMinLaunchedTokenPrice)] + #[storage_mapper("minLaunchedTokenPrice")] + fn min_launched_token_price(&self) -> SingleValueMapper; + + #[view(getPricePrecision)] + #[storage_mapper("pricePrecision")] + fn price_precision(&self) -> SingleValueMapper; + + #[view(getNoLimitPhaseDurationBlocks)] + #[storage_mapper("noLimitPhaseDurationBlocks")] + fn no_limit_phase_duration_blocks(&self) -> SingleValueMapper; + + #[view(getLinearPenaltyPhaseDurationBlocks)] + #[storage_mapper("linearPenaltyPhaseDurationBlocks")] + fn linear_penalty_phase_duration_blocks(&self) -> SingleValueMapper; + + #[view(getFixedPenaltyPhaseDurationBlocks)] + #[storage_mapper("fixedPenaltyPhaseDurationBlocks")] + fn fixed_penalty_phase_duration_blocks(&self) -> SingleValueMapper; + + #[view(getPenaltyMinPercentage)] + #[storage_mapper("penaltyMinPercentage")] + fn penalty_min_percentage(&self) -> SingleValueMapper; + + #[view(getPenaltyMaxPercentage)] + #[storage_mapper("penaltyMaxPercentage")] + fn penalty_max_percentage(&self) -> SingleValueMapper; + + #[view(getFixedPenaltyPercentage)] + #[storage_mapper("fixedPenaltyPercentage")] + fn fixed_penalty_percentage(&self) -> SingleValueMapper; + + #[view(getRedeemTokenId)] + #[storage_mapper("redeemTokenId")] + fn redeem_token(&self) -> NonFungibleTokenMapper; + + #[view(getRedeemTokenTotalCirculatingSupply)] + #[storage_mapper("totalCirculatingSupply")] + fn redeem_token_total_circulating_supply(&self, token_nonce: u64) + -> SingleValueMapper; +} diff --git a/legacy-contracts/price-discovery-v2/wasm/Cargo.lock b/legacy-contracts/price-discovery-v2/wasm/Cargo.lock new file mode 100644 index 000000000..635dbdb44 --- /dev/null +++ b/legacy-contracts/price-discovery-v2/wasm/Cargo.lock @@ -0,0 +1,188 @@ +# 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.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + +[[package]] +name = "endian-type" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" + +[[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 = "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-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 = "price-discovery-v2" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[package]] +name = "price-discovery-v2-wasm" +version = "0.0.0" +dependencies = [ + "multiversx-sc-wasm-adapter", + "price-discovery-v2", +] + +[[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 = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[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 = "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" diff --git a/legacy-contracts/price-discovery-v2/wasm/Cargo.toml b/legacy-contracts/price-discovery-v2/wasm/Cargo.toml new file mode 100644 index 000000000..0ca10975d --- /dev/null +++ b/legacy-contracts/price-discovery-v2/wasm/Cargo.toml @@ -0,0 +1,34 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + +[package] +name = "price-discovery-v2-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.price-discovery-v2] +path = ".." + +[dependencies.multiversx-sc-wasm-adapter] +version = "0.50.5" + +[workspace] +members = ["."] diff --git a/legacy-contracts/price-discovery-v2/wasm/src/lib.rs b/legacy-contracts/price-discovery-v2/wasm/src/lib.rs new file mode 100644 index 000000000..30ec83460 --- /dev/null +++ b/legacy-contracts/price-discovery-v2/wasm/src/lib.rs @@ -0,0 +1,47 @@ +// Code generated by the multiversx-sc build system. DO NOT EDIT. + +//////////////////////////////////////////////////// +////////////////// AUTO-GENERATED ////////////////// +//////////////////////////////////////////////////// + +// Init: 1 +// Endpoints: 23 +// Async Callback (empty): 1 +// Total number of exported functions: 25 + +#![no_std] + +multiversx_sc_wasm_adapter::allocator!(); +multiversx_sc_wasm_adapter::panic_handler!(); + +multiversx_sc_wasm_adapter::endpoints! { + price_discovery_v2 + ( + init => init + deposit => deposit + withdraw => withdraw + redeem => redeem + getCurrentPrice => calculate_price + getCurrentPhase => get_current_phase + issueRedeemToken => issue_redeem_token + createInitialRedeemTokens => create_initial_redeem_tokens + getLaunchedTokenId => launched_token_id + getAcceptedTokenId => accepted_token_id + getLaunchedTokenBalance => launched_token_balance + getAcceptedTokenBalance => accepted_token_balance + getStartBlock => start_block + getEndBlock => end_block + getMinLaunchedTokenPrice => min_launched_token_price + getPricePrecision => price_precision + getNoLimitPhaseDurationBlocks => no_limit_phase_duration_blocks + getLinearPenaltyPhaseDurationBlocks => linear_penalty_phase_duration_blocks + getFixedPenaltyPhaseDurationBlocks => fixed_penalty_phase_duration_blocks + getPenaltyMinPercentage => penalty_min_percentage + getPenaltyMaxPercentage => penalty_max_percentage + getFixedPenaltyPercentage => fixed_penalty_percentage + getRedeemTokenId => redeem_token + getRedeemTokenTotalCirculatingSupply => redeem_token_total_circulating_supply + ) +} + +multiversx_sc_wasm_adapter::async_callback_empty! {} From 28030df5ccb24ccbc22a38044954c6e626259665 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Wed, 31 Jul 2024 00:26:10 +0300 Subject: [PATCH 04/13] legacy contracts sc error text change --- legacy-contracts/farm-v12/src/lib.rs | 72 +++++++++--------- .../farm-v13-custom-rewards/src/lib.rs | 76 +++++++++---------- .../farm-v13-locked-rewards/src/lib.rs | 36 ++++----- legacy-contracts/farm-v13/src/lib.rs | 44 +++++------ .../price-discovery-v1/src/lib.rs | 14 ++-- .../price-discovery-v2/src/lib.rs | 14 ++-- 6 files changed, 128 insertions(+), 128 deletions(-) diff --git a/legacy-contracts/farm-v12/src/lib.rs b/legacy-contracts/farm-v12/src/lib.rs index 2623c773f..c126c2135 100644 --- a/legacy-contracts/farm-v12/src/lib.rs +++ b/legacy-contracts/farm-v12/src/lib.rs @@ -22,7 +22,7 @@ pub trait FarmV12 { #[payable("*")] #[endpoint(acceptFee)] fn accept_fee(&self, _token_in: TokenIdentifier, _amount: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(calculateRewardsForGivenPosition)] @@ -31,12 +31,12 @@ pub trait FarmV12 { _amount: BigUint, _attributes_raw: ManagedBuffer, ) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(end_produce_rewards_as_owner)] fn end_produce_rewards_as_owner(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -45,167 +45,167 @@ pub trait FarmV12 { &self, _opt_accept_funds_func: OptionalValue, ) -> ExitFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getBurnedTokenAmount)] fn burned_tokens(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getCurrentBlockFee)] fn current_block_fee_storage(&self) -> Option<(Nonce, BigUint)> { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getDivisionSafetyConstant)] fn division_safety_constant(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmTokenId)] fn farm_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmTokenSupply)] fn get_farm_token_supply(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmingTokenId)] fn farming_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmingTokenReserve)] fn farming_token_reserve(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLastErrorMessage)] fn last_error_message(&self) -> ManagedBuffer { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLastRewardBlockNonce)] fn last_reward_block_nonce(&self) -> Nonce { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLockedAssetFactoryManagedAddress)] fn locked_asset_factory_address(&self) -> ManagedAddress { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLockedRewardAprMuliplier)] fn locked_rewards_apr_multiplier(&self) -> u8 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getMinimumFarmingEpoch)] fn minimum_farming_epoch(&self) -> u8 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getOwner)] fn owner(&self) -> ManagedAddress { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getPairContractManagedAddress)] fn pair_contract_address(&self) -> ManagedAddress { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getPenaltyPercent)] fn penalty_percent(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getPerBlockRewardAmount)] fn per_block_reward_amount(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardPerShare)] fn reward_per_share(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardReserve)] fn reward_reserve(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardTokenId)] fn reward_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRouterManagedAddress)] fn router_address(&self) -> ManagedAddress { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getState)] fn state(&self) -> State { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getTransferExecGasLimit)] fn transfer_exec_gas_limit(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getUndistributedFees)] fn undistributed_fee_storage(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(pause)] fn pause(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(resume)] fn resume(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setPerBlockRewardAmount)] fn set_per_block_reward_amount(&self, _per_block_amount: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setTransferRoleFarmToken)] fn set_transfer_role_farm_token(&self, _opt_address: OptionalValue) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_locked_rewards_apr_multiplier)] fn set_locked_rewards_apr_multiplier(&self, _muliplier: u8) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_minimum_farming_epochs)] fn set_minimum_farming_epochs(&self, _epochs: u8) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_penalty_percent)] fn set_penalty_percent(&self, _percent: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_transfer_exec_gas_limit)] fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(start_produce_rewards)] fn start_produce_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } } diff --git a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs index 81a4d4e5a..4708be991 100644 --- a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs +++ b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs @@ -34,7 +34,7 @@ pub trait FarmV13LockedRewards { #[only_owner] #[endpoint(addAddressToWhitelist)] fn add_address_to_whitelist(&self, _address: ManagedAddress) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(calculateRewardsForGivenPosition)] @@ -43,7 +43,7 @@ pub trait FarmV13LockedRewards { _amount: BigUint, _attributes: FarmTokenAttributes, ) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -52,19 +52,19 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> ClaimRewardsResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[payable("*")] #[endpoint(depositRewards)] fn deposit_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(end_produce_rewards)] fn end_produce_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -73,7 +73,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> EnterFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -82,97 +82,97 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> ExitFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getBlockForEndRewards)] fn block_for_end_rewards(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getBurnGasLimit)] fn burn_gas_limit(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getDivisionSafetyConstant)] fn division_safety_constant(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmTokenId)] fn farm_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmTokenSupply)] fn farm_token_supply(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmingTokenId)] fn farming_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLastErrorMessage)] fn last_error_message(&self) -> ManagedBuffer { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLastRewardBlockNonce)] fn last_reward_block_nonce(&self) -> Nonce { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getMinimumFarmingEpoch)] fn minimum_farming_epochs(&self) -> u8 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getOwner)] fn owner(&self) -> ManagedAddress { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getPenaltyPercent)] fn penalty_percent(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getPerBlockRewardAmount)] fn per_block_reward_amount(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardPerShare)] fn reward_per_share(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardReserve)] fn reward_reserve(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getRewardTokenId)] fn reward_token_id(&self) -> TokenIdentifier { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getState)] fn state(&self) -> State { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getTransferExecGasLimit)] fn transfer_exec_gas_limit(&self) -> u64 { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getWhitelist)] fn whitelist(&self) -> UnorderedSetMapper { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -181,12 +181,12 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(pause)] fn pause(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("EGLD")] @@ -197,58 +197,58 @@ pub trait FarmV13LockedRewards { _token_ticker: ManagedBuffer, _num_decimals: usize, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(removeAddressFromWhitelist)] fn remove_address_from_whitelist(&self, _address: ManagedAddress) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(resume)] fn resume(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setBlockForEndRewards)] fn set_block_for_end_rewards(&self, _block_end: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setLocalRolesFarmToken)] fn set_local_roles_farm_token(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setPerBlockRewardAmount)] fn set_per_block_reward_amount(&self, _per_block_amount: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_burn_gas_limit)] fn set_burn_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_minimum_farming_epochs)] fn set_minimum_farming_epochs(&self, _epochs: u8) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_penalty_percent)] fn set_penalty_percent(&self, _percent: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_transfer_exec_gas_limit)] fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(startProduceRewards)] fn start_produce_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } } diff --git a/legacy-contracts/farm-v13-locked-rewards/src/lib.rs b/legacy-contracts/farm-v13-locked-rewards/src/lib.rs index 7dc899f89..af7864b21 100644 --- a/legacy-contracts/farm-v13-locked-rewards/src/lib.rs +++ b/legacy-contracts/farm-v13-locked-rewards/src/lib.rs @@ -73,7 +73,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> ExitFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -82,7 +82,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(calculateRewardsForGivenPosition)] @@ -91,71 +91,71 @@ pub trait FarmV13LockedRewards { _amount: BigUint, _attributes: FarmTokenAttributes, ) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn end_produce_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setPerBlockRewardAmount)] fn set_per_block_rewards(&self, _per_block_amount: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_penalty_percent(&self, _percent: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_minimum_farming_epochs(&self, _epochs: u8) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_burn_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setRpsAndStartRewards)] fn set_rps_and_start_rewards(&self, _rps: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn pause(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn resume(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(startProduceRewards)] fn start_produce_rewards_as_owner(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setFarmTokenSupply)] fn set_farm_token_supply(&self, _supply: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -167,7 +167,7 @@ pub trait FarmV13LockedRewards { _new_farm_address: ManagedAddress, _new_farm_with_lock_address: ManagedAddress, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -179,13 +179,13 @@ pub trait FarmV13LockedRewards { _token_ticker: ManagedBuffer, _num_decimals: usize, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setLocalRolesFarmToken)] fn set_local_roles_farm_token(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -195,7 +195,7 @@ pub trait FarmV13LockedRewards { _old_attrs: FarmTokenAttributesV1_2, _orig_caller: ManagedAddress, ) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmMigrationConfiguration)] diff --git a/legacy-contracts/farm-v13/src/lib.rs b/legacy-contracts/farm-v13/src/lib.rs index 204a3cfb1..047d6923a 100644 --- a/legacy-contracts/farm-v13/src/lib.rs +++ b/legacy-contracts/farm-v13/src/lib.rs @@ -77,7 +77,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> EnterFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -86,7 +86,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> ExitFarmResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -95,7 +95,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> ClaimRewardsResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -104,7 +104,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> CompoundRewardsResultType { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -113,7 +113,7 @@ pub trait FarmV13LockedRewards { &self, _opt_accept_funds_func: OptionalValue, ) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(calculateRewardsForGivenPosition)] @@ -122,66 +122,66 @@ pub trait FarmV13LockedRewards { _amount: BigUint, _attributes: FarmTokenAttributes, ) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn end_produce_rewards(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setPerBlockRewardAmount)] fn set_per_block_rewards(&self, _per_block_amount: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_penalty_percent(&self, _percent: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_minimum_farming_epochs(&self, _epochs: u8) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn set_burn_gas_limit(&self, _gas_limit: u64) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn pause(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint] fn resume(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(startProduceRewards)] fn start_produce_rewards_as_owner(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } - + #[only_owner] #[endpoint(setFarmTokenSupply)] fn set_farm_token_supply(&self, _supply: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -193,7 +193,7 @@ pub trait FarmV13LockedRewards { _new_farm_address: ManagedAddress, _new_farm_with_lock_address: ManagedAddress, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -205,18 +205,18 @@ pub trait FarmV13LockedRewards { _token_ticker: ManagedBuffer, _num_decimals: usize, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(setLocalRolesFarmToken)] fn set_local_roles_farm_token(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setRpsAndStartRewards)] fn set_rps_and_start_rewards(&self, _rps: BigUint) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] @@ -226,7 +226,7 @@ pub trait FarmV13LockedRewards { _old_attrs: FarmTokenAttributesV1_2, _orig_caller: ManagedAddress, ) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getFarmMigrationConfiguration)] diff --git a/legacy-contracts/price-discovery-v1/src/lib.rs b/legacy-contracts/price-discovery-v1/src/lib.rs index 1f4852e54..065cfecec 100644 --- a/legacy-contracts/price-discovery-v1/src/lib.rs +++ b/legacy-contracts/price-discovery-v1/src/lib.rs @@ -20,29 +20,29 @@ pub trait PriceDiscoveryV1 { #[payable("*")] #[endpoint] fn deposit(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] #[endpoint] fn withdraw(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] #[endpoint] fn redeem(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getCurrentPrice)] fn calculate_price(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getCurrentPhase)] fn get_current_phase(&self) -> Phase { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -54,13 +54,13 @@ pub trait PriceDiscoveryV1 { _token_ticker: ManagedBuffer, _nr_decimals: usize, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(createInitialRedeemTokens)] fn create_initial_redeem_tokens(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLaunchedTokenId)] diff --git a/legacy-contracts/price-discovery-v2/src/lib.rs b/legacy-contracts/price-discovery-v2/src/lib.rs index 77563ae78..cf63515a3 100644 --- a/legacy-contracts/price-discovery-v2/src/lib.rs +++ b/legacy-contracts/price-discovery-v2/src/lib.rs @@ -20,29 +20,29 @@ pub trait PriceDiscoveryV2 { #[payable("*")] #[endpoint] fn deposit(&self) -> EsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] #[endpoint] fn withdraw(&self) -> EgldOrEsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[payable("*")] #[endpoint] fn redeem(&self) -> EgldOrEsdtTokenPayment { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getCurrentPrice)] fn calculate_price(&self) -> BigUint { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getCurrentPhase)] fn get_current_phase(&self) -> Phase { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] @@ -54,13 +54,13 @@ pub trait PriceDiscoveryV2 { _token_ticker: ManagedBuffer, _nr_decimals: usize, ) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[endpoint(createInitialRedeemTokens)] fn create_initial_redeem_tokens(&self) { - sc_panic!("This is a legacy contract, should not be interacted with"); + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[view(getLaunchedTokenId)] From 6e1623fa576d509596c64da8f2256e5210dd8f5c Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Wed, 31 Jul 2024 10:24:30 +0300 Subject: [PATCH 05/13] factory-legacy SC audit updates --- Cargo.lock | 1 + legacy-contracts/factory-legacy/Cargo.toml | 5 +- .../factory-legacy/src/migration.rs | 20 +------ .../factory-legacy/wasm/Cargo.lock | 53 +++++++++++++++++++ 4 files changed, 60 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 43e7acf34..82bd11558 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -763,6 +763,7 @@ version = "0.0.0" dependencies = [ "common_errors", "common_structs", + "energy-factory", "multiversx-sc", "multiversx-sc-modules", "multiversx-sc-scenario", diff --git a/legacy-contracts/factory-legacy/Cargo.toml b/legacy-contracts/factory-legacy/Cargo.toml index bff8b6fa4..f1dee1bb8 100644 --- a/legacy-contracts/factory-legacy/Cargo.toml +++ b/legacy-contracts/factory-legacy/Cargo.toml @@ -24,4 +24,7 @@ path = "../../common/common_structs" path = "../../common/common_errors" [dependencies.token_merge_helper] -path = "../../common/modules/token_merge_helper" \ No newline at end of file +path = "../../common/modules/token_merge_helper" + +[dependencies.energy-factory] +path = "../../locked-asset/energy-factory" \ No newline at end of file diff --git a/legacy-contracts/factory-legacy/src/migration.rs b/legacy-contracts/factory-legacy/src/migration.rs index 393f82a59..653b93aa0 100644 --- a/legacy-contracts/factory-legacy/src/migration.rs +++ b/legacy-contracts/factory-legacy/src/migration.rs @@ -1,23 +1,7 @@ multiversx_sc::imports!(); use common_structs::UnlockEpochAmountPairs; - -mod energy_factory_proxy { - use common_structs::UnlockEpochAmountPairs; - - multiversx_sc::imports!(); - - #[multiversx_sc::proxy] - pub trait EnergyFactoryProxy { - #[endpoint(updateEnergyAfterOldTokenUnlock)] - fn update_energy_after_old_token_unlock( - &self, - original_caller: ManagedAddress, - initial_epoch_amount_pairs: UnlockEpochAmountPairs, - final_epoch_amount_pairs: UnlockEpochAmountPairs, - ); - } -} +use energy_factory::migration::ProxyTrait as _; #[multiversx_sc::module] pub trait LockedTokenMigrationModule: @@ -54,7 +38,7 @@ pub trait LockedTokenMigrationModule: fn new_factory_proxy_builder( &self, sc_address: ManagedAddress, - ) -> energy_factory_proxy::Proxy; + ) -> energy_factory::Proxy; #[storage_mapper("newFactoryAddress")] fn new_factory_address(&self) -> SingleValueMapper; diff --git a/legacy-contracts/factory-legacy/wasm/Cargo.lock b/legacy-contracts/factory-legacy/wasm/Cargo.lock index 50cc43b0b..84827ca96 100644 --- a/legacy-contracts/factory-legacy/wasm/Cargo.lock +++ b/legacy-contracts/factory-legacy/wasm/Cargo.lock @@ -44,12 +44,29 @@ 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 = "factory-legacy" version = "0.0.0" dependencies = [ "common_errors", "common_structs", + "energy-factory", "multiversx-sc", "multiversx-sc-modules", "token_merge_helper", @@ -82,6 +99,15 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +[[package]] +name = "legacy_token_decode_module" +version = "0.0.0" +dependencies = [ + "common_structs", + "multiversx-sc", + "utils", +] + [[package]] name = "math" version = "0.0.0" @@ -210,6 +236,23 @@ dependencies = [ "nibble_vec", ] +[[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.13.2" @@ -253,3 +296,13 @@ version = "0.0.0" dependencies = [ "multiversx-sc", ] + +[[package]] +name = "utils" +version = "0.0.0" +dependencies = [ + "common_structs", + "fixed-supply-token", + "mergeable", + "multiversx-sc", +] From 75b6fa7019b23ef45f97f097a7523a2f1ee5f95b Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Wed, 31 Jul 2024 11:10:58 +0300 Subject: [PATCH 06/13] proxy-dex-legacy audit updates --- Cargo.lock | 4 + .../common-modules/energy-query/src/lib.rs | 3 - .../farm-v13-locked-rewards/src/lib.rs | 2 +- legacy-contracts/proxy-dex-legacy/Cargo.toml | 12 ++ .../proxy-dex-legacy/src/energy.rs | 109 ----------- .../proxy-dex-legacy/src/energy_update.rs | 68 +------ legacy-contracts/proxy-dex-legacy/src/lib.rs | 4 +- .../src/migration_from_v1_2.rs | 116 ----------- .../proxy-dex-legacy/src/proxy_farm.rs | 19 +- .../proxy-dex-legacy/src/proxy_pair.rs | 27 +-- .../proxy-dex-legacy/wasm/Cargo.lock | 183 ++++++++++++++++++ .../proxy-dex-legacy/wasm/src/lib.rs | 9 +- 12 files changed, 218 insertions(+), 338 deletions(-) delete mode 100644 legacy-contracts/proxy-dex-legacy/src/energy.rs delete mode 100644 legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs diff --git a/Cargo.lock b/Cargo.lock index 82bd11558..3b7a33332 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2353,9 +2353,13 @@ name = "proxy-dex-legacy" version = "0.0.0" dependencies = [ "common_structs", + "energy-factory", + "energy-query", "factory-legacy", + "farm-v13-locked-rewards", "multiversx-sc", "multiversx-sc-scenario", + "pair", "token_merge_helper", ] diff --git a/energy-integration/common-modules/energy-query/src/lib.rs b/energy-integration/common-modules/energy-query/src/lib.rs index 4f4e2e7af..00ee89507 100644 --- a/energy-integration/common-modules/energy-query/src/lib.rs +++ b/energy-integration/common-modules/energy-query/src/lib.rs @@ -77,9 +77,6 @@ pub trait EnergyQueryModule { .read_from_address(&energy_factory_address, key) } - #[proxy] - fn energy_factory_proxy(&self, sc_address: ManagedAddress) -> energy_factory::Proxy; - #[view(getEnergyFactoryAddress)] #[storage_mapper("energyFactoryAddress")] fn energy_factory_address(&self) -> SingleValueMapper; diff --git a/legacy-contracts/farm-v13-locked-rewards/src/lib.rs b/legacy-contracts/farm-v13-locked-rewards/src/lib.rs index af7864b21..abd6f7bb8 100644 --- a/legacy-contracts/farm-v13-locked-rewards/src/lib.rs +++ b/legacy-contracts/farm-v13-locked-rewards/src/lib.rs @@ -4,7 +4,7 @@ use multiversx_sc::derive_imports::*; use multiversx_sc::imports::*; type Nonce = u64; -type ExitFarmResultType = +pub type ExitFarmResultType = MultiValue2, EsdtTokenPayment>; #[derive(TopEncode, TopDecode, PartialEq, TypeAbi)] diff --git a/legacy-contracts/proxy-dex-legacy/Cargo.toml b/legacy-contracts/proxy-dex-legacy/Cargo.toml index d91ce9636..0443092ed 100644 --- a/legacy-contracts/proxy-dex-legacy/Cargo.toml +++ b/legacy-contracts/proxy-dex-legacy/Cargo.toml @@ -22,3 +22,15 @@ path = "../../common/modules/token_merge_helper" [dependencies.factory-legacy] path = "../factory-legacy" + +[dependencies.energy-factory] +path = "../../locked-asset/energy-factory" + +[dependencies.energy-query] +path = "../../energy-integration/common-modules/energy-query" + +[dependencies.farm-v13-locked-rewards] +path = "../farm-v13-locked-rewards" + +[dependencies.pair] +path = "../../dex/pair" \ No newline at end of file diff --git a/legacy-contracts/proxy-dex-legacy/src/energy.rs b/legacy-contracts/proxy-dex-legacy/src/energy.rs deleted file mode 100644 index 651bbf544..000000000 --- a/legacy-contracts/proxy-dex-legacy/src/energy.rs +++ /dev/null @@ -1,109 +0,0 @@ -multiversx_sc::imports!(); -multiversx_sc::derive_imports!(); - -use common_structs::Epoch; - -#[derive(TypeAbi, TopEncode, TopDecode, NestedEncode, NestedDecode, Clone, PartialEq, Debug)] -pub struct Energy { - amount: BigInt, - last_update_epoch: Epoch, - total_locked_tokens: BigUint, -} - -impl Default for Energy { - fn default() -> Self { - Self { - amount: BigInt::zero(), - last_update_epoch: 0, - total_locked_tokens: BigUint::zero(), - } - } -} - -impl Energy { - #[inline] - pub fn new( - amount: BigInt, - last_update_epoch: Epoch, - total_locked_tokens: BigUint, - ) -> Self { - Energy { - amount, - last_update_epoch, - total_locked_tokens, - } - } - - pub fn new_zero_energy(current_epoch: Epoch) -> Self { - Self::new(BigInt::zero(), current_epoch, BigUint::zero()) - } - - fn add(&mut self, future_epoch: Epoch, current_epoch: Epoch, amount_per_epoch: &BigUint) { - if current_epoch >= future_epoch { - return; - } - - let epochs_diff = future_epoch - current_epoch; - let energy_added = amount_per_epoch * epochs_diff; - self.amount += BigInt::from(energy_added); - } - - fn subtract(&mut self, past_epoch: Epoch, current_epoch: Epoch, amount_per_epoch: &BigUint) { - if past_epoch >= current_epoch { - return; - } - - let epoch_diff = current_epoch - past_epoch; - let energy_decrease = amount_per_epoch * epoch_diff; - self.amount -= BigInt::from(energy_decrease); - } - - pub fn deplete(&mut self, current_epoch: Epoch) { - if self.last_update_epoch == current_epoch { - return; - } - - if self.total_locked_tokens > 0 { - self.subtract( - self.last_update_epoch, - current_epoch, - &self.total_locked_tokens.clone(), - ); - } - - self.last_update_epoch = current_epoch; - } - - pub fn refund_after_token_unlock( - &mut self, - unlock_amount: &BigUint, - unlock_epoch: Epoch, - current_epoch: Epoch, - ) { - self.add(current_epoch, unlock_epoch, unlock_amount); - self.total_locked_tokens -= unlock_amount; - } - - pub fn deplete_after_early_unlock( - &mut self, - unlock_amount: &BigUint, - unlock_epoch: Epoch, - current_epoch: Epoch, - ) { - self.subtract(current_epoch, unlock_epoch, unlock_amount); - self.total_locked_tokens -= unlock_amount; - } - - pub fn update_after_unlock_any( - &mut self, - unlock_amount: &BigUint, - unlock_epoch: Epoch, - current_epoch: Epoch, - ) { - if unlock_epoch < current_epoch { - self.refund_after_token_unlock(unlock_amount, unlock_epoch, current_epoch); - } else { - self.deplete_after_early_unlock(unlock_amount, unlock_epoch, current_epoch); - } - } -} diff --git a/legacy-contracts/proxy-dex-legacy/src/energy_update.rs b/legacy-contracts/proxy-dex-legacy/src/energy_update.rs index e1bb7725a..880cce46b 100644 --- a/legacy-contracts/proxy-dex-legacy/src/energy_update.rs +++ b/legacy-contracts/proxy-dex-legacy/src/energy_update.rs @@ -2,44 +2,18 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); use common_structs::LockedAssetTokenAttributesEx; +use energy_factory::{energy::Energy, locked_token_transfer::ProxyTrait as _}; use factory_legacy::attr_ex_helper; -use crate::{energy::Energy, proxy_common}; +use crate::proxy_common; static LEGACY_LOCKED_TOKEN_ID_STORAGE_KEY: &[u8] = b"legacyLockedTokenId"; -static USER_ENERGY_STORAGE_KEY: &[u8] = b"userEnergy"; static EXTENDED_ATTRIBUTES_ACTIVATION_NONCE_KEY: &[u8] = b"extended_attributes_activation_nonce"; -mod energy_factory_proxy { - multiversx_sc::imports!(); - use crate::energy_update::Energy; - - #[multiversx_sc::proxy] - pub trait LockedTokenTransferModule { - #[endpoint(setUserEnergyAfterLockedTokenTransfer)] - fn set_user_energy_after_locked_token_transfer( - &self, - user: ManagedAddress, - energy: Energy, - ); - } -} - #[multiversx_sc::module] pub trait EnergyUpdateModule: - proxy_common::ProxyCommonModule + attr_ex_helper::AttrExHelper + proxy_common::ProxyCommonModule + attr_ex_helper::AttrExHelper + energy_query::EnergyQueryModule { - #[only_owner] - #[endpoint(setEnergyFactoryAddress)] - fn set_energy_factory_address(&self, sc_address: ManagedAddress) { - require!( - self.blockchain().is_smart_contract(&sc_address), - "Invalid address" - ); - - self.energy_factory_address().set(&sc_address); - } - fn deduct_energy_from_user( &self, user: &ManagedAddress, @@ -82,33 +56,6 @@ pub trait EnergyUpdateModule: .execute_on_dest_context(); } - fn get_energy_entry(&self, user: &ManagedAddress) -> Energy { - let current_epoch = self.blockchain().get_block_epoch(); - if self.energy_factory_address().is_empty() { - return Energy::new_zero_energy(current_epoch); - } - - let energy_buffer: ManagedBuffer = self.read_storage_from_energy_factory(user); - if !energy_buffer.is_empty() { - let mut user_energy: Energy = Energy::top_decode(energy_buffer) - .unwrap_or_else(|_| sc_panic!("Failed decoding result from energy factory")); - user_energy.deplete(current_epoch); - - user_energy - } else { - Energy::new_zero_energy(current_epoch) - } - } - - fn read_storage_from_energy_factory(&self, user: &ManagedAddress) -> T { - let energy_factory_address = self.energy_factory_address().get(); - let mut key_buffer = ManagedBuffer::new_from_bytes(USER_ENERGY_STORAGE_KEY); - key_buffer.append(user.as_managed_buffer()); - - self.storage_raw() - .read_from_address(&energy_factory_address, key_buffer) - } - fn get_legacy_locked_token_id(&self, energy_factory_addr: &ManagedAddress) -> TokenIdentifier { self.storage_raw().read_from_address( energy_factory_addr, @@ -125,12 +72,5 @@ pub trait EnergyUpdateModule: } #[proxy] - fn energy_factory_proxy( - &self, - sc_address: ManagedAddress, - ) -> energy_factory_proxy::Proxy; - - #[view(getEnergyFactoryAddress)] - #[storage_mapper("energyFactoryAddress")] - fn energy_factory_address(&self) -> SingleValueMapper; + fn energy_factory_proxy(&self, sc_address: ManagedAddress) -> energy_factory::Proxy; } diff --git a/legacy-contracts/proxy-dex-legacy/src/lib.rs b/legacy-contracts/proxy-dex-legacy/src/lib.rs index e62a10190..d5034c31d 100644 --- a/legacy-contracts/proxy-dex-legacy/src/lib.rs +++ b/legacy-contracts/proxy-dex-legacy/src/lib.rs @@ -3,10 +3,8 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); -mod energy; mod energy_update; mod events; -pub mod migration_from_v1_2; pub mod proxy_common; pub mod proxy_farm; mod proxy_pair; @@ -22,9 +20,9 @@ pub trait ProxyDexImpl: + token_merge_helper::TokenMergeHelperModule + events::EventsModule + energy_update::EnergyUpdateModule - + migration_from_v1_2::MigrationModule + transfer_role::TransferRoleModule + attr_ex_helper::AttrExHelper + + energy_query::EnergyQueryModule { #[init] fn init(&self) {} diff --git a/legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs b/legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs deleted file mode 100644 index 871e42259..000000000 --- a/legacy-contracts/proxy-dex-legacy/src/migration_from_v1_2.rs +++ /dev/null @@ -1,116 +0,0 @@ -multiversx_sc::imports!(); -multiversx_sc::derive_imports!(); - -use common_structs::RawResultWrapper; -use common_structs::RawResultsType; -use factory_legacy::attr_ex_helper; - -use super::events; -use super::proxy_common; -use super::proxy_pair; -use crate::energy_update; -use crate::proxy_common::WrappedFarmTokenAttributes; -use crate::proxy_farm; - -mod farm_v1_2_contract_proxy { - multiversx_sc::imports!(); - - #[multiversx_sc::proxy] - pub trait Farm { - #[payable("*")] - #[endpoint(migrateToNewFarm)] - fn migrate_to_new_farm( - &self, - orig_caller: ManagedAddress, - ) -> MultiValue2, EsdtTokenPayment>; - } -} - -#[multiversx_sc::module] -pub trait MigrationModule: - proxy_farm::ProxyFarmModule - + proxy_common::ProxyCommonModule - + proxy_pair::ProxyPairModule - + token_merge_helper::TokenMergeHelperModule - + events::EventsModule - + energy_update::EnergyUpdateModule - + attr_ex_helper::AttrExHelper -{ - #[payable("*")] - #[endpoint(migrateV1_2Position)] - fn migrate_v1_2_position(&self, farm_address: ManagedAddress) { - self.require_is_intermediated_farm(&farm_address); - self.require_wrapped_farm_token_id_not_empty(); - self.require_wrapped_lp_token_id_not_empty(); - - let (payment_token_id, payment_token_nonce, payment_amount) = - self.call_value().single_esdt().into_tuple(); - let wrapped_farm_token = self.wrapped_farm_token_id().get(); - require!( - payment_token_id == wrapped_farm_token, - "Should only be used with wrapped farm tokens" - ); - require!(payment_amount != 0u64, "Payment amount cannot be zero"); - - // The actual work starts here - let wrapped_farm_token_attrs = - self.get_wrapped_farm_token_attributes(&payment_token_id, payment_token_nonce); - let farm_token_id = wrapped_farm_token_attrs.farm_token_id.clone(); - let farm_token_nonce = wrapped_farm_token_attrs.farm_token_nonce; - let farm_amount = payment_amount.clone(); - - // Get the new farm position from the new contract. - let raw_results: RawResultsType = self - .farm_v1_2_contract_proxy(farm_address) - .migrate_to_new_farm(self.blockchain().get_sc_address()) - .with_esdt_transfer((farm_token_id, farm_token_nonce, farm_amount)) - .execute_on_dest_context(); - - let mut results_wrapper = RawResultWrapper::new(raw_results); - results_wrapper.trim_results_front(2); - - let new_pos: EsdtTokenPayment = results_wrapper.decode_next_result(); - let reward: EsdtTokenPayment = results_wrapper.decode_next_result(); - - // Burn the old proxy farm position - self.send() - .esdt_local_burn(&payment_token_id, payment_token_nonce, &payment_amount); - - // Create a new proxy farm position based on the new farm position. - let new_attrs = WrappedFarmTokenAttributes { - farm_token_id: new_pos.token_identifier.clone(), - farm_token_nonce: new_pos.token_nonce, - farm_token_amount: new_pos.amount.clone(), - farming_token_id: wrapped_farm_token_attrs.farming_token_id, - farming_token_nonce: wrapped_farm_token_attrs.farming_token_nonce, - farming_token_amount: self.rule_of_three_non_zero_result( - &payment_amount, - &wrapped_farm_token_attrs.farm_token_amount, - &wrapped_farm_token_attrs.farming_token_amount, - ), - }; - let new_nonce = - self.send() - .esdt_nft_create_compact(&wrapped_farm_token, &new_pos.amount, &new_attrs); - - let mut payments = ManagedVec::new(); - payments.push(EsdtTokenPayment::new( - wrapped_farm_token, - new_nonce, - new_pos.amount, - )); - - if reward.amount != 0u64 { - payments.push(reward); - } - - let caller = self.blockchain().get_caller(); - self.send().direct_multi(&caller, &payments); - } - - #[proxy] - fn farm_v1_2_contract_proxy( - &self, - to: ManagedAddress, - ) -> farm_v1_2_contract_proxy::Proxy; -} diff --git a/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs b/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs index d875c5486..faa105228 100644 --- a/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs +++ b/legacy-contracts/proxy-dex-legacy/src/proxy_farm.rs @@ -14,19 +14,7 @@ use super::events; use super::proxy_common; use super::proxy_pair; -type ExitFarmResultType = - MultiValue2, EsdtTokenPayment>; - -mod farm_proxy { - multiversx_sc::imports!(); - - #[multiversx_sc::proxy] - pub trait FarmProxy { - #[payable("*")] - #[endpoint(exitFarm)] - fn exit_farm(&self) -> super::ExitFarmResultType; - } -} +use farm_v13_locked_rewards::ExitFarmResultType; #[derive(ManagedVecItem, Clone)] pub struct WrappedFarmToken { @@ -42,6 +30,7 @@ pub trait ProxyFarmModule: + events::EventsModule + energy_update::EnergyUpdateModule + attr_ex_helper::AttrExHelper + + energy_query::EnergyQueryModule { #[only_owner] #[endpoint(addFarmToIntermediate)] @@ -130,7 +119,7 @@ pub trait ProxyFarmModule: ) -> ExitFarmResultType { let raw_results: RawResultsType = self .farm_contract_proxy(farm_address.clone()) - .exit_farm() + .exit_farm(OptionalValue::::None) .with_esdt_transfer((farm_token_id.clone(), farm_token_nonce, amount.clone())) .execute_on_dest_context(); @@ -155,5 +144,5 @@ pub trait ProxyFarmModule: } #[proxy] - fn farm_contract_proxy(&self, to: ManagedAddress) -> farm_proxy::Proxy; + fn farm_contract_proxy(&self, to: ManagedAddress) -> farm_v13_locked_rewards::Proxy; } diff --git a/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs b/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs index c8ec2607c..279343cf4 100644 --- a/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs +++ b/legacy-contracts/proxy-dex-legacy/src/proxy_pair.rs @@ -7,6 +7,9 @@ multiversx_sc::derive_imports!(); use common_structs::{RawResultWrapper, RawResultsType}; use factory_legacy::attr_ex_helper; +use pair::config::ProxyTrait as _; +use pair::pair_actions::common_result_types::RemoveLiquidityResultType; +use pair::pair_actions::remove_liq::ProxyTrait as _; use crate::energy_update; use crate::proxy_common::WrappedLpTokenAttributes; @@ -14,27 +17,6 @@ use crate::proxy_common::WrappedLpTokenAttributes; use super::events; use super::proxy_common; -type RemoveLiquidityResultType = - MultiValue2, EsdtTokenPayment>; - -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, - ) -> super::RemoveLiquidityResultType; - - #[view(getLpTokenIdentifier)] - fn get_lp_token_identifier(&self) -> TokenIdentifier; - } -} - #[derive(ManagedVecItem, Clone)] pub struct WrappedLpToken { pub token_amount: EsdtTokenPayment, @@ -48,6 +30,7 @@ pub trait ProxyPairModule: + events::EventsModule + energy_update::EnergyUpdateModule + attr_ex_helper::AttrExHelper + + energy_query::EnergyQueryModule { #[only_owner] #[endpoint(addPairToIntermediate)] @@ -216,5 +199,5 @@ pub trait ProxyPairModule: } #[proxy] - fn pair_contract_proxy(&self, to: ManagedAddress) -> pair_proxy::Proxy; + fn pair_contract_proxy(&self, to: ManagedAddress) -> pair::Proxy; } diff --git a/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock b/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock index df92fe170..063bdc08a 100644 --- a/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock +++ b/legacy-contracts/proxy-dex-legacy/wasm/Cargo.lock @@ -20,6 +20,13 @@ 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" @@ -38,23 +45,79 @@ dependencies = [ "unwrappable", ] +[[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 = "factory-legacy" version = "0.0.0" dependencies = [ "common_errors", "common_structs", + "energy-factory", "multiversx-sc", "multiversx-sc-modules", "token_merge_helper", ] +[[package]] +name = "farm-v13-locked-rewards" +version = "0.0.0" +dependencies = [ + "multiversx-sc", +] + +[[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" @@ -74,6 +137,33 @@ 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" @@ -174,6 +264,39 @@ 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" @@ -188,8 +311,12 @@ name = "proxy-dex-legacy" version = "0.0.0" dependencies = [ "common_structs", + "energy-factory", + "energy-query", "factory-legacy", + "farm-v13-locked-rewards", "multiversx-sc", + "pair", "token_merge_helper", ] @@ -220,6 +347,23 @@ dependencies = [ "nibble_vec", ] +[[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.13.2" @@ -245,6 +389,15 @@ dependencies = [ "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" @@ -263,3 +416,33 @@ 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/proxy-dex-legacy/wasm/src/lib.rs b/legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs index 5d418f971..bc4c8d085 100644 --- a/legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs +++ b/legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs @@ -5,9 +5,9 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 20 +// Endpoints: 19 // Async Callback (empty): 1 -// Total number of exported functions: 22 +// Total number of exported functions: 21 #![no_std] @@ -30,14 +30,13 @@ multiversx_sc_wasm_adapter::endpoints! { addFarmToIntermediate => add_farm_to_intermediate removeIntermediatedFarm => remove_intermediated_farm exitFarmProxy => exit_farm_proxy - setEnergyFactoryAddress => set_energy_factory_address - getEnergyFactoryAddress => energy_factory_address - migrateV1_2Position => migrate_v1_2_position setTransferRoleLockedLpToken => set_transfer_role_locked_lp_token unsetTransferRoleLockedLpToken => unset_transfer_role_locked_lp_token setTransferRoleLockedFarmToken => set_transfer_role_locked_farm_token unsetTransferRoleLockedFarmToken => unset_transfer_role_locked_farm_token getExtendedAttributesActivationNonce => extended_attributes_activation_nonce + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address ) } From 57c06a5e3d5d30fa43d21bc013a4d9ddfc6c83bc Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Sat, 3 Aug 2024 12:43:49 +0300 Subject: [PATCH 07/13] restore energy factory proxy in query module --- energy-integration/common-modules/energy-query/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/energy-integration/common-modules/energy-query/src/lib.rs b/energy-integration/common-modules/energy-query/src/lib.rs index 00ee89507..4f4e2e7af 100644 --- a/energy-integration/common-modules/energy-query/src/lib.rs +++ b/energy-integration/common-modules/energy-query/src/lib.rs @@ -77,6 +77,9 @@ pub trait EnergyQueryModule { .read_from_address(&energy_factory_address, key) } + #[proxy] + fn energy_factory_proxy(&self, sc_address: ManagedAddress) -> energy_factory::Proxy; + #[view(getEnergyFactoryAddress)] #[storage_mapper("energyFactoryAddress")] fn energy_factory_address(&self) -> SingleValueMapper; From 984f596252e81687e6167c6ab39b1123f7a60914 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Sat, 3 Aug 2024 12:49:40 +0300 Subject: [PATCH 08/13] proxy dex legacy reference fix --- legacy-contracts/proxy-dex-legacy/src/energy_update.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/legacy-contracts/proxy-dex-legacy/src/energy_update.rs b/legacy-contracts/proxy-dex-legacy/src/energy_update.rs index 880cce46b..b4e30f9bf 100644 --- a/legacy-contracts/proxy-dex-legacy/src/energy_update.rs +++ b/legacy-contracts/proxy-dex-legacy/src/energy_update.rs @@ -70,7 +70,4 @@ pub trait EnergyUpdateModule: ManagedBuffer::new_from_bytes(EXTENDED_ATTRIBUTES_ACTIVATION_NONCE_KEY), ) } - - #[proxy] - fn energy_factory_proxy(&self, sc_address: ManagedAddress) -> energy_factory::Proxy; } From afdccc1ff45a97a89afef2e686c418779b5dc5e6 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Sat, 3 Aug 2024 12:53:44 +0300 Subject: [PATCH 09/13] github actions update --- .../workflows/on_pull_request_build_contracts.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .github/workflows/on_pull_request_build_contracts.yml diff --git a/.github/workflows/on_pull_request_build_contracts.yml b/.github/workflows/on_pull_request_build_contracts.yml deleted file mode 100644 index dd4b3713c..000000000 --- a/.github/workflows/on_pull_request_build_contracts.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: On pull request, build contracts - -on: - pull_request: - -permissions: - contents: write - -jobs: - build: - uses: multiversx/mx-sc-actions/.github/workflows/reproducible-build.yml@v3.2.0 - with: - image_tag: v7.0.0 - package_whole_project_src: true \ No newline at end of file From b05f46e08cc69165fb53a40fca6e5fb74e97d121 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Mon, 12 Aug 2024 23:59:01 +0300 Subject: [PATCH 10/13] audit updates --- legacy-contracts/factory-legacy/src/lib.rs | 3 +++ .../factory-legacy/wasm/src/lib.rs | 4 ++- legacy-contracts/farm-v12/src/lib.rs | 25 ++++++++++--------- .../farm-v13-custom-rewards/src/lib.rs | 25 +++++++++++-------- .../farm-v13-locked-rewards/src/lib.rs | 3 --- .../farm-v13-locked-rewards/wasm/src/lib.rs | 4 +-- legacy-contracts/farm-v13/src/lib.rs | 5 +--- legacy-contracts/farm-v13/wasm/src/lib.rs | 4 +-- .../price-discovery-v1/src/lib.rs | 20 +++++++++++++++ .../price-discovery-v1/wasm/src/lib.rs | 8 ++++-- .../price-discovery-v2/src/lib.rs | 20 +++++++++++++++ .../price-discovery-v2/wasm/src/lib.rs | 8 ++++-- legacy-contracts/proxy-dex-legacy/src/lib.rs | 3 +++ .../proxy-dex-legacy/wasm/src/lib.rs | 4 ++- 14 files changed, 94 insertions(+), 42 deletions(-) diff --git a/legacy-contracts/factory-legacy/src/lib.rs b/legacy-contracts/factory-legacy/src/lib.rs index 56449f8d1..1a5f01ad3 100644 --- a/legacy-contracts/factory-legacy/src/lib.rs +++ b/legacy-contracts/factory-legacy/src/lib.rs @@ -49,6 +49,9 @@ pub trait LockedAssetFactory: self.set_paused(true); } + #[upgrade] + fn upgrade(&self) {} + #[only_owner] #[endpoint] fn whitelist(&self, address: ManagedAddress) { diff --git a/legacy-contracts/factory-legacy/wasm/src/lib.rs b/legacy-contracts/factory-legacy/wasm/src/lib.rs index 1ddbeb62c..80a5bf559 100644 --- a/legacy-contracts/factory-legacy/wasm/src/lib.rs +++ b/legacy-contracts/factory-legacy/wasm/src/lib.rs @@ -5,9 +5,10 @@ //////////////////////////////////////////////////// // Init: 1 +// Upgrade: 1 // Endpoints: 21 // Async Callback (empty): 1 -// Total number of exported functions: 23 +// Total number of exported functions: 24 #![no_std] @@ -18,6 +19,7 @@ multiversx_sc_wasm_adapter::endpoints! { factory_legacy ( init => init + upgrade => upgrade whitelist => whitelist removeWhitelist => remove_whitelist createAndForwardCustomPeriod => create_and_forward_custom_period diff --git a/legacy-contracts/farm-v12/src/lib.rs b/legacy-contracts/farm-v12/src/lib.rs index c126c2135..806ae3bcf 100644 --- a/legacy-contracts/farm-v12/src/lib.rs +++ b/legacy-contracts/farm-v12/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(deprecated)] use multiversx_sc::derive_imports::*; use multiversx_sc::imports::*; @@ -21,7 +22,7 @@ pub trait FarmV12 { #[payable("*")] #[endpoint(acceptFee)] - fn accept_fee(&self, _token_in: TokenIdentifier, _amount: BigUint) { + fn accept_fee(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -30,12 +31,12 @@ pub trait FarmV12 { &self, _amount: BigUint, _attributes_raw: ManagedBuffer, - ) -> BigUint { + ) -> SCResult { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(end_produce_rewards_as_owner)] - fn end_produce_rewards_as_owner(&self) { + fn end_produce_rewards_as_owner(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -44,7 +45,7 @@ pub trait FarmV12 { fn exit_farm( &self, _opt_accept_funds_func: OptionalValue, - ) -> ExitFarmResultType { + ) -> SCResult> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -164,17 +165,17 @@ pub trait FarmV12 { } #[endpoint(pause)] - fn pause(&self) { + fn pause(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(resume)] - fn resume(&self) { + fn resume(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(setPerBlockRewardAmount)] - fn set_per_block_reward_amount(&self, _per_block_amount: BigUint) { + fn set_per_block_reward_amount(&self, _per_block_amount: BigUint) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -185,27 +186,27 @@ pub trait FarmV12 { } #[endpoint(set_locked_rewards_apr_multiplier)] - fn set_locked_rewards_apr_multiplier(&self, _muliplier: u8) { + fn set_locked_rewards_apr_multiplier(&self, _muliplier: u8) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_minimum_farming_epochs)] - fn set_minimum_farming_epochs(&self, _epochs: u8) { + fn set_minimum_farming_epochs(&self, _epochs: u8) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_penalty_percent)] - fn set_penalty_percent(&self, _percent: u64) { + fn set_penalty_percent(&self, _percent: u64) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_transfer_exec_gas_limit)] - fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { + fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(start_produce_rewards)] - fn start_produce_rewards(&self) { + fn start_produce_rewards(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } } diff --git a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs index 4708be991..40607fba0 100644 --- a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs +++ b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(deprecated)] use multiversx_sc::derive_imports::*; use multiversx_sc::imports::*; @@ -27,9 +28,11 @@ pub struct FarmTokenAttributes { } #[multiversx_sc::contract] -pub trait FarmV13LockedRewards { +pub trait FarmV13CustomRewards { #[init] - fn init(&self) {} + fn init(&self) -> SCResult<()> { + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); + } #[only_owner] #[endpoint(addAddressToWhitelist)] @@ -42,7 +45,7 @@ pub trait FarmV13LockedRewards { &self, _amount: BigUint, _attributes: FarmTokenAttributes, - ) -> BigUint { + ) -> SCResult { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -51,19 +54,19 @@ pub trait FarmV13LockedRewards { fn claim_rewards( &self, _opt_accept_funds_func: OptionalValue, - ) -> ClaimRewardsResultType { + ) -> SCResult> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[only_owner] #[payable("*")] #[endpoint(depositRewards)] - fn deposit_rewards(&self) { + fn deposit_rewards(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(end_produce_rewards)] - fn end_produce_rewards(&self) { + fn end_produce_rewards(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -72,7 +75,7 @@ pub trait FarmV13LockedRewards { fn enter_farm( &self, _opt_accept_funds_func: OptionalValue, - ) -> EnterFarmResultType { + ) -> SCResult> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -81,7 +84,7 @@ pub trait FarmV13LockedRewards { fn exit_farm( &self, _opt_accept_funds_func: OptionalValue, - ) -> ExitFarmResultType { + ) -> SCResult> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -180,7 +183,7 @@ pub trait FarmV13LockedRewards { fn merge_farm_tokens( &self, _opt_accept_funds_func: OptionalValue, - ) -> EsdtTokenPayment { + ) -> SCResult> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -213,7 +216,7 @@ pub trait FarmV13LockedRewards { #[only_owner] #[endpoint(setBlockForEndRewards)] - fn set_block_for_end_rewards(&self, _block_end: u64) { + fn set_block_for_end_rewards(&self, _block_end: u64) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -223,7 +226,7 @@ pub trait FarmV13LockedRewards { } #[endpoint(setPerBlockRewardAmount)] - fn set_per_block_reward_amount(&self, _per_block_amount: BigUint) { + fn set_per_block_reward_amount(&self, _per_block_amount: BigUint) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } diff --git a/legacy-contracts/farm-v13-locked-rewards/src/lib.rs b/legacy-contracts/farm-v13-locked-rewards/src/lib.rs index abd6f7bb8..1ab7cba04 100644 --- a/legacy-contracts/farm-v13-locked-rewards/src/lib.rs +++ b/legacy-contracts/farm-v13-locked-rewards/src/lib.rs @@ -64,9 +64,6 @@ pub trait FarmV13LockedRewards { #[init] fn init(&self) {} - #[upgrade] - fn upgrade(&self) {} - #[payable("*")] #[endpoint(exitFarm)] fn exit_farm( diff --git a/legacy-contracts/farm-v13-locked-rewards/wasm/src/lib.rs b/legacy-contracts/farm-v13-locked-rewards/wasm/src/lib.rs index c51ed969b..f45431ebf 100644 --- a/legacy-contracts/farm-v13-locked-rewards/wasm/src/lib.rs +++ b/legacy-contracts/farm-v13-locked-rewards/wasm/src/lib.rs @@ -5,10 +5,9 @@ //////////////////////////////////////////////////// // Init: 1 -// Upgrade: 1 // Endpoints: 36 // Async Callback (empty): 1 -// Total number of exported functions: 39 +// Total number of exported functions: 38 #![no_std] @@ -19,7 +18,6 @@ multiversx_sc_wasm_adapter::endpoints! { farm_v13_locked_rewards ( init => init - upgrade => upgrade exitFarm => exit_farm mergeFarmTokens => merge_farm_tokens calculateRewardsForGivenPosition => calculate_rewards_for_given_position diff --git a/legacy-contracts/farm-v13/src/lib.rs b/legacy-contracts/farm-v13/src/lib.rs index 047d6923a..9d877876f 100644 --- a/legacy-contracts/farm-v13/src/lib.rs +++ b/legacy-contracts/farm-v13/src/lib.rs @@ -64,13 +64,10 @@ pub struct FarmMigrationConfig { } #[multiversx_sc::contract] -pub trait FarmV13LockedRewards { +pub trait FarmV13 { #[init] fn init(&self) {} - #[upgrade] - fn upgrade(&self) {} - #[payable("*")] #[endpoint(enterFarm)] fn enter_farm( diff --git a/legacy-contracts/farm-v13/wasm/src/lib.rs b/legacy-contracts/farm-v13/wasm/src/lib.rs index d589b7dbf..2fef50415 100644 --- a/legacy-contracts/farm-v13/wasm/src/lib.rs +++ b/legacy-contracts/farm-v13/wasm/src/lib.rs @@ -5,10 +5,9 @@ //////////////////////////////////////////////////// // Init: 1 -// Upgrade: 1 // Endpoints: 39 // Async Callback (empty): 1 -// Total number of exported functions: 42 +// Total number of exported functions: 41 #![no_std] @@ -19,7 +18,6 @@ multiversx_sc_wasm_adapter::endpoints! { farm_v13 ( init => init - upgrade => upgrade enterFarm => enter_farm exitFarm => exit_farm claimRewards => claim_rewards diff --git a/legacy-contracts/price-discovery-v1/src/lib.rs b/legacy-contracts/price-discovery-v1/src/lib.rs index 065cfecec..4ac38f975 100644 --- a/legacy-contracts/price-discovery-v1/src/lib.rs +++ b/legacy-contracts/price-discovery-v1/src/lib.rs @@ -63,6 +63,18 @@ pub trait PriceDiscoveryV1 { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } + #[only_owner] + #[endpoint(setLockingScAddress)] + fn set_locking_sc_address(&self, _new_address: ManagedAddress) { + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); + } + + #[only_owner] + #[endpoint(setUnlockEpoch)] + fn set_unlock_epoch(&self, _new_epoch: u64) { + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); + } + #[view(getLaunchedTokenId)] #[storage_mapper("launchedTokenId")] fn launched_token_id(&self) -> SingleValueMapper; @@ -127,4 +139,12 @@ pub trait PriceDiscoveryV1 { #[view(getFixedPenaltyPercentage)] #[storage_mapper("fixedPenaltyPercentage")] fn fixed_penalty_percentage(&self) -> SingleValueMapper; + + #[view(getLockingScAddress)] + #[storage_mapper("lockingScAddress")] + fn locking_sc_address(&self) -> SingleValueMapper; + + #[view(getUnlockEpoch)] + #[storage_mapper("unlockEpoch")] + fn unlock_epoch(&self) -> SingleValueMapper; } diff --git a/legacy-contracts/price-discovery-v1/wasm/src/lib.rs b/legacy-contracts/price-discovery-v1/wasm/src/lib.rs index 638f4282c..b056de3a2 100644 --- a/legacy-contracts/price-discovery-v1/wasm/src/lib.rs +++ b/legacy-contracts/price-discovery-v1/wasm/src/lib.rs @@ -5,9 +5,9 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 23 +// Endpoints: 27 // Async Callback (empty): 1 -// Total number of exported functions: 25 +// Total number of exported functions: 29 #![no_std] @@ -25,6 +25,8 @@ multiversx_sc_wasm_adapter::endpoints! { getCurrentPhase => get_current_phase issueRedeemToken => issue_redeem_token createInitialRedeemTokens => create_initial_redeem_tokens + setLockingScAddress => set_locking_sc_address + setUnlockEpoch => set_unlock_epoch getLaunchedTokenId => launched_token_id getAcceptedTokenId => accepted_token_id getLaunchedTokenBalance => launched_token_balance @@ -41,6 +43,8 @@ multiversx_sc_wasm_adapter::endpoints! { getPenaltyMinPercentage => penalty_min_percentage getPenaltyMaxPercentage => penalty_max_percentage getFixedPenaltyPercentage => fixed_penalty_percentage + getLockingScAddress => locking_sc_address + getUnlockEpoch => unlock_epoch ) } diff --git a/legacy-contracts/price-discovery-v2/src/lib.rs b/legacy-contracts/price-discovery-v2/src/lib.rs index cf63515a3..34de9499b 100644 --- a/legacy-contracts/price-discovery-v2/src/lib.rs +++ b/legacy-contracts/price-discovery-v2/src/lib.rs @@ -63,6 +63,18 @@ pub trait PriceDiscoveryV2 { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } + #[only_owner] + #[endpoint(setLockingScAddress)] + fn set_locking_sc_address(&self, _new_address: ManagedAddress) { + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); + } + + #[only_owner] + #[endpoint(setUnlockEpoch)] + fn set_unlock_epoch(&self, _new_epoch: u64) { + sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); + } + #[view(getLaunchedTokenId)] #[storage_mapper("launchedTokenId")] fn launched_token_id(&self) -> SingleValueMapper; @@ -127,4 +139,12 @@ pub trait PriceDiscoveryV2 { #[storage_mapper("totalCirculatingSupply")] fn redeem_token_total_circulating_supply(&self, token_nonce: u64) -> SingleValueMapper; + + #[view(getLockingScAddress)] + #[storage_mapper("lockingScAddress")] + fn locking_sc_address(&self) -> SingleValueMapper; + + #[view(getUnlockEpoch)] + #[storage_mapper("unlockEpoch")] + fn unlock_epoch(&self) -> SingleValueMapper; } diff --git a/legacy-contracts/price-discovery-v2/wasm/src/lib.rs b/legacy-contracts/price-discovery-v2/wasm/src/lib.rs index 30ec83460..e4ac1662c 100644 --- a/legacy-contracts/price-discovery-v2/wasm/src/lib.rs +++ b/legacy-contracts/price-discovery-v2/wasm/src/lib.rs @@ -5,9 +5,9 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 23 +// Endpoints: 27 // Async Callback (empty): 1 -// Total number of exported functions: 25 +// Total number of exported functions: 29 #![no_std] @@ -25,6 +25,8 @@ multiversx_sc_wasm_adapter::endpoints! { getCurrentPhase => get_current_phase issueRedeemToken => issue_redeem_token createInitialRedeemTokens => create_initial_redeem_tokens + setLockingScAddress => set_locking_sc_address + setUnlockEpoch => set_unlock_epoch getLaunchedTokenId => launched_token_id getAcceptedTokenId => accepted_token_id getLaunchedTokenBalance => launched_token_balance @@ -41,6 +43,8 @@ multiversx_sc_wasm_adapter::endpoints! { getFixedPenaltyPercentage => fixed_penalty_percentage getRedeemTokenId => redeem_token getRedeemTokenTotalCirculatingSupply => redeem_token_total_circulating_supply + getLockingScAddress => locking_sc_address + getUnlockEpoch => unlock_epoch ) } diff --git a/legacy-contracts/proxy-dex-legacy/src/lib.rs b/legacy-contracts/proxy-dex-legacy/src/lib.rs index d5034c31d..a93923c71 100644 --- a/legacy-contracts/proxy-dex-legacy/src/lib.rs +++ b/legacy-contracts/proxy-dex-legacy/src/lib.rs @@ -26,4 +26,7 @@ pub trait ProxyDexImpl: { #[init] fn init(&self) {} + + #[upgrade] + fn upgrade(&self) {} } diff --git a/legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs b/legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs index bc4c8d085..4711ddb98 100644 --- a/legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs +++ b/legacy-contracts/proxy-dex-legacy/wasm/src/lib.rs @@ -5,9 +5,10 @@ //////////////////////////////////////////////////// // Init: 1 +// Upgrade: 1 // Endpoints: 19 // Async Callback (empty): 1 -// Total number of exported functions: 21 +// Total number of exported functions: 22 #![no_std] @@ -18,6 +19,7 @@ multiversx_sc_wasm_adapter::endpoints! { proxy_dex_legacy ( init => init + upgrade => upgrade getAssetTokenId => asset_token_id getLockedAssetTokenId => locked_asset_token_id getWrappedLpTokenId => wrapped_lp_token_id From 343a9edc5432aedac9b7cce714bd0a83f6ddd0de Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Tue, 13 Aug 2024 11:05:07 +0300 Subject: [PATCH 11/13] further audit fixes --- .../farm-v13-custom-rewards/src/lib.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs index 40607fba0..55292216f 100644 --- a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs +++ b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs @@ -188,7 +188,7 @@ pub trait FarmV13CustomRewards { } #[endpoint(pause)] - fn pause(&self) { + fn pause(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -199,7 +199,7 @@ pub trait FarmV13CustomRewards { _token_display_name: ManagedBuffer, _token_ticker: ManagedBuffer, _num_decimals: usize, - ) { + ) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -210,7 +210,7 @@ pub trait FarmV13CustomRewards { } #[endpoint(resume)] - fn resume(&self) { + fn resume(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -221,7 +221,7 @@ pub trait FarmV13CustomRewards { } #[endpoint(setLocalRolesFarmToken)] - fn set_local_roles_farm_token(&self) { + fn set_local_roles_farm_token(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -231,27 +231,27 @@ pub trait FarmV13CustomRewards { } #[endpoint(set_burn_gas_limit)] - fn set_burn_gas_limit(&self, _gas_limit: u64) { + fn set_burn_gas_limit(&self, _gas_limit: u64) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_minimum_farming_epochs)] - fn set_minimum_farming_epochs(&self, _epochs: u8) { + fn set_minimum_farming_epochs(&self, _epochs: u8) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_penalty_percent)] - fn set_penalty_percent(&self, _percent: u64) { + fn set_penalty_percent(&self, _percent: u64) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(set_transfer_exec_gas_limit)] - fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) { + fn set_transfer_exec_gas_limit(&self, _gas_limit: u64) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } #[endpoint(startProduceRewards)] - fn start_produce_rewards(&self) { + fn start_produce_rewards(&self) -> SCResult<()> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } } From d7463a0a0f77782e44865a1722ca9f95b05d58fc Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Tue, 13 Aug 2024 16:13:05 +0300 Subject: [PATCH 12/13] add INCORRECTReturnType in legacy contracts --- legacy-contracts/farm-v12/src/lib.rs | 6 +++++- legacy-contracts/farm-v13-custom-rewards/src/lib.rs | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/legacy-contracts/farm-v12/src/lib.rs b/legacy-contracts/farm-v12/src/lib.rs index 806ae3bcf..8c0d9a9d1 100644 --- a/legacy-contracts/farm-v12/src/lib.rs +++ b/legacy-contracts/farm-v12/src/lib.rs @@ -7,6 +7,7 @@ use multiversx_sc::imports::*; type Nonce = u64; type ExitFarmResultType = MultiValue2, EsdtTokenPayment>; +type INCORRECTReturnType = ManagedBuffer; #[derive(TopEncode, TopDecode, PartialEq, TypeAbi)] pub enum State { @@ -181,7 +182,10 @@ pub trait FarmV12 { #[only_owner] #[endpoint(setTransferRoleFarmToken)] - fn set_transfer_role_farm_token(&self, _opt_address: OptionalValue) { + fn set_transfer_role_farm_token( + &self, + _opt_address: OptionalValue, + ) -> INCORRECTReturnType { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } diff --git a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs index 55292216f..c1217bb56 100644 --- a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs +++ b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs @@ -10,6 +10,7 @@ type ClaimRewardsResultType = MultiValue2, EsdtTokenPayment>; type ExitFarmResultType = MultiValue2, EsdtTokenPayment>; +type INCORRECTReturnType = ManagedBuffer; #[derive(TopEncode, TopDecode, PartialEq, TypeAbi)] pub enum State { @@ -199,7 +200,7 @@ pub trait FarmV13CustomRewards { _token_display_name: ManagedBuffer, _token_ticker: ManagedBuffer, _num_decimals: usize, - ) -> SCResult<()> { + ) -> SCResult> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -221,7 +222,7 @@ pub trait FarmV13CustomRewards { } #[endpoint(setLocalRolesFarmToken)] - fn set_local_roles_farm_token(&self) -> SCResult<()> { + fn set_local_roles_farm_token(&self) -> SCResult> { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } From 57d14d98fa2a47fc46464c1a81f57908612409c6 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Wed, 14 Aug 2024 10:19:33 +0300 Subject: [PATCH 13/13] small fix --- legacy-contracts/farm-v13-custom-rewards/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs index c1217bb56..71cf8cf0d 100644 --- a/legacy-contracts/farm-v13-custom-rewards/src/lib.rs +++ b/legacy-contracts/farm-v13-custom-rewards/src/lib.rs @@ -200,7 +200,7 @@ pub trait FarmV13CustomRewards { _token_display_name: ManagedBuffer, _token_ticker: ManagedBuffer, _num_decimals: usize, - ) -> SCResult> { + ) -> INCORRECTReturnType { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); } @@ -222,7 +222,7 @@ pub trait FarmV13CustomRewards { } #[endpoint(setLocalRolesFarmToken)] - fn set_local_roles_farm_token(&self) -> SCResult> { + fn set_local_roles_farm_token(&self) -> INCORRECTReturnType { sc_panic!("This is a no-code version of a legacy contract. The logic of the endpoints has not been implemented."); }