From 5b39945d1361ea0ce7ee37a8a83d5d39c551dfb5 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Mon, 28 Oct 2024 13:06:06 +0200 Subject: [PATCH 01/22] setup config optimization tryout --- .../src/guaranteed_ticket_winners.rs | 1 + .../src/guaranteed_tickets_init.rs | 15 +++++++++++++-- launchpad-guaranteed-tickets-v2/src/lib.rs | 2 +- .../src/token_release.rs | 12 ++++++++++-- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs index 5d170c0..a66c3ae 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs @@ -132,6 +132,7 @@ pub trait GuaranteedTicketWinnersModule: if guaranteed_tickets > user_winning_tickets { let tickets_to_win = guaranteed_tickets - user_winning_tickets; self.select_additional_winning_tickets(ticket_range, tickets_to_win, op); + op.leftover_tickets += user_winning_tickets; } else { op.leftover_tickets += guaranteed_tickets; } diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index 8a54bca..1a9dab3 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -37,7 +37,7 @@ pub trait GuaranteedTicketsInitModule: fn add_tickets_with_guaranteed_winners( &self, address_number_pairs: MultiValueEncoded< - MultiValue3>, + MultiValue3>>, >, ) -> AddTicketsResult { self.require_add_tickets_period(); @@ -50,12 +50,23 @@ pub trait GuaranteedTicketsInitModule: let mut total_guaranteed_tickets_added = 0; for multi_arg in address_number_pairs { - let (buyer, total_tickets_allowance, guaranteed_ticket_infos) = multi_arg.into_tuple(); + let (buyer, total_tickets_allowance, guaranteed_ticket_array) = multi_arg.into_tuple(); self.try_create_tickets(buyer.clone(), total_tickets_allowance); let mut user_ticket_status = UserTicketsStatus::new(total_tickets_allowance); let mut user_guaranteed_tickets = 0; + + let mut guaranteed_ticket_infos = ManagedVec::new(); + for element in guaranteed_ticket_array { + let (guaranteed_tickets, min_confirmed_tickets) = element.into_tuple(); + let guaranteed_ticket_info = GuaranteedTicketInfo { + guaranteed_tickets, + min_confirmed_tickets, + }; + guaranteed_ticket_infos.push(guaranteed_ticket_info); + } + for info in guaranteed_ticket_infos.iter() { require!( info.guaranteed_tickets <= info.min_confirmed_tickets, diff --git a/launchpad-guaranteed-tickets-v2/src/lib.rs b/launchpad-guaranteed-tickets-v2/src/lib.rs index b9dd0b3..9a32de1 100644 --- a/launchpad-guaranteed-tickets-v2/src/lib.rs +++ b/launchpad-guaranteed-tickets-v2/src/lib.rs @@ -72,7 +72,7 @@ pub trait LaunchpadGuaranteedTickets: fn add_tickets_endpoint( &self, address_number_pairs: MultiValueEncoded< - MultiValue3>, + MultiValue3>>, >, ) { let total_users_count = address_number_pairs.len(); diff --git a/launchpad-guaranteed-tickets-v2/src/token_release.rs b/launchpad-guaranteed-tickets-v2/src/token_release.rs index bc68ebb..503a8fe 100644 --- a/launchpad-guaranteed-tickets-v2/src/token_release.rs +++ b/launchpad-guaranteed-tickets-v2/src/token_release.rs @@ -45,7 +45,7 @@ impl UnlockSchedule { pub trait TokenReleaseModule: config::ConfigModule + crate::events::EventsModule { #[only_owner] #[endpoint(setUnlockSchedule)] - fn set_unlock_schedule(&self, unlock_milestones: MultiValueEncoded) { + fn set_unlock_schedule(&self, unlock_milestones: MultiValueEncoded>) { let configuration = self.configuration(); require!( !configuration.is_empty(), @@ -60,7 +60,15 @@ pub trait TokenReleaseModule: config::ConfigModule + crate::events::EventsModule "Can't change the unlock schedule" ); - let milestones = unlock_milestones.to_vec(); + let mut milestones = ManagedVec::new(); + for unlock_milestone in unlock_milestones { + let (release_epoch, percentage) = unlock_milestone.into_tuple(); + milestones.push(UnlockMilestone { + release_epoch, + percentage, + }); + } + let unlock_schedule = UnlockSchedule::new(milestones.clone()); require!(unlock_schedule.validate(), "Invalid unlock schedule"); From 57493fd3dddee8fabe6e0b575dcc9858d27a569e Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Tue, 12 Nov 2024 13:04:33 +0000 Subject: [PATCH 02/22] launchpad v2 audit fixes --- launchpad-common/src/blacklist.rs | 8 +++ launchpad-common/src/tickets.rs | 6 ++ launchpad-common/src/winner_selection.rs | 22 +++++-- .../src/guaranteed_ticket_winners.rs | 12 +--- .../src/guaranteed_tickets_init.rs | 22 ++++++- launchpad-guaranteed-tickets-v2/src/lib.rs | 2 + .../src/token_release.rs | 59 +++++++++++-------- 7 files changed, 89 insertions(+), 42 deletions(-) diff --git a/launchpad-common/src/blacklist.rs b/launchpad-common/src/blacklist.rs index 9320822..b0548f6 100644 --- a/launchpad-common/src/blacklist.rs +++ b/launchpad-common/src/blacklist.rs @@ -15,6 +15,10 @@ pub trait BlacklistModule: let blacklist_mapper = self.blacklist(); for address in users_list { + require!( + !blacklist_mapper.contains(&address), + "User already blacklisted" + ); let confirmed_tickets_mapper = self.nr_confirmed_tickets(&address); let nr_confirmed_tickets = confirmed_tickets_mapper.get(); if nr_confirmed_tickets > 0 { @@ -32,6 +36,10 @@ pub trait BlacklistModule: let blacklist_mapper = self.blacklist(); for address in users_list { + require!( + blacklist_mapper.contains(&address), + "User is not blacklisted" + ); blacklist_mapper.remove(&address); } } diff --git a/launchpad-common/src/tickets.rs b/launchpad-common/src/tickets.rs index f70c266..5027e27 100644 --- a/launchpad-common/src/tickets.rs +++ b/launchpad-common/src/tickets.rs @@ -102,6 +102,12 @@ pub trait TicketsModule: let last_ticket_id_mapper = self.last_ticket_id(); let first_ticket_id = last_ticket_id_mapper.get() + 1; + + require!( + first_ticket_id < usize::MAX - nr_tickets, + "Maximum number of tickets was reached" + ); + let last_ticket_id = first_ticket_id + nr_tickets - 1; ticket_range_mapper.set(TicketRange { diff --git a/launchpad-common/src/winner_selection.rs b/launchpad-common/src/winner_selection.rs index 6bafd2d..29c7d20 100644 --- a/launchpad-common/src/winner_selection.rs +++ b/launchpad-common/src/winner_selection.rs @@ -36,13 +36,17 @@ pub trait WinnerSelectionModule: } let run_result = self.run_while_it_has_gas(|| { + if first_ticket_id_in_batch == last_ticket_id + 1 { + return STOP_OP; + } + let current_ticket_batch_mapper = self.ticket_batch(first_ticket_id_in_batch); let ticket_batch: TicketBatch = current_ticket_batch_mapper.get(); let address = &ticket_batch.address; let nr_tickets_in_batch = ticket_batch.nr_tickets; let nr_confirmed_tickets = self.nr_confirmed_tickets(address).get(); - if self.is_user_blacklisted(address) || nr_confirmed_tickets == 0 { + if nr_confirmed_tickets == 0 { self.ticket_range_for_address(address).clear(); current_ticket_batch_mapper.clear(); } else if nr_removed > 0 || nr_confirmed_tickets < nr_tickets_in_batch { @@ -64,11 +68,7 @@ pub trait WinnerSelectionModule: nr_removed += nr_tickets_in_batch - nr_confirmed_tickets; first_ticket_id_in_batch += nr_tickets_in_batch; - if first_ticket_id_in_batch == last_ticket_id + 1 { - STOP_OP - } else { - CONTINUE_OP - } + CONTINUE_OP }); match run_result { @@ -104,6 +104,8 @@ pub trait WinnerSelectionModule: self.require_not_paused(); self.require_winner_selection_period(); + self.check_caller_owner_or_user(); + let flags_mapper = self.flags(); let mut flags: Flags = flags_mapper.get(); require!(flags.were_tickets_filtered, "Must filter tickets first"); @@ -193,4 +195,12 @@ pub trait WinnerSelectionModule: ticket_ids } + + fn check_caller_owner_or_user(&self) { + if self.blockchain().get_owner_address() == self.blockchain().get_caller() { + return; + } + + self.blockchain().check_caller_is_user_account(); + } } diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs index a66c3ae..b06e2b6 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs @@ -198,20 +198,12 @@ pub trait GuaranteedTicketWinnersModule: ) -> bool { let current_ticket_pos = nr_original_winning_tickets + op.leftover_ticket_pos_offset; - let selection_result = self.select_winning_ticket(op, current_ticket_pos, last_ticket_pos); + let selection_result = + self.try_select_winning_ticket(&mut op.rng, current_ticket_pos, last_ticket_pos); self.process_selection_result(op, selection_result) } - fn select_winning_ticket( - &self, - op: &mut GuaranteedTicketsSelectionOperation, - current_ticket_pos: usize, - last_ticket_pos: usize, - ) -> AdditionalSelectionTryResult { - self.try_select_winning_ticket(&mut op.rng, current_ticket_pos, last_ticket_pos) - } - fn process_selection_result( &self, op: &mut GuaranteedTicketsSelectionOperation, diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index 1a9dab3..6c3f04f 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -1,6 +1,8 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); +pub const MAX_GUARANTEED_TICKETS_ENTRIES: usize = 10; + #[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi, ManagedVecItem)] pub struct GuaranteedTicketInfo { pub guaranteed_tickets: usize, @@ -51,6 +53,11 @@ pub trait GuaranteedTicketsInitModule: for multi_arg in address_number_pairs { let (buyer, total_tickets_allowance, guaranteed_ticket_array) = multi_arg.into_tuple(); + require!( + guaranteed_ticket_array.len() <= MAX_GUARANTEED_TICKETS_ENTRIES, + "Number of guaranteed tickets entries exceeds maximum allowed" + ); + self.try_create_tickets(buyer.clone(), total_tickets_allowance); let mut user_ticket_status = UserTicketsStatus::new(total_tickets_allowance); @@ -141,17 +148,25 @@ pub trait GuaranteedTicketsInitModule: continue; } - let user_ticket_status = self.blacklist_user_ticket_status(&user).take(); - let guaranteed_tickets_added = user_ticket_status + let blacklist_user_ticket_status_mapper = self.blacklist_user_ticket_status(&user); + if blacklist_user_ticket_status_mapper.is_empty() { + continue; + } + let blacklist_user_ticket_status = blacklist_user_ticket_status_mapper.take(); + let guaranteed_tickets_added = blacklist_user_ticket_status .guaranteed_tickets_info .iter() .fold(0, |acc, info| acc + info.guaranteed_tickets); if guaranteed_tickets_added > 0 { + require!( + guaranteed_tickets_added <= nr_winning_tickets, + "Number of winning tickets exceeded" + ); whitelist.insert(user.clone()); nr_winning_tickets -= guaranteed_tickets_added; total_guaranteed_tickets += guaranteed_tickets_added; - user_ticket_status_mapper.set(user_ticket_status); + user_ticket_status_mapper.set(blacklist_user_ticket_status); } } @@ -165,6 +180,7 @@ pub trait GuaranteedTicketsInitModule: #[storage_mapper("totalGuaranteedTickets")] fn total_guaranteed_tickets(&self) -> SingleValueMapper; + #[storage_mapper("userTicketStatus")] fn user_ticket_status( &self, diff --git a/launchpad-guaranteed-tickets-v2/src/lib.rs b/launchpad-guaranteed-tickets-v2/src/lib.rs index 9a32de1..ddb6b21 100644 --- a/launchpad-guaranteed-tickets-v2/src/lib.rs +++ b/launchpad-guaranteed-tickets-v2/src/lib.rs @@ -122,6 +122,8 @@ pub trait LaunchpadGuaranteedTickets: self.require_not_paused(); self.require_winner_selection_period(); + self.check_caller_owner_or_user(); + let flags_mapper = self.flags(); let mut flags = flags_mapper.get(); require!( diff --git a/launchpad-guaranteed-tickets-v2/src/token_release.rs b/launchpad-guaranteed-tickets-v2/src/token_release.rs index 503a8fe..a2d6547 100644 --- a/launchpad-guaranteed-tickets-v2/src/token_release.rs +++ b/launchpad-guaranteed-tickets-v2/src/token_release.rs @@ -1,9 +1,11 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); -use launchpad_common::config; +use launchpad_common::{config, launch_stage}; pub const MAX_PERCENTAGE: u64 = 10_000; +pub const MAX_UNLOCK_MILESTONES_ENTRIES: usize = 60; +pub const MAX_RELEASE_EPOCH_DIFF: u64 = 1800; #[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi, Clone, ManagedVecItem)] pub struct UnlockMilestone { @@ -16,12 +18,23 @@ pub struct UnlockSchedule { milestones: ManagedVec, } +impl Default for UnlockSchedule { + fn default() -> Self { + Self { + milestones: ManagedVec::from_single_item(UnlockMilestone { + release_epoch: 0, + percentage: MAX_PERCENTAGE, + }), + } + } +} + impl UnlockSchedule { pub fn new(milestones: ManagedVec) -> Self { UnlockSchedule { milestones } } - fn validate(&self) -> bool { + fn validate(&self, current_epoch: u64) -> bool { if self.milestones.is_empty() { return false; } @@ -30,9 +43,14 @@ impl UnlockSchedule { let mut last_epoch = 0u64; for milestone in self.milestones.iter() { - if milestone.release_epoch < last_epoch || milestone.percentage > MAX_PERCENTAGE { + if milestone.percentage > MAX_PERCENTAGE + || milestone.release_epoch < current_epoch + || milestone.release_epoch < last_epoch + || milestone.release_epoch > current_epoch + MAX_RELEASE_EPOCH_DIFF + { return false; } + last_epoch = milestone.release_epoch; total_percentage += milestone.percentage; } @@ -42,22 +60,16 @@ impl UnlockSchedule { } #[multiversx_sc::module] -pub trait TokenReleaseModule: config::ConfigModule + crate::events::EventsModule { +pub trait TokenReleaseModule: + config::ConfigModule + launch_stage::LaunchStageModule + crate::events::EventsModule +{ #[only_owner] #[endpoint(setUnlockSchedule)] fn set_unlock_schedule(&self, unlock_milestones: MultiValueEncoded>) { - let configuration = self.configuration(); - require!( - !configuration.is_empty(), - "Timeline configuration is not set" - ); - let confirmation_period_start_block = configuration.get().confirmation_period_start_block; - - let current_block = self.blockchain().get_block_nonce(); - let current_epoch = self.blockchain().get_block_epoch(); + self.require_add_tickets_period(); require!( - current_block < confirmation_period_start_block || self.unlock_schedule().is_empty(), - "Can't change the unlock schedule" + unlock_milestones.len() <= MAX_UNLOCK_MILESTONES_ENTRIES, + "Maximum unlock milestones entries exceeded" ); let mut milestones = ManagedVec::new(); @@ -69,12 +81,11 @@ pub trait TokenReleaseModule: config::ConfigModule + crate::events::EventsModule }); } + let current_epoch = self.blockchain().get_block_epoch(); let unlock_schedule = UnlockSchedule::new(milestones.clone()); - require!(unlock_schedule.validate(), "Invalid unlock schedule"); - require!( - unlock_schedule.milestones.get(0).release_epoch >= current_epoch, - "First milestone epoch must be in the future" + unlock_schedule.validate(current_epoch), + "Invalid unlock schedule" ); self.unlock_schedule().set(unlock_schedule); @@ -96,10 +107,12 @@ pub trait TokenReleaseModule: config::ConfigModule + crate::events::EventsModule ); let unlock_schedule_mapper = self.unlock_schedule(); - if unlock_schedule_mapper.is_empty() { - return BigUint::zero(); - } - let unlock_schedule = unlock_schedule_mapper.get(); + let unlock_schedule = if unlock_schedule_mapper.is_empty() { + UnlockSchedule::default() + } else { + unlock_schedule_mapper.get() + }; + let current_epoch = self.blockchain().get_block_epoch(); let mut claimable_percentage = 0u64; From 9fc07c196eaf3a3caca4df0202037e4ec8e022c9 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Tue, 12 Nov 2024 14:52:27 +0000 Subject: [PATCH 03/22] distribution of leftover tickets fix --- .../src/guaranteed_ticket_winners.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs index b06e2b6..01fc3ad 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs @@ -248,13 +248,18 @@ pub trait GuaranteedTicketWinnersModule: } let rand_pos = rng.next_usize_in_range(current_ticket_position, last_ticket_position + 1); - let winning_ticket_id = self.get_ticket_id_from_pos(rand_pos); - if self.is_already_winning_ticket(winning_ticket_id) { + let selected_ticket_id = self.get_ticket_id_from_pos(rand_pos); + if self.is_already_winning_ticket(selected_ticket_id) { + // Swap tickets positions so that the current position still has a chance in future selections + self.ticket_pos_to_id(current_ticket_position) + .set(selected_ticket_id); + self.ticket_pos_to_id(rand_pos).set(current_ticket_id); + return AdditionalSelectionTryResult::NewlySelectedAlreadyWinning; } self.ticket_pos_to_id(rand_pos).set(current_ticket_id); - self.ticket_status(winning_ticket_id).set(WINNING_TICKET); + self.ticket_status(selected_ticket_id).set(WINNING_TICKET); AdditionalSelectionTryResult::Ok } From 88cf10a8c1490cbd287ae6b3e4672f36ce51f905 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Wed, 13 Nov 2024 13:05:49 +0000 Subject: [PATCH 04/22] revert logic for addTickets endpoint --- .../src/guaranteed_tickets_init.rs | 16 +-- launchpad-guaranteed-tickets-v2/src/lib.rs | 2 +- .../tests/guaranteed_tickets_setup/mod.rs | 15 +-- .../tests/guaranteed_tickets_test.rs | 117 +++++++----------- 4 files changed, 55 insertions(+), 95 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index 6c3f04f..2845d6a 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -39,7 +39,7 @@ pub trait GuaranteedTicketsInitModule: fn add_tickets_with_guaranteed_winners( &self, address_number_pairs: MultiValueEncoded< - MultiValue3>>, + MultiValue3>, >, ) -> AddTicketsResult { self.require_add_tickets_period(); @@ -52,9 +52,9 @@ pub trait GuaranteedTicketsInitModule: let mut total_guaranteed_tickets_added = 0; for multi_arg in address_number_pairs { - let (buyer, total_tickets_allowance, guaranteed_ticket_array) = multi_arg.into_tuple(); + let (buyer, total_tickets_allowance, guaranteed_ticket_infos) = multi_arg.into_tuple(); require!( - guaranteed_ticket_array.len() <= MAX_GUARANTEED_TICKETS_ENTRIES, + guaranteed_ticket_infos.len() <= MAX_GUARANTEED_TICKETS_ENTRIES, "Number of guaranteed tickets entries exceeds maximum allowed" ); @@ -64,16 +64,6 @@ pub trait GuaranteedTicketsInitModule: let mut user_guaranteed_tickets = 0; - let mut guaranteed_ticket_infos = ManagedVec::new(); - for element in guaranteed_ticket_array { - let (guaranteed_tickets, min_confirmed_tickets) = element.into_tuple(); - let guaranteed_ticket_info = GuaranteedTicketInfo { - guaranteed_tickets, - min_confirmed_tickets, - }; - guaranteed_ticket_infos.push(guaranteed_ticket_info); - } - for info in guaranteed_ticket_infos.iter() { require!( info.guaranteed_tickets <= info.min_confirmed_tickets, diff --git a/launchpad-guaranteed-tickets-v2/src/lib.rs b/launchpad-guaranteed-tickets-v2/src/lib.rs index ddb6b21..9bc652f 100644 --- a/launchpad-guaranteed-tickets-v2/src/lib.rs +++ b/launchpad-guaranteed-tickets-v2/src/lib.rs @@ -72,7 +72,7 @@ pub trait LaunchpadGuaranteedTickets: fn add_tickets_endpoint( &self, address_number_pairs: MultiValueEncoded< - MultiValue3>>, + MultiValue3>, >, ) { let total_users_count = address_number_pairs.len(); diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs index 13574c2..6d5214e 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs @@ -10,8 +10,7 @@ use launchpad_common::{ winner_selection::WinnerSelectionModule, }; use launchpad_guaranteed_tickets_v2::{ - guaranteed_tickets_init::GuaranteedTicketInfo, - token_release::{TokenReleaseModule, UnlockMilestone}, + guaranteed_tickets_init::GuaranteedTicketInfo, token_release::TokenReleaseModule, }; use launchpad_guaranteed_tickets_v2::{ guaranteed_tickets_init::GuaranteedTicketsInitModule, LaunchpadGuaranteedTickets, @@ -136,8 +135,6 @@ where ) .assert_ok(); - b_mock.set_block_nonce(CONFIRM_START_BLOCK); - Self { b_mock, owner_address, @@ -235,14 +232,18 @@ where ) } - pub fn set_unlock_schedule(&mut self, unlock_milestones: Vec) { + pub fn set_unlock_schedule(&mut self, unlock_milestones: Vec<(u64, u64)>) { let _ = self.b_mock.execute_tx( &self.owner_address, &self.lp_wrapper, &rust_biguint!(0), |sc| { - let milestones = ManagedVec::from(unlock_milestones); - sc.set_unlock_schedule(MultiValueEncoded::from(milestones)); + let mut milestones = MultiValueEncoded::new(); + for milestone in unlock_milestones { + milestones.push(milestone.into()); + } + + sc.set_unlock_schedule(milestones); }, ); } diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs index 2aa2993..5fff790 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs @@ -17,7 +17,7 @@ use launchpad_guaranteed_tickets_v2::{ GuaranteedTicketWinnersModule, GuaranteedTicketsSelectionOperation, }, guaranteed_tickets_init::{GuaranteedTicketInfo, GuaranteedTicketsInitModule}, - token_release::{TokenReleaseModule, UnlockMilestone}, + token_release::TokenReleaseModule, LaunchpadGuaranteedTickets, }; use multiversx_sc::types::{EgldOrEsdtTokenIdentifier, ManagedVec, MultiValueEncoded}; @@ -39,11 +39,9 @@ fn confirm_all_test() { NR_WINNING_TICKETS, launchpad_guaranteed_tickets_v2::contract_obj, ); - let unlock_milestones = vec![UnlockMilestone { - release_epoch: 0, - percentage: 10000, - }]; + let unlock_milestones = vec![(0, 10000).into()]; lp_setup.set_unlock_schedule(unlock_milestones); + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); let participants = lp_setup.participants.clone(); for (i, p) in participants.iter().enumerate() { @@ -160,6 +158,8 @@ fn redistribute_test() { NR_WINNING_TICKETS, launchpad_guaranteed_tickets_v2::contract_obj, ); + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); + let participants = lp_setup.participants.clone(); lp_setup.confirm(&participants[0], 1).assert_ok(); @@ -373,10 +373,7 @@ fn add_migration_guaranteed_tickets_distribution_isolated_steps_scenario_test() nr_winning_tickets, launchpad_guaranteed_tickets_v2::contract_obj, ); - let unlock_milestones = vec![UnlockMilestone { - release_epoch: 0, - percentage: 10000, - }]; + let unlock_milestones = vec![(0, 10000)]; lp_setup.set_unlock_schedule(unlock_milestones); let mut participants = lp_setup.participants.clone(); @@ -553,10 +550,7 @@ fn add_migration_guaranteed_tickets_distribution_and_claim_scenario_test() { nr_winning_tickets, launchpad_guaranteed_tickets_v2::contract_obj, ); - let unlock_milestones = vec![UnlockMilestone { - release_epoch: 0, - percentage: 10000, - }]; + let unlock_milestones = vec![(0, 10000)]; lp_setup.set_unlock_schedule(unlock_milestones); let mut participants = lp_setup.participants.clone(); @@ -753,10 +747,7 @@ fn condition_checks_test() { nr_winning_tickets, launchpad_guaranteed_tickets_v2::contract_obj, ); - let unlock_milestones = vec![UnlockMilestone { - release_epoch: 0, - percentage: 10000, - }]; + let unlock_milestones = vec![(0, 10000)]; lp_setup.set_unlock_schedule(unlock_milestones); let mut participants = lp_setup.participants.clone(); @@ -926,10 +917,7 @@ fn blacklist_scenario_test() { nr_winning_tickets, launchpad_guaranteed_tickets_v2::contract_obj, ); - let unlock_milestones = vec![UnlockMilestone { - release_epoch: 0, - percentage: 10000, - }]; + let unlock_milestones = vec![(0, 10000)]; lp_setup.set_unlock_schedule(unlock_milestones); let mut participants = lp_setup.participants.clone(); @@ -1206,17 +1194,11 @@ fn confirm_less_tickets_than_total_available_with_vesting_scenario_test() { nr_winning_tickets, launchpad_guaranteed_tickets_v2::contract_obj, ); - let unlock_milestones = vec![ - UnlockMilestone { - release_epoch: 0, - percentage: 5_000, - }, - UnlockMilestone { - release_epoch: 1, - percentage: 5_000, - }, - ]; + let unlock_milestones = vec![(0, 5000), (1, 5000)]; lp_setup.set_unlock_schedule(unlock_milestones); + + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); + let mut participants = lp_setup.participants.clone(); let new_participant = lp_setup @@ -1361,24 +1343,8 @@ fn vesting_with_four_milestones_test() { nr_winning_tickets, launchpad_guaranteed_tickets_v2::contract_obj, ); - let unlock_milestones = vec![ - UnlockMilestone { - release_epoch: 0, - percentage: 2_500, // 25% - }, - UnlockMilestone { - release_epoch: 1, - percentage: 2_500, // 25% - }, - UnlockMilestone { - release_epoch: 2, - percentage: 2_500, // 25% - }, - UnlockMilestone { - release_epoch: 3, - percentage: 2_500, // 25% - }, - ]; + + let unlock_milestones = vec![(0, 2500), (1, 2500), (2, 2500), (3, 2500)]; lp_setup.set_unlock_schedule(unlock_milestones); let participant = &lp_setup.participants[0].clone(); @@ -1444,26 +1410,13 @@ fn vesting_with_four_milestones_test() { } #[test] -fn unlock_milestones_wrong_order_test() { +fn unlock_milestones_wrong_step_and_order_test() { let mut lp_setup = LaunchpadSetup::new( NR_WINNING_TICKETS, launchpad_guaranteed_tickets_v2::contract_obj, ); - let unlock_milestones = vec![ - UnlockMilestone { - release_epoch: 10, - percentage: 3000, - }, - UnlockMilestone { - release_epoch: 30, - percentage: 3000, - }, - UnlockMilestone { - release_epoch: 20, - percentage: 4000, - }, - ]; + let unlock_milestones = vec![(10, 3000), (30, 3000), (20, 4000)]; lp_setup .b_mock @@ -1472,11 +1425,33 @@ fn unlock_milestones_wrong_order_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let unlock_schedule = ManagedVec::from(unlock_milestones); - sc.set_unlock_schedule(MultiValueEncoded::from(unlock_schedule)); + let mut unlock_schedule = MultiValueEncoded::new(); + for milestone in unlock_milestones.clone() { + unlock_schedule.push(milestone.into()); + } + sc.set_unlock_schedule(unlock_schedule); }, ) .assert_user_error("Invalid unlock schedule"); + + // Retry after setup period has passed + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); + + lp_setup + .b_mock + .execute_tx( + &lp_setup.owner_address, + &lp_setup.lp_wrapper, + &rust_biguint!(0), + |sc| { + let mut unlock_schedule = MultiValueEncoded::new(); + for milestone in unlock_milestones { + unlock_schedule.push(milestone.into()); + } + sc.set_unlock_schedule(unlock_schedule); + }, + ) + .assert_user_error("Add tickets period has passed"); } #[test] @@ -1488,10 +1463,7 @@ fn multiple_guaranteed_tickets_test() { ); // Set unlock schedule: 100% release immediately - let unlock_milestones = vec![UnlockMilestone { - release_epoch: 0, - percentage: 10000, - }]; + let unlock_milestones = vec![(0, 10000)]; lp_setup.set_unlock_schedule(unlock_milestones); let mut participants = lp_setup.participants.clone(); @@ -1679,10 +1651,7 @@ fn contract_pause_test() { nr_winning_tickets, launchpad_guaranteed_tickets_v2::contract_obj, ); - let unlock_milestones = vec![UnlockMilestone { - release_epoch: 0, - percentage: 10_000, - }]; + let unlock_milestones = vec![(0, 10000)]; lp_setup.set_unlock_schedule(unlock_milestones); let participant = &lp_setup.participants[0].clone(); From b864047e69b5bb972d15e3048c72c6d08637319c Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Wed, 13 Nov 2024 13:09:42 +0000 Subject: [PATCH 05/22] clippy fixes --- .../tests/guaranteed_tickets_test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs index 5fff790..1325cad 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs @@ -39,7 +39,7 @@ fn confirm_all_test() { NR_WINNING_TICKETS, launchpad_guaranteed_tickets_v2::contract_obj, ); - let unlock_milestones = vec![(0, 10000).into()]; + let unlock_milestones = vec![(0, 10000)]; lp_setup.set_unlock_schedule(unlock_milestones); lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); let participants = lp_setup.participants.clone(); From f3dc4126d9015956981885312525b3d1279e786e Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Thu, 14 Nov 2024 10:14:18 +0000 Subject: [PATCH 06/22] framework upgrade 0.54.1 --- Cargo.lock | 101 +++++++++++++++--- launchpad-common/Cargo.toml | 4 +- launchpad-guaranteed-tickets-v2/Cargo.toml | 8 +- .../meta/Cargo.toml | 4 +- .../wasm/Cargo.lock | 27 +++-- .../wasm/Cargo.toml | 2 +- launchpad-guaranteed-tickets/Cargo.toml | 8 +- launchpad-guaranteed-tickets/meta/Cargo.toml | 4 +- launchpad-guaranteed-tickets/wasm/Cargo.lock | 27 +++-- launchpad-guaranteed-tickets/wasm/Cargo.toml | 2 +- .../Cargo.toml | 8 +- .../meta/Cargo.toml | 4 +- .../wasm/Cargo.lock | 27 +++-- .../wasm/Cargo.toml | 2 +- launchpad-locked-tokens/Cargo.toml | 8 +- launchpad-locked-tokens/meta/Cargo.toml | 4 +- launchpad-locked-tokens/wasm/Cargo.lock | 27 +++-- launchpad-locked-tokens/wasm/Cargo.toml | 2 +- .../Cargo.toml | 8 +- .../meta/Cargo.toml | 4 +- .../wasm/Cargo.lock | 27 +++-- .../wasm/Cargo.toml | 2 +- .../Cargo.toml | 8 +- .../meta/Cargo.toml | 4 +- .../wasm/Cargo.lock | 27 +++-- .../wasm/Cargo.toml | 2 +- launchpad-with-nft/Cargo.toml | 8 +- launchpad-with-nft/meta/Cargo.toml | 4 +- launchpad-with-nft/wasm/Cargo.lock | 27 +++-- launchpad-with-nft/wasm/Cargo.toml | 2 +- launchpad/Cargo.toml | 10 +- launchpad/meta/Cargo.toml | 4 +- launchpad/wasm/Cargo.lock | 27 +++-- launchpad/wasm/Cargo.toml | 2 +- 34 files changed, 298 insertions(+), 137 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba5fc04..2943759 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,6 +114,12 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + [[package]] name = "cfg-if" version = "1.0.0" @@ -583,6 +589,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" + [[package]] name = "libc" version = "0.2.155" @@ -601,6 +613,16 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "multiversx-chain-core" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +dependencies = [ + "bitflags", + "multiversx-sc-codec", +] + [[package]] name = "multiversx-chain-scenario-format" version = "0.23.0" @@ -618,9 +640,9 @@ dependencies = [ [[package]] name = "multiversx-chain-vm" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c537d27dfc7a8e295d4f7c5f67a967ce66b6c3fc8e31a160e8cf28e14ecb2d" +checksum = "0d885c04e117cf5ca37303825a578385dbc880ee89890b0649dbbb22ad19dc59" dependencies = [ "bitflags", "colored", @@ -628,6 +650,7 @@ dependencies = [ "hex", "hex-literal", "itertools", + "multiversx-chain-core", "multiversx-chain-vm-executor", "num-bigint", "num-traits", @@ -645,12 +668,13 @@ checksum = "b59072fa0624b55ae5ae3fa6bfa91515bbeb4ac440214bc4a509e2c8806d6e9f" [[package]] name = "multiversx-sc" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a86a27b04bb7cca97ad8971ee57e6b978619623dde4ba9acae1d4ecb436f062" +checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" dependencies = [ "bitflags", "hex-literal", + "multiversx-chain-core", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", @@ -683,9 +707,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a6ee275d6b1c2b86394369df0bc62a3f25018cbab12668a191b89d88fdcf71" +checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" dependencies = [ "hex", "proc-macro2", @@ -696,9 +720,9 @@ dependencies = [ [[package]] name = "multiversx-sc-meta-lib" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cadbd4a972764b864e7f6b73e6963df85f7010fbd3a993d820873809bce4e93" +checksum = "1aba25f649febadc7c8fa191bfd3140feaa0b7025a4db74e298a88c554b04409" dependencies = [ "clap", "colored", @@ -711,24 +735,25 @@ dependencies = [ "serde", "serde_json", "toml", - "wasmparser", + "wasmparser 0.216.0", "wasmprinter", + "wat", ] [[package]] name = "multiversx-sc-modules" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fece2308326cc59c53fedd682259625e8ecc306e4c3b35051725ca388677b47b" +checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-scenario" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe13bdcc09d9405c5767593359c8193dc05f8271423f76bd991cfabb90056e4c" +checksum = "c802278309d07bab20b144c5dd97e5228c70e9c73a1855821d527fcc03aeb638" dependencies = [ "base64", "bech32", @@ -1074,6 +1099,12 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "unwrap-infallible" version = "0.1.5" @@ -1098,6 +1129,16 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasm-encoder" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebf48234b389415b226a4daef6562933d38c7b28a8b8f64c5c4130dad1561ab7" +dependencies = [ + "leb128", + "wasmparser 0.220.0", +] + [[package]] name = "wasmparser" version = "0.216.0" @@ -1112,6 +1153,16 @@ dependencies = [ "serde", ] +[[package]] +name = "wasmparser" +version = "0.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e246c2772ce3ebc83f89a2d4487ac5794cad6c309b2071818a88c7db7c36d87b" +dependencies = [ + "bitflags", + "indexmap", +] + [[package]] name = "wasmprinter" version = "0.216.0" @@ -1120,7 +1171,29 @@ checksum = "8f82916f3892e53620639217d6ec78fe15c678352a3fbf3f3745b6417d0bd70f" dependencies = [ "anyhow", "termcolor", - "wasmparser", + "wasmparser 0.216.0", +] + +[[package]] +name = "wast" +version = "220.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e708c8de08751fd66e70961a32bae9d71901f14a70871e181cb8461a3bb3165" +dependencies = [ + "bumpalo", + "leb128", + "memchr", + "unicode-width", + "wasm-encoder", +] + +[[package]] +name = "wat" +version = "1.220.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de4f1d7d59614ba690541360102b995c4eb1b9ed373701d5102cc1a968b1c5a3" +dependencies = [ + "wast", ] [[package]] diff --git a/launchpad-common/Cargo.toml b/launchpad-common/Cargo.toml index a408541..e6e538f 100644 --- a/launchpad-common/Cargo.toml +++ b/launchpad-common/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-modules] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-guaranteed-tickets-v2/Cargo.toml b/launchpad-guaranteed-tickets-v2/Cargo.toml index d32b1fd..c9b01ea 100644 --- a/launchpad-guaranteed-tickets-v2/Cargo.toml +++ b/launchpad-guaranteed-tickets-v2/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-modules] -version = "0.53.0" +version = "0.54.1" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" [dev-dependencies.multiversx-sc-scenario] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-guaranteed-tickets-v2/meta/Cargo.toml b/launchpad-guaranteed-tickets-v2/meta/Cargo.toml index a85b0b4..3fa1ac6 100644 --- a/launchpad-guaranteed-tickets-v2/meta/Cargo.toml +++ b/launchpad-guaranteed-tickets-v2/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock b/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock index 5c86103..340eb20 100644 --- a/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock +++ b/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock @@ -63,14 +63,25 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] +[[package]] +name = "multiversx-chain-core" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +dependencies = [ + "bitflags", + "multiversx-sc-codec", +] + [[package]] name = "multiversx-sc" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a86a27b04bb7cca97ad8971ee57e6b978619623dde4ba9acae1d4ecb436f062" +checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" dependencies = [ "bitflags", "hex-literal", + "multiversx-chain-core", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", @@ -102,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a6ee275d6b1c2b86394369df0bc62a3f25018cbab12668a191b89d88fdcf71" +checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" dependencies = [ "hex", "proc-macro2", @@ -115,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fece2308326cc59c53fedd682259625e8ecc306e4c3b35051725ca388677b47b" +checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab5bb42b3ce827227a5e38f3c24fbe0fb23d475425b049043e193186e36c590" +checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml b/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml index 8b80095..4da552a 100644 --- a/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml +++ b/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.53.0" +version = "0.54.1" [workspace] members = ["."] diff --git a/launchpad-guaranteed-tickets/Cargo.toml b/launchpad-guaranteed-tickets/Cargo.toml index 511564e..a08e74b 100644 --- a/launchpad-guaranteed-tickets/Cargo.toml +++ b/launchpad-guaranteed-tickets/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-modules] -version = "0.53.0" +version = "0.54.1" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" [dev-dependencies.multiversx-sc-scenario] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-guaranteed-tickets/meta/Cargo.toml b/launchpad-guaranteed-tickets/meta/Cargo.toml index e1eb0a4..0cdae75 100644 --- a/launchpad-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-guaranteed-tickets/wasm/Cargo.lock b/launchpad-guaranteed-tickets/wasm/Cargo.lock index 840755a..639ada3 100644 --- a/launchpad-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-guaranteed-tickets/wasm/Cargo.lock @@ -63,14 +63,25 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] +[[package]] +name = "multiversx-chain-core" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +dependencies = [ + "bitflags", + "multiversx-sc-codec", +] + [[package]] name = "multiversx-sc" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a86a27b04bb7cca97ad8971ee57e6b978619623dde4ba9acae1d4ecb436f062" +checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" dependencies = [ "bitflags", "hex-literal", + "multiversx-chain-core", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", @@ -102,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a6ee275d6b1c2b86394369df0bc62a3f25018cbab12668a191b89d88fdcf71" +checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" dependencies = [ "hex", "proc-macro2", @@ -115,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fece2308326cc59c53fedd682259625e8ecc306e4c3b35051725ca388677b47b" +checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab5bb42b3ce827227a5e38f3c24fbe0fb23d475425b049043e193186e36c590" +checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-guaranteed-tickets/wasm/Cargo.toml b/launchpad-guaranteed-tickets/wasm/Cargo.toml index 724e478..270a96e 100644 --- a/launchpad-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.53.0" +version = "0.54.1" [workspace] members = ["."] diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml index c894327..3e21f6b 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml @@ -18,16 +18,16 @@ path = "../launchpad-locked-tokens" path = "../launchpad-guaranteed-tickets" [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-modules] -version = "0.53.0" +version = "0.54.1" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" [dev-dependencies.multiversx-sc-scenario] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml index 23b9e80..ac9ce45 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock index 5115a93..17429e4 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock @@ -83,14 +83,25 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] +[[package]] +name = "multiversx-chain-core" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +dependencies = [ + "bitflags", + "multiversx-sc-codec", +] + [[package]] name = "multiversx-sc" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a86a27b04bb7cca97ad8971ee57e6b978619623dde4ba9acae1d4ecb436f062" +checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" dependencies = [ "bitflags", "hex-literal", + "multiversx-chain-core", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", @@ -122,9 +133,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a6ee275d6b1c2b86394369df0bc62a3f25018cbab12668a191b89d88fdcf71" +checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" dependencies = [ "hex", "proc-macro2", @@ -135,18 +146,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fece2308326cc59c53fedd682259625e8ecc306e4c3b35051725ca388677b47b" +checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab5bb42b3ce827227a5e38f3c24fbe0fb23d475425b049043e193186e36c590" +checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml index a14c7ef..5ecce9d 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.53.0" +version = "0.54.1" [workspace] members = ["."] diff --git a/launchpad-locked-tokens/Cargo.toml b/launchpad-locked-tokens/Cargo.toml index 784f2e6..480e0fd 100644 --- a/launchpad-locked-tokens/Cargo.toml +++ b/launchpad-locked-tokens/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-modules] -version = "0.53.0" +version = "0.54.1" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" [dev-dependencies.multiversx-sc-scenario] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-locked-tokens/meta/Cargo.toml b/launchpad-locked-tokens/meta/Cargo.toml index d34461d..07eb5d7 100644 --- a/launchpad-locked-tokens/meta/Cargo.toml +++ b/launchpad-locked-tokens/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-locked-tokens/wasm/Cargo.lock b/launchpad-locked-tokens/wasm/Cargo.lock index fc79735..091aaf9 100644 --- a/launchpad-locked-tokens/wasm/Cargo.lock +++ b/launchpad-locked-tokens/wasm/Cargo.lock @@ -63,14 +63,25 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] +[[package]] +name = "multiversx-chain-core" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +dependencies = [ + "bitflags", + "multiversx-sc-codec", +] + [[package]] name = "multiversx-sc" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a86a27b04bb7cca97ad8971ee57e6b978619623dde4ba9acae1d4ecb436f062" +checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" dependencies = [ "bitflags", "hex-literal", + "multiversx-chain-core", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", @@ -102,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a6ee275d6b1c2b86394369df0bc62a3f25018cbab12668a191b89d88fdcf71" +checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" dependencies = [ "hex", "proc-macro2", @@ -115,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fece2308326cc59c53fedd682259625e8ecc306e4c3b35051725ca388677b47b" +checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab5bb42b3ce827227a5e38f3c24fbe0fb23d475425b049043e193186e36c590" +checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-locked-tokens/wasm/Cargo.toml b/launchpad-locked-tokens/wasm/Cargo.toml index 4bd11df..cd47178 100644 --- a/launchpad-locked-tokens/wasm/Cargo.toml +++ b/launchpad-locked-tokens/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.53.0" +version = "0.54.1" [workspace] members = ["."] diff --git a/launchpad-migration-guaranteed-tickets/Cargo.toml b/launchpad-migration-guaranteed-tickets/Cargo.toml index a1c3aa6..b6f67c1 100644 --- a/launchpad-migration-guaranteed-tickets/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-modules] -version = "0.53.0" +version = "0.54.1" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" [dev-dependencies.multiversx-sc-scenario] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-migration-guaranteed-tickets/meta/Cargo.toml b/launchpad-migration-guaranteed-tickets/meta/Cargo.toml index 7b53f57..2da73d7 100644 --- a/launchpad-migration-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock b/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock index f9a0015..6861412 100644 --- a/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock @@ -63,14 +63,25 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] +[[package]] +name = "multiversx-chain-core" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +dependencies = [ + "bitflags", + "multiversx-sc-codec", +] + [[package]] name = "multiversx-sc" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a86a27b04bb7cca97ad8971ee57e6b978619623dde4ba9acae1d4ecb436f062" +checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" dependencies = [ "bitflags", "hex-literal", + "multiversx-chain-core", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", @@ -102,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a6ee275d6b1c2b86394369df0bc62a3f25018cbab12668a191b89d88fdcf71" +checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" dependencies = [ "hex", "proc-macro2", @@ -115,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fece2308326cc59c53fedd682259625e8ecc306e4c3b35051725ca388677b47b" +checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab5bb42b3ce827227a5e38f3c24fbe0fb23d475425b049043e193186e36c590" +checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml b/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml index 61be7e4..b12eafb 100644 --- a/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.53.0" +version = "0.54.1" [workspace] members = ["."] diff --git a/launchpad-nft-and-guaranteed-tickets/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/Cargo.toml index 0e9f62a..f1dfd03 100644 --- a/launchpad-nft-and-guaranteed-tickets/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/Cargo.toml @@ -18,10 +18,10 @@ path = "../launchpad-with-nft" path = "../launchpad-guaranteed-tickets" [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-modules] -version = "0.53.0" +version = "0.54.1" [dev-dependencies] num-bigint = "0.4.2" @@ -29,7 +29,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" [dev-dependencies.multiversx-sc-scenario] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml index c2ffe51..cf61caf 100644 --- a/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock index 519f25a..2273c74 100644 --- a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock @@ -83,14 +83,25 @@ dependencies = [ "multiversx-sc-modules", ] +[[package]] +name = "multiversx-chain-core" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +dependencies = [ + "bitflags", + "multiversx-sc-codec", +] + [[package]] name = "multiversx-sc" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a86a27b04bb7cca97ad8971ee57e6b978619623dde4ba9acae1d4ecb436f062" +checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" dependencies = [ "bitflags", "hex-literal", + "multiversx-chain-core", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", @@ -122,9 +133,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a6ee275d6b1c2b86394369df0bc62a3f25018cbab12668a191b89d88fdcf71" +checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" dependencies = [ "hex", "proc-macro2", @@ -135,18 +146,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fece2308326cc59c53fedd682259625e8ecc306e4c3b35051725ca388677b47b" +checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab5bb42b3ce827227a5e38f3c24fbe0fb23d475425b049043e193186e36c590" +checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml index c0f0669..a410088 100644 --- a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.53.0" +version = "0.54.1" [workspace] members = ["."] diff --git a/launchpad-with-nft/Cargo.toml b/launchpad-with-nft/Cargo.toml index 6cd674b..0a9848b 100644 --- a/launchpad-with-nft/Cargo.toml +++ b/launchpad-with-nft/Cargo.toml @@ -12,10 +12,10 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-modules] -version = "0.53.0" +version = "0.54.1" [dev-dependencies] num-bigint = "0.4.2" @@ -23,7 +23,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" [dev-dependencies.multiversx-sc-scenario] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-with-nft/meta/Cargo.toml b/launchpad-with-nft/meta/Cargo.toml index 3cefa2f..059083f 100644 --- a/launchpad-with-nft/meta/Cargo.toml +++ b/launchpad-with-nft/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad-with-nft/wasm/Cargo.lock b/launchpad-with-nft/wasm/Cargo.lock index 761b4c8..d6a6008 100644 --- a/launchpad-with-nft/wasm/Cargo.lock +++ b/launchpad-with-nft/wasm/Cargo.lock @@ -63,14 +63,25 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] +[[package]] +name = "multiversx-chain-core" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +dependencies = [ + "bitflags", + "multiversx-sc-codec", +] + [[package]] name = "multiversx-sc" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a86a27b04bb7cca97ad8971ee57e6b978619623dde4ba9acae1d4ecb436f062" +checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" dependencies = [ "bitflags", "hex-literal", + "multiversx-chain-core", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", @@ -102,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a6ee275d6b1c2b86394369df0bc62a3f25018cbab12668a191b89d88fdcf71" +checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" dependencies = [ "hex", "proc-macro2", @@ -115,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fece2308326cc59c53fedd682259625e8ecc306e4c3b35051725ca388677b47b" +checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab5bb42b3ce827227a5e38f3c24fbe0fb23d475425b049043e193186e36c590" +checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-with-nft/wasm/Cargo.toml b/launchpad-with-nft/wasm/Cargo.toml index bc937e3..4326baa 100644 --- a/launchpad-with-nft/wasm/Cargo.toml +++ b/launchpad-with-nft/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.53.0" +version = "0.54.1" [workspace] members = ["."] diff --git a/launchpad/Cargo.toml b/launchpad/Cargo.toml index f63772f..a4841fe 100644 --- a/launchpad/Cargo.toml +++ b/launchpad/Cargo.toml @@ -12,10 +12,10 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.53.0" - -[dev-dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-modules] -version = "0.53.0" +version = "0.54.1" + +[dev-dependencies.multiversx-sc-meta-lib] +version = "0.54.1" diff --git a/launchpad/meta/Cargo.toml b/launchpad/meta/Cargo.toml index 6c06702..59a39e9 100644 --- a/launchpad/meta/Cargo.toml +++ b/launchpad/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.53.0" +version = "0.54.1" [dependencies.multiversx-sc-meta-lib] -version = "0.53.0" +version = "0.54.1" diff --git a/launchpad/wasm/Cargo.lock b/launchpad/wasm/Cargo.lock index 2dc9ffb..fbab8e0 100644 --- a/launchpad/wasm/Cargo.lock +++ b/launchpad/wasm/Cargo.lock @@ -63,14 +63,25 @@ dependencies = [ "multiversx-sc-wasm-adapter", ] +[[package]] +name = "multiversx-chain-core" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +dependencies = [ + "bitflags", + "multiversx-sc-codec", +] + [[package]] name = "multiversx-sc" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a86a27b04bb7cca97ad8971ee57e6b978619623dde4ba9acae1d4ecb436f062" +checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" dependencies = [ "bitflags", "hex-literal", + "multiversx-chain-core", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", @@ -102,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a6ee275d6b1c2b86394369df0bc62a3f25018cbab12668a191b89d88fdcf71" +checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" dependencies = [ "hex", "proc-macro2", @@ -115,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fece2308326cc59c53fedd682259625e8ecc306e4c3b35051725ca388677b47b" +checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.53.0" +version = "0.54.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab5bb42b3ce827227a5e38f3c24fbe0fb23d475425b049043e193186e36c590" +checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" dependencies = [ "multiversx-sc", ] diff --git a/launchpad/wasm/Cargo.toml b/launchpad/wasm/Cargo.toml index fb84820..377aa87 100644 --- a/launchpad/wasm/Cargo.toml +++ b/launchpad/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.53.0" +version = "0.54.1" [workspace] members = ["."] From 060fbbc86047d5f6e7d2b43130053523b91c2e83 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Thu, 14 Nov 2024 10:41:58 +0000 Subject: [PATCH 07/22] launchpad v2 addTickets new parameter types --- .../src/guaranteed_tickets_init.rs | 20 ++- launchpad-guaranteed-tickets-v2/src/lib.rs | 2 +- .../tests/guaranteed_tickets_setup/mod.rs | 32 +++-- .../tests/guaranteed_tickets_test.rs | 120 ++++++++---------- 4 files changed, 91 insertions(+), 83 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index 2845d6a..79bb5e8 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -39,7 +39,7 @@ pub trait GuaranteedTicketsInitModule: fn add_tickets_with_guaranteed_winners( &self, address_number_pairs: MultiValueEncoded< - MultiValue3>, + MultiValue3>>, >, ) -> AddTicketsResult { self.require_add_tickets_period(); @@ -52,9 +52,9 @@ pub trait GuaranteedTicketsInitModule: let mut total_guaranteed_tickets_added = 0; for multi_arg in address_number_pairs { - let (buyer, total_tickets_allowance, guaranteed_ticket_infos) = multi_arg.into_tuple(); + let (buyer, total_tickets_allowance, guaranteed_ticket_raw) = multi_arg.into_tuple(); require!( - guaranteed_ticket_infos.len() <= MAX_GUARANTEED_TICKETS_ENTRIES, + guaranteed_ticket_raw.len() <= MAX_GUARANTEED_TICKETS_ENTRIES, "Number of guaranteed tickets entries exceeds maximum allowed" ); @@ -64,12 +64,20 @@ pub trait GuaranteedTicketsInitModule: let mut user_guaranteed_tickets = 0; - for info in guaranteed_ticket_infos.iter() { + let mut guaranteed_ticket_infos = ManagedVec::new(); + for info in guaranteed_ticket_raw.into_iter() { + let (guaranteed_tickets, min_confirmed_tickets) = info.into_tuple(); require!( - info.guaranteed_tickets <= info.min_confirmed_tickets, + guaranteed_tickets <= min_confirmed_tickets, "Invalid guaranteed ticket min confirmed tickets" ); - user_guaranteed_tickets += info.guaranteed_tickets; + user_guaranteed_tickets += guaranteed_tickets; + + let guaranteed_ticket_info = GuaranteedTicketInfo { + guaranteed_tickets, + min_confirmed_tickets, + }; + guaranteed_ticket_infos.push(guaranteed_ticket_info); } if user_guaranteed_tickets > 0 { diff --git a/launchpad-guaranteed-tickets-v2/src/lib.rs b/launchpad-guaranteed-tickets-v2/src/lib.rs index 9bc652f..90d8566 100644 --- a/launchpad-guaranteed-tickets-v2/src/lib.rs +++ b/launchpad-guaranteed-tickets-v2/src/lib.rs @@ -72,7 +72,7 @@ pub trait LaunchpadGuaranteedTickets: fn add_tickets_endpoint( &self, address_number_pairs: MultiValueEncoded< - MultiValue3>, + MultiValue3>>, >, ) { let total_users_count = address_number_pairs.len(); diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs index 6d5214e..5c8c44b 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs @@ -1,5 +1,6 @@ use multiversx_sc::types::{ - Address, EgldOrEsdtTokenIdentifier, ManagedVec, MultiValueEncoded, OperationCompletionStatus, + Address, EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueEncodedCounted, + OperationCompletionStatus, }; use launchpad_common::{ @@ -9,9 +10,7 @@ use launchpad_common::{ user_interactions::UserInteractionsModule, winner_selection::WinnerSelectionModule, }; -use launchpad_guaranteed_tickets_v2::{ - guaranteed_tickets_init::GuaranteedTicketInfo, token_release::TokenReleaseModule, -}; +use launchpad_guaranteed_tickets_v2::token_release::TokenReleaseModule; use launchpad_guaranteed_tickets_v2::{ guaranteed_tickets_init::GuaranteedTicketsInitModule, LaunchpadGuaranteedTickets, }; @@ -97,16 +96,29 @@ where b_mock .execute_tx(&owner_address, &lp_wrapper, &rust_zero, |sc| { let mut args = MultiValueEncoded::new(); - args.push((managed_address!(&participants[0]), 1, ManagedVec::new()).into()); - args.push((managed_address!(&participants[1]), 2, ManagedVec::new()).into()); + args.push( + ( + managed_address!(&participants[0]), + 1, + MultiValueEncodedCounted::new(), + ) + .into(), + ); + args.push( + ( + managed_address!(&participants[1]), + 2, + MultiValueEncodedCounted::new(), + ) + .into(), + ); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 3).into()); args.push( ( managed_address!(&participants[2]), MAX_TIER_TICKETS, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 3, - }), + guaranteed_tickets_info, ) .into(), ); diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs index 1325cad..6591497 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs @@ -16,11 +16,13 @@ use launchpad_guaranteed_tickets_v2::{ guaranteed_ticket_winners::{ GuaranteedTicketWinnersModule, GuaranteedTicketsSelectionOperation, }, - guaranteed_tickets_init::{GuaranteedTicketInfo, GuaranteedTicketsInitModule}, + guaranteed_tickets_init::GuaranteedTicketsInitModule, token_release::TokenReleaseModule, LaunchpadGuaranteedTickets, }; -use multiversx_sc::types::{EgldOrEsdtTokenIdentifier, ManagedVec, MultiValueEncoded}; +use multiversx_sc::types::{ + EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueEncodedCounted, +}; use multiversx_sc_scenario::{managed_address, managed_biguint, rust_biguint}; use crate::guaranteed_tickets_setup::NR_WINNING_TICKETS; @@ -259,14 +261,13 @@ fn combined_scenario_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 3).into()); args.push( ( managed_address!(&new_participant), MAX_TIER_TICKETS, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 3, - }), + guaranteed_tickets_info, ) .into(), ); @@ -274,7 +275,7 @@ fn combined_scenario_test() { ( managed_address!(&second_new_participant), 1, - ManagedVec::new(), + MultiValueEncodedCounted::new(), ) .into(), ); @@ -397,25 +398,23 @@ fn add_migration_guaranteed_tickets_distribution_isolated_steps_scenario_test() &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 1).into()); args.push( ( managed_address!(&new_participant), 1, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 1, - }), + guaranteed_tickets_info, ) .into(), ); + let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); + guaranteed_tickets_info2.push((2, 3).into()); args.push( ( managed_address!(&second_new_participant), MAX_TIER_TICKETS * 2, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 2, - min_confirmed_tickets: 3, - }), + guaranteed_tickets_info2, ) .into(), ); @@ -574,25 +573,23 @@ fn add_migration_guaranteed_tickets_distribution_and_claim_scenario_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 1).into()); args.push( ( managed_address!(&new_participant), 1, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 1, - }), + guaranteed_tickets_info, ) .into(), ); + let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); + guaranteed_tickets_info2.push((2, 3).into()); args.push( ( managed_address!(&second_new_participant), MAX_TIER_TICKETS * 2, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 2, - min_confirmed_tickets: 3, - }), + guaranteed_tickets_info2, ) .into(), ); @@ -766,14 +763,13 @@ fn condition_checks_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 1).into()); args.push( ( managed_address!(&new_participant), 1, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 1, - }), + guaranteed_tickets_info, ) .into(), ); @@ -789,14 +785,13 @@ fn condition_checks_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 1).into()); args.push( ( managed_address!(&new_participant), 1, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 1, - }), + guaranteed_tickets_info, ) .into(), ); @@ -815,14 +810,13 @@ fn condition_checks_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 1).into()); args.push( ( managed_address!(&new_participant), 1, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 1, - }), + guaranteed_tickets_info, ) .into(), ); @@ -944,25 +938,23 @@ fn blacklist_scenario_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 1).into()); args.push( ( managed_address!(&new_participant), 1, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 1, - }), + guaranteed_tickets_info, ) .into(), ); + let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); + guaranteed_tickets_info2.push((1, 1).into()); args.push( ( managed_address!(&second_new_participant), 2, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 1, - }), + guaranteed_tickets_info2, ) .into(), ); @@ -1215,14 +1207,13 @@ fn confirm_less_tickets_than_total_available_with_vesting_scenario_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 1).into()); args.push( ( managed_address!(&new_participant), 1, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 1, - }), + guaranteed_tickets_info, ) .into(), ); @@ -1495,40 +1486,37 @@ fn multiple_guaranteed_tickets_test() { |sc| { let mut args = MultiValueEncoded::new(); // New participant: 1 guaranteed ticket if confirms 2 + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 2).into()); args.push( ( managed_address!(&new_participant), 2, - ManagedVec::from_single_item(GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 2, - }), + guaranteed_tickets_info, ) .into(), ); // Second new participant: complex guaranteed tickets structure + let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); + guaranteed_tickets_info2.push((1, 6).into()); + guaranteed_tickets_info2.push((2, 4).into()); + guaranteed_tickets_info2.push((3, 3).into()); args.push( ( managed_address!(&second_new_participant), 6, - ManagedVec::from(vec![ - GuaranteedTicketInfo { - guaranteed_tickets: 1, - min_confirmed_tickets: 6, - }, - GuaranteedTicketInfo { - guaranteed_tickets: 2, - min_confirmed_tickets: 4, - }, - GuaranteedTicketInfo { - guaranteed_tickets: 3, - min_confirmed_tickets: 3, - }, - ]), + guaranteed_tickets_info2, + ) + .into(), + ); + args.push( + ( + managed_address!(&participants[5]), + 9, + MultiValueEncodedCounted::new(), ) .into(), ); - args.push((managed_address!(&participants[5]), 9, ManagedVec::new()).into()); sc.add_tickets_endpoint(args); }, ) From d10268ae986a72262c7ec6f0b93b8508ea42838c Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Mon, 18 Nov 2024 12:53:56 +0000 Subject: [PATCH 08/22] framework upgrade 0.54.2 --- Cargo.lock | 36 +++++++++---------- launchpad-common/Cargo.toml | 4 +-- launchpad-guaranteed-tickets-v2/Cargo.toml | 8 ++--- .../meta/Cargo.toml | 4 +-- .../wasm/Cargo.lock | 32 ++++++++--------- .../wasm/Cargo.toml | 2 +- launchpad-guaranteed-tickets/Cargo.toml | 8 ++--- launchpad-guaranteed-tickets/meta/Cargo.toml | 4 +-- launchpad-guaranteed-tickets/wasm/Cargo.lock | 32 ++++++++--------- launchpad-guaranteed-tickets/wasm/Cargo.toml | 2 +- .../Cargo.toml | 8 ++--- .../meta/Cargo.toml | 4 +-- .../wasm/Cargo.lock | 32 ++++++++--------- .../wasm/Cargo.toml | 2 +- launchpad-locked-tokens/Cargo.toml | 8 ++--- launchpad-locked-tokens/meta/Cargo.toml | 4 +-- launchpad-locked-tokens/wasm/Cargo.lock | 32 ++++++++--------- launchpad-locked-tokens/wasm/Cargo.toml | 2 +- .../Cargo.toml | 8 ++--- .../meta/Cargo.toml | 4 +-- .../wasm/Cargo.lock | 32 ++++++++--------- .../wasm/Cargo.toml | 2 +- .../Cargo.toml | 8 ++--- .../meta/Cargo.toml | 4 +-- .../wasm/Cargo.lock | 32 ++++++++--------- .../wasm/Cargo.toml | 2 +- launchpad-with-nft/Cargo.toml | 8 ++--- launchpad-with-nft/meta/Cargo.toml | 4 +-- launchpad-with-nft/wasm/Cargo.lock | 32 ++++++++--------- launchpad-with-nft/wasm/Cargo.toml | 2 +- launchpad/Cargo.toml | 6 ++-- launchpad/meta/Cargo.toml | 4 +-- launchpad/wasm/Cargo.lock | 32 ++++++++--------- launchpad/wasm/Cargo.toml | 2 +- 34 files changed, 203 insertions(+), 203 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2943759..35834b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -615,9 +615,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -640,9 +640,9 @@ dependencies = [ [[package]] name = "multiversx-chain-vm" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d885c04e117cf5ca37303825a578385dbc880ee89890b0649dbbb22ad19dc59" +checksum = "fb84ccafc930d8a9d84de56758cef7070bfce951475d3f751be447acd4404d7a" dependencies = [ "bitflags", "colored", @@ -668,9 +668,9 @@ checksum = "b59072fa0624b55ae5ae3fa6bfa91515bbeb4ac440214bc4a509e2c8806d6e9f" [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -683,9 +683,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -695,9 +695,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -707,9 +707,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -720,9 +720,9 @@ dependencies = [ [[package]] name = "multiversx-sc-meta-lib" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aba25f649febadc7c8fa191bfd3140feaa0b7025a4db74e298a88c554b04409" +checksum = "90ff342ab443d1815b1ec3c0be10048d3004fa62146307fc507f13787fe1503f" dependencies = [ "clap", "colored", @@ -742,18 +742,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-scenario" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c802278309d07bab20b144c5dd97e5228c70e9c73a1855821d527fcc03aeb638" +checksum = "7a4ad9cef428cd8f92012aedf43c68f677bb606efec199b0157b62d384fc17eb" dependencies = [ "base64", "bech32", diff --git a/launchpad-common/Cargo.toml b/launchpad-common/Cargo.toml index e6e538f..e413f37 100644 --- a/launchpad-common/Cargo.toml +++ b/launchpad-common/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-guaranteed-tickets-v2/Cargo.toml b/launchpad-guaranteed-tickets-v2/Cargo.toml index c9b01ea..c76e42b 100644 --- a/launchpad-guaranteed-tickets-v2/Cargo.toml +++ b/launchpad-guaranteed-tickets-v2/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-guaranteed-tickets-v2/meta/Cargo.toml b/launchpad-guaranteed-tickets-v2/meta/Cargo.toml index 3fa1ac6..449c5c4 100644 --- a/launchpad-guaranteed-tickets-v2/meta/Cargo.toml +++ b/launchpad-guaranteed-tickets-v2/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock b/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock index 340eb20..d6d199e 100644 --- a/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock +++ b/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml b/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml index 4da552a..c69ccf2 100644 --- a/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml +++ b/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-guaranteed-tickets/Cargo.toml b/launchpad-guaranteed-tickets/Cargo.toml index a08e74b..59ea3d8 100644 --- a/launchpad-guaranteed-tickets/Cargo.toml +++ b/launchpad-guaranteed-tickets/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-guaranteed-tickets/meta/Cargo.toml b/launchpad-guaranteed-tickets/meta/Cargo.toml index 0cdae75..9497f5d 100644 --- a/launchpad-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-guaranteed-tickets/wasm/Cargo.lock b/launchpad-guaranteed-tickets/wasm/Cargo.lock index 639ada3..44b1211 100644 --- a/launchpad-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-guaranteed-tickets/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-guaranteed-tickets/wasm/Cargo.toml b/launchpad-guaranteed-tickets/wasm/Cargo.toml index 270a96e..d646efe 100644 --- a/launchpad-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml index 3e21f6b..c734109 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml @@ -18,16 +18,16 @@ path = "../launchpad-locked-tokens" path = "../launchpad-guaranteed-tickets" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml index ac9ce45..acc3452 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock index 17429e4..2ac324a 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -85,9 +85,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -95,9 +95,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -121,9 +121,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -133,9 +133,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -146,18 +146,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml index 5ecce9d..05caecf 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-locked-tokens/Cargo.toml b/launchpad-locked-tokens/Cargo.toml index 480e0fd..783da94 100644 --- a/launchpad-locked-tokens/Cargo.toml +++ b/launchpad-locked-tokens/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-locked-tokens/meta/Cargo.toml b/launchpad-locked-tokens/meta/Cargo.toml index 07eb5d7..6d80b9a 100644 --- a/launchpad-locked-tokens/meta/Cargo.toml +++ b/launchpad-locked-tokens/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-locked-tokens/wasm/Cargo.lock b/launchpad-locked-tokens/wasm/Cargo.lock index 091aaf9..cfd83be 100644 --- a/launchpad-locked-tokens/wasm/Cargo.lock +++ b/launchpad-locked-tokens/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-locked-tokens/wasm/Cargo.toml b/launchpad-locked-tokens/wasm/Cargo.toml index cd47178..9fce1fa 100644 --- a/launchpad-locked-tokens/wasm/Cargo.toml +++ b/launchpad-locked-tokens/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-migration-guaranteed-tickets/Cargo.toml b/launchpad-migration-guaranteed-tickets/Cargo.toml index b6f67c1..864450c 100644 --- a/launchpad-migration-guaranteed-tickets/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-migration-guaranteed-tickets/meta/Cargo.toml b/launchpad-migration-guaranteed-tickets/meta/Cargo.toml index 2da73d7..c8ff028 100644 --- a/launchpad-migration-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock b/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock index 6861412..6c48855 100644 --- a/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml b/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml index b12eafb..eaeecf6 100644 --- a/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-nft-and-guaranteed-tickets/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/Cargo.toml index f1dfd03..ba31676 100644 --- a/launchpad-nft-and-guaranteed-tickets/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/Cargo.toml @@ -18,10 +18,10 @@ path = "../launchpad-with-nft" path = "../launchpad-guaranteed-tickets" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" @@ -29,7 +29,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml index cf61caf..832311c 100644 --- a/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock index 2273c74..709efc6 100644 --- a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -85,9 +85,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -95,9 +95,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -121,9 +121,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -133,9 +133,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -146,18 +146,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml index a410088..be91896 100644 --- a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-with-nft/Cargo.toml b/launchpad-with-nft/Cargo.toml index 0a9848b..7930bdb 100644 --- a/launchpad-with-nft/Cargo.toml +++ b/launchpad-with-nft/Cargo.toml @@ -12,10 +12,10 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" @@ -23,7 +23,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-with-nft/meta/Cargo.toml b/launchpad-with-nft/meta/Cargo.toml index 059083f..2ca64a7 100644 --- a/launchpad-with-nft/meta/Cargo.toml +++ b/launchpad-with-nft/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-with-nft/wasm/Cargo.lock b/launchpad-with-nft/wasm/Cargo.lock index d6a6008..0a3ee56 100644 --- a/launchpad-with-nft/wasm/Cargo.lock +++ b/launchpad-with-nft/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-with-nft/wasm/Cargo.toml b/launchpad-with-nft/wasm/Cargo.toml index 4326baa..473cb1a 100644 --- a/launchpad-with-nft/wasm/Cargo.toml +++ b/launchpad-with-nft/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad/Cargo.toml b/launchpad/Cargo.toml index a4841fe..822b0ee 100644 --- a/launchpad/Cargo.toml +++ b/launchpad/Cargo.toml @@ -12,10 +12,10 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad/meta/Cargo.toml b/launchpad/meta/Cargo.toml index 59a39e9..970b48a 100644 --- a/launchpad/meta/Cargo.toml +++ b/launchpad/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad/wasm/Cargo.lock b/launchpad/wasm/Cargo.lock index fbab8e0..fa806b9 100644 --- a/launchpad/wasm/Cargo.lock +++ b/launchpad/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad/wasm/Cargo.toml b/launchpad/wasm/Cargo.toml index 377aa87..8742699 100644 --- a/launchpad/wasm/Cargo.toml +++ b/launchpad/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] From 70b4b5f556adbe0bfb5ffe597b4a6fc6db282f23 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Mon, 18 Nov 2024 12:53:56 +0000 Subject: [PATCH 09/22] framework upgrade 0.54.2 --- Cargo.lock | 36 +++++++++---------- launchpad-common/Cargo.toml | 4 +-- launchpad-guaranteed-tickets-v2/Cargo.toml | 8 ++--- .../meta/Cargo.toml | 4 +-- .../wasm/Cargo.lock | 32 ++++++++--------- .../wasm/Cargo.toml | 2 +- launchpad-guaranteed-tickets/Cargo.toml | 8 ++--- launchpad-guaranteed-tickets/meta/Cargo.toml | 4 +-- launchpad-guaranteed-tickets/wasm/Cargo.lock | 32 ++++++++--------- launchpad-guaranteed-tickets/wasm/Cargo.toml | 2 +- .../Cargo.toml | 8 ++--- .../meta/Cargo.toml | 4 +-- .../wasm/Cargo.lock | 32 ++++++++--------- .../wasm/Cargo.toml | 2 +- launchpad-locked-tokens/Cargo.toml | 8 ++--- launchpad-locked-tokens/meta/Cargo.toml | 4 +-- launchpad-locked-tokens/wasm/Cargo.lock | 32 ++++++++--------- launchpad-locked-tokens/wasm/Cargo.toml | 2 +- .../Cargo.toml | 8 ++--- .../meta/Cargo.toml | 4 +-- .../wasm/Cargo.lock | 32 ++++++++--------- .../wasm/Cargo.toml | 2 +- .../Cargo.toml | 8 ++--- .../meta/Cargo.toml | 4 +-- .../wasm/Cargo.lock | 32 ++++++++--------- .../wasm/Cargo.toml | 2 +- launchpad-with-nft/Cargo.toml | 8 ++--- launchpad-with-nft/meta/Cargo.toml | 4 +-- launchpad-with-nft/wasm/Cargo.lock | 32 ++++++++--------- launchpad-with-nft/wasm/Cargo.toml | 2 +- launchpad/Cargo.toml | 6 ++-- launchpad/meta/Cargo.toml | 4 +-- launchpad/wasm/Cargo.lock | 32 ++++++++--------- launchpad/wasm/Cargo.toml | 2 +- 34 files changed, 203 insertions(+), 203 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2943759..35834b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -615,9 +615,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -640,9 +640,9 @@ dependencies = [ [[package]] name = "multiversx-chain-vm" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d885c04e117cf5ca37303825a578385dbc880ee89890b0649dbbb22ad19dc59" +checksum = "fb84ccafc930d8a9d84de56758cef7070bfce951475d3f751be447acd4404d7a" dependencies = [ "bitflags", "colored", @@ -668,9 +668,9 @@ checksum = "b59072fa0624b55ae5ae3fa6bfa91515bbeb4ac440214bc4a509e2c8806d6e9f" [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -683,9 +683,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -695,9 +695,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -707,9 +707,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -720,9 +720,9 @@ dependencies = [ [[package]] name = "multiversx-sc-meta-lib" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aba25f649febadc7c8fa191bfd3140feaa0b7025a4db74e298a88c554b04409" +checksum = "90ff342ab443d1815b1ec3c0be10048d3004fa62146307fc507f13787fe1503f" dependencies = [ "clap", "colored", @@ -742,18 +742,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-scenario" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c802278309d07bab20b144c5dd97e5228c70e9c73a1855821d527fcc03aeb638" +checksum = "7a4ad9cef428cd8f92012aedf43c68f677bb606efec199b0157b62d384fc17eb" dependencies = [ "base64", "bech32", diff --git a/launchpad-common/Cargo.toml b/launchpad-common/Cargo.toml index e6e538f..e413f37 100644 --- a/launchpad-common/Cargo.toml +++ b/launchpad-common/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-guaranteed-tickets-v2/Cargo.toml b/launchpad-guaranteed-tickets-v2/Cargo.toml index c9b01ea..c76e42b 100644 --- a/launchpad-guaranteed-tickets-v2/Cargo.toml +++ b/launchpad-guaranteed-tickets-v2/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-guaranteed-tickets-v2/meta/Cargo.toml b/launchpad-guaranteed-tickets-v2/meta/Cargo.toml index 3fa1ac6..449c5c4 100644 --- a/launchpad-guaranteed-tickets-v2/meta/Cargo.toml +++ b/launchpad-guaranteed-tickets-v2/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock b/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock index 340eb20..d6d199e 100644 --- a/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock +++ b/launchpad-guaranteed-tickets-v2/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml b/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml index 4da552a..c69ccf2 100644 --- a/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml +++ b/launchpad-guaranteed-tickets-v2/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-guaranteed-tickets/Cargo.toml b/launchpad-guaranteed-tickets/Cargo.toml index a08e74b..59ea3d8 100644 --- a/launchpad-guaranteed-tickets/Cargo.toml +++ b/launchpad-guaranteed-tickets/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-guaranteed-tickets/meta/Cargo.toml b/launchpad-guaranteed-tickets/meta/Cargo.toml index 0cdae75..9497f5d 100644 --- a/launchpad-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-guaranteed-tickets/wasm/Cargo.lock b/launchpad-guaranteed-tickets/wasm/Cargo.lock index 639ada3..44b1211 100644 --- a/launchpad-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-guaranteed-tickets/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-guaranteed-tickets/wasm/Cargo.toml b/launchpad-guaranteed-tickets/wasm/Cargo.toml index 270a96e..d646efe 100644 --- a/launchpad-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml index 3e21f6b..c734109 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/Cargo.toml @@ -18,16 +18,16 @@ path = "../launchpad-locked-tokens" path = "../launchpad-guaranteed-tickets" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml index ac9ce45..acc3452 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock index 17429e4..2ac324a 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -85,9 +85,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -95,9 +95,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -121,9 +121,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -133,9 +133,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -146,18 +146,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml index 5ecce9d..05caecf 100644 --- a/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-locked-tokens-and-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-locked-tokens/Cargo.toml b/launchpad-locked-tokens/Cargo.toml index 480e0fd..783da94 100644 --- a/launchpad-locked-tokens/Cargo.toml +++ b/launchpad-locked-tokens/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-locked-tokens/meta/Cargo.toml b/launchpad-locked-tokens/meta/Cargo.toml index 07eb5d7..6d80b9a 100644 --- a/launchpad-locked-tokens/meta/Cargo.toml +++ b/launchpad-locked-tokens/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-locked-tokens/wasm/Cargo.lock b/launchpad-locked-tokens/wasm/Cargo.lock index 091aaf9..cfd83be 100644 --- a/launchpad-locked-tokens/wasm/Cargo.lock +++ b/launchpad-locked-tokens/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-locked-tokens/wasm/Cargo.toml b/launchpad-locked-tokens/wasm/Cargo.toml index cd47178..9fce1fa 100644 --- a/launchpad-locked-tokens/wasm/Cargo.toml +++ b/launchpad-locked-tokens/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-migration-guaranteed-tickets/Cargo.toml b/launchpad-migration-guaranteed-tickets/Cargo.toml index b6f67c1..864450c 100644 --- a/launchpad-migration-guaranteed-tickets/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/Cargo.toml @@ -12,16 +12,16 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-migration-guaranteed-tickets/meta/Cargo.toml b/launchpad-migration-guaranteed-tickets/meta/Cargo.toml index 2da73d7..c8ff028 100644 --- a/launchpad-migration-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock b/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock index 6861412..6c48855 100644 --- a/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-migration-guaranteed-tickets/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml b/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml index b12eafb..eaeecf6 100644 --- a/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-migration-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-nft-and-guaranteed-tickets/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/Cargo.toml index f1dfd03..ba31676 100644 --- a/launchpad-nft-and-guaranteed-tickets/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/Cargo.toml @@ -18,10 +18,10 @@ path = "../launchpad-with-nft" path = "../launchpad-guaranteed-tickets" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" @@ -29,7 +29,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml index cf61caf..832311c 100644 --- a/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock index 2273c74..709efc6 100644 --- a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock +++ b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -85,9 +85,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -95,9 +95,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -121,9 +121,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -133,9 +133,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -146,18 +146,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml index a410088..be91896 100644 --- a/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml +++ b/launchpad-nft-and-guaranteed-tickets/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad-with-nft/Cargo.toml b/launchpad-with-nft/Cargo.toml index 0a9848b..7930bdb 100644 --- a/launchpad-with-nft/Cargo.toml +++ b/launchpad-with-nft/Cargo.toml @@ -12,10 +12,10 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies] num-bigint = "0.4.2" @@ -23,7 +23,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-scenario] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-with-nft/meta/Cargo.toml b/launchpad-with-nft/meta/Cargo.toml index 059083f..2ca64a7 100644 --- a/launchpad-with-nft/meta/Cargo.toml +++ b/launchpad-with-nft/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad-with-nft/wasm/Cargo.lock b/launchpad-with-nft/wasm/Cargo.lock index d6a6008..0a3ee56 100644 --- a/launchpad-with-nft/wasm/Cargo.lock +++ b/launchpad-with-nft/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad-with-nft/wasm/Cargo.toml b/launchpad-with-nft/wasm/Cargo.toml index 4326baa..473cb1a 100644 --- a/launchpad-with-nft/wasm/Cargo.toml +++ b/launchpad-with-nft/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] diff --git a/launchpad/Cargo.toml b/launchpad/Cargo.toml index a4841fe..822b0ee 100644 --- a/launchpad/Cargo.toml +++ b/launchpad/Cargo.toml @@ -12,10 +12,10 @@ path = "src/lib.rs" path = "../launchpad-common" [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-modules] -version = "0.54.1" +version = "0.54.2" [dev-dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad/meta/Cargo.toml b/launchpad/meta/Cargo.toml index 59a39e9..970b48a 100644 --- a/launchpad/meta/Cargo.toml +++ b/launchpad/meta/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = ".." [dependencies.multiversx-sc] -version = "0.54.1" +version = "0.54.2" [dependencies.multiversx-sc-meta-lib] -version = "0.54.1" +version = "0.54.2" diff --git a/launchpad/wasm/Cargo.lock b/launchpad/wasm/Cargo.lock index fbab8e0..fa806b9 100644 --- a/launchpad/wasm/Cargo.lock +++ b/launchpad/wasm/Cargo.lock @@ -10,9 +10,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" @@ -65,9 +65,9 @@ dependencies = [ [[package]] name = "multiversx-chain-core" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c1088b268cad0d8c1146df9ca71a1f2baaee78267ab75e2202c0c0c71cc4b6e" +checksum = "c483122550dca9dd4286f970000d855e9d0184e4fe5c5527209a131ac1207638" dependencies = [ "bitflags", "multiversx-sc-codec", @@ -75,9 +75,9 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4abf60eb027d0b005a1778dc9d670a473065ab8e5bea22eeb6ace7f118dc36f" +checksum = "c2e8edabd1e3eea1c85f96485d88116a95f57429b8e4f002444d6465608d1bf5" dependencies = [ "bitflags", "hex-literal", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" +checksum = "2b72f7f6a3e0828c5e38fe0e98298706837f8337fe06bca3ff21df22c84b6256" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "multiversx-sc-codec-derive" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" +checksum = "23b915f0f463fd1811de124b51d68cb2067f5a4796cde2a9570316780cf18961" dependencies = [ "hex", "proc-macro2", @@ -113,9 +113,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3caeda89d90190c4002f7482e934e3981968d6853f70f865d23c8d2938bd907b" +checksum = "c8712fed727b0f22094616c6398c821899e03f5998dab619acd54ece669de3e8" dependencies = [ "hex", "proc-macro2", @@ -126,18 +126,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f7a758e2d5dc3e87fd095cb76d47f3cf4b0cee41b5415aa95b8e323ffe162" +checksum = "1b172d4130662f912e8812ca5f58ec92c7f566ac5adcb244a8e68f1289ece886" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.54.1" +version = "0.54.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b10f0b29d4bcd7520e659ae2429ea9a4f02b7203a77d7788bebc79786babd250" +checksum = "6c143d26d1b683d96b10c49f373d980fe573c77f5f7826f97a2214cfd65348f3" dependencies = [ "multiversx-sc", ] diff --git a/launchpad/wasm/Cargo.toml b/launchpad/wasm/Cargo.toml index 377aa87..8742699 100644 --- a/launchpad/wasm/Cargo.toml +++ b/launchpad/wasm/Cargo.toml @@ -28,7 +28,7 @@ panic = "abort" path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.54.1" +version = "0.54.2" [workspace] members = ["."] From fcfe8cbb5062cb81fe3bef4b93b8b4e226df0a43 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Mon, 18 Nov 2024 13:16:45 +0000 Subject: [PATCH 10/22] fix after framework upgrade --- .../src/guaranteed_tickets_init.rs | 4 ++++ launchpad-guaranteed-tickets-v2/src/lib.rs | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index 79bb5e8..7f3bc62 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -25,6 +25,7 @@ impl UserTicketsStatus { } pub struct AddTicketsResult { + pub total_users_count: usize, pub total_tickets_added: usize, pub total_guaranteed_tickets_added: usize, } @@ -48,6 +49,7 @@ pub trait GuaranteedTicketsInitModule: let mut total_winning_tickets = self.nr_winning_tickets().get(); let mut total_guaranteed_tickets = self.total_guaranteed_tickets().get(); + let mut total_users_count = 0; let mut total_tickets_added = 0; let mut total_guaranteed_tickets_added = 0; @@ -93,6 +95,7 @@ pub trait GuaranteedTicketsInitModule: } total_tickets_added += total_tickets_allowance; + total_users_count += 1; self.user_ticket_status(&buyer).set(user_ticket_status); } @@ -101,6 +104,7 @@ pub trait GuaranteedTicketsInitModule: self.nr_winning_tickets().set(total_winning_tickets); AddTicketsResult { + total_users_count, total_tickets_added, total_guaranteed_tickets_added, } diff --git a/launchpad-guaranteed-tickets-v2/src/lib.rs b/launchpad-guaranteed-tickets-v2/src/lib.rs index 90d8566..472951e 100644 --- a/launchpad-guaranteed-tickets-v2/src/lib.rs +++ b/launchpad-guaranteed-tickets-v2/src/lib.rs @@ -75,11 +75,10 @@ pub trait LaunchpadGuaranteedTickets: MultiValue3>>, >, ) { - let total_users_count = address_number_pairs.len(); let add_tickets_result = self.add_tickets_with_guaranteed_winners(address_number_pairs); self.emit_add_tickets_event( - total_users_count, + add_tickets_result.total_users_count, add_tickets_result.total_tickets_added, add_tickets_result.total_guaranteed_tickets_added, ); From 7708e079b9a2519a0937196f3faad77ec9dca903 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Mon, 18 Nov 2024 14:05:26 +0000 Subject: [PATCH 11/22] use MultiValueManagedVecCounted --- .../src/guaranteed_tickets_init.rs | 8 +++-- launchpad-guaranteed-tickets-v2/src/lib.rs | 6 +++- .../tests/guaranteed_tickets_setup/mod.rs | 8 ++--- .../tests/guaranteed_tickets_test.rs | 32 +++++++++---------- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index 7f3bc62..e21549d 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -40,7 +40,11 @@ pub trait GuaranteedTicketsInitModule: fn add_tickets_with_guaranteed_winners( &self, address_number_pairs: MultiValueEncoded< - MultiValue3>>, + MultiValue3< + ManagedAddress, + usize, + MultiValueManagedVecCounted>, + >, >, ) -> AddTicketsResult { self.require_add_tickets_period(); @@ -67,7 +71,7 @@ pub trait GuaranteedTicketsInitModule: let mut user_guaranteed_tickets = 0; let mut guaranteed_ticket_infos = ManagedVec::new(); - for info in guaranteed_ticket_raw.into_iter() { + for info in guaranteed_ticket_raw.into_vec().iter() { let (guaranteed_tickets, min_confirmed_tickets) = info.into_tuple(); require!( guaranteed_tickets <= min_confirmed_tickets, diff --git a/launchpad-guaranteed-tickets-v2/src/lib.rs b/launchpad-guaranteed-tickets-v2/src/lib.rs index 472951e..6a421d1 100644 --- a/launchpad-guaranteed-tickets-v2/src/lib.rs +++ b/launchpad-guaranteed-tickets-v2/src/lib.rs @@ -72,7 +72,11 @@ pub trait LaunchpadGuaranteedTickets: fn add_tickets_endpoint( &self, address_number_pairs: MultiValueEncoded< - MultiValue3>>, + MultiValue3< + ManagedAddress, + usize, + MultiValueManagedVecCounted>, + >, >, ) { let add_tickets_result = self.add_tickets_with_guaranteed_winners(address_number_pairs); diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs index 5c8c44b..05dd666 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs @@ -1,5 +1,5 @@ use multiversx_sc::types::{ - Address, EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueEncodedCounted, + Address, EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueManagedVecCounted, OperationCompletionStatus, }; @@ -100,7 +100,7 @@ where ( managed_address!(&participants[0]), 1, - MultiValueEncodedCounted::new(), + MultiValueManagedVecCounted::new(), ) .into(), ); @@ -108,11 +108,11 @@ where ( managed_address!(&participants[1]), 2, - MultiValueEncodedCounted::new(), + MultiValueManagedVecCounted::new(), ) .into(), ); - let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 3).into()); args.push( ( diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs index 6591497..46bbc35 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs @@ -21,7 +21,7 @@ use launchpad_guaranteed_tickets_v2::{ LaunchpadGuaranteedTickets, }; use multiversx_sc::types::{ - EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueEncodedCounted, + EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueManagedVecCounted, }; use multiversx_sc_scenario::{managed_address, managed_biguint, rust_biguint}; @@ -261,7 +261,7 @@ fn combined_scenario_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); - let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 3).into()); args.push( ( @@ -275,7 +275,7 @@ fn combined_scenario_test() { ( managed_address!(&second_new_participant), 1, - MultiValueEncodedCounted::new(), + MultiValueManagedVecCounted::new(), ) .into(), ); @@ -398,7 +398,7 @@ fn add_migration_guaranteed_tickets_distribution_isolated_steps_scenario_test() &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); - let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -408,7 +408,7 @@ fn add_migration_guaranteed_tickets_distribution_isolated_steps_scenario_test() ) .into(), ); - let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info2 = MultiValueManagedVecCounted::new(); guaranteed_tickets_info2.push((2, 3).into()); args.push( ( @@ -573,7 +573,7 @@ fn add_migration_guaranteed_tickets_distribution_and_claim_scenario_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); - let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -583,7 +583,7 @@ fn add_migration_guaranteed_tickets_distribution_and_claim_scenario_test() { ) .into(), ); - let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info2 = MultiValueManagedVecCounted::new(); guaranteed_tickets_info2.push((2, 3).into()); args.push( ( @@ -763,7 +763,7 @@ fn condition_checks_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); - let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -785,7 +785,7 @@ fn condition_checks_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); - let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -810,7 +810,7 @@ fn condition_checks_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); - let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -938,7 +938,7 @@ fn blacklist_scenario_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); - let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -948,7 +948,7 @@ fn blacklist_scenario_test() { ) .into(), ); - let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info2 = MultiValueManagedVecCounted::new(); guaranteed_tickets_info2.push((1, 1).into()); args.push( ( @@ -1207,7 +1207,7 @@ fn confirm_less_tickets_than_total_available_with_vesting_scenario_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); - let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -1486,7 +1486,7 @@ fn multiple_guaranteed_tickets_test() { |sc| { let mut args = MultiValueEncoded::new(); // New participant: 1 guaranteed ticket if confirms 2 - let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 2).into()); args.push( ( @@ -1497,7 +1497,7 @@ fn multiple_guaranteed_tickets_test() { .into(), ); // Second new participant: complex guaranteed tickets structure - let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); + let mut guaranteed_tickets_info2 = MultiValueManagedVecCounted::new(); guaranteed_tickets_info2.push((1, 6).into()); guaranteed_tickets_info2.push((2, 4).into()); guaranteed_tickets_info2.push((3, 3).into()); @@ -1513,7 +1513,7 @@ fn multiple_guaranteed_tickets_test() { ( managed_address!(&participants[5]), 9, - MultiValueEncodedCounted::new(), + MultiValueManagedVecCounted::new(), ) .into(), ); From fbbf5959007663723f62c701df57344f980d85d0 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Mon, 18 Nov 2024 14:16:08 +0000 Subject: [PATCH 12/22] replace MultiValueEncoded with MultiValueManagedVec for addTickets --- .../src/guaranteed_tickets_init.rs | 4 ++-- launchpad-guaranteed-tickets-v2/src/lib.rs | 2 +- .../tests/guaranteed_tickets_setup/mod.rs | 6 +++--- .../tests/guaranteed_tickets_test.rs | 20 +++++++++---------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index e21549d..bdffff9 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -39,7 +39,7 @@ pub trait GuaranteedTicketsInitModule: { fn add_tickets_with_guaranteed_winners( &self, - address_number_pairs: MultiValueEncoded< + address_number_pairs: MultiValueManagedVec< MultiValue3< ManagedAddress, usize, @@ -57,7 +57,7 @@ pub trait GuaranteedTicketsInitModule: let mut total_tickets_added = 0; let mut total_guaranteed_tickets_added = 0; - for multi_arg in address_number_pairs { + for multi_arg in address_number_pairs.iter() { let (buyer, total_tickets_allowance, guaranteed_ticket_raw) = multi_arg.into_tuple(); require!( guaranteed_ticket_raw.len() <= MAX_GUARANTEED_TICKETS_ENTRIES, diff --git a/launchpad-guaranteed-tickets-v2/src/lib.rs b/launchpad-guaranteed-tickets-v2/src/lib.rs index 6a421d1..3aa1b95 100644 --- a/launchpad-guaranteed-tickets-v2/src/lib.rs +++ b/launchpad-guaranteed-tickets-v2/src/lib.rs @@ -71,7 +71,7 @@ pub trait LaunchpadGuaranteedTickets: #[endpoint(addTickets)] fn add_tickets_endpoint( &self, - address_number_pairs: MultiValueEncoded< + address_number_pairs: MultiValueManagedVec< MultiValue3< ManagedAddress, usize, diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs index 05dd666..75c18a0 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs @@ -1,6 +1,6 @@ use multiversx_sc::types::{ - Address, EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueManagedVecCounted, - OperationCompletionStatus, + Address, EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueManagedVec, + MultiValueManagedVecCounted, OperationCompletionStatus, }; use launchpad_common::{ @@ -95,7 +95,7 @@ where // first user - 1 ticket, second user - 2 tickets, 3rd user - 3 tickets b_mock .execute_tx(&owner_address, &lp_wrapper, &rust_zero, |sc| { - let mut args = MultiValueEncoded::new(); + let mut args = MultiValueManagedVec::new(); args.push( ( managed_address!(&participants[0]), diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs index 46bbc35..1a6c746 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs @@ -21,7 +21,7 @@ use launchpad_guaranteed_tickets_v2::{ LaunchpadGuaranteedTickets, }; use multiversx_sc::types::{ - EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueManagedVecCounted, + EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueManagedVec, MultiValueManagedVecCounted, }; use multiversx_sc_scenario::{managed_address, managed_biguint, rust_biguint}; @@ -260,7 +260,7 @@ fn combined_scenario_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueEncoded::new(); + let mut args = MultiValueManagedVec::new(); let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 3).into()); args.push( @@ -397,7 +397,7 @@ fn add_migration_guaranteed_tickets_distribution_isolated_steps_scenario_test() &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueEncoded::new(); + let mut args = MultiValueManagedVec::new(); let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( @@ -572,7 +572,7 @@ fn add_migration_guaranteed_tickets_distribution_and_claim_scenario_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueEncoded::new(); + let mut args = MultiValueManagedVec::new(); let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( @@ -762,7 +762,7 @@ fn condition_checks_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueEncoded::new(); + let mut args = MultiValueManagedVec::new(); let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( @@ -784,7 +784,7 @@ fn condition_checks_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueEncoded::new(); + let mut args = MultiValueManagedVec::new(); let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( @@ -809,7 +809,7 @@ fn condition_checks_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueEncoded::new(); + let mut args = MultiValueManagedVec::new(); let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( @@ -937,7 +937,7 @@ fn blacklist_scenario_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueEncoded::new(); + let mut args = MultiValueManagedVec::new(); let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( @@ -1206,7 +1206,7 @@ fn confirm_less_tickets_than_total_available_with_vesting_scenario_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueEncoded::new(); + let mut args = MultiValueManagedVec::new(); let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( @@ -1484,7 +1484,7 @@ fn multiple_guaranteed_tickets_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueEncoded::new(); + let mut args = MultiValueManagedVec::new(); // New participant: 1 guaranteed ticket if confirms 2 let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); guaranteed_tickets_info.push((1, 2).into()); From 18a1d549924b3741d7e48b8aec855dbb6d7f3654 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Mon, 18 Nov 2024 15:37:29 +0000 Subject: [PATCH 13/22] revert addTickets params types --- .../src/guaranteed_tickets_init.rs | 12 ++--- launchpad-guaranteed-tickets-v2/src/lib.rs | 8 +-- .../tests/guaranteed_tickets_setup/mod.rs | 12 ++--- .../tests/guaranteed_tickets_test.rs | 50 +++++++++---------- 4 files changed, 37 insertions(+), 45 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index bdffff9..7594332 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -39,12 +39,8 @@ pub trait GuaranteedTicketsInitModule: { fn add_tickets_with_guaranteed_winners( &self, - address_number_pairs: MultiValueManagedVec< - MultiValue3< - ManagedAddress, - usize, - MultiValueManagedVecCounted>, - >, + address_number_pairs: MultiValueEncoded< + MultiValue3>>, >, ) -> AddTicketsResult { self.require_add_tickets_period(); @@ -57,7 +53,7 @@ pub trait GuaranteedTicketsInitModule: let mut total_tickets_added = 0; let mut total_guaranteed_tickets_added = 0; - for multi_arg in address_number_pairs.iter() { + for multi_arg in address_number_pairs.into_iter() { let (buyer, total_tickets_allowance, guaranteed_ticket_raw) = multi_arg.into_tuple(); require!( guaranteed_ticket_raw.len() <= MAX_GUARANTEED_TICKETS_ENTRIES, @@ -71,7 +67,7 @@ pub trait GuaranteedTicketsInitModule: let mut user_guaranteed_tickets = 0; let mut guaranteed_ticket_infos = ManagedVec::new(); - for info in guaranteed_ticket_raw.into_vec().iter() { + for info in guaranteed_ticket_raw.into_iter() { let (guaranteed_tickets, min_confirmed_tickets) = info.into_tuple(); require!( guaranteed_tickets <= min_confirmed_tickets, diff --git a/launchpad-guaranteed-tickets-v2/src/lib.rs b/launchpad-guaranteed-tickets-v2/src/lib.rs index 3aa1b95..472951e 100644 --- a/launchpad-guaranteed-tickets-v2/src/lib.rs +++ b/launchpad-guaranteed-tickets-v2/src/lib.rs @@ -71,12 +71,8 @@ pub trait LaunchpadGuaranteedTickets: #[endpoint(addTickets)] fn add_tickets_endpoint( &self, - address_number_pairs: MultiValueManagedVec< - MultiValue3< - ManagedAddress, - usize, - MultiValueManagedVecCounted>, - >, + address_number_pairs: MultiValueEncoded< + MultiValue3>>, >, ) { let add_tickets_result = self.add_tickets_with_guaranteed_winners(address_number_pairs); diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs index 75c18a0..5c8c44b 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs @@ -1,6 +1,6 @@ use multiversx_sc::types::{ - Address, EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueManagedVec, - MultiValueManagedVecCounted, OperationCompletionStatus, + Address, EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueEncodedCounted, + OperationCompletionStatus, }; use launchpad_common::{ @@ -95,12 +95,12 @@ where // first user - 1 ticket, second user - 2 tickets, 3rd user - 3 tickets b_mock .execute_tx(&owner_address, &lp_wrapper, &rust_zero, |sc| { - let mut args = MultiValueManagedVec::new(); + let mut args = MultiValueEncoded::new(); args.push( ( managed_address!(&participants[0]), 1, - MultiValueManagedVecCounted::new(), + MultiValueEncodedCounted::new(), ) .into(), ); @@ -108,11 +108,11 @@ where ( managed_address!(&participants[1]), 2, - MultiValueManagedVecCounted::new(), + MultiValueEncodedCounted::new(), ) .into(), ); - let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((1, 3).into()); args.push( ( diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs index 1a6c746..6591497 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs @@ -21,7 +21,7 @@ use launchpad_guaranteed_tickets_v2::{ LaunchpadGuaranteedTickets, }; use multiversx_sc::types::{ - EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueManagedVec, MultiValueManagedVecCounted, + EgldOrEsdtTokenIdentifier, MultiValueEncoded, MultiValueEncodedCounted, }; use multiversx_sc_scenario::{managed_address, managed_biguint, rust_biguint}; @@ -260,8 +260,8 @@ fn combined_scenario_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueManagedVec::new(); - let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); + let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((1, 3).into()); args.push( ( @@ -275,7 +275,7 @@ fn combined_scenario_test() { ( managed_address!(&second_new_participant), 1, - MultiValueManagedVecCounted::new(), + MultiValueEncodedCounted::new(), ) .into(), ); @@ -397,8 +397,8 @@ fn add_migration_guaranteed_tickets_distribution_isolated_steps_scenario_test() &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueManagedVec::new(); - let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); + let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -408,7 +408,7 @@ fn add_migration_guaranteed_tickets_distribution_isolated_steps_scenario_test() ) .into(), ); - let mut guaranteed_tickets_info2 = MultiValueManagedVecCounted::new(); + let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); guaranteed_tickets_info2.push((2, 3).into()); args.push( ( @@ -572,8 +572,8 @@ fn add_migration_guaranteed_tickets_distribution_and_claim_scenario_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueManagedVec::new(); - let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); + let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -583,7 +583,7 @@ fn add_migration_guaranteed_tickets_distribution_and_claim_scenario_test() { ) .into(), ); - let mut guaranteed_tickets_info2 = MultiValueManagedVecCounted::new(); + let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); guaranteed_tickets_info2.push((2, 3).into()); args.push( ( @@ -762,8 +762,8 @@ fn condition_checks_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueManagedVec::new(); - let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); + let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -784,8 +784,8 @@ fn condition_checks_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueManagedVec::new(); - let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); + let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -809,8 +809,8 @@ fn condition_checks_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueManagedVec::new(); - let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); + let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -937,8 +937,8 @@ fn blacklist_scenario_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueManagedVec::new(); - let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); + let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -948,7 +948,7 @@ fn blacklist_scenario_test() { ) .into(), ); - let mut guaranteed_tickets_info2 = MultiValueManagedVecCounted::new(); + let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); guaranteed_tickets_info2.push((1, 1).into()); args.push( ( @@ -1206,8 +1206,8 @@ fn confirm_less_tickets_than_total_available_with_vesting_scenario_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueManagedVec::new(); - let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); + let mut args = MultiValueEncoded::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((1, 1).into()); args.push( ( @@ -1484,9 +1484,9 @@ fn multiple_guaranteed_tickets_test() { &lp_setup.lp_wrapper, &rust_biguint!(0), |sc| { - let mut args = MultiValueManagedVec::new(); + let mut args = MultiValueEncoded::new(); // New participant: 1 guaranteed ticket if confirms 2 - let mut guaranteed_tickets_info = MultiValueManagedVecCounted::new(); + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((1, 2).into()); args.push( ( @@ -1497,7 +1497,7 @@ fn multiple_guaranteed_tickets_test() { .into(), ); // Second new participant: complex guaranteed tickets structure - let mut guaranteed_tickets_info2 = MultiValueManagedVecCounted::new(); + let mut guaranteed_tickets_info2 = MultiValueEncodedCounted::new(); guaranteed_tickets_info2.push((1, 6).into()); guaranteed_tickets_info2.push((2, 4).into()); guaranteed_tickets_info2.push((3, 3).into()); @@ -1513,7 +1513,7 @@ fn multiple_guaranteed_tickets_test() { ( managed_address!(&participants[5]), 9, - MultiValueManagedVecCounted::new(), + MultiValueEncodedCounted::new(), ) .into(), ); From 1225e738547bf5effde3c9eca7b52b24e1b7203b Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Fri, 22 Nov 2024 03:07:43 +0000 Subject: [PATCH 14/22] audit fixes unit tests --- launchpad-common/src/winner_selection.rs | 4 + .../tests/guaranteed_tickets_setup/mod.rs | 2 +- .../tests/guaranteed_tickets_test.rs | 452 ++++++++++++++++++ 3 files changed, 457 insertions(+), 1 deletion(-) diff --git a/launchpad-common/src/winner_selection.rs b/launchpad-common/src/winner_selection.rs index 29c7d20..cebfb4d 100644 --- a/launchpad-common/src/winner_selection.rs +++ b/launchpad-common/src/winner_selection.rs @@ -116,6 +116,10 @@ pub trait WinnerSelectionModule: let (mut rng, mut ticket_position) = self.load_select_winners_operation(); let run_result = self.run_while_it_has_gas(|| { + if nr_winning_tickets == 0 { + return STOP_OP; + } + self.shuffle_single_ticket(&mut rng, ticket_position, last_ticket_position); if ticket_position == nr_winning_tickets { diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs index 5c8c44b..1302ea3 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_setup/mod.rs @@ -124,7 +124,7 @@ where ); sc.add_tickets_endpoint(args); - // 1 ticket for the max tier gets removed + // 1 ticket for the guaranteed entry gets removed assert_eq!(sc.nr_winning_tickets().get(), nr_winning_tickets - 1); assert_eq!(sc.users_with_guaranteed_ticket().len(), 1); assert!(sc diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs index 6591497..59519b4 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs @@ -1175,6 +1175,130 @@ fn blacklist_scenario_test() { ); } +#[test] +fn remove_from_blacklist_underflow_and_empty_storage_test() { + let nr_winning_tickets = 6; + let mut lp_setup = LaunchpadSetup::new( + nr_winning_tickets, + launchpad_guaranteed_tickets_v2::contract_obj, + ); + + let mut participants = lp_setup.participants.clone(); + + let new_participant = lp_setup + .b_mock + .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64 * 2)); + participants.push(new_participant.clone()); + + let new_participant2 = lp_setup + .b_mock + .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64 * 2)); + participants.push(new_participant.clone()); + + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK - 1); + + // Set guaranteed tickets for new_participant + lp_setup + .b_mock + .execute_tx( + &lp_setup.owner_address, + &lp_setup.lp_wrapper, + &rust_biguint!(0), + |sc| { + let mut args = MultiValueEncoded::new(); + // New participant with complex structure + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + + guaranteed_tickets_info.push((3, 3).into()); + args.push( + ( + managed_address!(&new_participant), + 6, + guaranteed_tickets_info, + ) + .into(), + ); + + sc.add_tickets_endpoint(args); + }, + ) + .assert_ok(); + + // Blacklist new_participant + lp_setup + .b_mock + .execute_tx( + &lp_setup.owner_address, + &lp_setup.lp_wrapper, + &rust_biguint!(0), + |sc| { + let mut blacklist = MultiValueEncoded::new(); + blacklist.push(managed_address!(&new_participant)); + blacklist.push(managed_address!(&participants[0])); + sc.add_users_to_blacklist_endpoint(blacklist); + }, + ) + .assert_ok(); + + // Set guaranteed tickets for new_participant2 + lp_setup + .b_mock + .execute_tx( + &lp_setup.owner_address, + &lp_setup.lp_wrapper, + &rust_biguint!(0), + |sc| { + let mut args = MultiValueEncoded::new(); + // New participant with complex structure + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + + guaranteed_tickets_info.push((3, 3).into()); + args.push( + ( + managed_address!(&new_participant2), + 6, + guaranteed_tickets_info, + ) + .into(), + ); + + sc.add_tickets_endpoint(args); + }, + ) + .assert_ok(); + + // Remove first participant from blacklist + lp_setup + .b_mock + .execute_tx( + &lp_setup.owner_address, + &lp_setup.lp_wrapper, + &rust_biguint!(0), + |sc| { + let mut blacklist = MultiValueEncoded::new(); + blacklist.push(managed_address!(&participants[0])); + sc.remove_guaranteed_users_from_blacklist_endpoint(blacklist); + }, + ) + .assert_ok(); + + // Try remove new_participant from blacklist + // Should throw an error + lp_setup + .b_mock + .execute_tx( + &lp_setup.owner_address, + &lp_setup.lp_wrapper, + &rust_biguint!(0), + |sc| { + let mut blacklist = MultiValueEncoded::new(); + blacklist.push(managed_address!(&new_participant)); + sc.remove_guaranteed_users_from_blacklist_endpoint(blacklist); + }, + ) + .assert_error(4, "Number of winning tickets exceeded"); +} + #[test] fn confirm_less_tickets_than_total_available_with_vesting_scenario_test() { let nr_random_tickets = 1; @@ -1700,3 +1824,331 @@ fn contract_pause_test() { &rust_biguint!(LAUNCHPAD_TOKENS_PER_TICKET), ); } + +#[test] +fn fair_chance_allocation_and_ticket_redistribution_test() { + let nr_winning_tickets = 9; + let mut lp_setup = LaunchpadSetup::new( + nr_winning_tickets, + launchpad_guaranteed_tickets_v2::contract_obj, + ); + + // Set unlock schedule: 100% release immediately + let unlock_milestones = vec![(0, 10000)]; + lp_setup.set_unlock_schedule(unlock_milestones); + + let mut participants = lp_setup.participants.clone(); + + let new_participant = lp_setup + .b_mock + .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64 * 2)); + participants.push(new_participant.clone()); + + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK - 1); + + // Set guaranteed tickets for users + lp_setup + .b_mock + .execute_tx( + &lp_setup.owner_address, + &lp_setup.lp_wrapper, + &rust_biguint!(0), + |sc| { + let mut args = MultiValueEncoded::new(); + // New participant with complex structure + let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); + guaranteed_tickets_info.push((1, 6).into()); + guaranteed_tickets_info.push((2, 4).into()); + guaranteed_tickets_info.push((3, 3).into()); + args.push( + ( + managed_address!(&new_participant), + 6, + guaranteed_tickets_info, + ) + .into(), + ); + + sc.add_tickets_endpoint(args); + }, + ) + .assert_ok(); + + // Confirm tickets + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); + lp_setup.confirm(&participants[0], 1).assert_ok(); + lp_setup.confirm(&participants[1], 2).assert_ok(); + lp_setup.confirm(&participants[2], 3).assert_ok(); + lp_setup.confirm(&participants[3], 4).assert_ok(); + + // Set block to winner selection + lp_setup + .b_mock + .set_block_nonce(WINNER_SELECTION_START_BLOCK); + + // Filter tickets and select winners + lp_setup.filter_tickets().assert_ok(); + lp_setup.select_winners().assert_ok(); + lp_setup.distribute_tickets().assert_ok(); + + lp_setup + .b_mock + .execute_query(&lp_setup.lp_wrapper, |sc| { + assert_eq!(sc.nr_winning_tickets().get(), nr_winning_tickets); + }) + .assert_ok(); + + // Set block to claim period + lp_setup.b_mock.set_block_nonce(CLAIM_START_BLOCK); + + // Claim for all users + for participant in participants.iter().take(4) { + lp_setup.claim_user(participant).assert_ok(); + } + + // Check balances + // First user: 1 ticket, no guarantee, no winning tickets + let winning_tickets_user1 = 0u64; + lp_setup + .b_mock + .check_egld_balance(&participants[0], &rust_biguint!(3 * TICKET_COST)); + lp_setup.b_mock.check_esdt_balance( + &participants[0], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user1 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // Second user: 2 tickets, no guarantee, 2 winning tickets + let winning_tickets_user2 = 2; + lp_setup + .b_mock + .check_egld_balance(&participants[1], &rust_biguint!(TICKET_COST)); + lp_setup.b_mock.check_esdt_balance( + &participants[1], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user2 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // Third user: 3 tickets, 1 guaranteed, 3 winning ticket + let winning_tickets_user3 = 3; + lp_setup + .b_mock + .check_egld_balance(&participants[2], &rust_biguint!(0)); + lp_setup.b_mock.check_esdt_balance( + &participants[2], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user3 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // New participant: 4 tickets, 5 guaranteed, 4 winning ticket + let winning_tickets_user4 = 4; + lp_setup + .b_mock + .check_egld_balance(&participants[3], &rust_biguint!(2 * TICKET_COST)); + lp_setup.b_mock.check_esdt_balance( + &participants[3], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user4 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // Check correct nr_winning_tickets + // Does not work without ticket permutation + assert_eq!( + nr_winning_tickets as u64, + winning_tickets_user1 + + winning_tickets_user2 + + winning_tickets_user3 + + winning_tickets_user4 + ); + + // Owner claims + lp_setup.claim_owner().assert_ok(); + + // Check owner's balances + let expected_owner_egld = TICKET_COST * nr_winning_tickets as u64; // 9 winning tickets + + lp_setup + .b_mock + .check_egld_balance(&lp_setup.owner_address, &rust_biguint!(expected_owner_egld)); + lp_setup.b_mock.check_esdt_balance( + &lp_setup.owner_address, + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(0), // All tokens were distributed + ); + + // Check contract balances + lp_setup + .b_mock + .check_egld_balance(lp_setup.lp_wrapper.address_ref(), &rust_biguint!(0)); + lp_setup.b_mock.check_esdt_balance( + lp_setup.lp_wrapper.address_ref(), + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(0), + ); +} + +#[test] +fn no_unlock_schedule_test() { + let nr_winning_tickets = 6; + let mut lp_setup = LaunchpadSetup::new( + nr_winning_tickets, + launchpad_guaranteed_tickets_v2::contract_obj, + ); + + // Do not set unlock schedule: 100% release immediately + + let participants = lp_setup.participants.clone(); + + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK - 1); + + // Confirm tickets + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); + lp_setup.confirm(&participants[0], 1).assert_ok(); + lp_setup.confirm(&participants[1], 2).assert_ok(); + lp_setup.confirm(&participants[2], 3).assert_ok(); + + // Set block to winner selection + lp_setup + .b_mock + .set_block_nonce(WINNER_SELECTION_START_BLOCK); + + // Filter tickets and select winners + lp_setup.filter_tickets().assert_ok(); + lp_setup.select_winners().assert_ok(); + lp_setup.distribute_tickets().assert_ok(); + + lp_setup + .b_mock + .execute_query(&lp_setup.lp_wrapper, |sc| { + assert_eq!(sc.nr_winning_tickets().get(), nr_winning_tickets); + }) + .assert_ok(); + + // Set block to claim period + lp_setup.b_mock.set_block_nonce(CLAIM_START_BLOCK); + + // Claim for all users + for participant in participants.iter().take(3) { + lp_setup.claim_user(participant).assert_ok(); + } + + // Check balances + // First user: 1 ticket, no guarantee, 1 winning ticket + let winning_tickets_user1 = 1; + lp_setup + .b_mock + .check_egld_balance(&participants[0], &rust_biguint!(2 * TICKET_COST)); + lp_setup.b_mock.check_esdt_balance( + &participants[0], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user1 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // Second user: 2 tickets, no guarantee, 2 winning tickets + let winning_tickets_user2 = 2; + lp_setup + .b_mock + .check_egld_balance(&participants[1], &rust_biguint!(TICKET_COST)); + lp_setup.b_mock.check_esdt_balance( + &participants[1], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user2 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // Third user: 3 tickets, 1 guaranteed, 3 winning ticket + let winning_tickets_user3 = 3; + lp_setup + .b_mock + .check_egld_balance(&participants[2], &rust_biguint!(0)); + lp_setup.b_mock.check_esdt_balance( + &participants[2], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user3 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // Check correct nr_winning_tickets + // Does not work without ticket permutation + assert_eq!( + nr_winning_tickets as u64, + winning_tickets_user1 + winning_tickets_user2 + winning_tickets_user3 + ); + + // Owner claims + lp_setup.claim_owner().assert_ok(); + + // Check owner's balances + let expected_owner_egld = TICKET_COST * nr_winning_tickets as u64; // 9 winning tickets + + lp_setup + .b_mock + .check_egld_balance(&lp_setup.owner_address, &rust_biguint!(expected_owner_egld)); + lp_setup.b_mock.check_esdt_balance( + &lp_setup.owner_address, + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(0), // All tokens were distributed + ); + + // Check contract balances + lp_setup + .b_mock + .check_egld_balance(lp_setup.lp_wrapper.address_ref(), &rust_biguint!(0)); + lp_setup.b_mock.check_esdt_balance( + lp_setup.lp_wrapper.address_ref(), + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(0), + ); +} + +#[test] +fn no_participants_test() { + let nr_winning_tickets = 6; + let mut lp_setup = LaunchpadSetup::new( + nr_winning_tickets, + launchpad_guaranteed_tickets_v2::contract_obj, + ); + + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK - 1); + + // Confirm tickets + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); + // No participant confirms + + // Set block to winner selection + lp_setup + .b_mock + .set_block_nonce(WINNER_SELECTION_START_BLOCK); + + // Filter tickets and select winners + lp_setup.filter_tickets().assert_ok(); + lp_setup.select_winners().assert_ok(); + lp_setup.distribute_tickets().assert_ok(); + + // Set block to claim period + lp_setup.b_mock.set_block_nonce(CLAIM_START_BLOCK); + + // Owner claims + lp_setup.claim_owner().assert_ok(); + + // Check owner's balances + let nr_confirmed_tickets = 0u64; + let expected_owner_egld = TICKET_COST * nr_confirmed_tickets; // 0 + + lp_setup + .b_mock + .check_egld_balance(&lp_setup.owner_address, &rust_biguint!(expected_owner_egld)); + lp_setup.b_mock.check_esdt_balance( + &lp_setup.owner_address, + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(nr_winning_tickets as u64 * LAUNCHPAD_TOKENS_PER_TICKET), // All tokens were refunded to the owner + ); + + // Check contract balances + lp_setup + .b_mock + .check_egld_balance(lp_setup.lp_wrapper.address_ref(), &rust_biguint!(0)); + lp_setup.b_mock.check_esdt_balance( + lp_setup.lp_wrapper.address_ref(), + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(0), + ); +} From d587001e28563f0ed42e68331d6acda75d17676d Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Fri, 22 Nov 2024 03:15:01 +0000 Subject: [PATCH 15/22] added MAX_TICKETS_ALLOWANCE check --- .../src/guaranteed_tickets_init.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index 7594332..4e478a3 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -1,6 +1,7 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); +pub const MAX_TICKETS_ALLOWANCE: usize = 128; pub const MAX_GUARANTEED_TICKETS_ENTRIES: usize = 10; #[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi, ManagedVecItem)] @@ -55,6 +56,10 @@ pub trait GuaranteedTicketsInitModule: for multi_arg in address_number_pairs.into_iter() { let (buyer, total_tickets_allowance, guaranteed_ticket_raw) = multi_arg.into_tuple(); + require!( + total_tickets_allowance <= MAX_TICKETS_ALLOWANCE, + "Total number of tickets exceeds maximum allowed" + ); require!( guaranteed_ticket_raw.len() <= MAX_GUARANTEED_TICKETS_ENTRIES, "Number of guaranteed tickets entries exceeds maximum allowed" From 08af8758821ef0e9e0292292e0eb652a7ba7f18e Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Fri, 22 Nov 2024 09:16:05 +0000 Subject: [PATCH 16/22] Added user accounts only check --- .../src/guaranteed_tickets_init.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index 4e478a3..cef5f97 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -56,6 +56,10 @@ pub trait GuaranteedTicketsInitModule: for multi_arg in address_number_pairs.into_iter() { let (buyer, total_tickets_allowance, guaranteed_ticket_raw) = multi_arg.into_tuple(); + require!( + !self.blockchain().is_smart_contract(&buyer), + "Only user accounts can participate" + ); require!( total_tickets_allowance <= MAX_TICKETS_ALLOWANCE, "Total number of tickets exceeds maximum allowed" From d7a992f115b49795a1bf4969a000c625dbc95f2a Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Fri, 22 Nov 2024 11:54:10 +0000 Subject: [PATCH 17/22] updated MAX_TICKETS_ALLOWANCE value --- .../src/guaranteed_tickets_init.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index cef5f97..86385e9 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -1,7 +1,7 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); -pub const MAX_TICKETS_ALLOWANCE: usize = 128; +pub const MAX_TICKETS_ALLOWANCE: usize = 255; pub const MAX_GUARANTEED_TICKETS_ENTRIES: usize = 10; #[derive(TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi, ManagedVecItem)] @@ -153,9 +153,11 @@ pub trait GuaranteedTicketsInitModule: let mut whitelist = self.users_with_guaranteed_ticket(); for user in users { let user_ticket_status_mapper = self.user_ticket_status(&user); - if !user_ticket_status_mapper.is_empty() - || self.ticket_range_for_address(&user).is_empty() - { + if !user_ticket_status_mapper.is_empty() { + continue; + } + + if self.ticket_range_for_address(&user).is_empty() { continue; } From 492b05325938a6ac1f3a4718501dc6e2490e547d Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Fri, 22 Nov 2024 12:24:17 +0000 Subject: [PATCH 18/22] Blacklist mechanism extensive unit test --- .../tests/guaranteed_tickets_test.rs | 143 ++++++++++++++++-- 1 file changed, 129 insertions(+), 14 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs index 59519b4..7b5cb19 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs @@ -1187,17 +1187,17 @@ fn remove_from_blacklist_underflow_and_empty_storage_test() { let new_participant = lp_setup .b_mock - .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64 * 2)); + .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64)); participants.push(new_participant.clone()); let new_participant2 = lp_setup .b_mock - .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64 * 2)); - participants.push(new_participant.clone()); + .create_user_account(&rust_biguint!(TICKET_COST * MAX_TIER_TICKETS as u64)); + participants.push(new_participant2.clone()); lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK - 1); - // Set guaranteed tickets for new_participant + // Set guaranteed tickets for new_participant2 lp_setup .b_mock .execute_tx( @@ -1206,13 +1206,12 @@ fn remove_from_blacklist_underflow_and_empty_storage_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); - // New participant with complex structure let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((3, 3).into()); args.push( ( - managed_address!(&new_participant), + managed_address!(&new_participant2), 6, guaranteed_tickets_info, ) @@ -1224,7 +1223,7 @@ fn remove_from_blacklist_underflow_and_empty_storage_test() { ) .assert_ok(); - // Blacklist new_participant + // Blacklist new_participant2 lp_setup .b_mock .execute_tx( @@ -1233,14 +1232,14 @@ fn remove_from_blacklist_underflow_and_empty_storage_test() { &rust_biguint!(0), |sc| { let mut blacklist = MultiValueEncoded::new(); - blacklist.push(managed_address!(&new_participant)); + blacklist.push(managed_address!(&new_participant2)); blacklist.push(managed_address!(&participants[0])); sc.add_users_to_blacklist_endpoint(blacklist); }, ) .assert_ok(); - // Set guaranteed tickets for new_participant2 + // Set guaranteed tickets for new_participant lp_setup .b_mock .execute_tx( @@ -1249,13 +1248,12 @@ fn remove_from_blacklist_underflow_and_empty_storage_test() { &rust_biguint!(0), |sc| { let mut args = MultiValueEncoded::new(); - // New participant with complex structure let mut guaranteed_tickets_info = MultiValueEncodedCounted::new(); guaranteed_tickets_info.push((3, 3).into()); args.push( ( - managed_address!(&new_participant2), + managed_address!(&new_participant), 6, guaranteed_tickets_info, ) @@ -1282,7 +1280,7 @@ fn remove_from_blacklist_underflow_and_empty_storage_test() { ) .assert_ok(); - // Try remove new_participant from blacklist + // Try remove new_participant2 from blacklist // Should throw an error lp_setup .b_mock @@ -1292,11 +1290,128 @@ fn remove_from_blacklist_underflow_and_empty_storage_test() { &rust_biguint!(0), |sc| { let mut blacklist = MultiValueEncoded::new(); - blacklist.push(managed_address!(&new_participant)); + blacklist.push(managed_address!(&new_participant2)); sc.remove_guaranteed_users_from_blacklist_endpoint(blacklist); }, ) .assert_error(4, "Number of winning tickets exceeded"); + + // Confirm tickets + lp_setup.b_mock.set_block_nonce(CONFIRM_START_BLOCK); + lp_setup.confirm(&participants[0], 1).assert_ok(); + lp_setup.confirm(&participants[1], 2).assert_ok(); + lp_setup.confirm(&participants[2], 3).assert_ok(); + lp_setup.confirm(&participants[3], 3).assert_ok(); + + lp_setup.confirm(&participants[4], 3).assert_error( + 4, + "You have been put into the blacklist and may not confirm tickets", + ); + + // Set block to winner selection + lp_setup + .b_mock + .set_block_nonce(WINNER_SELECTION_START_BLOCK); + + // Filter tickets and select winners + lp_setup.filter_tickets().assert_ok(); + lp_setup.select_winners().assert_ok(); + lp_setup.distribute_tickets().assert_ok(); + + lp_setup + .b_mock + .execute_query(&lp_setup.lp_wrapper, |sc| { + assert_eq!(sc.nr_winning_tickets().get(), nr_winning_tickets); + }) + .assert_ok(); + + // Set block to claim period + lp_setup.b_mock.set_block_nonce(CLAIM_START_BLOCK); + + // Claim for all users + for participant in participants.iter().take(4) { + lp_setup.claim_user(participant).assert_ok(); + } + + // Check balances + // First user: 1 winning ticket + let winning_tickets_user1 = 1; + lp_setup + .b_mock + .check_egld_balance(&participants[0], &rust_biguint!(2 * TICKET_COST)); + lp_setup.b_mock.check_esdt_balance( + &participants[0], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user1 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // Second user: 1 winning ticket + let winning_tickets_user2 = 1; + lp_setup + .b_mock + .check_egld_balance(&participants[1], &rust_biguint!(2 * TICKET_COST)); + lp_setup.b_mock.check_esdt_balance( + &participants[1], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user2 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // Third user: 1 winning ticket + let winning_tickets_user3 = 1; + lp_setup + .b_mock + .check_egld_balance(&participants[2], &rust_biguint!(2 * TICKET_COST)); + lp_setup.b_mock.check_esdt_balance( + &participants[2], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user3 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // New participant: 3 winning tickets + let winning_tickets_user4 = 3; + lp_setup + .b_mock + .check_egld_balance(&participants[3], &rust_biguint!(0)); + lp_setup.b_mock.check_esdt_balance( + &participants[3], + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(winning_tickets_user4 * LAUNCHPAD_TOKENS_PER_TICKET), + ); + + // Check correct nr_winning_tickets + // Does not work without ticket permutation + assert_eq!( + nr_winning_tickets as u64, + winning_tickets_user1 + + winning_tickets_user2 + + winning_tickets_user3 + + winning_tickets_user4 + ); + + // Owner claims + lp_setup.claim_owner().assert_ok(); + + // Check owner's balances + let expected_owner_egld = TICKET_COST * nr_winning_tickets as u64; // 6 winning tickets + + lp_setup + .b_mock + .check_egld_balance(&lp_setup.owner_address, &rust_biguint!(expected_owner_egld)); + lp_setup.b_mock.check_esdt_balance( + &lp_setup.owner_address, + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(0), // All tokens were distributed + ); + + // Check contract balances + lp_setup + .b_mock + .check_egld_balance(lp_setup.lp_wrapper.address_ref(), &rust_biguint!(0)); + lp_setup.b_mock.check_esdt_balance( + lp_setup.lp_wrapper.address_ref(), + LAUNCHPAD_TOKEN_ID, + &rust_biguint!(0), + ); } #[test] @@ -2077,7 +2192,7 @@ fn no_unlock_schedule_test() { lp_setup.claim_owner().assert_ok(); // Check owner's balances - let expected_owner_egld = TICKET_COST * nr_winning_tickets as u64; // 9 winning tickets + let expected_owner_egld = TICKET_COST * nr_winning_tickets as u64; // 6 winning tickets lp_setup .b_mock From d5b06671e3a348f5608a7d28778276ee135b611d Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Fri, 22 Nov 2024 12:47:43 +0000 Subject: [PATCH 19/22] fix remove from blacklist checks --- .../src/guaranteed_tickets_init.rs | 17 ++++++----------- .../tests/guaranteed_tickets_test.rs | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index 86385e9..0ceb4d2 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -152,19 +152,13 @@ pub trait GuaranteedTicketsInitModule: let mut total_guaranteed_tickets = self.total_guaranteed_tickets().get(); let mut whitelist = self.users_with_guaranteed_ticket(); for user in users { - let user_ticket_status_mapper = self.user_ticket_status(&user); - if !user_ticket_status_mapper.is_empty() { - continue; - } - - if self.ticket_range_for_address(&user).is_empty() { - continue; - } - let blacklist_user_ticket_status_mapper = self.blacklist_user_ticket_status(&user); - if blacklist_user_ticket_status_mapper.is_empty() { + if blacklist_user_ticket_status_mapper.is_empty() + || self.ticket_range_for_address(&user).is_empty() + { continue; } + let blacklist_user_ticket_status = blacklist_user_ticket_status_mapper.take(); let guaranteed_tickets_added = blacklist_user_ticket_status .guaranteed_tickets_info @@ -179,7 +173,8 @@ pub trait GuaranteedTicketsInitModule: whitelist.insert(user.clone()); nr_winning_tickets -= guaranteed_tickets_added; total_guaranteed_tickets += guaranteed_tickets_added; - user_ticket_status_mapper.set(blacklist_user_ticket_status); + self.user_ticket_status(&user) + .set(blacklist_user_ticket_status); } } diff --git a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs index 7b5cb19..01bca6a 100644 --- a/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs +++ b/launchpad-guaranteed-tickets-v2/tests/guaranteed_tickets_test.rs @@ -1232,8 +1232,8 @@ fn remove_from_blacklist_underflow_and_empty_storage_test() { &rust_biguint!(0), |sc| { let mut blacklist = MultiValueEncoded::new(); - blacklist.push(managed_address!(&new_participant2)); blacklist.push(managed_address!(&participants[0])); + blacklist.push(managed_address!(&new_participant2)); sc.add_users_to_blacklist_endpoint(blacklist); }, ) From ab7ee57f72cee6badedb9f2a9e608d717cfe9b43 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Mon, 25 Nov 2024 12:00:30 +0200 Subject: [PATCH 20/22] blacklist storage logic optimization --- .../src/guaranteed_tickets_init.rs | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index 0ceb4d2..be368ee 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -127,19 +127,17 @@ pub trait GuaranteedTicketsInitModule: let mut nr_winning_tickets = self.nr_winning_tickets().get(); let mut total_guaranteed_tickets = self.total_guaranteed_tickets().get(); for user in users { - let was_whitelisted = whitelist.swap_remove(&user); - if was_whitelisted { - let user_ticket_status = self.user_ticket_status(&user).take(); - let guaranteed_tickets_recovered = user_ticket_status - .guaranteed_tickets_info - .iter() - .fold(0, |acc, info| acc + info.guaranteed_tickets); - - nr_winning_tickets += guaranteed_tickets_recovered; - total_guaranteed_tickets -= guaranteed_tickets_recovered; - self.blacklist_user_ticket_status(&user) - .set(user_ticket_status); - } + let _ = whitelist.swap_remove(&user); + let user_ticket_status = self.user_ticket_status(&user).take(); + let guaranteed_tickets_recovered = user_ticket_status + .guaranteed_tickets_info + .iter() + .fold(0, |acc, info| acc + info.guaranteed_tickets); + + nr_winning_tickets += guaranteed_tickets_recovered; + total_guaranteed_tickets -= guaranteed_tickets_recovered; + self.blacklist_user_ticket_status(&user) + .set(user_ticket_status); } self.nr_winning_tickets().set(nr_winning_tickets); @@ -152,14 +150,11 @@ pub trait GuaranteedTicketsInitModule: let mut total_guaranteed_tickets = self.total_guaranteed_tickets().get(); let mut whitelist = self.users_with_guaranteed_ticket(); for user in users { - let blacklist_user_ticket_status_mapper = self.blacklist_user_ticket_status(&user); - if blacklist_user_ticket_status_mapper.is_empty() - || self.ticket_range_for_address(&user).is_empty() - { + if self.ticket_range_for_address(&user).is_empty() { continue; } - let blacklist_user_ticket_status = blacklist_user_ticket_status_mapper.take(); + let blacklist_user_ticket_status = self.blacklist_user_ticket_status(&user).take(); let guaranteed_tickets_added = blacklist_user_ticket_status .guaranteed_tickets_info .iter() @@ -173,9 +168,10 @@ pub trait GuaranteedTicketsInitModule: whitelist.insert(user.clone()); nr_winning_tickets -= guaranteed_tickets_added; total_guaranteed_tickets += guaranteed_tickets_added; - self.user_ticket_status(&user) - .set(blacklist_user_ticket_status); } + + self.user_ticket_status(&user) + .set(blacklist_user_ticket_status); } self.nr_winning_tickets().set(nr_winning_tickets); From 9345234e683dcb96cc8ee2caebc660796641df86 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Tue, 26 Nov 2024 10:19:57 +0200 Subject: [PATCH 21/22] remove unneeded comments --- launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs index 01fc3ad..038c0bf 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_ticket_winners.rs @@ -160,7 +160,6 @@ pub trait GuaranteedTicketWinnersModule: op.leftover_tickets += remaining_tickets; } - // TODO - add a check if current_ticket_pos > last_ticket_pos fn distribute_leftover_tickets( &self, op: &mut GuaranteedTicketsSelectionOperation, From ddf0836868b054e6de30dc3bef937cafe6d438c0 Mon Sep 17 00:00:00 2001 From: Sorin Petreasca Date: Tue, 26 Nov 2024 10:47:46 +0200 Subject: [PATCH 22/22] addTickets extra check --- .../src/guaranteed_tickets_init.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs index be368ee..446274d 100644 --- a/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs +++ b/launchpad-guaranteed-tickets-v2/src/guaranteed_tickets_init.rs @@ -56,6 +56,10 @@ pub trait GuaranteedTicketsInitModule: for multi_arg in address_number_pairs.into_iter() { let (buyer, total_tickets_allowance, guaranteed_ticket_raw) = multi_arg.into_tuple(); + if total_tickets_allowance == 0 { + continue; + } + require!( !self.blockchain().is_smart_contract(&buyer), "Only user accounts can participate"