provwasm

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Overview

Package provwasm allows CosmWasm smart contracts to communicate with custom provenance modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertProtoToJSONMarshal added in v1.15.0

func ConvertProtoToJSONMarshal(protoResponseType proto.Message, bz []byte, cdc codec.Codec) ([]byte, error)

ConvertProtoToJsonMarshal unmarshals the given bytes into a proto message and then marshals it to json. This is done so that clients calling stargate queries do not need to define their own proto unmarshalers, being able to use response directly by json marshaling, which is supported in cosmwasm.

func Dispatch added in v1.8.0

Dispatch sends an operation to the chain using a given account/funds on account for fees. Failures on the server side are handled as no-op msg operations with the error string as the status/response. Ideally this would live in wasmd

func GetStargateWhitelistedPaths added in v1.15.0

func GetStargateWhitelistedPaths() (keys []string)

func GetWhitelistedQuery added in v1.15.0

func GetWhitelistedQuery(queryPath string) (proto.Message, error)

GetWhitelistedQuery returns the whitelisted query at the provided path. If the query does not exist, or it was setup wrong by the chain, this returns an error.

func GrpcQuerier added in v1.19.0

func GrpcQuerier(queryRouter baseapp.GRPCQueryRouter) func(ctx sdk.Context, request *wasmvmtypes.GrpcQuery) (proto.Message, error)

GrpcQuerier dispatches whitelisted queries and returns protobuf encoded responses

func QueryPlugins

func QueryPlugins(queryRouter baseapp.GRPCQueryRouter, cdc codec.Codec) *wasmkeeper.QueryPlugins

QueryPlugins provides provenance query support for smart contracts.

func SimulateActivateMarker added in v1.8.0

func SimulateActivateMarker(simState module.SimulationState, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, node, feebucket, merchant, consumer simtypes.Account, name string) simtypes.Operation

func SimulateFinalizeMarker added in v1.8.0

func SimulateFinalizeMarker(simState module.SimulationState, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, node, feebucket, merchant, consumer simtypes.Account, name string) simtypes.Operation

func SimulateMsgAddAccess added in v1.8.0

func SimulateMsgAddAccess(simState module.SimulationState, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, node, feebucket, merchant, consumer simtypes.Account, name string) simtypes.Operation

func SimulateMsgAddMarker added in v1.8.0

func SimulateMsgAddMarker(simState module.SimulationState, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, node, feebucket, merchant, consumer simtypes.Account, name string) simtypes.Operation

func SimulateMsgBindName added in v1.8.0

func SimulateMsgBindName(simState module.SimulationState, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, count *int) simtypes.Operation

SimulateMsgBindName will bind a NAME under an existing name

func SimulateMsgExecuteContract added in v1.8.0

func SimulateMsgExecuteContract(simState module.SimulationState, ak authkeeper.AccountKeeperI, bk bankkeeper.ViewKeeper, _, consumer simtypes.Account, contractAddr string) simtypes.Operation

func SimulateMsgInstantiateContract added in v1.8.0

func SimulateMsgInstantiateContract(simState module.SimulationState, ak authkeeper.AccountKeeperI, bk bankkeeper.ViewKeeper, nk namekeeper.Keeper, node, feebucket, merchant, consumer simtypes.Account, name string) simtypes.Operation

func SimulateMsgStoreContract added in v1.8.0

func SimulateMsgStoreContract(simState module.SimulationState, ak authkeeper.AccountKeeperI, bk bankkeeper.ViewKeeper, nk namekeeper.Keeper, node, feebucket, merchant, consumer simtypes.Account, name string) simtypes.Operation

func SimulateMsgWithdrawRequest added in v1.8.0

func SimulateMsgWithdrawRequest(simState module.SimulationState, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, node, feebucket, merchant, consumer simtypes.Account, name string) simtypes.Operation

func StargateQuerier added in v1.15.0

func StargateQuerier(queryRouter baseapp.GRPCQueryRouter, cdc codec.Codec) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error)

StargateQuerier dispatches whitelisted stargate queries

Types

type Querier

type Querier func(ctx sdk.Context, query json.RawMessage, version string) ([]byte, error)

Querier describes behavior for provenance smart contract query support.

type QuerierRegistry

type QuerierRegistry struct {
	// contains filtered or unexported fields
}

QuerierRegistry maps routes to queriers.

func NewQuerierRegistry

func NewQuerierRegistry() *QuerierRegistry

NewQuerierRegistry creates a new registry for queriers.

func (*QuerierRegistry) RegisterQuerier

func (qr *QuerierRegistry) RegisterQuerier(route string, querier Querier)

RegisterQuerier adds a query handler for the given route.

type Wrapper added in v1.8.0

type Wrapper struct {
	// contains filtered or unexported fields
}

func NewWrapper added in v1.8.0

func (Wrapper) GenerateGenesisState added in v1.8.0

func (pw Wrapper) GenerateGenesisState(input *module.SimulationState)

GenerateGenesisState creates a randomized GenState of the wasm module.

func (Wrapper) ProposalMsgs added in v1.19.0

ProposalMsgs returns the wasm weighted proposal messages.

func (Wrapper) RandomizedParams added in v1.8.0

func (pw Wrapper) RandomizedParams(_ *rand.Rand) []simtypes.LegacyParamChange

RandomizedParams returns empty list as the params don't change

func (Wrapper) RegisterStoreDecoder added in v1.8.0

func (pw Wrapper) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for supply module's types

func (Wrapper) WeightedOperations added in v1.8.0

func (pw Wrapper) WeightedOperations(simSate module.SimulationState) []simtypes.WeightedOperation

WeightedOperations returns the all the provwasm operations with their respective weights.

Jump to

Keyboard shortcuts

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