INNER CODE UNIT · Rust

close_application

AstarNetwork/Astar · pallets/collator-selection/src/lib.rs:589

        pub fn close_application(
            origin: OriginFor<T>,
            who: T::AccountId,
        ) -> DispatchResultWithPostInfo {
            Self::ensure_governance_or_caller(origin, &who)?;

            let deposit =
                PendingApplications::<T>::take(&who).ok_or(Error::<T>::NoApplicationFound)?;

            T::Currency::unreserve(&who, deposit);

            Self::deposit_event(Event::CandidacyApplicationClosed(who));
            Ok(().into())
        }

        /// Approve a pending candidacy application.
        ///
        /// This will remove the application from pending status and immediately add the account

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…