Documentation ¶
Overview ¶
Package provwasm allows CosmWasm smart contracts to communicate with custom provenance modules.
Package provwasm allows CosmWasm smart contracts to communicate with custom provenance modules.
Package provwasm allows CosmWasm smart contracts to communicate with custom provenance modules.
Index ¶
- func Dispatch(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, ...) (simtypes.OperationMsg, []simtypes.FutureOperation, *sdk.Result, error)
- func MessageEncoders(registry *EncoderRegistry, logger log.Logger) *wasm.MessageEncoders
- func QueryPlugins(registry *QuerierRegistry) *wasm.QueryPlugins
- func SimulateActivateMarker(ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, ...) simtypes.Operation
- func SimulateFinalizeMarker(ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, ...) simtypes.Operation
- func SimulateMsgAddAccess(ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, ...) simtypes.Operation
- func SimulateMsgAddMarker(ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, ...) simtypes.Operation
- func SimulateMsgBindName(ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, ...) simtypes.Operation
- func SimulateMsgExecuteContract(ak authkeeper.AccountKeeperI, bk bankkeeper.ViewKeeper, ...) simtypes.Operation
- func SimulateMsgInstantiateContract(ak authkeeper.AccountKeeperI, bk bankkeeper.ViewKeeper, nk namekeeper.Keeper, ...) simtypes.Operation
- func SimulateMsgStoreContract(ak authkeeper.AccountKeeperI, bk bankkeeper.ViewKeeper, nk namekeeper.Keeper, ...) simtypes.Operation
- func SimulateMsgWithdrawRequest(ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, ...) simtypes.Operation
- type EncodeRequest
- type Encoder
- type EncoderRegistry
- type Querier
- type QuerierRegistry
- type QueryRequest
- type RequestFields
- type Wrapper
- func (pw Wrapper) GenerateGenesisState(input *module.SimulationState)
- func (pw Wrapper) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent
- func (pw Wrapper) RandomizedParams(r *rand.Rand) []simtypes.ParamChange
- func (pw Wrapper) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
- func (pw Wrapper) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dispatch ¶ added in v1.8.0
func Dispatch( r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, ak authkeeper.AccountKeeperI, bk bankkeeper.ViewKeeper, from simtypes.Account, chainID string, msg sdk.Msg, 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 MessageEncoders ¶
func MessageEncoders(registry *EncoderRegistry, logger log.Logger) *wasm.MessageEncoders
MessageEncoders provides provenance message encoding support for smart contracts.
func QueryPlugins ¶
func QueryPlugins(registry *QuerierRegistry) *wasm.QueryPlugins
QueryPlugins provides provenance query support for smart contracts.
func SimulateActivateMarker ¶ added in v1.8.0
func SimulateActivateMarker(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(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(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(ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, node, feebucket, merchant, consumer simtypes.Account, name string) simtypes.Operation
SimulateMsgAddMarker will bind a NAME under an existing name
func SimulateMsgBindName ¶ added in v1.8.0
func SimulateMsgBindName(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(ak authkeeper.AccountKeeperI, bk bankkeeper.ViewKeeper, node, consumer simtypes.Account, contractAddr string) simtypes.Operation
func SimulateMsgInstantiateContract ¶ added in v1.8.0
func SimulateMsgInstantiateContract(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(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(ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, node, feebucket, merchant, consumer simtypes.Account, name string) simtypes.Operation
Types ¶
type EncodeRequest ¶
type EncodeRequest struct {
RequestFields
}
EncodeRequest is the top-level type for provenance message encoding support in CosmWasm smart contracts.
type Encoder ¶
type Encoder func(contract sdk.AccAddress, data json.RawMessage, version string) ([]sdk.Msg, error)
Encoder describes behavior for provenance smart contract message encoding. The contract address must ALWAYS be set as the Msg signer.
type EncoderRegistry ¶
type EncoderRegistry struct {
// contains filtered or unexported fields
}
EncoderRegistry maps routes to encoders.
func NewEncoderRegistry ¶
func NewEncoderRegistry() *EncoderRegistry
NewEncoderRegistry creates a new registry for message encoders.
func (*EncoderRegistry) RegisterEncoder ¶
func (qr *EncoderRegistry) RegisterEncoder(route string, encoder Encoder)
RegisterEncoder adds a message encoder for the given route.
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 QueryRequest ¶
type QueryRequest struct {
RequestFields
}
QueryRequest is the top-level type for provenance query support in CosmWasm smart contracts.
type RequestFields ¶
type RequestFields struct { // The router key of the module Route string `json:"route"` // The module-specific inputs represented as JSON. Params json.RawMessage `json:"params"` // Enables smart contract backwards compatibility. Version string `json:"version,omitempty"` }
RequestFields contains fields shared between query requests and encode requests. Version should be the semantic data format version of the provenance rust bindings (eg 1.2.3).
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 *wasm.Keeper, validatorSetSource keeper.ValidatorSetSource, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper) *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) ProposalContents ¶ added in v1.8.0
func (pw Wrapper) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent
ProposalContents doesn't return any content functions for governance proposals.
func (Wrapper) RandomizedParams ¶ added in v1.8.0
func (pw Wrapper) RandomizedParams(r *rand.Rand) []simtypes.ParamChange
RandomizedParams returns empty list as the params don't change
func (Wrapper) RegisterStoreDecoder ¶ added in v1.8.0
func (pw Wrapper) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)
RegisterStoreDecoder registers a decoder for supply module's types
func (Wrapper) WeightedOperations ¶ added in v1.8.0
func (pw Wrapper) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation
WeightedOperations returns the all the provwasm operations with their respective weights.