Skip to main content
Version: Next

Contract

The FlowIDTableStaking contract is the central table that manages staked nodes, delegation and rewards.

Source: FlowIDTableStaking.cdc

NetworkContract Address
Emulator/Canary0xf8d6e0586b0a20c7
Testnet0x9eca2b38b18b5dfe
Sandboxnet0xf4527793ee68aede
Mainnet0x8624b52f9ddcd04a

Transactions

Getting Staking Info

These scripts are read-only and get info about the current state of the staking contract.

IDNameSource
SC.01Get Delegation Cut PercentageidTableStaking/get_cut_percentage.cdc
SC.02Get Minimum Stake RequirementsidTableStaking/get_stake_requirements.cdc
SC.03Get Total Weekly Reward PayoutidTableStaking/get_weekly_payout.cdc
SC.04Get Current Staked Node TableidTableStaking/get_current_table.cdc
SC.05Get Proposed Staked Node TableidTableStaking/get_proposed_table.cdc
SC.06Get Total Flow StakedidTableStaking/get_total_staked.cdc
SC.07Get Total Flow Staked by Node TypeidTableStaking/get_total_staked_by_type.cdc
SC.08Get All Info about a single NodeIDidTableStaking/get_node_info.cdc
SC.09Get a node's total Commitment (delegators)idTableStaking/get_node_total_commitment.cdc
SC.10Get All Info about a single DelegatoridTableStaking/delegation/get_delegator_info.cdc
SC.11Get a node's total CommitmentidTableStaking/get_node_total_commitment_without_delegators.cdc

Delegator Transactions

Documentation for delegating with tokens is described in the staking documentation for the staking collection

Events

The FlowIDTableStaking contract emits an event whenever an important action occurs. See the staking events Documentation for more information about each event.


_27
pub event NewEpoch(totalStaked: UFix64, totalRewardPayout: UFix64)
_27
_27
/// Node Events
_27
pub event NewNodeCreated(nodeID: String, role: UInt8, amountCommitted: UFix64)
_27
pub event TokensCommitted(nodeID: String, amount: UFix64)
_27
pub event TokensStaked(nodeID: String, amount: UFix64)
_27
pub event TokensUnstaking(nodeID: String, amount: UFix64)
_27
pub event TokensUnstaked(nodeID: String, amount: UFix64)
_27
pub event NodeRemovedAndRefunded(nodeID: String, amount: UFix64)
_27
pub event RewardsPaid(nodeID: String, amount: UFix64)
_27
pub event UnstakedTokensWithdrawn(nodeID: String, amount: UFix64)
_27
pub event RewardTokensWithdrawn(nodeID: String, amount: UFix64)
_27
_27
/// Delegator Events
_27
pub event NewDelegatorCreated(nodeID: String, delegatorID: UInt32)
_27
pub event DelegatorTokensCommitted(nodeID: String, delegatorID: UInt32, amount: UFix64)
_27
pub event DelegatorTokensStaked(nodeID: String, delegatorID: UInt32, amount: UFix64)
_27
pub event DelegatorTokensUnstaking(nodeID: String, delegatorID: UInt32, amount: UFix64)
_27
pub event DelegatorTokensUnstaked(nodeID: String, delegatorID: UInt32, amount: UFix64)
_27
pub event DelegatorRewardsPaid(nodeID: String, delegatorID: UInt32, amount: UFix64)
_27
pub event DelegatorUnstakedTokensWithdrawn(nodeID: String, delegatorID: UInt32, amount: UFix64)
_27
pub event DelegatorRewardTokensWithdrawn(nodeID: String, delegatorID: UInt32, amount: UFix64)
_27
_27
/// Contract Field Change Events
_27
pub event NewDelegatorCutPercentage(newCutPercentage: UFix64)
_27
pub event NewWeeklyPayout(newPayout: UFix64)
_27
pub event NewStakingMinimums(newMinimums: {UInt8: UFix64})