tmquerier

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Querier

type Querier struct {
	Client  *rpcclienthttp.HTTP
	ChainID string
	// contains filtered or unexported fields
}

Querier can get proofs for stored blockchain values

func NewQuerier

func NewQuerier(client *rpcclienthttp.HTTP, chainId string) (*Querier, error)

func (*Querier) QueryTendermintProof

func (q *Querier) QueryTendermintProof(ctx context.Context, height int64, storeKey string, key []byte) (*neutrontypes.StorageValue, uint64, error)

QueryTendermintProof performs an ABCI query with the given key and returns the value of the query, the proto encoded merkle proof, and the height of the Tendermint block containing the state root. The query will be performed at one below this height (at the IAVL version) in order to obtain the correct merkle proof. Proof queries at height less than or equal to 2 are not supported. Txs with a client context height of 0 will perform a query at the latest state available. Issue: https://github.com/cosmos/cosmos-sdk/issues/6567 NOTE: returned uint64 height=(HEIGHT + 1) which is a height of a block with root_hash proofs it, NOT the block number that we got value for

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL