Convenience methods for querying CosmWasm smart contracts.
Summary
Functions
Paginates through a smart contract query result set.
Queries the full, raw contract state at an address
Streams the current contract state
Types
Functions
@spec build_address!(binary(), String.t(), non_neg_integer() | String.t()) :: String.t()
@spec by_code(integer()) :: {:ok, [t()]} | {:error, GRPC.RPCError.t()}
@spec by_codes([integer()]) :: {:ok, [t()]} | {:error, GRPC.RPCError.t()}
@spec code(integer()) :: {:ok, Cosmwasm.Wasm.V1.QueryCodeResponse} | {:error, GRPC.RPCError.t()}
@spec code_info(non_neg_integer()) :: {:ok, Cosmwasm.Wasm.V1.CodeInfoResponse.t()} | {:error, GRPC.RPCError.t()}
@spec codes() :: {:ok, [Cosmwasm.Wasm.V1.CodeInfoResponse.t()]} | {:error, GRPC.RPCError.t()}
@spec info(String.t()) :: {:ok, Cosmwasm.Wasm.V1.ContractInfo.t()} | {:error, GRPC.RPCError.t()}
@spec list(module(), [integer()]) :: {:ok, [struct()]} | {:error, GRPC.RPCError.t()}
@spec paginate( {:ok, map()} | {:error, any()}, String.t(), pos_integer(), (list() -> {:ok, list()} | {:error, any()}) ) :: {:ok, list()} | {:error, any()}
Paginates through a smart contract query result set.
@spec query_state_all(String.t()) :: {:ok, map()} | {:error, GRPC.RPCError.t()}
Queries the full, raw contract state at an address
@spec query_state_raw(String.t(), binary()) :: {:ok, term()} | {:error, :not_found} | {:error, GRPC.RPCError.t()}
@spec query_state_smart(String.t(), map()) :: {:ok, map()} | {:error, GRPC.RPCError.t()}
@spec query_state_smart(String.t(), map(), keyword()) :: {:ok, map()} | {:error, GRPC.RPCError.t()}
@spec stream_state_all(String.t()) :: Enumerable.t()
Streams the current contract state