如何在 SUI-graphql 中使用“验证器”查询

问题描述 投票:0回答:1

我正在SUI链中开发,我想知道如何使用“Validator”查询。每次都会出现以下错误消息。

{
  "data": null,
  "errors": [
    {
      "message": "Unknown field \"Validator\" on type \"Query\".",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ]
    }
  ]
}

我想在每个时期从验证人那里获得特定的委托人奖励

graphql sui
1个回答
0
投票

这将为您提供当前时期的活跃验证者列表。您还可以对目标

epoch
activeValidators
上的过滤器执行相同的操作。阅读架构以获取更多选项。

query SysState {
  epoch {
    validatorSet {
      totalStake
      activeValidators {
        nodes {
          name
          commissionRate
          apy
          
        }
        
      }
    }
  }
}
© www.soinside.com 2019 - 2024. All rights reserved.