From 374f81fb93d2d2e27247ad063e4a6ab5b65b6e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Thu, 7 Sep 2023 17:55:35 +0300 Subject: [PATCH 01/12] Governance-v2: Fix double withdraw fee --- .../governance-v2/src/errors.rs | 1 + energy-integration/governance-v2/src/lib.rs | 28 +++++++++++++------ .../governance-v2/src/proposal.rs | 1 + .../governance-v2/tests/gov_rust_test.rs | 5 ++++ 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/energy-integration/governance-v2/src/errors.rs b/energy-integration/governance-v2/src/errors.rs index cb399e14e..1656c165f 100644 --- a/energy-integration/governance-v2/src/errors.rs +++ b/energy-integration/governance-v2/src/errors.rs @@ -8,5 +8,6 @@ pub const ALREADY_VOTED_ERR_MSG: &[u8] = b"Already voted for this proposal"; pub const EXEEDED_MAX_ACTIONS: &[u8] = b"Exceeded max actions per proposal"; pub const ONLY_PROPOSER_CANCEL: &[u8] = b"Only original proposer may cancel a pending proposal"; pub const ONLY_PROPOSER_WITHDRAW: &[u8] = b"Only original proposer may withdraw a pending proposal"; +pub const FEE_ALREADY_WITHDRAWN: &[u8] = b"Fee already withdrawn!"; pub const NO_PROPOSAL: &[u8] = b"Proposal does not exist"; pub const WITHDRAW_NOT_ALLOWED: &[u8] = b"You may not withdraw funds from this proposal!"; diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index 17f0ba528..c2c0ed90a 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -136,6 +136,7 @@ pub trait GovernanceV2: withdraw_percentage_defeated, total_quorum: BigUint::zero(), proposal_start_block: current_block, + fee_withdrawn: false }; let proposal_id = self.proposals().push(&proposal); @@ -231,7 +232,7 @@ pub trait GovernanceV2: let caller = self.blockchain().get_caller(); require!(caller == proposal.proposer, ONLY_PROPOSER_CANCEL); - self.refund_proposal_fee(proposal_id, &proposal.fee_payment.amount); + self.refund_proposal_fee(&proposal, &proposal.fee_payment.amount); self.clear_proposal(proposal_id); self.proposal_canceled_event(proposal_id); } @@ -253,19 +254,31 @@ pub trait GovernanceV2: sc_panic!(NO_PROPOSAL); } GovernanceProposalStatus::Succeeded | GovernanceProposalStatus::Defeated => { - let proposal = self.proposals().get(proposal_id); + let mut proposal = self.proposals().get(proposal_id); require!(caller == proposal.proposer, ONLY_PROPOSER_WITHDRAW); + require!(!proposal.fee_withdrawn, FEE_ALREADY_WITHDRAWN); + + self.refund_proposal_fee(&proposal, &proposal.fee_payment.amount); + proposal.fee_withdrawn = true; + self.proposals().set(proposal_id, &proposal); - self.refund_proposal_fee(proposal_id, &proposal.fee_payment.amount); + proposal.fee_withdrawn = true; + self.proposals().set(proposal_id, &proposal); } GovernanceProposalStatus::DefeatedWithVeto => { - let proposal = self.proposals().get(proposal_id); + let mut proposal = self.proposals().get(proposal_id); + + require!(!proposal.fee_withdrawn, FEE_ALREADY_WITHDRAWN); + let refund_percentage = BigUint::from(proposal.withdraw_percentage_defeated); let refund_amount = refund_percentage * proposal.fee_payment.amount.clone() / FULL_PERCENTAGE; - self.refund_proposal_fee(proposal_id, &refund_amount); + self.refund_proposal_fee(&proposal, &refund_amount); + proposal.fee_withdrawn = true; + self.proposals().set(proposal_id, &proposal); + let remaining_fee = proposal.fee_payment.amount - refund_amount; self.proposal_remaining_fees().update(|fees| { @@ -295,10 +308,7 @@ pub trait GovernanceV2: total } - fn refund_proposal_fee(&self, proposal_id: ProposalId, refund_amount: &BigUint) { - let proposal: GovernanceProposal<::Api> = - self.proposals().get(proposal_id); - + fn refund_proposal_fee(&self, proposal: &GovernanceProposal, refund_amount: &BigUint) { self.send().direct_esdt( &proposal.proposer, &proposal.fee_payment.token_identifier, diff --git a/energy-integration/governance-v2/src/proposal.rs b/energy-integration/governance-v2/src/proposal.rs index 9ca71088e..8c60bc280 100644 --- a/energy-integration/governance-v2/src/proposal.rs +++ b/energy-integration/governance-v2/src/proposal.rs @@ -63,4 +63,5 @@ pub struct GovernanceProposal { pub withdraw_percentage_defeated: u64, pub total_quorum: BigUint, pub proposal_start_block: u64, + pub fee_withdrawn: bool, } diff --git a/energy-integration/governance-v2/tests/gov_rust_test.rs b/energy-integration/governance-v2/tests/gov_rust_test.rs index 12749ef43..7f7ad8fbb 100644 --- a/energy-integration/governance-v2/tests/gov_rust_test.rs +++ b/energy-integration/governance-v2/tests/gov_rust_test.rs @@ -518,6 +518,11 @@ fn gov_withdraw_no_with_veto_defeated_proposal_test() { &(min_fee / 2u64), None, ); + + // Withdraw the fee twice - error + gov_setup + .withdraw_after_defeated(&third_user_addr, proposal_id) + .assert_error(4, "Fee already withdrawn!"); } #[test] From b093f8265c9217eb2747a1246bd2e3abe78983ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Thu, 7 Sep 2023 18:12:56 +0300 Subject: [PATCH 02/12] Governance-v2: Withdraw percentage limits fix --- energy-integration/governance-v2/src/configurable.rs | 12 ++++++++++-- energy-integration/governance-v2/src/lib.rs | 4 +--- .../governance-v2/tests/gov_rust_test.rs | 4 ++++ .../governance-v2/tests/gov_test_setup/mod.rs | 9 ++++++++- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/energy-integration/governance-v2/src/configurable.rs b/energy-integration/governance-v2/src/configurable.rs index cccbede16..3fe44e7b0 100644 --- a/energy-integration/governance-v2/src/configurable.rs +++ b/energy-integration/governance-v2/src/configurable.rs @@ -1,4 +1,4 @@ -use crate::{errors::ERROR_NOT_AN_ESDT, FULL_PERCENTAGE}; +use crate::errors::ERROR_NOT_AN_ESDT; multiversx_sc::imports!(); @@ -39,6 +39,8 @@ const MAX_QUORUM: u64 = 6_000; // 60% const MIN_MIN_FEE_FOR_PROPOSE: u64 = 2_000_000; const MAX_MIN_FEE_FOR_PROPOSE: u64 = 200_000_000_000; const DECIMALS_CONST: u64 = 1_000_000_000_000_000_000; +pub const MAX_GAS_LIMIT_PER_BLOCK: u64 = 600_000_000; +pub const FULL_PERCENTAGE: u64 = 10_000; #[multiversx_sc::module] pub trait ConfigurablePropertiesModule: @@ -65,6 +67,12 @@ pub trait ConfigurablePropertiesModule: self.try_change_quorum_percentage(new_value); } + #[only_owner] + #[endpoint(changeWithdrawPercentage)] + fn change_withdraw_percentage(&self, new_value: u64) { + self.try_change_withdraw_percentage_defeated(new_value); + } + #[only_owner] #[endpoint(changeVotingDelayInBlocks)] fn change_voting_delay_in_blocks(&self, new_value: u64) { @@ -125,7 +133,7 @@ pub trait ConfigurablePropertiesModule: fn try_change_withdraw_percentage_defeated(&self, new_value: u64) { require!( - new_value > 0 && new_value < FULL_PERCENTAGE, + new_value <= FULL_PERCENTAGE, "Not valid value for withdraw percentage if defeated!" ); diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index c2c0ed90a..8ee3110c7 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -15,12 +15,10 @@ use proposal_storage::VoteType; use weekly_rewards_splitting::events::Week; use weekly_rewards_splitting::global_info::ProxyTrait as _; +use crate::configurable::{FULL_PERCENTAGE, MAX_GAS_LIMIT_PER_BLOCK}; use crate::errors::*; use crate::proposal_storage::ProposalVotes; -const MAX_GAS_LIMIT_PER_BLOCK: u64 = 600_000_000; -const FULL_PERCENTAGE: u64 = 10_000; - /// An empty contract. To be used as a template when starting a new contract from scratch. #[multiversx_sc::contract] pub trait GovernanceV2: diff --git a/energy-integration/governance-v2/tests/gov_rust_test.rs b/energy-integration/governance-v2/tests/gov_rust_test.rs index 7f7ad8fbb..352fd2125 100644 --- a/energy-integration/governance-v2/tests/gov_rust_test.rs +++ b/energy-integration/governance-v2/tests/gov_rust_test.rs @@ -420,6 +420,10 @@ fn gov_modify_withdraw_defeated_proposal_test() { gov_setup.increment_block_nonce(LOCKING_PERIOD_BLOCKS); + gov_setup + .change_withdraw_percentage(FULL_PERCENTAGE + 1u64) + .assert_error(4, "Not valid value for withdraw percentage if defeated!"); + gov_setup .b_mock .execute_query(&gov_setup.gov_wrapper, |sc| { diff --git a/energy-integration/governance-v2/tests/gov_test_setup/mod.rs b/energy-integration/governance-v2/tests/gov_test_setup/mod.rs index 8ea1ef5f0..5a6f17e33 100644 --- a/energy-integration/governance-v2/tests/gov_test_setup/mod.rs +++ b/energy-integration/governance-v2/tests/gov_test_setup/mod.rs @@ -30,7 +30,7 @@ pub const WITHDRAW_PERCENTAGE: u64 = 5_000; // 50% pub static WXMEX_TOKEN_ID: &[u8] = b"WXMEX-123456"; pub const LOCKED_TOKEN_ID: &[u8] = b"LOCKED-abcdef"; pub const DECIMALS_CONST: u64 = 1_000_000_000_000_000_000; - +pub const FULL_PERCENTAGE: u64 = 10_000; pub const USER_ENERGY: u64 = 1_000_000; pub const GAS_LIMIT: u64 = 1_000_000; @@ -260,6 +260,13 @@ where }) } + pub fn change_withdraw_percentage(&mut self, withdraw_value: u64) -> TxResult { + self.b_mock + .execute_tx(&self.owner, &self.gov_wrapper, &rust_biguint!(0), |sc| { + sc.change_withdraw_percentage(withdraw_value); + }) + } + pub fn cancel_proposal(&mut self, caller: &Address, proposal_id: usize) -> TxResult { self.b_mock .execute_tx(caller, &self.gov_wrapper, &rust_biguint!(0), |sc| { From f328ba4525ca4485d6c2820e60c23f57750078b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Thu, 7 Sep 2023 18:13:11 +0300 Subject: [PATCH 03/12] Governance-v2: Remove unused code --- .../governance-v2/src/proposal_storage.rs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/energy-integration/governance-v2/src/proposal_storage.rs b/energy-integration/governance-v2/src/proposal_storage.rs index 1e7db1561..28dd58c1d 100644 --- a/energy-integration/governance-v2/src/proposal_storage.rs +++ b/energy-integration/governance-v2/src/proposal_storage.rs @@ -39,22 +39,6 @@ impl ProposalVotes { pub fn get_total_votes(&self) -> BigUint { &self.up_votes + &self.down_votes + &self.down_veto_votes + &self.abstain_votes } - pub fn get_up_votes_percentage(&self) -> BigUint { - let total_votes = self.get_total_votes(); - &self.up_votes / &total_votes - } - pub fn get_down_votes_percentage(&self) -> BigUint { - let total_votes = self.get_total_votes(); - &self.down_votes / &total_votes - } - pub fn get_down_veto_votes_percentage(&self) -> BigUint { - let total_votes = self.get_total_votes(); - &self.down_veto_votes / &total_votes - } - pub fn get_abstain_votes_percentage(&self) -> BigUint { - let total_votes = self.get_total_votes(); - &self.abstain_votes / &total_votes - } } #[multiversx_sc::module] From af57b8867763ec5e09edcd4e117cc9ab1c1c4e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Thu, 7 Sep 2023 18:15:19 +0300 Subject: [PATCH 04/12] Governance-v2: Remove unused code --- energy-integration/governance-v2/src/views.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/energy-integration/governance-v2/src/views.rs b/energy-integration/governance-v2/src/views.rs index 770f3b210..2699bd5a3 100644 --- a/energy-integration/governance-v2/src/views.rs +++ b/energy-integration/governance-v2/src/views.rs @@ -50,11 +50,6 @@ pub trait ViewsModule: fn vote_reached(&self, proposal_id: ProposalId) -> bool { let proposal_votes = self.proposal_votes(proposal_id).get(); let total_votes = proposal_votes.get_total_votes(); - - if total_votes == 0u64 { - return false; - } - let total_up_votes = proposal_votes.up_votes; let total_down_veto_votes = proposal_votes.down_veto_votes; let third_total_votes = &total_votes / 3u64; @@ -70,11 +65,6 @@ pub trait ViewsModule: fn vote_down_with_veto(&self, proposal_id: ProposalId) -> bool { let proposal_votes = self.proposal_votes(proposal_id).get(); let total_votes = proposal_votes.get_total_votes(); - - if total_votes == 0u64 { - return false; - } - let total_down_veto_votes = proposal_votes.down_veto_votes; let third_total_votes = &total_votes / 3u64; From e16dc32fa9219ef66480ad9be10caf1c847f7190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Thu, 7 Sep 2023 18:21:49 +0300 Subject: [PATCH 05/12] Governance-v2: Code refactor --- energy-integration/governance-v2/src/lib.rs | 8 ++++++-- energy-integration/governance-v2/src/views.rs | 10 +--------- .../governance-v2/tests/gov_rust_test.rs | 8 ++++---- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index 8ee3110c7..9f2228408 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -134,7 +134,7 @@ pub trait GovernanceV2: withdraw_percentage_defeated, total_quorum: BigUint::zero(), proposal_start_block: current_block, - fee_withdrawn: false + fee_withdrawn: false, }; let proposal_id = self.proposals().push(&proposal); @@ -306,7 +306,11 @@ pub trait GovernanceV2: total } - fn refund_proposal_fee(&self, proposal: &GovernanceProposal, refund_amount: &BigUint) { + fn refund_proposal_fee( + &self, + proposal: &GovernanceProposal, + refund_amount: &BigUint, + ) { self.send().direct_esdt( &proposal.proposer, &proposal.fee_payment.token_identifier, diff --git a/energy-integration/governance-v2/src/views.rs b/energy-integration/governance-v2/src/views.rs index 2699bd5a3..c6eb36916 100644 --- a/energy-integration/governance-v2/src/views.rs +++ b/energy-integration/governance-v2/src/views.rs @@ -74,18 +74,10 @@ pub trait ViewsModule: fn quorum_reached(&self, proposal_id: ProposalId) -> bool { let proposal = self.proposals().get(proposal_id); let total_quorum_for_proposal = proposal.total_quorum; - - if total_quorum_for_proposal == 0u64 { - return false; - } - let required_minimum_percentage = proposal.minimum_quorum; - let current_quorum = self.proposal_votes(proposal_id).get().quorum; - let current_quorum_percentage = - current_quorum * FULL_PERCENTAGE / total_quorum_for_proposal; - current_quorum_percentage >= required_minimum_percentage + current_quorum * FULL_PERCENTAGE >= required_minimum_percentage * total_quorum_for_proposal } fn require_valid_proposal_id(&self, proposal_id: ProposalId) { diff --git a/energy-integration/governance-v2/tests/gov_rust_test.rs b/energy-integration/governance-v2/tests/gov_rust_test.rs index 352fd2125..73ab392d1 100644 --- a/energy-integration/governance-v2/tests/gov_rust_test.rs +++ b/energy-integration/governance-v2/tests/gov_rust_test.rs @@ -421,8 +421,8 @@ fn gov_modify_withdraw_defeated_proposal_test() { gov_setup.increment_block_nonce(LOCKING_PERIOD_BLOCKS); gov_setup - .change_withdraw_percentage(FULL_PERCENTAGE + 1u64) - .assert_error(4, "Not valid value for withdraw percentage if defeated!"); + .change_withdraw_percentage(FULL_PERCENTAGE + 1u64) + .assert_error(4, "Not valid value for withdraw percentage if defeated!"); gov_setup .b_mock @@ -523,8 +523,8 @@ fn gov_withdraw_no_with_veto_defeated_proposal_test() { None, ); - // Withdraw the fee twice - error - gov_setup + // Withdraw the fee twice - error + gov_setup .withdraw_after_defeated(&third_user_addr, proposal_id) .assert_error(4, "Fee already withdrawn!"); } From 897aea861b6a7dc130f2c4b9003ff68797915c38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Thu, 7 Sep 2023 18:43:02 +0300 Subject: [PATCH 06/12] Governance-v2: Burn fees --- energy-integration/governance-v2/src/lib.rs | 19 +++++++------------ .../governance-v2/tests/gov_test_setup/mod.rs | 13 ++++++++++++- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index 9f2228408..ca0be83bb 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -273,19 +273,18 @@ pub trait GovernanceV2: let refund_amount = refund_percentage * proposal.fee_payment.amount.clone() / FULL_PERCENTAGE; + // Mark this proposal - fee withdrawn self.refund_proposal_fee(&proposal, &refund_amount); proposal.fee_withdrawn = true; self.proposals().set(proposal_id, &proposal); + // Burn remaining fees let remaining_fee = proposal.fee_payment.amount - refund_amount; - - self.proposal_remaining_fees().update(|fees| { - fees.push(EsdtTokenPayment::new( - proposal.fee_payment.token_identifier, - proposal.fee_payment.token_nonce, - remaining_fee, - )); - }); + self.send().esdt_local_burn( + &proposal.fee_payment.token_identifier, + proposal.fee_payment.token_nonce, + &remaining_fee, + ); } _ => { sc_panic!(WITHDRAW_NOT_ALLOWED); @@ -318,8 +317,4 @@ pub trait GovernanceV2: refund_amount, ); } - - #[storage_mapper("proposalRemainingFees")] - fn proposal_remaining_fees(&self) - -> SingleValueMapper>>; } diff --git a/energy-integration/governance-v2/tests/gov_test_setup/mod.rs b/energy-integration/governance-v2/tests/gov_test_setup/mod.rs index 5a6f17e33..6a9d42d4c 100644 --- a/energy-integration/governance-v2/tests/gov_test_setup/mod.rs +++ b/energy-integration/governance-v2/tests/gov_test_setup/mod.rs @@ -10,7 +10,7 @@ use governance_v2::{ }; use multiversx_sc::{ codec::multi_types::OptionalValue, - types::{Address, BigInt, ManagedVec, MultiValueEncoded}, + types::{Address, BigInt, EsdtLocalRole, ManagedVec, MultiValueEncoded}, }; use multiversx_sc_scenario::{ managed_address, managed_biguint, managed_buffer, managed_token_id, rust_biguint, @@ -175,6 +175,17 @@ where }) .assert_ok(); + let vote_nft_roles = [ + EsdtLocalRole::NftCreate, + EsdtLocalRole::NftBurn, + EsdtLocalRole::NftUpdateAttributes, + ]; + b_mock.set_esdt_local_roles( + &gov_wrapper.address_ref(), + WXMEX_TOKEN_ID, + &vote_nft_roles[..], + ); + Self { b_mock, owner, From 9d87efab4e39ea6bfb098c0a1f5b6bebba5672e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Thu, 7 Sep 2023 18:46:55 +0300 Subject: [PATCH 07/12] Governance-v2: Clippy fixes for tests --- energy-integration/governance-v2/tests/gov_test_setup/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/energy-integration/governance-v2/tests/gov_test_setup/mod.rs b/energy-integration/governance-v2/tests/gov_test_setup/mod.rs index 6a9d42d4c..520b5b0b4 100644 --- a/energy-integration/governance-v2/tests/gov_test_setup/mod.rs +++ b/energy-integration/governance-v2/tests/gov_test_setup/mod.rs @@ -181,7 +181,7 @@ where EsdtLocalRole::NftUpdateAttributes, ]; b_mock.set_esdt_local_roles( - &gov_wrapper.address_ref(), + gov_wrapper.address_ref(), WXMEX_TOKEN_ID, &vote_nft_roles[..], ); From ff7424edbc22e7e6e8dcb80bf35a9c1b1198ab5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Fri, 8 Sep 2023 13:12:33 +0300 Subject: [PATCH 08/12] Governance-v2: Fixes after audit * Safely burn & send if amount = 0 * Removed redunant code --- energy-integration/governance-v2/src/lib.rs | 26 ++-- .../governance-v2/tests/gov_rust_test.rs | 125 ++++++++++++++++++ 2 files changed, 139 insertions(+), 12 deletions(-) diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index ca0be83bb..cf242f2f8 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -260,9 +260,6 @@ pub trait GovernanceV2: self.refund_proposal_fee(&proposal, &proposal.fee_payment.amount); proposal.fee_withdrawn = true; self.proposals().set(proposal_id, &proposal); - - proposal.fee_withdrawn = true; - self.proposals().set(proposal_id, &proposal); } GovernanceProposalStatus::DefeatedWithVeto => { let mut proposal = self.proposals().get(proposal_id); @@ -280,11 +277,14 @@ pub trait GovernanceV2: // Burn remaining fees let remaining_fee = proposal.fee_payment.amount - refund_amount; - self.send().esdt_local_burn( - &proposal.fee_payment.token_identifier, - proposal.fee_payment.token_nonce, - &remaining_fee, - ); + + if remaining_fee != BigUint::zero() { + self.send().esdt_local_burn( + &proposal.fee_payment.token_identifier, + proposal.fee_payment.token_nonce, + &remaining_fee, + ); + } } _ => { sc_panic!(WITHDRAW_NOT_ALLOWED); @@ -310,11 +310,13 @@ pub trait GovernanceV2: proposal: &GovernanceProposal, refund_amount: &BigUint, ) { - self.send().direct_esdt( + self.send().direct_non_zero_esdt_payment( &proposal.proposer, - &proposal.fee_payment.token_identifier, - proposal.fee_payment.token_nonce, - refund_amount, + &EsdtTokenPayment::new( + proposal.fee_payment.token_identifier.clone(), + proposal.fee_payment.token_nonce, + refund_amount.clone(), + ), ); } } diff --git a/energy-integration/governance-v2/tests/gov_rust_test.rs b/energy-integration/governance-v2/tests/gov_rust_test.rs index 73ab392d1..929e36945 100644 --- a/energy-integration/governance-v2/tests/gov_rust_test.rs +++ b/energy-integration/governance-v2/tests/gov_rust_test.rs @@ -529,6 +529,131 @@ fn gov_withdraw_no_with_veto_defeated_proposal_test() { .assert_error(4, "Fee already withdrawn!"); } +#[test] +fn gov_withdraw_no_with_veto_penalty_limits_test() { + let mut gov_setup = GovSetup::new(governance_v2::contract_obj); + + let first_user_addr = gov_setup.first_user.clone(); + let third_user_addr = gov_setup.third_user.clone(); + let sc_addr = gov_setup.gov_wrapper.address_ref().clone(); + let min_fee = rust_biguint!(MIN_FEE_FOR_PROPOSE) * DECIMALS_CONST; + // Give proposer the minimum fee + gov_setup + .b_mock + .set_nft_balance(&first_user_addr, WXMEX_TOKEN_ID, 1, &min_fee, &Empty); + + gov_setup.change_withdraw_percentage(0).assert_ok(); + let (result, proposal_id) = gov_setup.propose( + &first_user_addr, + &min_fee, + &sc_addr, + b"changeTODO", + vec![1_000u64.to_be_bytes().to_vec()], + ); + result.assert_ok(); + assert_eq!(proposal_id, 1); + + // Check proposer balance + gov_setup.b_mock.check_nft_balance::( + &first_user_addr, + WXMEX_TOKEN_ID, + 1, + &rust_biguint!(0), + None, + ); + + gov_setup.increment_block_nonce(VOTING_PERIOD_BLOCKS); + + gov_setup.up_vote(&first_user_addr, proposal_id).assert_ok(); + gov_setup + .down_veto_vote(&third_user_addr, proposal_id) + .assert_ok(); + + gov_setup.increment_block_nonce(LOCKING_PERIOD_BLOCKS); + + gov_setup + .b_mock + .execute_query(&gov_setup.gov_wrapper, |sc| { + assert!( + sc.get_proposal_status(1) == GovernanceProposalStatus::DefeatedWithVeto, + "Action should have been Defeated" + ); + }) + .assert_ok(); + + // Other user (not proposer) withdraw the fee + gov_setup + .withdraw_after_defeated(&third_user_addr, proposal_id) + .assert_ok(); + + // Check proposer balance (fee) + gov_setup.b_mock.check_nft_balance::( + &first_user_addr, + WXMEX_TOKEN_ID, + 1, + &rust_biguint!(0), + None, + ); + + // Give proposer the minimum fee + gov_setup + .b_mock + .set_nft_balance(&first_user_addr, WXMEX_TOKEN_ID, 1, &min_fee, &Empty); + + gov_setup.change_withdraw_percentage(10_000).assert_ok(); + let (result, proposal_id) = gov_setup.propose( + &first_user_addr, + &min_fee, + &sc_addr, + b"changeTODO", + vec![1_000u64.to_be_bytes().to_vec()], + ); + result.assert_ok(); + assert_eq!(proposal_id, 2); + + // Check proposer balance + gov_setup.b_mock.check_nft_balance::( + &first_user_addr, + WXMEX_TOKEN_ID, + 1, + &rust_biguint!(0), + None, + ); + + gov_setup.increment_block_nonce(VOTING_PERIOD_BLOCKS); + + gov_setup.up_vote(&first_user_addr, proposal_id).assert_ok(); + gov_setup + .down_veto_vote(&third_user_addr, proposal_id) + .assert_ok(); + + gov_setup.increment_block_nonce(LOCKING_PERIOD_BLOCKS); + + gov_setup + .b_mock + .execute_query(&gov_setup.gov_wrapper, |sc| { + assert!( + sc.get_proposal_status(1) == GovernanceProposalStatus::DefeatedWithVeto, + "Action should have been Defeated" + ); + }) + .assert_ok(); + + // Other user (not proposer) withdraw the fee + gov_setup + .withdraw_after_defeated(&third_user_addr, proposal_id) + .assert_ok(); + + // Check proposer balance (fee) + gov_setup.b_mock.check_nft_balance::( + &first_user_addr, + WXMEX_TOKEN_ID, + 1, + &min_fee, + None, + ); +} + #[test] fn gov_propose_cancel_proposal_id_test() { let mut gov_setup = GovSetup::new(governance_v2::contract_obj); From 0d463d789bc4992832bbab0b181b7192a62cec6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Fri, 8 Sep 2023 14:07:37 +0300 Subject: [PATCH 09/12] Governance-v2: fix withdraw after NoWithVeto First burn, then refund --- energy-integration/governance-v2/src/lib.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index cf242f2f8..d5e53948e 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -270,13 +270,8 @@ pub trait GovernanceV2: let refund_amount = refund_percentage * proposal.fee_payment.amount.clone() / FULL_PERCENTAGE; - // Mark this proposal - fee withdrawn - self.refund_proposal_fee(&proposal, &refund_amount); - proposal.fee_withdrawn = true; - self.proposals().set(proposal_id, &proposal); - // Burn remaining fees - let remaining_fee = proposal.fee_payment.amount - refund_amount; + let remaining_fee = proposal.fee_payment.amount.clone() - refund_amount.clone(); if remaining_fee != BigUint::zero() { self.send().esdt_local_burn( @@ -285,6 +280,10 @@ pub trait GovernanceV2: &remaining_fee, ); } + // Mark this proposal - fee withdrawn + self.refund_proposal_fee(&proposal, &refund_amount); + proposal.fee_withdrawn = true; + self.proposals().set(proposal_id, &proposal); } _ => { sc_panic!(WITHDRAW_NOT_ALLOWED); From 7354488e07a0aec1bd911b81d10fd6dc88c53429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Fri, 8 Sep 2023 16:47:30 +0300 Subject: [PATCH 10/12] Governance-v2 * Remove check_caller module - not necessary anymore * SC are not allowed to propose --- .../governance-v2/src/caller_check.rs | 14 ------------ .../governance-v2/src/errors.rs | 1 + energy-integration/governance-v2/src/lib.rs | 22 +++++++------------ energy-integration/governance-v2/src/views.rs | 1 - 4 files changed, 9 insertions(+), 29 deletions(-) delete mode 100644 energy-integration/governance-v2/src/caller_check.rs diff --git a/energy-integration/governance-v2/src/caller_check.rs b/energy-integration/governance-v2/src/caller_check.rs deleted file mode 100644 index f21475a58..000000000 --- a/energy-integration/governance-v2/src/caller_check.rs +++ /dev/null @@ -1,14 +0,0 @@ -multiversx_sc::imports!(); - -#[multiversx_sc::module] -pub trait CallerCheckModule { - fn require_caller_not_self(&self) { - let caller = self.blockchain().get_caller(); - let sc_address = self.blockchain().get_sc_address(); - - require!( - caller != sc_address, - "Cannot call this endpoint through proposed action" - ); - } -} diff --git a/energy-integration/governance-v2/src/errors.rs b/energy-integration/governance-v2/src/errors.rs index 1656c165f..f1100a5be 100644 --- a/energy-integration/governance-v2/src/errors.rs +++ b/energy-integration/governance-v2/src/errors.rs @@ -11,3 +11,4 @@ pub const ONLY_PROPOSER_WITHDRAW: &[u8] = b"Only original proposer may withdraw pub const FEE_ALREADY_WITHDRAWN: &[u8] = b"Fee already withdrawn!"; pub const NO_PROPOSAL: &[u8] = b"Proposal does not exist"; pub const WITHDRAW_NOT_ALLOWED: &[u8] = b"You may not withdraw funds from this proposal!"; +pub const PROPOSAL_NOT_ALLOWED_FOR_SC: &[u8] = b"Smart Contracts are not allowed to propose!"; diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index d5e53948e..4c4fe79fb 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -2,7 +2,6 @@ multiversx_sc::imports!(); -pub mod caller_check; pub mod configurable; mod errors; pub mod events; @@ -25,7 +24,6 @@ pub trait GovernanceV2: configurable::ConfigurablePropertiesModule + events::EventsModule + proposal_storage::ProposalStorageModule - + caller_check::CallerCheckModule + views::ViewsModule + energy_query::EnergyQueryModule + permissions_module::PermissionsModule @@ -76,14 +74,17 @@ pub trait GovernanceV2: description: ManagedBuffer, actions: MultiValueEncoded>, ) -> ProposalId { - self.require_caller_not_self(); + let proposer = self.blockchain().get_caller(); + require!( + !self.blockchain().is_smart_contract(&proposer), + PROPOSAL_NOT_ALLOWED_FOR_SC + ); require!( actions.len() <= MAX_GOVERNANCE_PROPOSAL_ACTIONS, EXEEDED_MAX_ACTIONS ); - let proposer = self.blockchain().get_caller(); let user_energy = self.get_energy_amount_non_zero(&proposer); let min_energy_for_propose = self.min_energy_for_propose().get(); require!(user_energy >= min_energy_for_propose, NOT_ENOUGH_ENERGY); @@ -148,7 +149,6 @@ pub trait GovernanceV2: /// Vote on a proposal. The voting power depends on the user's energy. #[endpoint] fn vote(&self, proposal_id: ProposalId, vote: VoteType) { - self.require_caller_not_self(); self.require_valid_proposal_id(proposal_id); require!( self.get_proposal_status(proposal_id) == GovernanceProposalStatus::Active, @@ -214,13 +214,9 @@ pub trait GovernanceV2: } } - /// Cancel a proposed action. This can be done: - /// - by the proposer, at any time - /// - by anyone, if the proposal was defeated + /// Cancel a proposed action. This can be done only during Pending status #[endpoint] fn cancel(&self, proposal_id: ProposalId) { - self.require_caller_not_self(); - match self.get_proposal_status(proposal_id) { GovernanceProposalStatus::None => { sc_panic!(NO_PROPOSAL); @@ -241,10 +237,9 @@ pub trait GovernanceV2: } /// When a proposal was defeated, the proposer can withdraw - /// a part of the FEE. + /// If DefeatedWithVeto only part of the fee can be withdrawn #[endpoint(withdrawDeposit)] fn withdraw_deposit(&self, proposal_id: ProposalId) { - self.require_caller_not_self(); let caller = self.blockchain().get_caller(); match self.get_proposal_status(proposal_id) { @@ -272,7 +267,6 @@ pub trait GovernanceV2: // Burn remaining fees let remaining_fee = proposal.fee_payment.amount.clone() - refund_amount.clone(); - if remaining_fee != BigUint::zero() { self.send().esdt_local_burn( &proposal.fee_payment.token_identifier, @@ -280,7 +274,7 @@ pub trait GovernanceV2: &remaining_fee, ); } - // Mark this proposal - fee withdrawn + // Mark this proposal that fee is withdrawn self.refund_proposal_fee(&proposal, &refund_amount); proposal.fee_withdrawn = true; self.proposals().set(proposal_id, &proposal); diff --git a/energy-integration/governance-v2/src/views.rs b/energy-integration/governance-v2/src/views.rs index c6eb36916..79b33c20c 100644 --- a/energy-integration/governance-v2/src/views.rs +++ b/energy-integration/governance-v2/src/views.rs @@ -9,7 +9,6 @@ use crate::{ pub trait ViewsModule: crate::proposal_storage::ProposalStorageModule + crate::configurable::ConfigurablePropertiesModule - + crate::caller_check::CallerCheckModule + permissions_module::PermissionsModule + energy_query::EnergyQueryModule { From a14de934fa1d97e280f0893e2672305c9506fe8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Fri, 8 Sep 2023 16:51:34 +0300 Subject: [PATCH 11/12] Framework upgrade 0.43.3 Governance-v2: use esdt_non_zero_local_burn --- common/common_errors/Cargo.toml | 2 +- common/common_structs/Cargo.toml | 2 +- common/modules/farm/config/Cargo.toml | 2 +- common/modules/farm/contexts/Cargo.toml | 4 ++-- common/modules/farm/events/Cargo.toml | 2 +- common/modules/farm/farm_base_impl/Cargo.toml | 6 +++--- common/modules/farm/farm_token/Cargo.toml | 4 ++-- common/modules/farm/farm_token_merge/Cargo.toml | 4 ++-- common/modules/farm/rewards/Cargo.toml | 4 ++-- .../modules/legacy_token_decode_module/Cargo.toml | 2 +- common/modules/locking_module/Cargo.toml | 2 +- common/modules/math/Cargo.toml | 2 +- common/modules/pausable/Cargo.toml | 2 +- common/modules/permissions_module/Cargo.toml | 2 +- common/modules/sc_whitelist_module/Cargo.toml | 2 +- common/modules/token_merge_helper/Cargo.toml | 2 +- common/modules/token_send/Cargo.toml | 2 +- common/modules/utils/Cargo.toml | 2 +- common/traits/fixed-supply-token/Cargo.toml | 2 +- common/traits/mergeable/Cargo.toml | 2 +- common/traits/unwrappable/Cargo.toml | 2 +- dex/Cargo.toml | 6 +++--- dex/farm-with-locked-rewards/Cargo.toml | 6 +++--- dex/farm-with-locked-rewards/wasm/Cargo.toml | 2 +- dex/farm/Cargo.toml | 6 +++--- dex/farm/wasm/Cargo.toml | 2 +- dex/fuzz/Cargo.toml | 4 ++-- dex/governance/Cargo.toml | 4 ++-- dex/governance/wasm/Cargo.toml | 2 +- dex/pair-mock/Cargo.toml | 4 ++-- dex/pair-mock/wasm/Cargo.toml | 2 +- dex/pair/Cargo.toml | 4 ++-- dex/pair/wasm-pair-full/Cargo.toml | 2 +- dex/pair/wasm-safe-price-view/Cargo.toml | 2 +- dex/pair/wasm/Cargo.toml | 2 +- dex/price-discovery/Cargo.toml | 6 +++--- dex/price-discovery/wasm/Cargo.toml | 2 +- dex/proxy-deployer/Cargo.toml | 4 ++-- dex/proxy-deployer/wasm/Cargo.toml | 2 +- dex/router/Cargo.toml | 4 ++-- dex/router/wasm/Cargo.toml | 2 +- .../common-modules/energy-query/Cargo.toml | 2 +- .../common-modules/week-timekeeping/Cargo.toml | 2 +- .../weekly-rewards-splitting/Cargo.toml | 2 +- energy-integration/common-types/Cargo.toml | 2 +- energy-integration/energy-factory-mock/Cargo.toml | 4 ++-- .../energy-factory-mock/wasm/Cargo.toml | 2 +- energy-integration/energy-update/Cargo.toml | 6 +++--- energy-integration/energy-update/wasm/Cargo.toml | 2 +- energy-integration/farm-boosted-yields/Cargo.toml | 2 +- energy-integration/fees-collector/Cargo.toml | 6 +++--- energy-integration/fees-collector/wasm/Cargo.toml | 2 +- energy-integration/governance-v2/Cargo.toml | 4 ++-- energy-integration/governance-v2/src/lib.rs | 13 ++++++------- energy-integration/governance-v2/wasm/Cargo.toml | 2 +- farm-staking/farm-staking-proxy/Cargo.toml | 6 +++--- farm-staking/farm-staking-proxy/wasm/Cargo.toml | 2 +- farm-staking/farm-staking/Cargo.toml | 6 +++--- farm-staking/farm-staking/wasm/Cargo.toml | 2 +- farm-staking/metabonding-staking/Cargo.toml | 6 +++--- farm-staking/metabonding-staking/wasm/Cargo.toml | 2 +- locked-asset/Cargo.toml | 6 +++--- locked-asset/distribution/Cargo.toml | 4 ++-- locked-asset/distribution/wasm/Cargo.toml | 2 +- locked-asset/energy-factory/Cargo.toml | 6 +++--- locked-asset/energy-factory/wasm/Cargo.toml | 2 +- locked-asset/factory/Cargo.toml | 6 +++--- locked-asset/factory/wasm/Cargo.toml | 2 +- locked-asset/lkmex-transfer/Cargo.toml | 6 +++--- locked-asset/lkmex-transfer/wasm/Cargo.toml | 2 +- locked-asset/locked-token-wrapper/Cargo.toml | 6 +++--- locked-asset/locked-token-wrapper/wasm/Cargo.toml | 2 +- locked-asset/proxy_dex/Cargo.toml | 6 +++--- locked-asset/proxy_dex/wasm/Cargo.toml | 2 +- locked-asset/simple-lock-whitelist/Cargo.toml | 6 +++--- locked-asset/simple-lock-whitelist/wasm/Cargo.toml | 2 +- locked-asset/simple-lock/Cargo.toml | 6 +++--- locked-asset/simple-lock/wasm/Cargo.toml | 2 +- locked-asset/token-unstake/Cargo.toml | 6 +++--- locked-asset/token-unstake/wasm/Cargo.toml | 2 +- pause-all/Cargo.toml | 6 +++--- pause-all/wasm/Cargo.toml | 2 +- 82 files changed, 140 insertions(+), 141 deletions(-) diff --git a/common/common_errors/Cargo.toml b/common/common_errors/Cargo.toml index 499450be3..cee6021cb 100644 --- a/common/common_errors/Cargo.toml +++ b/common/common_errors/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/common_structs/Cargo.toml b/common/common_structs/Cargo.toml index f1ab9094c..967fb2174 100644 --- a/common/common_structs/Cargo.toml +++ b/common/common_structs/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.mergeable] diff --git a/common/modules/farm/config/Cargo.toml b/common/modules/farm/config/Cargo.toml index 2bf5d119e..c1382c3a2 100644 --- a/common/modules/farm/config/Cargo.toml +++ b/common/modules/farm/config/Cargo.toml @@ -22,5 +22,5 @@ path = "../../pausable" path = "../../permissions_module" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/farm/contexts/Cargo.toml b/common/modules/farm/contexts/Cargo.toml index 8ab7c0cd5..61326685e 100644 --- a/common/modules/farm/contexts/Cargo.toml +++ b/common/modules/farm/contexts/Cargo.toml @@ -34,8 +34,8 @@ path = "../../pausable" path = "../../permissions_module" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" diff --git a/common/modules/farm/events/Cargo.toml b/common/modules/farm/events/Cargo.toml index b19892e0b..14f710818 100644 --- a/common/modules/farm/events/Cargo.toml +++ b/common/modules/farm/events/Cargo.toml @@ -13,5 +13,5 @@ path = "../../../common_structs" path = "../contexts" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/farm/farm_base_impl/Cargo.toml b/common/modules/farm/farm_base_impl/Cargo.toml index e38957230..e303dc21f 100644 --- a/common/modules/farm/farm_base_impl/Cargo.toml +++ b/common/modules/farm/farm_base_impl/Cargo.toml @@ -49,10 +49,10 @@ path = "../../../traits/mergeable" path = "../../../traits/fixed-supply-token" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/common/modules/farm/farm_token/Cargo.toml b/common/modules/farm/farm_token/Cargo.toml index 27579b189..abcf49db3 100644 --- a/common/modules/farm/farm_token/Cargo.toml +++ b/common/modules/farm/farm_token/Cargo.toml @@ -25,8 +25,8 @@ path = "../../pausable" path = "../../permissions_module" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" diff --git a/common/modules/farm/farm_token_merge/Cargo.toml b/common/modules/farm/farm_token_merge/Cargo.toml index 3458a9daa..a73eef274 100644 --- a/common/modules/farm/farm_token_merge/Cargo.toml +++ b/common/modules/farm/farm_token_merge/Cargo.toml @@ -22,8 +22,8 @@ path = "../../token_merge_helper" path = "../farm_token" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" diff --git a/common/modules/farm/rewards/Cargo.toml b/common/modules/farm/rewards/Cargo.toml index 954b95342..0e3361f30 100644 --- a/common/modules/farm/rewards/Cargo.toml +++ b/common/modules/farm/rewards/Cargo.toml @@ -28,8 +28,8 @@ path = "../../pausable" path = "../../permissions_module" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" diff --git a/common/modules/legacy_token_decode_module/Cargo.toml b/common/modules/legacy_token_decode_module/Cargo.toml index 50d697c77..7742f8d70 100644 --- a/common/modules/legacy_token_decode_module/Cargo.toml +++ b/common/modules/legacy_token_decode_module/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.common_structs] diff --git a/common/modules/locking_module/Cargo.toml b/common/modules/locking_module/Cargo.toml index 6dbd6e89c..2627818d2 100644 --- a/common/modules/locking_module/Cargo.toml +++ b/common/modules/locking_module/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.simple-lock] diff --git a/common/modules/math/Cargo.toml b/common/modules/math/Cargo.toml index d591a6aa5..212fbea3e 100644 --- a/common/modules/math/Cargo.toml +++ b/common/modules/math/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/pausable/Cargo.toml b/common/modules/pausable/Cargo.toml index c332aed4c..91c293650 100644 --- a/common/modules/pausable/Cargo.toml +++ b/common/modules/pausable/Cargo.toml @@ -10,5 +10,5 @@ path = "src/pausable.rs" path = "../permissions_module" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/permissions_module/Cargo.toml b/common/modules/permissions_module/Cargo.toml index ce9642965..3c016d8ce 100644 --- a/common/modules/permissions_module/Cargo.toml +++ b/common/modules/permissions_module/Cargo.toml @@ -14,5 +14,5 @@ bitflags = "1.3.2" path = "../../common_errors" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/sc_whitelist_module/Cargo.toml b/common/modules/sc_whitelist_module/Cargo.toml index 711661188..35dd61be5 100644 --- a/common/modules/sc_whitelist_module/Cargo.toml +++ b/common/modules/sc_whitelist_module/Cargo.toml @@ -10,5 +10,5 @@ path = "src/sc_whitelist_module.rs" path = "../../common_errors" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/token_merge_helper/Cargo.toml b/common/modules/token_merge_helper/Cargo.toml index 56585e019..80d3bcb6e 100644 --- a/common/modules/token_merge_helper/Cargo.toml +++ b/common/modules/token_merge_helper/Cargo.toml @@ -10,5 +10,5 @@ path = "src/lib.rs" path = "../../common_errors" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/token_send/Cargo.toml b/common/modules/token_send/Cargo.toml index bff76dcd0..5e155af70 100644 --- a/common/modules/token_send/Cargo.toml +++ b/common/modules/token_send/Cargo.toml @@ -13,5 +13,5 @@ path = "../../common_structs" path = "../../common_errors" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/utils/Cargo.toml b/common/modules/utils/Cargo.toml index 0b229c058..406bce549 100644 --- a/common/modules/utils/Cargo.toml +++ b/common/modules/utils/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.common_structs] diff --git a/common/traits/fixed-supply-token/Cargo.toml b/common/traits/fixed-supply-token/Cargo.toml index c8a2679f9..7922633a1 100644 --- a/common/traits/fixed-supply-token/Cargo.toml +++ b/common/traits/fixed-supply-token/Cargo.toml @@ -7,4 +7,4 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" diff --git a/common/traits/mergeable/Cargo.toml b/common/traits/mergeable/Cargo.toml index fce702ff2..d8e76fa93 100644 --- a/common/traits/mergeable/Cargo.toml +++ b/common/traits/mergeable/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/traits/unwrappable/Cargo.toml b/common/traits/unwrappable/Cargo.toml index 5ea86b7fb..01cf23ef0 100644 --- a/common/traits/unwrappable/Cargo.toml +++ b/common/traits/unwrappable/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/dex/Cargo.toml b/dex/Cargo.toml index 7bf3dc375..b62358245 100644 --- a/dex/Cargo.toml +++ b/dex/Cargo.toml @@ -4,17 +4,17 @@ version = "0.0.0" edition = "2021" publish = false [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.config] path = "../common/modules/farm/config" diff --git a/dex/farm-with-locked-rewards/Cargo.toml b/dex/farm-with-locked-rewards/Cargo.toml index e111ba646..b250d12ad 100644 --- a/dex/farm-with-locked-rewards/Cargo.toml +++ b/dex/farm-with-locked-rewards/Cargo.toml @@ -74,17 +74,17 @@ path = "../../locked-asset/energy-factory" path = "../../energy-integration/common-modules/energy-query" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.simple-lock] path = "../../locked-asset/simple-lock" diff --git a/dex/farm-with-locked-rewards/wasm/Cargo.toml b/dex/farm-with-locked-rewards/wasm/Cargo.toml index 7a33ece2d..6abffb966 100644 --- a/dex/farm-with-locked-rewards/wasm/Cargo.toml +++ b/dex/farm-with-locked-rewards/wasm/Cargo.toml @@ -23,4 +23,4 @@ default-features = false path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/farm/Cargo.toml b/dex/farm/Cargo.toml index c75ce1fcb..b3df661f7 100644 --- a/dex/farm/Cargo.toml +++ b/dex/farm/Cargo.toml @@ -68,11 +68,11 @@ path = "../../energy-integration/common-modules/weekly-rewards-splitting" path = "../../energy-integration/common-modules/energy-query" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies] num-bigint = "0.4.2" @@ -81,7 +81,7 @@ num-bigint = "0.4.2" path = "../../energy-integration/energy-update" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.energy-factory-mock] path = "../../energy-integration/energy-factory-mock" diff --git a/dex/farm/wasm/Cargo.toml b/dex/farm/wasm/Cargo.toml index c43c76ab2..1e0b0a134 100644 --- a/dex/farm/wasm/Cargo.toml +++ b/dex/farm/wasm/Cargo.toml @@ -23,4 +23,4 @@ default-features = false path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/fuzz/Cargo.toml b/dex/fuzz/Cargo.toml index bd8bc2d8e..34bbfa809 100644 --- a/dex/fuzz/Cargo.toml +++ b/dex/fuzz/Cargo.toml @@ -12,11 +12,11 @@ num-bigint = "0.4.2" rand = "0.8.4" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dependencies.pausable] path = "../../common/modules/pausable" diff --git a/dex/governance/Cargo.toml b/dex/governance/Cargo.toml index 5ceb95c9d..b38e75cf9 100644 --- a/dex/governance/Cargo.toml +++ b/dex/governance/Cargo.toml @@ -8,14 +8,14 @@ publish = false [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.pair-mock] path = "../pair-mock" diff --git a/dex/governance/wasm/Cargo.toml b/dex/governance/wasm/Cargo.toml index 964b6bf7c..8abd3ad55 100644 --- a/dex/governance/wasm/Cargo.toml +++ b/dex/governance/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/pair-mock/Cargo.toml b/dex/pair-mock/Cargo.toml index a335ee5da..d7c805e2f 100644 --- a/dex/pair-mock/Cargo.toml +++ b/dex/pair-mock/Cargo.toml @@ -11,11 +11,11 @@ path = "src/pair.rs" path = "../../common/common_errors" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.itertools] version = "0.10.1" default-features = false [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/pair-mock/wasm/Cargo.toml b/dex/pair-mock/wasm/Cargo.toml index 0e43165cd..d3c6f1947 100644 --- a/dex/pair-mock/wasm/Cargo.toml +++ b/dex/pair-mock/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/pair/Cargo.toml b/dex/pair/Cargo.toml index 32c1fae21..e3e80088c 100644 --- a/dex/pair/Cargo.toml +++ b/dex/pair/Cargo.toml @@ -33,11 +33,11 @@ version = "0.10.1" default-features = false [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/pair/wasm-pair-full/Cargo.toml b/dex/pair/wasm-pair-full/Cargo.toml index b9e1841c2..5d2901b79 100644 --- a/dex/pair/wasm-pair-full/Cargo.toml +++ b/dex/pair/wasm-pair-full/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/pair/wasm-safe-price-view/Cargo.toml b/dex/pair/wasm-safe-price-view/Cargo.toml index be0fd8731..2c2f6556d 100644 --- a/dex/pair/wasm-safe-price-view/Cargo.toml +++ b/dex/pair/wasm-safe-price-view/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/pair/wasm/Cargo.toml b/dex/pair/wasm/Cargo.toml index 02438d6bc..b94221364 100644 --- a/dex/pair/wasm/Cargo.toml +++ b/dex/pair/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/price-discovery/Cargo.toml b/dex/price-discovery/Cargo.toml index d62a52636..043f18403 100644 --- a/dex/price-discovery/Cargo.toml +++ b/dex/price-discovery/Cargo.toml @@ -12,11 +12,11 @@ path = "src/lib.rs" hex-literal = "0.3.1" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dependencies.locking_module] path = "../../common/modules/locking_module" @@ -30,4 +30,4 @@ hex = "0.4" path = "../../locked-asset/simple-lock" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/price-discovery/wasm/Cargo.toml b/dex/price-discovery/wasm/Cargo.toml index 721537a54..70b97b365 100644 --- a/dex/price-discovery/wasm/Cargo.toml +++ b/dex/price-discovery/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/proxy-deployer/Cargo.toml b/dex/proxy-deployer/Cargo.toml index 85f723f1e..b9ed729a9 100644 --- a/dex/proxy-deployer/Cargo.toml +++ b/dex/proxy-deployer/Cargo.toml @@ -20,11 +20,11 @@ path = "../../common/modules/farm/config" path = "../../common/modules/farm/farm_token" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/proxy-deployer/wasm/Cargo.toml b/dex/proxy-deployer/wasm/Cargo.toml index 4cf22608e..76774d56a 100644 --- a/dex/proxy-deployer/wasm/Cargo.toml +++ b/dex/proxy-deployer/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/router/Cargo.toml b/dex/router/Cargo.toml index 401e90b89..bf147cedd 100644 --- a/dex/router/Cargo.toml +++ b/dex/router/Cargo.toml @@ -14,7 +14,7 @@ path = "../../common/modules/token_send" path = "../../common/modules/pausable" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.pair] @@ -26,4 +26,4 @@ path = "../../common/modules/locking_module" [dependencies.simple-lock] path = "../../locked-asset/simple-lock" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/dex/router/wasm/Cargo.toml b/dex/router/wasm/Cargo.toml index f2a456292..02a08c8a8 100644 --- a/dex/router/wasm/Cargo.toml +++ b/dex/router/wasm/Cargo.toml @@ -23,4 +23,4 @@ default-features = false path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/energy-integration/common-modules/energy-query/Cargo.toml b/energy-integration/common-modules/energy-query/Cargo.toml index e4a52097c..1a87d9b18 100644 --- a/energy-integration/common-modules/energy-query/Cargo.toml +++ b/energy-integration/common-modules/energy-query/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.energy-factory] diff --git a/energy-integration/common-modules/week-timekeeping/Cargo.toml b/energy-integration/common-modules/week-timekeeping/Cargo.toml index 805abb126..7ee59bf06 100644 --- a/energy-integration/common-modules/week-timekeeping/Cargo.toml +++ b/energy-integration/common-modules/week-timekeeping/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.common-types] diff --git a/energy-integration/common-modules/weekly-rewards-splitting/Cargo.toml b/energy-integration/common-modules/weekly-rewards-splitting/Cargo.toml index 4cc3bb2c3..f2bf32dfb 100644 --- a/energy-integration/common-modules/weekly-rewards-splitting/Cargo.toml +++ b/energy-integration/common-modules/weekly-rewards-splitting/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.energy-query] diff --git a/energy-integration/common-types/Cargo.toml b/energy-integration/common-types/Cargo.toml index 43fdc4687..abaa00aa4 100644 --- a/energy-integration/common-types/Cargo.toml +++ b/energy-integration/common-types/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] diff --git a/energy-integration/energy-factory-mock/Cargo.toml b/energy-integration/energy-factory-mock/Cargo.toml index 2268f1472..1333cfccf 100644 --- a/energy-integration/energy-factory-mock/Cargo.toml +++ b/energy-integration/energy-factory-mock/Cargo.toml @@ -11,7 +11,7 @@ path = "src/lib.rs" path = "../common-modules/energy-query" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/energy-integration/energy-factory-mock/wasm/Cargo.toml b/energy-integration/energy-factory-mock/wasm/Cargo.toml index ec16f4fae..14191c202 100644 --- a/energy-integration/energy-factory-mock/wasm/Cargo.toml +++ b/energy-integration/energy-factory-mock/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/energy-integration/energy-update/Cargo.toml b/energy-integration/energy-update/Cargo.toml index 09d479864..994ea2f20 100644 --- a/energy-integration/energy-update/Cargo.toml +++ b/energy-integration/energy-update/Cargo.toml @@ -8,11 +8,11 @@ publish = false [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dependencies.farm] path = "../../dex/farm" @@ -24,4 +24,4 @@ path = "../common-modules/weekly-rewards-splitting" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/energy-integration/energy-update/wasm/Cargo.toml b/energy-integration/energy-update/wasm/Cargo.toml index 5ccada06e..a9ee6ddde 100644 --- a/energy-integration/energy-update/wasm/Cargo.toml +++ b/energy-integration/energy-update/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/energy-integration/farm-boosted-yields/Cargo.toml b/energy-integration/farm-boosted-yields/Cargo.toml index 443883813..c8ee30757 100644 --- a/energy-integration/farm-boosted-yields/Cargo.toml +++ b/energy-integration/farm-boosted-yields/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.config] diff --git a/energy-integration/fees-collector/Cargo.toml b/energy-integration/fees-collector/Cargo.toml index 1c01cc70f..adde4d6a5 100644 --- a/energy-integration/fees-collector/Cargo.toml +++ b/energy-integration/fees-collector/Cargo.toml @@ -8,11 +8,11 @@ publish = false [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dependencies.energy-query] path = "../common-modules/energy-query" @@ -48,7 +48,7 @@ path = "../../common/common_errors" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.sc_whitelist_module] path = "../../common/modules/sc_whitelist_module" diff --git a/energy-integration/fees-collector/wasm/Cargo.toml b/energy-integration/fees-collector/wasm/Cargo.toml index 4c46ff2ee..5acfe555f 100644 --- a/energy-integration/fees-collector/wasm/Cargo.toml +++ b/energy-integration/fees-collector/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/energy-integration/governance-v2/Cargo.toml b/energy-integration/governance-v2/Cargo.toml index ab9768c6b..063b9dab9 100644 --- a/energy-integration/governance-v2/Cargo.toml +++ b/energy-integration/governance-v2/Cargo.toml @@ -11,7 +11,7 @@ path = "src/lib.rs" path = "../common-modules/energy-query" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.permissions_module] @@ -27,7 +27,7 @@ path = "../common-modules/weekly-rewards-splitting" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.energy-factory-mock] path = "../energy-factory-mock" diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index 4c4fe79fb..bdeba1326 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -267,13 +267,12 @@ pub trait GovernanceV2: // Burn remaining fees let remaining_fee = proposal.fee_payment.amount.clone() - refund_amount.clone(); - if remaining_fee != BigUint::zero() { - self.send().esdt_local_burn( - &proposal.fee_payment.token_identifier, - proposal.fee_payment.token_nonce, - &remaining_fee, - ); - } + self.send().esdt_non_zero_local_burn( + &proposal.fee_payment.token_identifier, + proposal.fee_payment.token_nonce, + &remaining_fee, + ); + // Mark this proposal that fee is withdrawn self.refund_proposal_fee(&proposal, &refund_amount); proposal.fee_withdrawn = true; diff --git a/energy-integration/governance-v2/wasm/Cargo.toml b/energy-integration/governance-v2/wasm/Cargo.toml index 767e42380..194776b0a 100644 --- a/energy-integration/governance-v2/wasm/Cargo.toml +++ b/energy-integration/governance-v2/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/farm-staking/farm-staking-proxy/Cargo.toml b/farm-staking/farm-staking-proxy/Cargo.toml index a9fba8db2..088edab13 100644 --- a/farm-staking/farm-staking-proxy/Cargo.toml +++ b/farm-staking/farm-staking-proxy/Cargo.toml @@ -12,11 +12,11 @@ path = "src/lib.rs" hex-literal = "0.3.1" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dependencies.farm] path = "../../dex/farm" @@ -61,7 +61,7 @@ path = "../../common/modules/sc_whitelist_module" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.farm_token] path = "../../common/modules/farm/farm_token" diff --git a/farm-staking/farm-staking-proxy/wasm/Cargo.toml b/farm-staking/farm-staking-proxy/wasm/Cargo.toml index 5e6c97a92..cf5c28357 100644 --- a/farm-staking/farm-staking-proxy/wasm/Cargo.toml +++ b/farm-staking/farm-staking-proxy/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/farm-staking/farm-staking/Cargo.toml b/farm-staking/farm-staking/Cargo.toml index 48523fc76..9884e34ce 100644 --- a/farm-staking/farm-staking/Cargo.toml +++ b/farm-staking/farm-staking/Cargo.toml @@ -77,14 +77,14 @@ path = "../../common/common_structs" path = "../../common/common_errors" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/farm-staking/farm-staking/wasm/Cargo.toml b/farm-staking/farm-staking/wasm/Cargo.toml index 8a48c1058..946b86b9b 100644 --- a/farm-staking/farm-staking/wasm/Cargo.toml +++ b/farm-staking/farm-staking/wasm/Cargo.toml @@ -23,4 +23,4 @@ default-features = false path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/farm-staking/metabonding-staking/Cargo.toml b/farm-staking/metabonding-staking/Cargo.toml index d618306bf..76fe4492e 100644 --- a/farm-staking/metabonding-staking/Cargo.toml +++ b/farm-staking/metabonding-staking/Cargo.toml @@ -8,11 +8,11 @@ publish = false [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dependencies.factory] path = "../../locked-asset/factory" @@ -21,7 +21,7 @@ path = "../../locked-asset/factory" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.common_structs] path = "../../common/common_structs" diff --git a/farm-staking/metabonding-staking/wasm/Cargo.toml b/farm-staking/metabonding-staking/wasm/Cargo.toml index f4fab82b3..3765823a6 100644 --- a/farm-staking/metabonding-staking/wasm/Cargo.toml +++ b/farm-staking/metabonding-staking/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/Cargo.toml b/locked-asset/Cargo.toml index 8c27ab608..c54180a85 100644 --- a/locked-asset/Cargo.toml +++ b/locked-asset/Cargo.toml @@ -4,7 +4,7 @@ version = "0.0.0" edition = "2021" publish = false [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.farm] @@ -49,7 +49,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/distribution/Cargo.toml b/locked-asset/distribution/Cargo.toml index f40090c14..56cc20ec2 100644 --- a/locked-asset/distribution/Cargo.toml +++ b/locked-asset/distribution/Cargo.toml @@ -13,7 +13,7 @@ path = "../../common/common_structs" path = "../factory" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/distribution/wasm/Cargo.toml b/locked-asset/distribution/wasm/Cargo.toml index bb3466e11..9be455a14 100644 --- a/locked-asset/distribution/wasm/Cargo.toml +++ b/locked-asset/distribution/wasm/Cargo.toml @@ -23,4 +23,4 @@ default-features = false path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/energy-factory/Cargo.toml b/locked-asset/energy-factory/Cargo.toml index a6aa2276f..0fa92855a 100644 --- a/locked-asset/energy-factory/Cargo.toml +++ b/locked-asset/energy-factory/Cargo.toml @@ -32,11 +32,11 @@ path = "../../common/traits/unwrappable" path = "../../common/modules/legacy_token_decode_module" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies] num-bigint = "0.4.2" @@ -44,4 +44,4 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/energy-factory/wasm/Cargo.toml b/locked-asset/energy-factory/wasm/Cargo.toml index 64c23e954..1ffbf327b 100644 --- a/locked-asset/energy-factory/wasm/Cargo.toml +++ b/locked-asset/energy-factory/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/factory/Cargo.toml b/locked-asset/factory/Cargo.toml index c353b9c9d..b0771ada1 100644 --- a/locked-asset/factory/Cargo.toml +++ b/locked-asset/factory/Cargo.toml @@ -26,11 +26,11 @@ path = "../../common/modules/token_merge_helper" path = "../energy-factory" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dependencies.arrayvec] version = "0.7.1" @@ -49,4 +49,4 @@ hex = "0.4" path = "../simple-lock" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/factory/wasm/Cargo.toml b/locked-asset/factory/wasm/Cargo.toml index 2d8adf3c9..591bb319a 100644 --- a/locked-asset/factory/wasm/Cargo.toml +++ b/locked-asset/factory/wasm/Cargo.toml @@ -23,4 +23,4 @@ default-features = false path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/lkmex-transfer/Cargo.toml b/locked-asset/lkmex-transfer/Cargo.toml index 05f05ce18..b7b076233 100644 --- a/locked-asset/lkmex-transfer/Cargo.toml +++ b/locked-asset/lkmex-transfer/Cargo.toml @@ -29,14 +29,14 @@ path = "../energy-factory" path = "../../energy-integration/common-modules/energy-query" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/lkmex-transfer/wasm/Cargo.toml b/locked-asset/lkmex-transfer/wasm/Cargo.toml index 7555038a6..7ca9c97ef 100644 --- a/locked-asset/lkmex-transfer/wasm/Cargo.toml +++ b/locked-asset/lkmex-transfer/wasm/Cargo.toml @@ -23,4 +23,4 @@ default-features = false path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/locked-token-wrapper/Cargo.toml b/locked-asset/locked-token-wrapper/Cargo.toml index 63c4884e1..576375026 100644 --- a/locked-asset/locked-token-wrapper/Cargo.toml +++ b/locked-asset/locked-token-wrapper/Cargo.toml @@ -8,10 +8,10 @@ publish = false [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dependencies.utils] path = "../../common/modules/utils" @@ -43,4 +43,4 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/locked-token-wrapper/wasm/Cargo.toml b/locked-asset/locked-token-wrapper/wasm/Cargo.toml index 198c12da9..31488c7c5 100644 --- a/locked-asset/locked-token-wrapper/wasm/Cargo.toml +++ b/locked-asset/locked-token-wrapper/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/proxy_dex/Cargo.toml b/locked-asset/proxy_dex/Cargo.toml index 1038cdffa..2bbeec0d2 100644 --- a/locked-asset/proxy_dex/Cargo.toml +++ b/locked-asset/proxy_dex/Cargo.toml @@ -44,11 +44,11 @@ path = "../../common/traits/mergeable" path = "../../common/traits/fixed-supply-token" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dependencies.energy-factory] path = "../energy-factory" @@ -65,7 +65,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.pausable] path = "../../common/modules/pausable" diff --git a/locked-asset/proxy_dex/wasm/Cargo.toml b/locked-asset/proxy_dex/wasm/Cargo.toml index 440f1a190..3ca1df49d 100644 --- a/locked-asset/proxy_dex/wasm/Cargo.toml +++ b/locked-asset/proxy_dex/wasm/Cargo.toml @@ -23,4 +23,4 @@ default-features = false path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/simple-lock-whitelist/Cargo.toml b/locked-asset/simple-lock-whitelist/Cargo.toml index e46c6f9d0..08671b883 100644 --- a/locked-asset/simple-lock-whitelist/Cargo.toml +++ b/locked-asset/simple-lock-whitelist/Cargo.toml @@ -14,11 +14,11 @@ path = "../simple-lock" path = "../../common/modules/utils" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies] num-bigint = "0.4.2" @@ -26,4 +26,4 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/simple-lock-whitelist/wasm/Cargo.toml b/locked-asset/simple-lock-whitelist/wasm/Cargo.toml index 638f49b8c..d89132156 100644 --- a/locked-asset/simple-lock-whitelist/wasm/Cargo.toml +++ b/locked-asset/simple-lock-whitelist/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/simple-lock/Cargo.toml b/locked-asset/simple-lock/Cargo.toml index ca79b9b58..771d60639 100644 --- a/locked-asset/simple-lock/Cargo.toml +++ b/locked-asset/simple-lock/Cargo.toml @@ -8,11 +8,11 @@ publish = false [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dependencies.common_structs] path = "../../common/common_structs" @@ -23,4 +23,4 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/simple-lock/wasm/Cargo.toml b/locked-asset/simple-lock/wasm/Cargo.toml index 952e46e5d..12f9cf76d 100644 --- a/locked-asset/simple-lock/wasm/Cargo.toml +++ b/locked-asset/simple-lock/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/token-unstake/Cargo.toml b/locked-asset/token-unstake/Cargo.toml index 303074c0d..95966aea4 100644 --- a/locked-asset/token-unstake/Cargo.toml +++ b/locked-asset/token-unstake/Cargo.toml @@ -8,7 +8,7 @@ publish = false [lib] path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.mergeable] @@ -38,7 +38,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" diff --git a/locked-asset/token-unstake/wasm/Cargo.toml b/locked-asset/token-unstake/wasm/Cargo.toml index 1c9a3a43d..494c44b70 100644 --- a/locked-asset/token-unstake/wasm/Cargo.toml +++ b/locked-asset/token-unstake/wasm/Cargo.toml @@ -23,4 +23,4 @@ default-features = false path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" diff --git a/pause-all/Cargo.toml b/pause-all/Cargo.toml index 182a8459d..538678894 100644 --- a/pause-all/Cargo.toml +++ b/pause-all/Cargo.toml @@ -11,13 +11,13 @@ path = "src/lib.rs" path = "../common/modules/pausable" [dependencies.multiversx-sc] -version = "=0.43.2" +version = "=0.43.3" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.multiversx-sc-scenario] -version = "=0.43.2" +version = "=0.43.3" [dev-dependencies.farm] path = "../dex/farm" diff --git a/pause-all/wasm/Cargo.toml b/pause-all/wasm/Cargo.toml index 5bf81326a..0b22beec3 100644 --- a/pause-all/wasm/Cargo.toml +++ b/pause-all/wasm/Cargo.toml @@ -22,4 +22,4 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.43.2" +version = "=0.43.3" From 03899ea59a38d97135a3cb1bb9fcae47062253f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Costin=20Caraba=C8=99?= Date: Fri, 8 Sep 2023 17:04:27 +0300 Subject: [PATCH 12/12] Framework update dependencies --- dex/farm-with-locked-rewards/wasm/Cargo.lock | 88 +++-------- dex/farm-with-locked-rewards/wasm/src/lib.rs | 133 +++++++++-------- dex/farm/wasm/Cargo.lock | 88 +++-------- dex/farm/wasm/src/lib.rs | 127 ++++++++-------- dex/governance/wasm/Cargo.lock | 84 ++--------- dex/governance/wasm/src/lib.rs | 50 ++++--- dex/pair-mock/wasm/Cargo.lock | 84 ++--------- dex/pair-mock/wasm/src/lib.rs | 12 +- dex/pair/wasm-pair-full/Cargo.lock | 88 +++-------- dex/pair/wasm-pair-full/src/lib.rs | 134 ++++++++--------- dex/pair/wasm-safe-price-view/Cargo.lock | 88 +++-------- dex/pair/wasm-safe-price-view/src/lib.rs | 27 ++-- dex/pair/wasm/Cargo.lock | 88 +++-------- dex/pair/wasm/src/lib.rs | 116 ++++++++------- dex/price-discovery/wasm/Cargo.lock | 88 +++-------- dex/price-discovery/wasm/src/lib.rs | 63 ++++---- dex/proxy-deployer/wasm/Cargo.lock | 88 +++-------- dex/proxy-deployer/wasm/src/lib.rs | 16 +- dex/router/wasm/Cargo.lock | 88 +++-------- dex/router/wasm/src/lib.rs | 74 +++++----- .../energy-factory-mock/wasm/Cargo.lock | 88 +++-------- .../energy-factory-mock/wasm/src/lib.rs | 16 +- .../energy-update/wasm/Cargo.lock | 88 +++-------- .../energy-update/wasm/src/lib.rs | 10 +- .../fees-collector/wasm/Cargo.lock | 88 +++-------- .../fees-collector/wasm/src/lib.rs | 78 +++++----- .../governance-v2/wasm/Cargo.lock | 112 ++++---------- .../governance-v2/wasm/src/lib.rs | 69 ++++----- .../farm-staking-proxy/wasm/Cargo.lock | 88 +++-------- .../farm-staking-proxy/wasm/src/lib.rs | 41 +++--- farm-staking/farm-staking/wasm/Cargo.lock | 88 +++-------- farm-staking/farm-staking/wasm/src/lib.rs | 137 +++++++++--------- .../metabonding-staking/wasm/Cargo.lock | 34 ++--- .../metabonding-staking/wasm/src/lib.rs | 28 ++-- locked-asset/distribution/wasm/Cargo.lock | 34 ++--- locked-asset/distribution/wasm/src/lib.rs | 38 ++--- locked-asset/energy-factory/wasm/Cargo.lock | 88 +++-------- locked-asset/energy-factory/wasm/src/lib.rs | 73 +++++----- locked-asset/factory/wasm/Cargo.lock | 34 ++--- locked-asset/factory/wasm/src/lib.rs | 57 ++++---- locked-asset/lkmex-transfer/wasm/Cargo.lock | 88 +++-------- locked-asset/lkmex-transfer/wasm/src/lib.rs | 30 ++-- .../locked-token-wrapper/wasm/Cargo.lock | 88 +++-------- .../locked-token-wrapper/wasm/src/lib.rs | 25 ++-- locked-asset/proxy_dex/wasm/Cargo.lock | 88 +++-------- locked-asset/proxy_dex/wasm/src/lib.rs | 59 ++++---- .../simple-lock-whitelist/wasm/Cargo.lock | 88 +++-------- .../simple-lock-whitelist/wasm/src/lib.rs | 57 ++++---- locked-asset/simple-lock/wasm/Cargo.lock | 88 +++-------- locked-asset/simple-lock/wasm/src/lib.rs | 47 +++--- locked-asset/token-unstake/wasm/Cargo.lock | 88 +++-------- locked-asset/token-unstake/wasm/src/lib.rs | 28 ++-- pause-all/wasm/Cargo.lock | 88 +++-------- pause-all/wasm/src/lib.rs | 22 +-- 54 files changed, 1308 insertions(+), 2489 deletions(-) diff --git a/dex/farm-with-locked-rewards/wasm/Cargo.lock b/dex/farm-with-locked-rewards/wasm/Cargo.lock index 83649b5f2..102fabc1d 100644 --- a/dex/farm-with-locked-rewards/wasm/Cargo.lock +++ b/dex/farm-with-locked-rewards/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -322,12 +316,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -344,12 +332,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" @@ -359,9 +341,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -373,20 +355,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -396,9 +377,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -409,21 +390,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -484,18 +464,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -605,18 +585,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -636,25 +604,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/dex/farm-with-locked-rewards/wasm/src/lib.rs b/dex/farm-with-locked-rewards/wasm/src/lib.rs index d4f9e0650..0daf55ccf 100644 --- a/dex/farm-with-locked-rewards/wasm/src/lib.rs +++ b/dex/farm-with-locked-rewards/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 64 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,68 +21,70 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { farm_with_locked_rewards ( - enterFarm - claimRewards - exitFarm - calculateRewardsForGivenPosition - mergeFarmTokens - startProduceRewards - endProduceRewards - setPerBlockRewardAmount - getRewardPerShare - getRewardReserve - getFarmingTokenId - getRewardTokenId - getPerBlockRewardAmount - getLastRewardBlockNonce - getDivisionSafetyConstant - setLockingScAddress - setLockEpochs - getLockingScAddress - getLockEpochs - registerFarmToken - getFarmTokenId - getFarmTokenSupply - addToPauseWhitelist - removeFromPauseWhitelist - pause - resume - getState - addAdmin - removeAdmin - updateOwnerOrAdmin - getPermissions - addSCAddressToWhitelist - removeSCAddressFromWhitelist - isSCAddressWhitelisted - set_penalty_percent - set_minimum_farming_epochs - set_burn_gas_limit - getPenaltyPercent - getMinimumFarmingEpoch - getBurnGasLimit - getPairContractManagedAddress - setBoostedYieldsRewardsPercentage - collectUndistributedBoostedRewards - getBoostedYieldsRewardsPercentage - getAccumulatedRewardsForWeek - getFarmSupplyForWeek - getRemainingBoostedRewardsToDistribute - getUndistributedBoostedRewards - setBoostedYieldsFactors - getBoostedYieldsFactors - getCurrentWeek - getFirstWeekStartEpoch - getLastActiveWeekForUser - getUserEnergyForWeek - getLastGlobalUpdateWeek - getTotalRewardsForWeek - getTotalEnergyForWeek - getTotalLockedTokensForWeek - updateEnergyForUser - getCurrentClaimProgress - setEnergyFactoryAddress - getEnergyFactoryAddress - callBack + init => init + enterFarm => enter_farm_endpoint + claimRewards => claim_rewards_endpoint + exitFarm => exit_farm_endpoint + calculateRewardsForGivenPosition => calculate_rewards_for_given_position + mergeFarmTokens => merge_farm_tokens_endpoint + startProduceRewards => start_produce_rewards_endpoint + endProduceRewards => end_produce_rewards_endpoint + setPerBlockRewardAmount => set_per_block_rewards_endpoint + getRewardPerShare => reward_per_share + getRewardReserve => reward_reserve + getFarmingTokenId => farming_token_id + getRewardTokenId => reward_token_id + getPerBlockRewardAmount => per_block_reward_amount + getLastRewardBlockNonce => last_reward_block_nonce + getDivisionSafetyConstant => division_safety_constant + setLockingScAddress => set_locking_sc_address + setLockEpochs => set_lock_epochs + getLockingScAddress => locking_sc_address + getLockEpochs => lock_epochs + registerFarmToken => register_farm_token + getFarmTokenId => farm_token + getFarmTokenSupply => farm_token_supply + addToPauseWhitelist => add_to_pause_whitelist + removeFromPauseWhitelist => remove_from_pause_whitelist + pause => pause + resume => resume + getState => state + addAdmin => add_admin_endpoint + removeAdmin => remove_admin_endpoint + updateOwnerOrAdmin => update_owner_or_admin_endpoint + getPermissions => permissions + addSCAddressToWhitelist => add_sc_address_to_whitelist + removeSCAddressFromWhitelist => remove_sc_address_from_whitelist + isSCAddressWhitelisted => is_sc_address_whitelisted + set_penalty_percent => set_penalty_percent + set_minimum_farming_epochs => set_minimum_farming_epochs + set_burn_gas_limit => set_burn_gas_limit + getPenaltyPercent => penalty_percent + getMinimumFarmingEpoch => minimum_farming_epochs + getBurnGasLimit => burn_gas_limit + getPairContractManagedAddress => pair_contract_address + setBoostedYieldsRewardsPercentage => set_boosted_yields_rewards_percentage + collectUndistributedBoostedRewards => collect_undistributed_boosted_rewards + getBoostedYieldsRewardsPercentage => boosted_yields_rewards_percentage + getAccumulatedRewardsForWeek => accumulated_rewards_for_week + getFarmSupplyForWeek => farm_supply_for_week + getRemainingBoostedRewardsToDistribute => remaining_boosted_rewards_to_distribute + getUndistributedBoostedRewards => undistributed_boosted_rewards + setBoostedYieldsFactors => set_boosted_yields_factors + getBoostedYieldsFactors => get_boosted_yields_factors + getCurrentWeek => get_current_week + getFirstWeekStartEpoch => first_week_start_epoch + getLastActiveWeekForUser => get_last_active_week_for_user_view + getUserEnergyForWeek => get_user_energy_for_week_view + getLastGlobalUpdateWeek => last_global_update_week + getTotalRewardsForWeek => total_rewards_for_week + getTotalEnergyForWeek => total_energy_for_week + getTotalLockedTokensForWeek => total_locked_tokens_for_week + updateEnergyForUser => update_energy_for_user + getCurrentClaimProgress => current_claim_progress + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address ) } + +multiversx_sc_wasm_adapter::async_callback! { farm_with_locked_rewards } diff --git a/dex/farm/wasm/Cargo.lock b/dex/farm/wasm/Cargo.lock index 97ea7e292..7e9a4a925 100644 --- a/dex/farm/wasm/Cargo.lock +++ b/dex/farm/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -292,12 +286,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -314,12 +302,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" @@ -329,9 +311,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -343,20 +325,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -366,9 +347,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -379,21 +360,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -454,18 +434,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -575,18 +555,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -606,25 +574,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/dex/farm/wasm/src/lib.rs b/dex/farm/wasm/src/lib.rs index 9ec1c0a1c..305f48092 100644 --- a/dex/farm/wasm/src/lib.rs +++ b/dex/farm/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 61 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,65 +21,67 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { farm ( - enterFarm - claimRewards - compoundRewards - exitFarm - calculateRewardsForGivenPosition - mergeFarmTokens - startProduceRewards - endProduceRewards - setPerBlockRewardAmount - getRewardPerShare - getRewardReserve - getFarmingTokenId - getRewardTokenId - getPerBlockRewardAmount - getLastRewardBlockNonce - getDivisionSafetyConstant - registerFarmToken - getFarmTokenId - getFarmTokenSupply - addToPauseWhitelist - removeFromPauseWhitelist - pause - resume - getState - addAdmin - removeAdmin - updateOwnerOrAdmin - getPermissions - addSCAddressToWhitelist - removeSCAddressFromWhitelist - isSCAddressWhitelisted - set_penalty_percent - set_minimum_farming_epochs - set_burn_gas_limit - getPenaltyPercent - getMinimumFarmingEpoch - getBurnGasLimit - getPairContractManagedAddress - setBoostedYieldsRewardsPercentage - collectUndistributedBoostedRewards - getBoostedYieldsRewardsPercentage - getAccumulatedRewardsForWeek - getFarmSupplyForWeek - getRemainingBoostedRewardsToDistribute - getUndistributedBoostedRewards - setBoostedYieldsFactors - getBoostedYieldsFactors - getCurrentWeek - getFirstWeekStartEpoch - getLastActiveWeekForUser - getUserEnergyForWeek - getLastGlobalUpdateWeek - getTotalRewardsForWeek - getTotalEnergyForWeek - getTotalLockedTokensForWeek - updateEnergyForUser - getCurrentClaimProgress - setEnergyFactoryAddress - getEnergyFactoryAddress - callBack + init => init + enterFarm => enter_farm_endpoint + claimRewards => claim_rewards_endpoint + compoundRewards => compound_rewards_endpoint + exitFarm => exit_farm_endpoint + calculateRewardsForGivenPosition => calculate_rewards_for_given_position + mergeFarmTokens => merge_farm_tokens_endpoint + startProduceRewards => start_produce_rewards_endpoint + endProduceRewards => end_produce_rewards_endpoint + setPerBlockRewardAmount => set_per_block_rewards_endpoint + getRewardPerShare => reward_per_share + getRewardReserve => reward_reserve + getFarmingTokenId => farming_token_id + getRewardTokenId => reward_token_id + getPerBlockRewardAmount => per_block_reward_amount + getLastRewardBlockNonce => last_reward_block_nonce + getDivisionSafetyConstant => division_safety_constant + registerFarmToken => register_farm_token + getFarmTokenId => farm_token + getFarmTokenSupply => farm_token_supply + addToPauseWhitelist => add_to_pause_whitelist + removeFromPauseWhitelist => remove_from_pause_whitelist + pause => pause + resume => resume + getState => state + addAdmin => add_admin_endpoint + removeAdmin => remove_admin_endpoint + updateOwnerOrAdmin => update_owner_or_admin_endpoint + getPermissions => permissions + addSCAddressToWhitelist => add_sc_address_to_whitelist + removeSCAddressFromWhitelist => remove_sc_address_from_whitelist + isSCAddressWhitelisted => is_sc_address_whitelisted + set_penalty_percent => set_penalty_percent + set_minimum_farming_epochs => set_minimum_farming_epochs + set_burn_gas_limit => set_burn_gas_limit + getPenaltyPercent => penalty_percent + getMinimumFarmingEpoch => minimum_farming_epochs + getBurnGasLimit => burn_gas_limit + getPairContractManagedAddress => pair_contract_address + setBoostedYieldsRewardsPercentage => set_boosted_yields_rewards_percentage + collectUndistributedBoostedRewards => collect_undistributed_boosted_rewards + getBoostedYieldsRewardsPercentage => boosted_yields_rewards_percentage + getAccumulatedRewardsForWeek => accumulated_rewards_for_week + getFarmSupplyForWeek => farm_supply_for_week + getRemainingBoostedRewardsToDistribute => remaining_boosted_rewards_to_distribute + getUndistributedBoostedRewards => undistributed_boosted_rewards + setBoostedYieldsFactors => set_boosted_yields_factors + getBoostedYieldsFactors => get_boosted_yields_factors + getCurrentWeek => get_current_week + getFirstWeekStartEpoch => first_week_start_epoch + getLastActiveWeekForUser => get_last_active_week_for_user_view + getUserEnergyForWeek => get_user_energy_for_week_view + getLastGlobalUpdateWeek => last_global_update_week + getTotalRewardsForWeek => total_rewards_for_week + getTotalEnergyForWeek => total_energy_for_week + getTotalLockedTokensForWeek => total_locked_tokens_for_week + updateEnergyForUser => update_energy_for_user + getCurrentClaimProgress => current_claim_progress + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address ) } + +multiversx_sc_wasm_adapter::async_callback! { farm } diff --git a/dex/governance/wasm/Cargo.lock b/dex/governance/wasm/Cargo.lock index ebe14cc18..80da9733b 100644 --- a/dex/governance/wasm/Cargo.lock +++ b/dex/governance/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -85,23 +79,11 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -113,20 +95,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -136,9 +117,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -149,12 +130,11 @@ dependencies = [ [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -183,18 +163,18 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -237,37 +217,3 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "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/dex/governance/wasm/src/lib.rs b/dex/governance/wasm/src/lib.rs index bfedec764..3e106b05e 100644 --- a/dex/governance/wasm/src/lib.rs +++ b/dex/governance/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 23 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,28 +21,29 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { governance ( - propose - upvote - downvote - execute - redeem - changeQuorum - changeMinTokenBalanceForProposing - changeVotingDelayInBlocks - changeVotingPeriodInBlocks - changeGovernanceTokenIds - changePriceProviders - getGovernanceTokenId - getQuorum - getMinWeightForProposal - getVotingDelayInBlocks - getVotingPeriodInBlocks - getProposal - getProposalIdCounter - getVoteNFTId - getMexTokenId - getProposalStatus + init => init + propose => propose + upvote => upvote + downvote => downvote + execute => execute + redeem => redeem + changeQuorum => change_quorum + changeMinTokenBalanceForProposing => change_min_weight_for_proposal + changeVotingDelayInBlocks => change_voting_delay_in_blocks + changeVotingPeriodInBlocks => change_voting_period_in_blocks + changeGovernanceTokenIds => change_governance_token_ids + changePriceProviders => change_price_providers + getGovernanceTokenId => governance_token_ids + getQuorum => quorum + getMinWeightForProposal => min_weight_for_proposal + getVotingDelayInBlocks => voting_delay_in_blocks + getVotingPeriodInBlocks => voting_period_in_blocks + getProposal => proposal + getProposalIdCounter => proposal_id_counter + getVoteNFTId => vote_nft_id + getMexTokenId => mex_token_id + getProposalStatus => get_proposal_status_view ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/dex/pair-mock/wasm/Cargo.lock b/dex/pair-mock/wasm/Cargo.lock index fdfb68d12..e813b5155 100644 --- a/dex/pair-mock/wasm/Cargo.lock +++ b/dex/pair-mock/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -92,23 +86,11 @@ dependencies = [ "either", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -120,20 +102,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -143,9 +124,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -156,12 +137,11 @@ dependencies = [ [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -207,18 +187,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -261,37 +241,3 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "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/dex/pair-mock/wasm/src/lib.rs b/dex/pair-mock/wasm/src/lib.rs index 0634dae52..77325383a 100644 --- a/dex/pair-mock/wasm/src/lib.rs +++ b/dex/pair-mock/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 4 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,9 +21,10 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { pair_mock ( - addInitialLiquidity - updateAndGetTokensForGivenPositionWithSafePrice + init => init + addInitialLiquidity => add_initial_liquidity + getTokensForGivenPositionWithSafePrice => get_tokens_for_given_position_with_safe_price ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/dex/pair/wasm-pair-full/Cargo.lock b/dex/pair/wasm-pair-full/Cargo.lock index 9077209cd..75cf862d4 100644 --- a/dex/pair/wasm-pair-full/Cargo.lock +++ b/dex/pair/wasm-pair-full/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -168,12 +162,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - [[package]] name = "locking_module" version = "0.0.0" @@ -190,12 +178,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" @@ -205,9 +187,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -219,20 +201,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -242,9 +223,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -255,21 +236,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -338,18 +318,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.27" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -436,18 +416,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -467,25 +435,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/dex/pair/wasm-pair-full/src/lib.rs b/dex/pair/wasm-pair-full/src/lib.rs index 30efb71cb..9c6650e16 100644 --- a/dex/pair/wasm-pair-full/src/lib.rs +++ b/dex/pair/wasm-pair-full/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 65 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,70 +21,71 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { pair ( - addInitialLiquidity - addLiquidity - removeLiquidity - removeLiquidityAndBuyBackAndBurnToken - swapNoFeeAndForward - swapTokensFixedInput - swapTokensFixedOutput - setLpTokenIdentifier - getTokensForGivenPosition - getReservesAndTotalSupply - getAmountOut - getAmountIn - getEquivalent - getFeeState - whitelist - removeWhitelist - addTrustedSwapPair - removeTrustedSwapPair - setupFeesCollector - setFeeOn - getFeeDestinations - getTrustedSwapPairs - getWhitelistedManagedAddresses - getFeesCollectorAddress - getFeesCollectorCutPercentage - setStateActiveNoSwaps - setFeePercents - getLpTokenIdentifier - getTotalFeePercent - getSpecialFee - getRouterManagedAddress - getFirstTokenId - getSecondTokenId - getTotalSupply - getInitialLiquidtyAdder - getReserve - getSafePriceCurrentIndex - updateAndGetTokensForGivenPositionWithSafePrice - updateAndGetSafePrice - setLockingDeadlineEpoch - setLockingScAddress - setUnlockEpoch - getLockingScAddress - getUnlockEpoch - getLockingDeadlineEpoch - addAdmin - removeAdmin - updateOwnerOrAdmin - getPermissions - addToPauseWhitelist - removeFromPauseWhitelist - pause - resume - getState - getLpTokensSafePriceByDefaultOffset - getLpTokensSafePriceByRoundOffset - getLpTokensSafePriceByTimestampOffset - getLpTokensSafePrice - getSafePriceByDefaultOffset - getSafePriceByRoundOffset - getSafePriceByTimestampOffset - getSafePrice - getPriceObservation + init => init + addInitialLiquidity => add_initial_liquidity + addLiquidity => add_liquidity + removeLiquidity => remove_liquidity + removeLiquidityAndBuyBackAndBurnToken => remove_liquidity_and_burn_token + swapNoFeeAndForward => swap_no_fee + swapTokensFixedInput => swap_tokens_fixed_input + swapTokensFixedOutput => swap_tokens_fixed_output + setLpTokenIdentifier => set_lp_token_identifier + getTokensForGivenPosition => get_tokens_for_given_position + getReservesAndTotalSupply => get_reserves_and_total_supply + getAmountOut => get_amount_out_view + getAmountIn => get_amount_in_view + getEquivalent => get_equivalent + getFeeState => is_fee_enabled + whitelist => whitelist_endpoint + removeWhitelist => remove_whitelist + addTrustedSwapPair => add_trusted_swap_pair + removeTrustedSwapPair => remove_trusted_swap_pair + setupFeesCollector => setup_fees_collector + setFeeOn => set_fee_on + getFeeDestinations => get_fee_destinations + getTrustedSwapPairs => get_trusted_swap_pairs + getWhitelistedManagedAddresses => get_whitelisted_managed_addresses + getFeesCollectorAddress => fees_collector_address + getFeesCollectorCutPercentage => fees_collector_cut_percentage + setStateActiveNoSwaps => set_state_active_no_swaps + setFeePercents => set_fee_percent + getLpTokenIdentifier => get_lp_token_identifier + getTotalFeePercent => total_fee_percent + getSpecialFee => special_fee_percent + getRouterManagedAddress => router_address + getFirstTokenId => first_token_id + getSecondTokenId => second_token_id + getTotalSupply => lp_token_supply + getInitialLiquidtyAdder => initial_liquidity_adder + getReserve => pair_reserve + getSafePriceCurrentIndex => safe_price_current_index + updateAndGetTokensForGivenPositionWithSafePrice => update_and_get_tokens_for_given_position_with_safe_price + updateAndGetSafePrice => update_and_get_safe_price + setLockingDeadlineEpoch => set_locking_deadline_epoch + setLockingScAddress => set_locking_sc_address + setUnlockEpoch => set_unlock_epoch + getLockingScAddress => locking_sc_address + getUnlockEpoch => unlock_epoch + getLockingDeadlineEpoch => locking_deadline_epoch + addAdmin => add_admin_endpoint + removeAdmin => remove_admin_endpoint + updateOwnerOrAdmin => update_owner_or_admin_endpoint + getPermissions => permissions + addToPauseWhitelist => add_to_pause_whitelist + removeFromPauseWhitelist => remove_from_pause_whitelist + pause => pause + resume => resume + getState => state + getLpTokensSafePriceByDefaultOffset => get_lp_tokens_safe_price_by_default_offset + getLpTokensSafePriceByRoundOffset => get_lp_tokens_safe_price_by_round_offset + getLpTokensSafePriceByTimestampOffset => get_lp_tokens_safe_price_by_timestamp_offset + getLpTokensSafePrice => get_lp_tokens_safe_price + getSafePriceByDefaultOffset => get_safe_price_by_default_offset + getSafePriceByRoundOffset => get_safe_price_by_round_offset + getSafePriceByTimestampOffset => get_safe_price_by_timestamp_offset + getSafePrice => get_safe_price + getPriceObservation => get_price_observation_view ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/dex/pair/wasm-safe-price-view/Cargo.lock b/dex/pair/wasm-safe-price-view/Cargo.lock index c8995accb..b2afa0021 100644 --- a/dex/pair/wasm-safe-price-view/Cargo.lock +++ b/dex/pair/wasm-safe-price-view/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -168,12 +162,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.144" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" - [[package]] name = "locking_module" version = "0.0.0" @@ -190,12 +178,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" @@ -205,9 +187,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -219,20 +201,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -242,9 +223,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -255,21 +236,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -330,18 +310,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.27" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -436,18 +416,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -467,25 +435,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/dex/pair/wasm-safe-price-view/src/lib.rs b/dex/pair/wasm-safe-price-view/src/lib.rs index a41f72fd1..c5f78382f 100644 --- a/dex/pair/wasm-safe-price-view/src/lib.rs +++ b/dex/pair/wasm-safe-price-view/src/lib.rs @@ -10,24 +10,29 @@ // Total number of exported functions: 11 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); +multiversx_sc_wasm_adapter::external_view_init! {} + multiversx_sc_wasm_adapter::external_view_endpoints! { pair ( - getLpTokensSafePriceByDefaultOffset - getLpTokensSafePriceByRoundOffset - getLpTokensSafePriceByTimestampOffset - getLpTokensSafePrice - getSafePriceByDefaultOffset - getSafePriceByRoundOffset - getSafePriceByTimestampOffset - getSafePrice - getPriceObservation + getLpTokensSafePriceByDefaultOffset => get_lp_tokens_safe_price_by_default_offset + getLpTokensSafePriceByRoundOffset => get_lp_tokens_safe_price_by_round_offset + getLpTokensSafePriceByTimestampOffset => get_lp_tokens_safe_price_by_timestamp_offset + getLpTokensSafePrice => get_lp_tokens_safe_price + getSafePriceByDefaultOffset => get_safe_price_by_default_offset + getSafePriceByRoundOffset => get_safe_price_by_round_offset + getSafePriceByTimestampOffset => get_safe_price_by_timestamp_offset + getSafePrice => get_safe_price + getPriceObservation => get_price_observation_view ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/dex/pair/wasm/Cargo.lock b/dex/pair/wasm/Cargo.lock index a2f6f1a44..9c045aa1d 100644 --- a/dex/pair/wasm/Cargo.lock +++ b/dex/pair/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -168,12 +162,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -190,12 +178,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" @@ -205,9 +187,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -219,20 +201,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -242,9 +223,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -255,21 +236,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -338,18 +318,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -436,18 +416,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -467,25 +435,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/dex/pair/wasm/src/lib.rs b/dex/pair/wasm/src/lib.rs index d692b1d2b..9f65c8a35 100644 --- a/dex/pair/wasm/src/lib.rs +++ b/dex/pair/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 56 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,61 +21,62 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { pair ( - addInitialLiquidity - addLiquidity - removeLiquidity - removeLiquidityAndBuyBackAndBurnToken - swapNoFeeAndForward - swapTokensFixedInput - swapTokensFixedOutput - setLpTokenIdentifier - getTokensForGivenPosition - getReservesAndTotalSupply - getAmountOut - getAmountIn - getEquivalent - getFeeState - whitelist - removeWhitelist - addTrustedSwapPair - removeTrustedSwapPair - setupFeesCollector - setFeeOn - getFeeDestinations - getTrustedSwapPairs - getWhitelistedManagedAddresses - getFeesCollectorAddress - getFeesCollectorCutPercentage - setStateActiveNoSwaps - setFeePercents - getLpTokenIdentifier - getTotalFeePercent - getSpecialFee - getRouterManagedAddress - getFirstTokenId - getSecondTokenId - getTotalSupply - getInitialLiquidtyAdder - getReserve - getSafePriceCurrentIndex - updateAndGetTokensForGivenPositionWithSafePrice - updateAndGetSafePrice - setLockingDeadlineEpoch - setLockingScAddress - setUnlockEpoch - getLockingScAddress - getUnlockEpoch - getLockingDeadlineEpoch - addAdmin - removeAdmin - updateOwnerOrAdmin - getPermissions - addToPauseWhitelist - removeFromPauseWhitelist - pause - resume - getState + init => init + addInitialLiquidity => add_initial_liquidity + addLiquidity => add_liquidity + removeLiquidity => remove_liquidity + removeLiquidityAndBuyBackAndBurnToken => remove_liquidity_and_burn_token + swapNoFeeAndForward => swap_no_fee + swapTokensFixedInput => swap_tokens_fixed_input + swapTokensFixedOutput => swap_tokens_fixed_output + setLpTokenIdentifier => set_lp_token_identifier + getTokensForGivenPosition => get_tokens_for_given_position + getReservesAndTotalSupply => get_reserves_and_total_supply + getAmountOut => get_amount_out_view + getAmountIn => get_amount_in_view + getEquivalent => get_equivalent + getFeeState => is_fee_enabled + whitelist => whitelist_endpoint + removeWhitelist => remove_whitelist + addTrustedSwapPair => add_trusted_swap_pair + removeTrustedSwapPair => remove_trusted_swap_pair + setupFeesCollector => setup_fees_collector + setFeeOn => set_fee_on + getFeeDestinations => get_fee_destinations + getTrustedSwapPairs => get_trusted_swap_pairs + getWhitelistedManagedAddresses => get_whitelisted_managed_addresses + getFeesCollectorAddress => fees_collector_address + getFeesCollectorCutPercentage => fees_collector_cut_percentage + setStateActiveNoSwaps => set_state_active_no_swaps + setFeePercents => set_fee_percent + getLpTokenIdentifier => get_lp_token_identifier + getTotalFeePercent => total_fee_percent + getSpecialFee => special_fee_percent + getRouterManagedAddress => router_address + getFirstTokenId => first_token_id + getSecondTokenId => second_token_id + getTotalSupply => lp_token_supply + getInitialLiquidtyAdder => initial_liquidity_adder + getReserve => pair_reserve + getSafePriceCurrentIndex => safe_price_current_index + updateAndGetTokensForGivenPositionWithSafePrice => update_and_get_tokens_for_given_position_with_safe_price + updateAndGetSafePrice => update_and_get_safe_price + setLockingDeadlineEpoch => set_locking_deadline_epoch + setLockingScAddress => set_locking_sc_address + setUnlockEpoch => set_unlock_epoch + getLockingScAddress => locking_sc_address + getUnlockEpoch => unlock_epoch + getLockingDeadlineEpoch => locking_deadline_epoch + addAdmin => add_admin_endpoint + removeAdmin => remove_admin_endpoint + updateOwnerOrAdmin => update_owner_or_admin_endpoint + getPermissions => permissions + addToPauseWhitelist => add_to_pause_whitelist + removeFromPauseWhitelist => remove_from_pause_whitelist + pause => pause + resume => resume + getState => state ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/dex/price-discovery/wasm/Cargo.lock b/dex/price-discovery/wasm/Cargo.lock index 7e6dc4c5b..71637c4d0 100644 --- a/dex/price-discovery/wasm/Cargo.lock +++ b/dex/price-discovery/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -120,12 +114,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -142,12 +130,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" @@ -157,9 +139,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -171,20 +153,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -194,9 +175,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -207,21 +188,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -268,18 +248,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -356,37 +336,3 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "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/dex/price-discovery/wasm/src/lib.rs b/dex/price-discovery/wasm/src/lib.rs index 7c227533c..0a3ed110d 100644 --- a/dex/price-discovery/wasm/src/lib.rs +++ b/dex/price-discovery/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 29 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,33 +21,35 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { price_discovery ( - deposit - withdraw - redeem - getCurrentPrice - getMinLaunchedTokenPrice - getPricePrecision - getLaunchedTokenId - getAcceptedTokenId - getLaunchedTokenBalance - getAcceptedTokenBalance - getStartBlock - getEndBlock - setLockingScAddress - setUnlockEpoch - getLockingScAddress - getUnlockEpoch - getCurrentPhase - getNoLimitPhaseDurationBlocks - getLinearPenaltyPhaseDurationBlocks - getFixedPenaltyPhaseDurationBlocks - getPenaltyMinPercentage - getPenaltyMaxPercentage - getFixedPenaltyPercentage - issueRedeemToken - createInitialRedeemTokens - getRedeemTokenId - getRedeemTokenTotalCirculatingSupply - callBack + init => init + deposit => deposit + withdraw => withdraw + redeem => redeem + getCurrentPrice => calculate_price + getMinLaunchedTokenPrice => min_launched_token_price + getPricePrecision => price_precision + getLaunchedTokenId => launched_token_id + getAcceptedTokenId => accepted_token_id + getLaunchedTokenBalance => launched_token_balance + getAcceptedTokenBalance => accepted_token_balance + getStartBlock => start_block + getEndBlock => end_block + setLockingScAddress => set_locking_sc_address + setUnlockEpoch => set_unlock_epoch + getLockingScAddress => locking_sc_address + getUnlockEpoch => unlock_epoch + getCurrentPhase => get_current_phase + 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 + issueRedeemToken => issue_redeem_token + createInitialRedeemTokens => create_initial_redeem_tokens + getRedeemTokenId => redeem_token + getRedeemTokenTotalCirculatingSupply => redeem_token_total_circulating_supply ) } + +multiversx_sc_wasm_adapter::async_callback! { price_discovery } diff --git a/dex/proxy-deployer/wasm/Cargo.lock b/dex/proxy-deployer/wasm/Cargo.lock index 3d762a9be..26a4d02fc 100644 --- a/dex/proxy-deployer/wasm/Cargo.lock +++ b/dex/proxy-deployer/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -284,12 +278,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -306,12 +294,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" @@ -321,9 +303,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -335,20 +317,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -358,9 +339,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -371,21 +352,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -446,9 +426,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -474,9 +454,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -586,18 +566,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -617,25 +585,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/dex/proxy-deployer/wasm/src/lib.rs b/dex/proxy-deployer/wasm/src/lib.rs index bdf618263..b8d5311f2 100644 --- a/dex/proxy-deployer/wasm/src/lib.rs +++ b/dex/proxy-deployer/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 6 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,11 +21,12 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { proxy_deployer ( - deployFarm - callFarmEndpoint - getAllDeployedFarms - getDeployerFarmAddresses + init => init + deployFarm => deploy_farm + callFarmEndpoint => call_farm_endpoint + getAllDeployedFarms => get_all_deployed_farms + getDeployerFarmAddresses => deployer_farm_addresses ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/dex/router/wasm/Cargo.lock b/dex/router/wasm/Cargo.lock index 6746dd43d..22954b04d 100644 --- a/dex/router/wasm/Cargo.lock +++ b/dex/router/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -168,12 +162,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -190,12 +178,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" @@ -205,9 +187,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -219,20 +201,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -242,9 +223,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -255,21 +236,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -330,18 +310,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -448,18 +428,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -479,25 +447,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/dex/router/wasm/src/lib.rs b/dex/router/wasm/src/lib.rs index 28609e0ab..a33c1a146 100644 --- a/dex/router/wasm/src/lib.rs +++ b/dex/router/wasm/src/lib.rs @@ -5,12 +5,15 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 30 +// Endpoints: 31 // Async Callback: 1 -// Total number of exported functions: 32 +// Total number of exported functions: 33 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,36 +21,39 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { router ( - pause - resume - createPair - upgradePair - issueLpToken - setLocalRoles - setLocalRolesOwner - removePair - setFeeOn - setFeeOff - setPairCreationEnabled - getPairCreationEnabled - getState - getOwner - getAllPairsManagedAddresses - getAllPairTokens - getAllPairContractMetadata - getPair - clearPairTemporaryOwnerStorage - setTemporaryOwnerPeriod - setPairTemplateAddress - getPairTemplateAddress - getTemporaryOwnerPeriod - multiPairSwap - configEnableByUserParameters - addCommonTokensForUserPairs - removeCommonTokensForUserPairs - setSwapEnabledByUser - getEnableSwapByUserConfig - getCommonTokensForUserPairs - callBack + init => init + pause => pause + resume => resume + createPair => create_pair_endpoint + upgradePair => upgrade_pair_endpoint + issueLpToken => issue_lp_token + setLocalRoles => set_local_roles + setLocalRolesOwner => set_local_roles_owner + removePair => remove_pair + setFeeOn => set_fee_on + setFeeOff => set_fee_off + setPairCreationEnabled => set_pair_creation_enabled + migratePairMap => migrate_pair_map + getPairCreationEnabled => pair_creation_enabled + getState => state + getOwner => owner + getAllPairsManagedAddresses => get_all_pairs_addresses + getAllPairTokens => get_all_token_pairs + getAllPairContractMetadata => get_all_pair_contract_metadata + getPair => get_pair + clearPairTemporaryOwnerStorage => clear_pair_temporary_owner_storage + setTemporaryOwnerPeriod => set_temporary_owner_period + setPairTemplateAddress => set_pair_template_address + getPairTemplateAddress => pair_template_address + getTemporaryOwnerPeriod => temporary_owner_period + multiPairSwap => multi_pair_swap + configEnableByUserParameters => config_enable_by_user_parameters + addCommonTokensForUserPairs => add_common_tokens_for_user_pairs + removeCommonTokensForUserPairs => remove_common_tokens_for_user_pairs + setSwapEnabledByUser => set_swap_enabled_by_user + getEnableSwapByUserConfig => try_get_config + getCommonTokensForUserPairs => common_tokens_for_user_pairs ) } + +multiversx_sc_wasm_adapter::async_callback! { router } diff --git a/energy-integration/energy-factory-mock/wasm/Cargo.lock b/energy-integration/energy-factory-mock/wasm/Cargo.lock index 1b1924b82..f3ebd3fc5 100644 --- a/energy-integration/energy-factory-mock/wasm/Cargo.lock +++ b/energy-integration/energy-factory-mock/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -144,12 +138,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "math" version = "0.0.0" @@ -157,12 +145,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" @@ -172,9 +154,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -186,20 +168,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -209,9 +190,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -222,21 +203,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -265,18 +245,18 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -353,37 +333,3 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "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/energy-integration/energy-factory-mock/wasm/src/lib.rs b/energy-integration/energy-factory-mock/wasm/src/lib.rs index bfa562d58..89a4cb257 100644 --- a/energy-integration/energy-factory-mock/wasm/src/lib.rs +++ b/energy-integration/energy-factory-mock/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 6 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,11 +21,12 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { energy_factory_mock ( - setUserEnergy - getEnergyAmountForUser - getEnergyEntryForUser - setUserEnergyAfterLockedTokenTransfer + init => init + setUserEnergy => set_user_energy + getEnergyAmountForUser => get_energy_amount_for_user + getEnergyEntryForUser => get_energy_entry_for_user + setUserEnergyAfterLockedTokenTransfer => set_user_energy_after_locked_token_transfer ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/energy-integration/energy-update/wasm/Cargo.lock b/energy-integration/energy-update/wasm/Cargo.lock index 5173db1ce..6b131311e 100644 --- a/energy-integration/energy-update/wasm/Cargo.lock +++ b/energy-integration/energy-update/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -302,12 +296,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -324,12 +312,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" @@ -339,9 +321,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -353,20 +335,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -376,9 +357,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -389,21 +370,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -464,18 +444,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -585,18 +565,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -616,25 +584,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/energy-integration/energy-update/wasm/src/lib.rs b/energy-integration/energy-update/wasm/src/lib.rs index 9ddd60e4c..18eb3df45 100644 --- a/energy-integration/energy-update/wasm/src/lib.rs +++ b/energy-integration/energy-update/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 3 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,8 +21,9 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { energy_update ( - updateFarmsEnergyForUser + init => init + updateFarmsEnergyForUser => update_farms_energy_for_user ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/energy-integration/fees-collector/wasm/Cargo.lock b/energy-integration/fees-collector/wasm/Cargo.lock index 601610441..0c9a34eaf 100644 --- a/energy-integration/fees-collector/wasm/Cargo.lock +++ b/energy-integration/fees-collector/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -161,12 +155,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -183,12 +171,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" @@ -198,9 +180,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -212,20 +194,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -235,9 +216,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -248,21 +229,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -291,18 +271,18 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -380,18 +360,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -411,25 +379,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/energy-integration/fees-collector/wasm/src/lib.rs b/energy-integration/fees-collector/wasm/src/lib.rs index 74fbfdf40..ee768b13f 100644 --- a/energy-integration/fees-collector/wasm/src/lib.rs +++ b/energy-integration/fees-collector/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 37 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,42 +21,43 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { fees_collector ( - claimRewards - addKnownContracts - removeKnownContracts - addKnownTokens - removeKnownTokens - getLockedTokenId - getAllTokens - getAllKnownContracts - getLastActiveWeekForUser - getUserEnergyForWeek - getLastGlobalUpdateWeek - getTotalRewardsForWeek - getTotalEnergyForWeek - getTotalLockedTokensForWeek - updateEnergyForUser - getCurrentClaimProgress - depositSwapFees - getAccumulatedFees - setLockedTokensPerBlock - getLastLockedTokensAddWeek - getLockedTokensPerBlock - setLockingScAddress - setLockEpochs - getLockingScAddress - getLockEpochs - setEnergyFactoryAddress - getEnergyFactoryAddress - getCurrentWeek - getFirstWeekStartEpoch - pause - unpause - isPaused - addSCAddressToWhitelist - removeSCAddressFromWhitelist - isSCAddressWhitelisted + init => init + claimRewards => claim_rewards + addKnownContracts => add_known_contracts + removeKnownContracts => remove_known_contracts + addKnownTokens => add_known_tokens + removeKnownTokens => remove_known_tokens + getLockedTokenId => locked_token_id + getAllTokens => get_all_tokens + getAllKnownContracts => known_contracts + getLastActiveWeekForUser => get_last_active_week_for_user_view + getUserEnergyForWeek => get_user_energy_for_week_view + getLastGlobalUpdateWeek => last_global_update_week + getTotalRewardsForWeek => total_rewards_for_week + getTotalEnergyForWeek => total_energy_for_week + getTotalLockedTokensForWeek => total_locked_tokens_for_week + updateEnergyForUser => update_energy_for_user + getCurrentClaimProgress => current_claim_progress + depositSwapFees => deposit_swap_fees + getAccumulatedFees => accumulated_fees + setLockedTokensPerBlock => set_locked_tokens_per_block + getLastLockedTokensAddWeek => last_locked_token_add_week + getLockedTokensPerBlock => locked_tokens_per_block + setLockingScAddress => set_locking_sc_address + setLockEpochs => set_lock_epochs + getLockingScAddress => locking_sc_address + getLockEpochs => lock_epochs + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address + getCurrentWeek => get_current_week + getFirstWeekStartEpoch => first_week_start_epoch + pause => pause_endpoint + unpause => unpause_endpoint + isPaused => paused_status + addSCAddressToWhitelist => add_sc_address_to_whitelist + removeSCAddressFromWhitelist => remove_sc_address_from_whitelist + isSCAddressWhitelisted => is_sc_address_whitelisted ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/energy-integration/governance-v2/wasm/Cargo.lock b/energy-integration/governance-v2/wasm/Cargo.lock index 40bcf7baa..f214936de 100644 --- a/energy-integration/governance-v2/wasm/Cargo.lock +++ b/energy-integration/governance-v2/wasm/Cargo.lock @@ -8,16 +8,16 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "autocfg" @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -172,12 +166,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -194,12 +182,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" @@ -209,9 +191,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -223,20 +205,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -246,9 +227,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -259,21 +240,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -287,18 +267,18 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] [[package]] name = "once_cell" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "permissions_module" @@ -311,18 +291,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -356,15 +336,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -373,9 +353,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unwrappable" @@ -400,18 +380,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -431,25 +399,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/energy-integration/governance-v2/wasm/src/lib.rs b/energy-integration/governance-v2/wasm/src/lib.rs index 5115397b6..7b63bb856 100644 --- a/energy-integration/governance-v2/wasm/src/lib.rs +++ b/energy-integration/governance-v2/wasm/src/lib.rs @@ -5,12 +5,15 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 29 +// Endpoints: 28 // Async Callback (empty): 1 -// Total number of exported functions: 31 +// Total number of exported functions: 30 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,36 +21,36 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { governance_v2 ( - propose - vote - cancel - withdrawDeposit - changeMinEnergyForProposal - changeMinFeeForProposal - changeQuorumPercentage - changeVotingDelayInBlocks - changeVotingPeriodInBlocks - getMinEnergyForPropose - getMinFeeForPropose - getQuorum - getVotingDelayInBlocks - getVotingPeriodInBlocks - getFeeTokenId - getWithdrawPercentageDefeated - getProposals - getUserVotedProposals - getProposalVotes - getProposalStatus - getUserVotingPower - getVotingPowerEquivalent - getFeesCollectorAddress - setEnergyFactoryAddress - getEnergyFactoryAddress - addAdmin - removeAdmin - updateOwnerOrAdmin - getPermissions + init => init + propose => propose + vote => vote + cancel => cancel + withdrawDeposit => withdraw_deposit + changeMinEnergyForProposal => change_min_energy_for_propose + changeMinFeeForProposal => change_min_fee_for_propose + changeQuorumPercentage => change_quorum_percentage + changeWithdrawPercentage => change_withdraw_percentage + changeVotingDelayInBlocks => change_voting_delay_in_blocks + changeVotingPeriodInBlocks => change_voting_period_in_blocks + getMinEnergyForPropose => min_energy_for_propose + getMinFeeForPropose => min_fee_for_propose + getQuorum => quorum_percentage + getVotingDelayInBlocks => voting_delay_in_blocks + getVotingPeriodInBlocks => voting_period_in_blocks + getFeeTokenId => fee_token_id + getWithdrawPercentageDefeated => withdraw_percentage_defeated + getProposals => proposals + getUserVotedProposals => user_voted_proposals + getProposalVotes => proposal_votes + getProposalStatus => get_proposal_status + getFeesCollectorAddress => fees_collector_address + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address + addAdmin => add_admin_endpoint + removeAdmin => remove_admin_endpoint + updateOwnerOrAdmin => update_owner_or_admin_endpoint + getPermissions => permissions ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/farm-staking/farm-staking-proxy/wasm/Cargo.lock b/farm-staking/farm-staking-proxy/wasm/Cargo.lock index 6b8cfa51d..b39a7d277 100644 --- a/farm-staking/farm-staking-proxy/wasm/Cargo.lock +++ b/farm-staking/farm-staking-proxy/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -345,12 +339,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -367,12 +355,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" @@ -382,9 +364,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -396,20 +378,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -419,9 +400,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -432,21 +413,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -507,18 +487,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -628,18 +608,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -659,25 +627,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/farm-staking/farm-staking-proxy/wasm/src/lib.rs b/farm-staking/farm-staking-proxy/wasm/src/lib.rs index 5aea5b134..60c524a7a 100644 --- a/farm-staking/farm-staking-proxy/wasm/src/lib.rs +++ b/farm-staking/farm-staking-proxy/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 18 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,22 +21,24 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { farm_staking_proxy ( - registerDualYieldToken - getDualYieldTokenId - getLpFarmAddress - getStakingFarmAddress - getPairAddress - getStakingTokenId - getFarmTokenId - getLpTokenId - getLpFarmTokenId - addSCAddressToWhitelist - removeSCAddressFromWhitelist - isSCAddressWhitelisted - stakeFarmTokens - claimDualYield - unstakeFarmTokens - mergeMetastakingWithStakingToken - callBack + init => init + registerDualYieldToken => register_dual_yield_token + getDualYieldTokenId => dual_yield_token + getLpFarmAddress => lp_farm_address + getStakingFarmAddress => staking_farm_address + getPairAddress => pair_address + getStakingTokenId => staking_token_id + getFarmTokenId => staking_farm_token_id + getLpTokenId => lp_token_id + getLpFarmTokenId => lp_farm_token_id + addSCAddressToWhitelist => add_sc_address_to_whitelist + removeSCAddressFromWhitelist => remove_sc_address_from_whitelist + isSCAddressWhitelisted => is_sc_address_whitelisted + stakeFarmTokens => stake_farm_tokens + claimDualYield => claim_dual_yield_endpoint + unstakeFarmTokens => unstake_farm_tokens + mergeMetastakingWithStakingToken => merge_metastaking_with_staking_token ) } + +multiversx_sc_wasm_adapter::async_callback! { farm_staking_proxy } diff --git a/farm-staking/farm-staking/wasm/Cargo.lock b/farm-staking/farm-staking/wasm/Cargo.lock index 4584bdf1a..6f95fbf0e 100644 --- a/farm-staking/farm-staking/wasm/Cargo.lock +++ b/farm-staking/farm-staking/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -323,12 +317,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -345,12 +333,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" @@ -360,9 +342,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -374,20 +356,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -397,9 +378,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -410,21 +391,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -485,18 +465,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -606,18 +586,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -637,25 +605,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/farm-staking/farm-staking/wasm/src/lib.rs b/farm-staking/farm-staking/wasm/src/lib.rs index f168969c1..59a998e10 100644 --- a/farm-staking/farm-staking/wasm/src/lib.rs +++ b/farm-staking/farm-staking/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 66 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,70 +21,72 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { farm_staking ( - mergeFarmTokens - calculateRewardsForGivenPosition - topUpRewards - endProduceRewards - setPerBlockRewardAmount - setMaxApr - setMinUnbondEpochs - startProduceRewards - getAccumulatedRewards - getRewardCapacity - getAnnualPercentageRewards - getMinUnbondEpochs - getRewardPerShare - getRewardReserve - getFarmingTokenId - getRewardTokenId - getPerBlockRewardAmount - getLastRewardBlockNonce - getDivisionSafetyConstant - registerFarmToken - getFarmTokenId - getFarmTokenSupply - addSCAddressToWhitelist - removeSCAddressFromWhitelist - isSCAddressWhitelisted - addToPauseWhitelist - removeFromPauseWhitelist - pause - resume - getState - addAdmin - removeAdmin - updateOwnerOrAdmin - getPermissions - setBurnRoleForAddress - stakeFarmThroughProxy - stakeFarm - claimRewards - claimRewardsWithNewValue - compoundRewards - unstakeFarm - unstakeFarmThroughProxy - unbondFarm - setBoostedYieldsRewardsPercentage - collectUndistributedBoostedRewards - getBoostedYieldsRewardsPercentage - getAccumulatedRewardsForWeek - getFarmSupplyForWeek - getRemainingBoostedRewardsToDistribute - getUndistributedBoostedRewards - setBoostedYieldsFactors - getBoostedYieldsFactors - getCurrentWeek - getFirstWeekStartEpoch - getLastActiveWeekForUser - getUserEnergyForWeek - getLastGlobalUpdateWeek - getTotalRewardsForWeek - getTotalEnergyForWeek - getTotalLockedTokensForWeek - updateEnergyForUser - getCurrentClaimProgress - setEnergyFactoryAddress - getEnergyFactoryAddress - callBack + init => init + mergeFarmTokens => merge_farm_tokens_endpoint + calculateRewardsForGivenPosition => calculate_rewards_for_given_position + topUpRewards => top_up_rewards + endProduceRewards => end_produce_rewards + setPerBlockRewardAmount => set_per_block_rewards + setMaxApr => set_max_apr + setMinUnbondEpochs => set_min_unbond_epochs_endpoint + startProduceRewards => start_produce_rewards_endpoint + getAccumulatedRewards => accumulated_rewards + getRewardCapacity => reward_capacity + getAnnualPercentageRewards => max_annual_percentage_rewards + getMinUnbondEpochs => min_unbond_epochs + getRewardPerShare => reward_per_share + getRewardReserve => reward_reserve + getFarmingTokenId => farming_token_id + getRewardTokenId => reward_token_id + getPerBlockRewardAmount => per_block_reward_amount + getLastRewardBlockNonce => last_reward_block_nonce + getDivisionSafetyConstant => division_safety_constant + registerFarmToken => register_farm_token + getFarmTokenId => farm_token + getFarmTokenSupply => farm_token_supply + addSCAddressToWhitelist => add_sc_address_to_whitelist + removeSCAddressFromWhitelist => remove_sc_address_from_whitelist + isSCAddressWhitelisted => is_sc_address_whitelisted + addToPauseWhitelist => add_to_pause_whitelist + removeFromPauseWhitelist => remove_from_pause_whitelist + pause => pause + resume => resume + getState => state + addAdmin => add_admin_endpoint + removeAdmin => remove_admin_endpoint + updateOwnerOrAdmin => update_owner_or_admin_endpoint + getPermissions => permissions + setBurnRoleForAddress => set_burn_role_for_address + stakeFarmThroughProxy => stake_farm_through_proxy + stakeFarm => stake_farm_endpoint + claimRewards => claim_rewards + claimRewardsWithNewValue => claim_rewards_with_new_value + compoundRewards => compound_rewards + unstakeFarm => unstake_farm + unstakeFarmThroughProxy => unstake_farm_through_proxy + unbondFarm => unbond_farm + setBoostedYieldsRewardsPercentage => set_boosted_yields_rewards_percentage + collectUndistributedBoostedRewards => collect_undistributed_boosted_rewards + getBoostedYieldsRewardsPercentage => boosted_yields_rewards_percentage + getAccumulatedRewardsForWeek => accumulated_rewards_for_week + getFarmSupplyForWeek => farm_supply_for_week + getRemainingBoostedRewardsToDistribute => remaining_boosted_rewards_to_distribute + getUndistributedBoostedRewards => undistributed_boosted_rewards + setBoostedYieldsFactors => set_boosted_yields_factors + getBoostedYieldsFactors => get_boosted_yields_factors + getCurrentWeek => get_current_week + getFirstWeekStartEpoch => first_week_start_epoch + getLastActiveWeekForUser => get_last_active_week_for_user_view + getUserEnergyForWeek => get_user_energy_for_week_view + getLastGlobalUpdateWeek => last_global_update_week + getTotalRewardsForWeek => total_rewards_for_week + getTotalEnergyForWeek => total_energy_for_week + getTotalLockedTokensForWeek => total_locked_tokens_for_week + updateEnergyForUser => update_energy_for_user + getCurrentClaimProgress => current_claim_progress + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address ) } + +multiversx_sc_wasm_adapter::async_callback! { farm_staking } diff --git a/farm-staking/metabonding-staking/wasm/Cargo.lock b/farm-staking/metabonding-staking/wasm/Cargo.lock index dbb5e6cc5..82f364c2e 100644 --- a/farm-staking/metabonding-staking/wasm/Cargo.lock +++ b/farm-staking/metabonding-staking/wasm/Cargo.lock @@ -196,9 +196,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -210,20 +210,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -233,9 +232,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -246,21 +245,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -289,18 +287,18 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] diff --git a/farm-staking/metabonding-staking/wasm/src/lib.rs b/farm-staking/metabonding-staking/wasm/src/lib.rs index 337c0ea4b..ce110b30f 100644 --- a/farm-staking/metabonding-staking/wasm/src/lib.rs +++ b/farm-staking/metabonding-staking/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 12 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,17 +21,18 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { metabonding_staking ( - stakeLockedAsset - unstake - unbond - getStakedAmountForUser - getUserEntry - getSnapshot - getLockedAssetTokenId - getLockedAssetFactoryAddress - getTotalLockedAssetSupply - getUserList + init => init + stakeLockedAsset => stake_locked_asset + unstake => unstake + unbond => unbond + getStakedAmountForUser => get_staked_amount_for_user + getUserEntry => get_user_entry + getSnapshot => get_snapshot + getLockedAssetTokenId => locked_asset_token_id + getLockedAssetFactoryAddress => locked_asset_factory_address + getTotalLockedAssetSupply => total_locked_asset_supply + getUserList => user_list ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/locked-asset/distribution/wasm/Cargo.lock b/locked-asset/distribution/wasm/Cargo.lock index e1cc0fc9e..87717fb9d 100644 --- a/locked-asset/distribution/wasm/Cargo.lock +++ b/locked-asset/distribution/wasm/Cargo.lock @@ -196,9 +196,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -210,20 +210,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -233,9 +232,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -246,21 +245,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -289,18 +287,18 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] diff --git a/locked-asset/distribution/wasm/src/lib.rs b/locked-asset/distribution/wasm/src/lib.rs index 829e87945..7713b182b 100644 --- a/locked-asset/distribution/wasm/src/lib.rs +++ b/locked-asset/distribution/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 17 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,22 +21,23 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { distribution ( - setCommunityDistribution - setPerUserDistributedLockedAssets - claimLockedAssets - clearUnclaimableAssets - undoLastCommunityDistribution - undoUserDistributedAssetsBetweenEpochs - setUnlockPeriod - calculateLockedAssets - deleteUserDistributedLockedAssets - getUsersDistributedLockedAssetsLength - getUnlockPeriod - getCommunityDistributionList - getAssetTokenId - startGlobalOperation - endGlobalOperation + init => init + setCommunityDistribution => set_community_distribution + setPerUserDistributedLockedAssets => set_per_user_distributed_locked_assets + claimLockedAssets => claim_locked_assets + clearUnclaimableAssets => clear_unclaimable_assets + undoLastCommunityDistribution => undo_last_community_distrib + undoUserDistributedAssetsBetweenEpochs => undo_user_assets_between_epochs + setUnlockPeriod => set_unlock_period + calculateLockedAssets => calculate_locked_assets_view + deleteUserDistributedLockedAssets => delete_user_distributed_locked_assets + getUsersDistributedLockedAssetsLength => get_users_distributed_locked_assets_length + getUnlockPeriod => unlock_period + getCommunityDistributionList => community_distribution_list + getAssetTokenId => asset_token_id + startGlobalOperation => global_op_start + endGlobalOperation => global_op_stop ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/locked-asset/energy-factory/wasm/Cargo.lock b/locked-asset/energy-factory/wasm/Cargo.lock index 4ce7c14d7..b51127ae1 100644 --- a/locked-asset/energy-factory/wasm/Cargo.lock +++ b/locked-asset/energy-factory/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -128,12 +122,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "math" version = "0.0.0" @@ -141,12 +129,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" @@ -156,9 +138,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -170,20 +152,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -193,9 +174,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -206,21 +187,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -249,18 +229,18 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -337,37 +317,3 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "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/locked-asset/energy-factory/wasm/src/lib.rs b/locked-asset/energy-factory/wasm/src/lib.rs index d496bd0d2..213c94146 100644 --- a/locked-asset/energy-factory/wasm/src/lib.rs +++ b/locked-asset/energy-factory/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 34 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,38 +21,40 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { energy_factory ( - lockTokens - unlockTokens - issueLockedToken - getLockedTokenId - getBaseAssetTokenId - getLegacyLockedTokenId - getEnergyEntryForUser - getEnergyAmountForUser - addLockOptions - getLockOptions - unlockEarly - reduceLockPeriod - getPenaltyAmount - setTokenUnstakeAddress - revertUnstake - getTokenUnstakeScAddress - setEnergyForOldTokens - updateEnergyAfterOldTokenUnlock - migrateOldTokens - pause - unpause - isPaused - setTransferRoleLockedToken - setBurnRoleLockedToken - mergeTokens - lockVirtual - addSCAddressToWhitelist - removeSCAddressFromWhitelist - isSCAddressWhitelisted - addToTokenTransferWhitelist - removeFromTokenTransferWhitelist - setUserEnergyAfterLockedTokenTransfer - callBack + init => init + lockTokens => lock_tokens_endpoint + unlockTokens => unlock_tokens_endpoint + issueLockedToken => issue_locked_token + getLockedTokenId => locked_token + getBaseAssetTokenId => base_asset_token_id + getLegacyLockedTokenId => legacy_locked_token_id + getEnergyEntryForUser => get_updated_energy_entry_for_user + getEnergyAmountForUser => get_energy_amount_for_user + addLockOptions => add_lock_options + getLockOptions => get_lock_options_view + unlockEarly => unlock_early + reduceLockPeriod => reduce_lock_period + getPenaltyAmount => calculate_penalty_amount + setTokenUnstakeAddress => set_token_unstake_address + revertUnstake => revert_unstake + getTokenUnstakeScAddress => token_unstake_sc_address + setEnergyForOldTokens => set_energy_for_old_tokens + updateEnergyAfterOldTokenUnlock => update_energy_after_old_token_unlock + migrateOldTokens => migrate_old_tokens + pause => pause_endpoint + unpause => unpause_endpoint + isPaused => paused_status + setTransferRoleLockedToken => set_transfer_role + setBurnRoleLockedToken => set_burn_role + mergeTokens => merge_tokens_endpoint + lockVirtual => lock_virtual + addSCAddressToWhitelist => add_sc_address_to_whitelist + removeSCAddressFromWhitelist => remove_sc_address_from_whitelist + isSCAddressWhitelisted => is_sc_address_whitelisted + addToTokenTransferWhitelist => add_to_token_transfer_whitelist + removeFromTokenTransferWhitelist => remove_from_token_transfer_whitelist + setUserEnergyAfterLockedTokenTransfer => set_user_energy_after_locked_token_transfer ) } + +multiversx_sc_wasm_adapter::async_callback! { energy_factory } diff --git a/locked-asset/factory/wasm/Cargo.lock b/locked-asset/factory/wasm/Cargo.lock index ca5df67df..5b759e551 100644 --- a/locked-asset/factory/wasm/Cargo.lock +++ b/locked-asset/factory/wasm/Cargo.lock @@ -187,9 +187,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -201,20 +201,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -224,9 +223,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -237,21 +236,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -280,18 +278,18 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] diff --git a/locked-asset/factory/wasm/src/lib.rs b/locked-asset/factory/wasm/src/lib.rs index e5250b664..3593ccb49 100644 --- a/locked-asset/factory/wasm/src/lib.rs +++ b/locked-asset/factory/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 26 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,30 +21,32 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { factory ( - whitelist - removeWhitelist - createAndForwardCustomPeriod - createAndForward - unlockAssets - lockAssets - setUnlockPeriod - registerLockedAssetToken - setInitEpoch - getInitEpoch - getWhitelistedContracts - getDefaultUnlockPeriod - getLockedAssetTokenId - getAssetTokenId - getUnlockScheduleForSFTNonce - getCacheSize - mergeTokens - getExtendedAttributesActivationNonce - setLockedTokenBurnRoleForAddress - setTransferRoleOldLockedToken - setNewFactoryAddress - pause - unpause - isPaused - callBack + init => init + whitelist => whitelist + removeWhitelist => remove_whitelist + createAndForwardCustomPeriod => create_and_forward_custom_period + createAndForward => create_and_forward + unlockAssets => unlock_assets + lockAssets => lock_assets + setUnlockPeriod => set_unlock_period + registerLockedAssetToken => register_locked_asset_token + setInitEpoch => set_init_epoch + getInitEpoch => init_epoch + getWhitelistedContracts => whitelisted_contracts + getDefaultUnlockPeriod => default_unlock_period + getLockedAssetTokenId => locked_asset_token + getAssetTokenId => asset_token_id + getUnlockScheduleForSFTNonce => get_unlock_schedule_for_sft_nonce + getCacheSize => get_cache_size + mergeTokens => merge_tokens + getExtendedAttributesActivationNonce => extended_attributes_activation_nonce + setLockedTokenBurnRoleForAddress => set_locked_token_burn_role_for_address + setTransferRoleOldLockedToken => set_transfer_role_old_locked_token + setNewFactoryAddress => set_new_factory_address + pause => pause_endpoint + unpause => unpause_endpoint + isPaused => paused_status ) } + +multiversx_sc_wasm_adapter::async_callback! { factory } diff --git a/locked-asset/lkmex-transfer/wasm/Cargo.lock b/locked-asset/lkmex-transfer/wasm/Cargo.lock index 0956bbfca..de13098e5 100644 --- a/locked-asset/lkmex-transfer/wasm/Cargo.lock +++ b/locked-asset/lkmex-transfer/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -128,12 +122,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "lkmex-transfer" version = "0.0.0" @@ -163,12 +151,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" @@ -178,9 +160,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -192,20 +174,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -215,9 +196,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -228,21 +209,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -280,18 +260,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -368,37 +348,3 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "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/locked-asset/lkmex-transfer/wasm/src/lib.rs b/locked-asset/lkmex-transfer/wasm/src/lib.rs index 5b48ab16b..88d45c5f9 100644 --- a/locked-asset/lkmex-transfer/wasm/src/lib.rs +++ b/locked-asset/lkmex-transfer/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 13 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,18 +21,19 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { lkmex_transfer ( - withdraw - cancelTransfer - lockFunds - getScheduledTransfers - getAllSenders - setEnergyFactoryAddress - getEnergyFactoryAddress - addAdmin - removeAdmin - updateOwnerOrAdmin - getPermissions + init => init + withdraw => withdraw + cancelTransfer => cancel_transfer + lockFunds => lock_funds + getScheduledTransfers => get_scheduled_transfers + getAllSenders => all_senders + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address + addAdmin => add_admin_endpoint + removeAdmin => remove_admin_endpoint + updateOwnerOrAdmin => update_owner_or_admin_endpoint + getPermissions => permissions ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/locked-asset/locked-token-wrapper/wasm/Cargo.lock b/locked-asset/locked-token-wrapper/wasm/Cargo.lock index 389a26cc8..023c10693 100644 --- a/locked-asset/locked-token-wrapper/wasm/Cargo.lock +++ b/locked-asset/locked-token-wrapper/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -136,12 +130,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "lkmex-transfer" version = "0.0.0" @@ -187,12 +175,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" @@ -202,9 +184,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -216,20 +198,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -239,9 +220,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -252,21 +233,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -304,18 +284,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -392,37 +372,3 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "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/locked-asset/locked-token-wrapper/wasm/src/lib.rs b/locked-asset/locked-token-wrapper/wasm/src/lib.rs index efae1ed5e..dd7c8fd96 100644 --- a/locked-asset/locked-token-wrapper/wasm/src/lib.rs +++ b/locked-asset/locked-token-wrapper/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 10 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,14 +21,16 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { locked_token_wrapper ( - wrapLockedToken - unwrapLockedToken - issueWrappedToken - setTransferRoleWrappedToken - unsetTransferRoleWrappedToken - getWrappedTokenId - setEnergyFactoryAddress - getEnergyFactoryAddress - callBack + init => init + wrapLockedToken => wrap_locked_token_endpoint + unwrapLockedToken => unwrap_locked_token_endpoint + issueWrappedToken => issue_wrapped_token + setTransferRoleWrappedToken => set_transfer_role + unsetTransferRoleWrappedToken => unset_transfer_role + getWrappedTokenId => wrapped_token + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address ) } + +multiversx_sc_wasm_adapter::async_callback! { locked_token_wrapper } diff --git a/locked-asset/proxy_dex/wasm/Cargo.lock b/locked-asset/proxy_dex/wasm/Cargo.lock index fe099d430..b40656523 100644 --- a/locked-asset/proxy_dex/wasm/Cargo.lock +++ b/locked-asset/proxy_dex/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -314,12 +308,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "locking_module" version = "0.0.0" @@ -336,12 +324,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" @@ -351,9 +333,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -365,20 +347,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -388,9 +369,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -401,21 +382,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -476,9 +456,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -516,9 +496,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -628,18 +608,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -659,25 +627,3 @@ dependencies = [ "unwrappable", "week-timekeeping", ] - -[[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/locked-asset/proxy_dex/wasm/src/lib.rs b/locked-asset/proxy_dex/wasm/src/lib.rs index 892463480..096dff097 100644 --- a/locked-asset/proxy_dex/wasm/src/lib.rs +++ b/locked-asset/proxy_dex/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 27 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,31 +21,33 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { proxy_dex ( - registerProxyPair - setTransferRoleWrappedLpToken - registerProxyFarm - setTransferRoleWrappedFarmToken - getAssetTokenId - getLockedTokenIds - getOldLockedTokenId - getOldFactoryAddress - getWrappedLpTokenId - getWrappedFarmTokenId - addPairToIntermediate - removeIntermediatedPair - addFarmToIntermediate - removeIntermediatedFarm - getIntermediatedPairs - getIntermediatedFarms - addLiquidityProxy - removeLiquidityProxy - enterFarmProxy - exitFarmProxy - claimRewardsProxy - mergeWrappedFarmTokens - mergeWrappedLpTokens - setEnergyFactoryAddress - getEnergyFactoryAddress - callBack + init => init + registerProxyPair => register_proxy_pair + setTransferRoleWrappedLpToken => set_transfer_role_wrapped_lp_token + registerProxyFarm => register_proxy_farm + setTransferRoleWrappedFarmToken => set_transfer_role_wrapped_farm_token + getAssetTokenId => get_asset_token_id_view + getLockedTokenIds => get_locked_token_ids_view + getOldLockedTokenId => old_locked_token_id + getOldFactoryAddress => old_factory_address + getWrappedLpTokenId => wrapped_lp_token + getWrappedFarmTokenId => wrapped_farm_token + addPairToIntermediate => add_pair_to_intermediate + removeIntermediatedPair => remove_intermediated_pair + addFarmToIntermediate => add_farm_to_intermediate + removeIntermediatedFarm => remove_intermediated_farm + getIntermediatedPairs => intermediated_pairs + getIntermediatedFarms => intermediated_farms + addLiquidityProxy => add_liquidity_proxy + removeLiquidityProxy => remove_liquidity_proxy + enterFarmProxy => enter_farm_proxy_endpoint + exitFarmProxy => exit_farm_proxy + claimRewardsProxy => claim_rewards_proxy + mergeWrappedFarmTokens => merge_wrapped_farm_tokens_endpoint + mergeWrappedLpTokens => merge_wrapped_lp_tokens_endpoint + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address ) } + +multiversx_sc_wasm_adapter::async_callback! { proxy_dex } diff --git a/locked-asset/simple-lock-whitelist/wasm/Cargo.lock b/locked-asset/simple-lock-whitelist/wasm/Cargo.lock index 678cb0db6..294b59f7c 100644 --- a/locked-asset/simple-lock-whitelist/wasm/Cargo.lock +++ b/locked-asset/simple-lock-whitelist/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -88,12 +82,6 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "math" version = "0.0.0" @@ -101,12 +89,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" @@ -116,9 +98,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -130,20 +112,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -153,9 +134,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -166,21 +147,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -209,18 +189,18 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -307,37 +287,3 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "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/locked-asset/simple-lock-whitelist/wasm/src/lib.rs b/locked-asset/simple-lock-whitelist/wasm/src/lib.rs index 2d42f0f2c..8d60bed84 100644 --- a/locked-asset/simple-lock-whitelist/wasm/src/lib.rs +++ b/locked-asset/simple-lock-whitelist/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 26 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,30 +21,32 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { simple_lock_whitelist ( - setTransferRoleLockedToken - setTransferRoleProxyLpToken - setTransferRoleProxyFarmToken - setLockedToken - lockTokens - unlockTokens - getTokenWhitelist - issueLockedToken - getLockedTokenId - issueLpProxyToken - addLpToWhitelist - removeLpFromWhitelist - addLiquidityLockedToken - removeLiquidityLockedToken - getKnownLiquidityPools - getLpProxyTokenId - issueFarmProxyToken - addFarmToWhitelist - removeFarmFromWhitelist - enterFarmLockedToken - exitFarmLockedToken - farmClaimRewardsLockedToken - getKnownFarms - getFarmProxyTokenId - callBack + init => init + setTransferRoleLockedToken => set_transfer_role + setTransferRoleProxyLpToken => set_transfer_role_proxy_lp + setTransferRoleProxyFarmToken => set_transfer_role_proxy_farm + setLockedToken => set_locked_token + lockTokens => lock_tokens_endpoint + unlockTokens => unlock_tokens_endpoint + getTokenWhitelist => token_whitelist + issueLockedToken => issue_locked_token + getLockedTokenId => locked_token + issueLpProxyToken => issue_lp_proxy_token + addLpToWhitelist => add_lp_to_whitelist + removeLpFromWhitelist => remove_lp_from_whitelist + addLiquidityLockedToken => add_liquidity_locked_token + removeLiquidityLockedToken => remove_liquidity_locked_token + getKnownLiquidityPools => known_liquidity_pools + getLpProxyTokenId => lp_proxy_token + issueFarmProxyToken => issue_farm_proxy_token + addFarmToWhitelist => add_farm_to_whitelist + removeFarmFromWhitelist => remove_farm_from_whitelist + enterFarmLockedToken => enter_farm_locked_token + exitFarmLockedToken => exit_farm_locked_token + farmClaimRewardsLockedToken => farm_claim_rewards_locked_token + getKnownFarms => known_farms + getFarmProxyTokenId => farm_proxy_token ) } + +multiversx_sc_wasm_adapter::async_callback! { simple_lock_whitelist } diff --git a/locked-asset/simple-lock/wasm/Cargo.lock b/locked-asset/simple-lock/wasm/Cargo.lock index 270c2aca4..3e1b222c7 100644 --- a/locked-asset/simple-lock/wasm/Cargo.lock +++ b/locked-asset/simple-lock/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -88,12 +82,6 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "math" version = "0.0.0" @@ -101,12 +89,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" @@ -116,9 +98,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -130,20 +112,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -153,9 +134,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -166,21 +147,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -209,18 +189,18 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -287,37 +267,3 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "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/locked-asset/simple-lock/wasm/src/lib.rs b/locked-asset/simple-lock/wasm/src/lib.rs index 042660883..afe83b5ff 100644 --- a/locked-asset/simple-lock/wasm/src/lib.rs +++ b/locked-asset/simple-lock/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 21 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,25 +21,27 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { simple_lock ( - lockTokens - unlockTokens - issueLockedToken - getLockedTokenId - issueLpProxyToken - addLpToWhitelist - removeLpFromWhitelist - addLiquidityLockedToken - removeLiquidityLockedToken - getKnownLiquidityPools - getLpProxyTokenId - issueFarmProxyToken - addFarmToWhitelist - removeFarmFromWhitelist - enterFarmLockedToken - exitFarmLockedToken - farmClaimRewardsLockedToken - getKnownFarms - getFarmProxyTokenId - callBack + init => init + lockTokens => lock_tokens_endpoint + unlockTokens => unlock_tokens_endpoint + issueLockedToken => issue_locked_token + getLockedTokenId => locked_token + issueLpProxyToken => issue_lp_proxy_token + addLpToWhitelist => add_lp_to_whitelist + removeLpFromWhitelist => remove_lp_from_whitelist + addLiquidityLockedToken => add_liquidity_locked_token + removeLiquidityLockedToken => remove_liquidity_locked_token + getKnownLiquidityPools => known_liquidity_pools + getLpProxyTokenId => lp_proxy_token + issueFarmProxyToken => issue_farm_proxy_token + addFarmToWhitelist => add_farm_to_whitelist + removeFarmFromWhitelist => remove_farm_from_whitelist + enterFarmLockedToken => enter_farm_locked_token + exitFarmLockedToken => exit_farm_locked_token + farmClaimRewardsLockedToken => farm_claim_rewards_locked_token + getKnownFarms => known_farms + getFarmProxyTokenId => farm_proxy_token ) } + +multiversx_sc_wasm_adapter::async_callback! { simple_lock } diff --git a/locked-asset/token-unstake/wasm/Cargo.lock b/locked-asset/token-unstake/wasm/Cargo.lock index 4a78e1d16..9558941a9 100644 --- a/locked-asset/token-unstake/wasm/Cargo.lock +++ b/locked-asset/token-unstake/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -135,12 +129,6 @@ dependencies = [ "utils", ] -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - [[package]] name = "math" version = "0.0.0" @@ -148,12 +136,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" @@ -163,9 +145,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -177,20 +159,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -200,9 +181,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -213,21 +194,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -256,18 +236,18 @@ checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -367,18 +347,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "memory_units", - "winapi", -] - [[package]] name = "week-timekeeping" version = "0.0.0" @@ -386,25 +354,3 @@ dependencies = [ "common-types", "multiversx-sc", ] - -[[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/locked-asset/token-unstake/wasm/src/lib.rs b/locked-asset/token-unstake/wasm/src/lib.rs index e0ac873af..f2f371c21 100644 --- a/locked-asset/token-unstake/wasm/src/lib.rs +++ b/locked-asset/token-unstake/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 12 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,17 +21,18 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { token_unstake ( - getUnbondEpochs - getUnlockedTokensForUser - claimUnlockedTokens - cancelUnbond - depositUserTokens - depositFees - getFeesBurnPercentage - getFeesCollectorAddress - setEnergyFactoryAddress - getEnergyFactoryAddress + init => init + getUnbondEpochs => unbond_epochs + getUnlockedTokensForUser => unlocked_tokens_for_user + claimUnlockedTokens => claim_unlocked_tokens + cancelUnbond => cancel_unbond + depositUserTokens => deposit_user_tokens + depositFees => deposit_fees + getFeesBurnPercentage => fees_burn_percentage + getFeesCollectorAddress => fees_collector_address + setEnergyFactoryAddress => set_energy_factory_address + getEnergyFactoryAddress => energy_factory_address ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {} diff --git a/pause-all/wasm/Cargo.lock b/pause-all/wasm/Cargo.lock index 8dfdb7105..ef99da944 100644 --- a/pause-all/wasm/Cargo.lock +++ b/pause-all/wasm/Cargo.lock @@ -8,7 +8,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "version_check", ] @@ -31,12 +31,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -77,23 +71,11 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - -[[package]] -name = "memory_units" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" - [[package]] name = "multiversx-sc" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecfb3e03ac6e08114963a54e15a3c78c28e57cc0e31836e870450b35085bdf8d" +checksum = "5889db6e6f6814b221cf4c1cd2937aa047b419e2a80b08695d85b4a9f537bdfd" dependencies = [ "bitflags", "hashbrown", @@ -105,20 +87,19 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7638cb46a0e99c636fd55443ac534ff0a5fad0bd772e1037fbac9a75e04c3c9" +checksum = "0f1e15b46c17b87c0c7cdd79b041a4abd7f3a2b45f3c993f6ce38c0f233e82b6" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", - "wee_alloc", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.17.1" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e976002d51367f16140929c10ee695f95dd8d34c150a45db60d3fcd1328a267a" +checksum = "9a7bc0762cd6d88f8bc54805bc652b042a61cd7fbc2d0a325010f088b78fb2ac" dependencies = [ "hex", "proc-macro2", @@ -128,9 +109,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6eb54a7d452eb09f5de159ee9b4d1fb9ec79cf49f1602ebd3efc8532015a4ea" +checksum = "23fead13b29d79f702e021926402588e9a7822ed9dfadfdfe71c436dce100e4f" dependencies = [ "hex", "proc-macro2", @@ -141,21 +122,20 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12284a3e31c0852b6ca0ce8306d3f404c3712b996a05ed78e97e765c98461f3" +checksum = "e5c160745bf0c997146fa816a19fba8a8d0517e99ed30cc514eca0967f2eed74" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.39.4" +version = "0.43.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee69fa831cdd5a7ea1aedbb6356a55792b821396f48360a6194f4131eddd1045" +checksum = "9f6fce7b968fec7ea27f6fef909d4149e515e31aa2486a93dcd7c72a8a01e571" dependencies = [ "multiversx-sc", - "wee_alloc", ] [[package]] @@ -218,18 +198,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.23" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -272,37 +252,3 @@ name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wee_alloc" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb3b5a6b2bb17cb6ad44a2e68a43e8d2722c997da10e928665c72ec6c0a0b8e" -dependencies = [ - "cfg-if 0.1.10", - "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/pause-all/wasm/src/lib.rs b/pause-all/wasm/src/lib.rs index 6177d8585..d92fcfc45 100644 --- a/pause-all/wasm/src/lib.rs +++ b/pause-all/wasm/src/lib.rs @@ -10,7 +10,10 @@ // Total number of exported functions: 9 #![no_std] -#![feature(alloc_error_handler, lang_items)] + +// Configuration that works with rustc < 1.73.0. +// TODO: Recommended rustc version: 1.73.0 or newer. +#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); @@ -18,14 +21,15 @@ multiversx_sc_wasm_adapter::panic_handler!(); multiversx_sc_wasm_adapter::endpoints! { pause_all ( - addPausableContracts - removePausableContracts - pauseSelected - pauseAll - resumeSelected - resumeAll - getPausableContracts + init => init + addPausableContracts => add_pausable_contracts + removePausableContracts => remove_pausable_contracts + pauseSelected => pause_selected + pauseAll => pause_all + resumeSelected => resume_selected + resumeAll => resume_all + getPausableContracts => pausable_contracts ) } -multiversx_sc_wasm_adapter::empty_callback! {} +multiversx_sc_wasm_adapter::async_callback_empty! {}