Subnet Staking

Main logic for subnet node staking

Increase Stake

pub fn add_to_stake(
    origin: OriginFor<T>, 
    subnet_id: u32,
    stake_to_be_added: u128,
) -> DispatchResult

Parameters

  • subnet_id: The key of the subnet.

  • stake_to_be_added: The balance to add to stake towards a specific subnet.


Remove Stake

pub fn remove_stake(
    origin: OriginFor<T>, 
    subnet_id: u32, 
    stake_to_be_removed: u128
) -> DispatchResult

Parameters

  • subnet_id: The key of the subnet.

  • stake_to_be_removed: The balance to remove from stake towards a specific subnet.

Last updated