Documentation ¶
Overview ¶
Package provwasm allows CosmWasm smart contracts to communicate with custom provenance modules.
Index ¶
- func ConvertProtoToJSONMarshal(protoResponseType proto.Message, bz []byte, cdc codec.Codec) ([]byte, error)
- func Dispatch(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, ...) (simtypes.OperationMsg, []simtypes.FutureOperation, *sdk.Result, error)
- func GetStargateWhitelistedPaths() (keys []string)
- func GetWhitelistedQuery(queryPath string) (proto.Message, error)
- func GrpcQuerier(queryRouter baseapp.GRPCQueryRouter) func(ctx sdk.Context, request *wasmvmtypes.GrpcQuery) (proto.Message, error)
- func QueryPlugins(queryRouter baseapp.GRPCQueryRouter, cdc codec.Codec) *wasmkeeper.QueryPlugins
- func SimulateActivateMarker(simState module.SimulationState, ak authkeeper.AccountKeeperI, ...) simtypes.Operation
- func SimulateFinalizeMarker(simState module.SimulationState, ak authkeeper.AccountKeeperI, ...) simtypes.Operation
- func SimulateMsgAddAccess(simState module.SimulationState, ak authkeeper.AccountKeeperI, ...) simtypes.Operation
- func SimulateMsgAddMarker(simState module.SimulationState, ak authkeeper.AccountKeeperI, ...) simtypes.Operation
- func SimulateMsgBindName(simState module.SimulationState, ak authkeeper.AccountKeeperI, ...) simtypes.Operation
- func SimulateMsgExecuteContract(simState module.SimulationState, ak authkeeper.AccountKeeperI, ...) simtypes.Operation
- func SimulateMsgInstantiateContract(simState module.SimulationState, ak authkeeper.AccountKeeperI, ...) simtypes.Operation
- func SimulateMsgStoreContract(simState module.SimulationState, ak authkeeper.AccountKeeperI, ...) simtypes.Operation
- func SimulateMsgWithdrawRequest(simState module.SimulationState, ak authkeeper.AccountKeeperI, ...) simtypes.Operation
- func StargateQuerier(queryRouter baseapp.GRPCQueryRouter, cdc codec.Codec) func(ctx sdk.Context, request *wasmvmtypes.StargateQuery) ([]byte, error)
- type Querier
- type QuerierRegistry
- type Wrapper
- func (pw Wrapper) GenerateGenesisState(input *module.SimulationState)
- func (pw Wrapper) ProposalMsgs(_ module.SimulationState) []simtypes.WeightedProposalMsg
- func (pw Wrapper) RandomizedParams(_ *rand.Rand) []simtypes.LegacyParamChange
- func (pw Wrapper) RegisterStoreDecoder(sdr simtypes.StoreDecoderRegistry)
- func (pw Wrapper) WeightedOperations(simSate module.SimulationState) []simtypes.WeightedOperation
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
func Dispatch( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, simState module.SimulationState, ak authkeeper.AccountKeeperI, bk bankkeeper.ViewKeeper, from simtypes.Account, chainID string, msg sdk.Msg, fundsInMsg sdk.Coins, futures []simtypes.FutureOperation, ) ( simtypes.OperationMsg, []simtypes.FutureOperation, *sdk.Result, error, )
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
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 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 NewWrapper(cdc codec.Codec, keeper *wasmkeeper.Keeper, validatorSetSource wasmkeeper.ValidatorSetSource, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, router wasmkeeper.MessageRouter) *Wrapper
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
func (pw Wrapper) ProposalMsgs(_ module.SimulationState) []simtypes.WeightedProposalMsg
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.