0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Staking Table

Last updated at Posted at 2024-12-26

Previous << Flow Fees
Next >> Epoch Contracts

Flow Staking Contract Reference

Contract

FlowIDTableStakingコントラクトは、ステーク(担保)されたノード、委任、報酬を管理する中心的なテーブルです。

Source: FlowIDTableStaking.cdc

Network Contract Address
Emulator 0xf8d6e0586b0a20c7
Cadence Testing Framework 0x0000000000000001
Testnet 0x9eca2b38b18b5dfe
Mainnet 0x8624b52f9ddcd04a

Transactions and Scripts

ステーキングコントラクトのトランザクションは、flow-core-contractsレポジトリにあります。開発者およびユーザーは、テスト用に用意されている基本トランザクションではなく、ステーキングコレクショントランザクション(the staking collection transactions)を使用してトークンをステークすることが推奨されます。

Getting Staking Info with Scripts

これらのスクリプトは読み取り専用であり、ステーキングコントラクトの現在の状態(ステート)に関する情報を取得します。

ID Name Source
SC.01 Get Delegation Cut Percentage idTableStaking/get_cut_percentage.cdc
SC.02 Get Minimum Stake Requirements dTableStaking/get_stake_requirements.cdc
SC.03 Get Total Weekly Reward Payout idTableStaking/get_weekly_payout.cdc
SC.04 Get Current Staked Node Table idTableStaking/get_current_table.cdc
SC.05 Get Proposed Staked Node Table idTableStaking/get_proposed_table.cdc
SC.06 Get Total Flow Staked idTableStaking/get_total_staked.cdc
SC.07 Get Total Flow Staked by Node Type idTableStaking/get_total_staked_by_type.cdc
SC.08 Get All Info about a single NodeID idTableStaking/get_node_info.cdc
SC.09 Get a node's total Commitment (delegators) idTableStaking/get_node_total_commitment.cdc
SC.10 Get All Info about a single Delegator idTableStaking/delegation/get_delegator_info.cdc
SC.11 Get a node's total Commitment idTableStaking/get_node_total_commitment_without_delegators.cdc

Delegator Transactions

トークンによる委任に関するドキュメントは、ステーキングコレクションのステーキングに関するドキュメントに記載されています。

Events

FlowIDTableStakingコントラクトは、重要なアクションが発生するたびにイベントを発行します。各イベントの詳細については、ステーキングイベントのドキュメントを参照してください。

    /** Epoch */
    access(all) event NewEpoch(
        totalStaked: UFix64,
        totalRewardPayout: UFix64,
        newEpochCounter: UInt64
    )
    access(all) event EpochTotalRewardsPaid(
        total: UFix64,
        fromFees: UFix64,
        minted: UFix64,
        feesBurned: UFix64,
        epochCounterForRewards: UInt64
    )

    /** Node */
    access(all) event NewNodeCreated(nodeID: String, role: UInt8, amountCommitted: UFix64)
    access(all) event TokensCommitted(nodeID: String, amount: UFix64)
    access(all) event TokensStaked(nodeID: String, amount: UFix64)
    access(all) event NodeTokensRequestedToUnstake(nodeID: String, amount: UFix64)
    access(all) event TokensUnstaking(nodeID: String, amount: UFix64)
    access(all) event TokensUnstaked(nodeID: String, amount: UFix64)
    access(all) event NodeRemovedAndRefunded(nodeID: String, amount: UFix64)
    access(all) event RewardsPaid(nodeID: String, amount: UFix64, epochCounter:  UInt64)
    access(all) event UnstakedTokensWithdrawn(nodeID: String, amount: UFix64)
    access(all) event RewardTokensWithdrawn(nodeID: String, amount: UFix64)
    access(all) event NetworkingAddressUpdated(nodeID: String, newAddress: String)
    access(all) event NodeWeightChanged(nodeID: String, newWeight: UInt64)

    /** Delegator */
    access(all) event NewDelegatorCreated(nodeID: String, delegatorID: UInt32)
    access(all) event DelegatorTokensCommitted(nodeID: String, delegatorID: UInt32, amount: UFix64)
    access(all) event DelegatorTokensStaked(nodeID: String, delegatorID: UInt32, amount: UFix64)
    access(all) event DelegatorTokensRequestedToUnstake(nodeID: String, delegatorID: UInt32, amount: UFix64)
    access(all) event DelegatorTokensUnstaking(nodeID: String, delegatorID: UInt32, amount: UFix64)
    access(all) event DelegatorTokensUnstaked(nodeID: String, delegatorID: UInt32, amount: UFix64)
    access(all) event DelegatorRewardsPaid(nodeID: String, delegatorID: UInt32, amount: UFix64, epochCounter:  UInt64)
    access(all) event DelegatorUnstakedTokensWithdrawn(nodeID: String, delegatorID: UInt32, amount: UFix64)
    access(all) event DelegatorRewardTokensWithdrawn(nodeID: String, delegatorID: UInt32, amount: UFix64)

    /** Contract Fields */
    access(all) event NewDelegatorCutPercentage(newCutPercentage: UFix64)
    access(all) event NewWeeklyPayout(newPayout: UFix64)
    access(all) event NewStakingMinimums(newMinimums: {UInt8: UFix64})
    access(all) event NewDelegatorStakingMinimum(newMinimum: UFix64)

Last updated on Dec 17, 2024 by j pimmel

翻訳元


Previous << Flow Fees

Flow BlockchainのCadence version1.0ドキュメント (Flow Fees)

Next >> Epoch Contracts

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?