@@ -518,35 +518,35 @@ pub mod LaunchpadMarketplace {
518518 self . shares_by_users. entry (owner ). entry (key_user ). read ()
519519 }
520520
521- fn get_all_coins (self : @ ContractState ) -> Span <Token > {
522- let max_coin_id = self . total_token. read () + 1 ;
523- let mut coins : Array <Token > = ArrayTrait :: new ();
524- let mut i = 0 ; // Since the stream id starts from 0
525- loop {
526- if i >= max_coin_id {}
527- let coin = self . array_coins. read (i );
528- if coin . owner. is_zero () {
529- break coins . span ();
530- }
531- coins . append (coin );
532- i += 1 ;
533- }
534- }
535-
536- fn get_all_launch (self : @ ContractState ) -> Span <TokenLaunch > {
537- let max_key_id = self . total_launch. read () + 1 ;
538- let mut launches : Array <TokenLaunch > = ArrayTrait :: new ();
539- let mut i = 0 ; // Since the stream id starts from 0
540- loop {
541- if i >= max_key_id {}
542- let pool = self . array_launched_coins. read (i );
543- if pool . owner. is_zero () {
544- break launches . span ();
545- }
546- launches . append (pool );
547- i += 1 ;
548- }
549- }
521+ // fn get_all_coins(self: @ContractState) -> Span<Token> {
522+ // let max_coin_id = self.total_token.read() + 1;
523+ // let mut coins: Array<Token> = ArrayTrait::new();
524+ // let mut i = 0; //Since the stream id starts from 0
525+ // loop {
526+ // if i >= max_coin_id {}
527+ // let coin = self.array_coins.read(i);
528+ // if coin.owner.is_zero() {
529+ // break coins.span();
530+ // }
531+ // coins.append(coin);
532+ // i += 1;
533+ // }
534+ // }
535+
536+ // fn get_all_launch(self: @ContractState) -> Span<TokenLaunch> {
537+ // let max_key_id = self.total_launch.read() + 1;
538+ // let mut launches: Array<TokenLaunch> = ArrayTrait::new();
539+ // let mut i = 0; //Since the stream id starts from 0
540+ // loop {
541+ // if i >= max_key_id {}
542+ // let pool = self.array_launched_coins.read(i);
543+ // if pool.owner.is_zero() {
544+ // break launches.span();
545+ // }
546+ // launches.append(pool);
547+ // i += 1;
548+ // }
549+ // }
550550 // User call
551551
552552 // Create token for an user
@@ -780,7 +780,6 @@ pub mod LaunchpadMarketplace {
780780 get_caller_address (), get_contract_address (), remain_quote_to_liquidity
781781 );
782782
783- // Assertion: Amount Received Validation
784783 // Update the Stats of pool:
785784 // Liquidity raised
786785 // Available supply
@@ -790,8 +789,6 @@ pub mod LaunchpadMarketplace {
790789 // Optionally, re-calculate the quote amount based on the amount to ensure consistency
791790 // println!("total_price {:?}", total_price);
792791 // println!("update pool");
793-
794-
795792 // println!("subtract amount and available supply");
796793 // println!("available supply {:?}", pool_coin.available_supply);
797794 // println!("amount {:?}", amount);
@@ -811,9 +808,6 @@ pub mod LaunchpadMarketplace {
811808 }
812809
813810 // Update share and coin stats for an user
814- // let mut old_share = self.shares_by_users.read((get_caller_address(), coin_address));
815- // let mut old_share = self.shares_by_users.entry((get_caller_address(),
816- // coin_address)).read();
817811 let mut old_share = self
818812 . shares_by_users
819813 . entry (get_caller_address ())
@@ -822,7 +816,6 @@ pub mod LaunchpadMarketplace {
822816
823817 let mut share_user = old_share . clone ();
824818 // println!("update share");
825-
826819 if share_user . owner. is_zero () {
827820 share_user =
828821 SharesTokenUser {
0 commit comments