planetarium / NineChronicles.Headless

A headless node of NineChronicles game network, powered by Libplanet.
https://planetarium.github.io/NineChronicles.Headless/
GNU Affero General Public License v3.0
34 stars 37 forks source link

Provide `index` parameter when to query state #2477

Closed moreal closed 2 months ago

moreal commented 2 months ago

Description

When it's a PoW chain, it's very risky to access state by index. However, thanks to the work of the Libplanet team, the NineChronicles network has partially transitioned to PoS, so we're adding the ability to access it by index. We expect that this will solve the problem of replacing index with hash and then accessing it.

GraphQL

{
  state(address: "0x", index: 0)
  stateQuery(index: 0)
  {
    avatar(address: "0x") { name }
  }
}