INNER CODE UNIT · Rust

set_slash_destination

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

        pub fn set_slash_destination(
            origin: OriginFor<T>,
            destination: Option<T::AccountId>,
        ) -> DispatchResult {
            T::UpdateOrigin::ensure_origin(origin)?;
            match destination {
                Some(account) => <SlashDestination<T>>::put(account),
                None => <SlashDestination<T>>::kill(),
            }
            Ok(())
        }

        /// Add an invulnerable collator.
        #[pallet::call_index(7)]
        #[pallet::weight(T::WeightInfo::add_invulnerable(T::MaxInvulnerables::get()))]
        pub fn add_invulnerable(
            origin: OriginFor<T>,
            who: T::AccountId,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…