Documentation ¶
Index ¶
- func ClearContractAdminCmd() *cobra.Command
- func ExecuteContractCmd() *cobra.Command
- func GenesisExecuteContractCmd(defaultNodeHome string, genesisMutator GenesisMutator) *cobra.Command
- func GenesisInstantiateContractCmd(defaultNodeHome string, genesisMutator GenesisMutator) *cobra.Command
- func GenesisListCodesCmd(defaultNodeHome string, genReader GenesisReader) *cobra.Command
- func GenesisListContractsCmd(defaultNodeHome string, genReader GenesisReader) *cobra.Command
- func GenesisStoreCodeCmd(defaultNodeHome string, genesisMutator GenesisMutator) *cobra.Command
- func GetCmdBuildAddress() *cobra.Command
- func GetCmdGetContractHistory() *cobra.Command
- func GetCmdGetContractInfo() *cobra.Command
- func GetCmdGetContractState() *cobra.Command
- func GetCmdGetContractStateAll() *cobra.Command
- func GetCmdGetContractStateRaw() *cobra.Command
- func GetCmdGetContractStateSmart() *cobra.Command
- func GetCmdLibVersion() *cobra.Command
- func GetCmdListCode() *cobra.Command
- func GetCmdListContractByCode() *cobra.Command
- func GetCmdListPinnedCode() *cobra.Command
- func GetCmdQueryCode() *cobra.Command
- func GetCmdQueryCodeInfo() *cobra.Command
- func GetCmdQueryParams() *cobra.Command
- func GetQueryCmd() *cobra.Command
- func GetTxCmd() *cobra.Command
- func InstantiateContractCmd() *cobra.Command
- func MigrateContractCmd() *cobra.Command
- func ProposalClearContractAdminCmd() *cobra.Command
- func ProposalExecuteContractCmd() *cobra.Command
- func ProposalInstantiateContractCmd() *cobra.Command
- func ProposalMigrateContractCmd() *cobra.Command
- func ProposalPinCodesCmd() *cobra.Command
- func ProposalStoreCodeCmd() *cobra.Command
- func ProposalSudoContractCmd() *cobra.Command
- func ProposalUnpinCodesCmd() *cobra.Command
- func ProposalUpdateContractAdminCmd() *cobra.Command
- func ProposalUpdateInstantiateConfigCmd() *cobra.Command
- func StoreCodeCmd() *cobra.Command
- func UpdateContractAdminCmd() *cobra.Command
- type CodeMeta
- type ContractMeta
- type DefaultGenesisIO
- type DefaultGenesisReader
- type GenesisData
- type GenesisMutator
- type GenesisReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearContractAdminCmd ¶ added in v0.9.0
ClearContractAdminCmd clears an admin for a contract
func ExecuteContractCmd ¶
ExecuteContractCmd will instantiate a contract from previously uploaded code.
func GenesisExecuteContractCmd ¶ added in v0.14.1
func GenesisExecuteContractCmd(defaultNodeHome string, genesisMutator GenesisMutator) *cobra.Command
GenesisExecuteContractCmd cli command to add a `MsgExecuteContract` to the wasm section of the genesis that is executed on block 0.
func GenesisInstantiateContractCmd ¶ added in v0.14.1
func GenesisInstantiateContractCmd(defaultNodeHome string, genesisMutator GenesisMutator) *cobra.Command
GenesisInstantiateContractCmd cli command to add a `MsgInstantiateContract` to the wasm section of the genesis that is executed on block 0.
func GenesisListCodesCmd ¶ added in v0.14.1
func GenesisListCodesCmd(defaultNodeHome string, genReader GenesisReader) *cobra.Command
GenesisListCodesCmd cli command to list all codes stored in the genesis wasm.code section as well as from messages that are queued in the wasm.genMsgs section.
func GenesisListContractsCmd ¶ added in v0.14.1
func GenesisListContractsCmd(defaultNodeHome string, genReader GenesisReader) *cobra.Command
GenesisListContractsCmd cli command to list all contracts stored in the genesis wasm.contract section as well as from messages that are queued in the wasm.genMsgs section.
func GenesisStoreCodeCmd ¶ added in v0.14.1
func GenesisStoreCodeCmd(defaultNodeHome string, genesisMutator GenesisMutator) *cobra.Command
GenesisStoreCodeCmd cli command to add a `MsgStoreCode` to the wasm section of the genesis that is executed on block 0.
func GetCmdBuildAddress ¶ added in v0.29.0
GetCmdBuildAddress build a contract address
func GetCmdGetContractHistory ¶ added in v0.10.0
GetCmdGetContractHistory prints the code history for a given contract
func GetCmdGetContractInfo ¶
GetCmdGetContractInfo gets details about a given contract
func GetCmdGetContractState ¶
GetCmdGetContractState dumps full internal state of a given contract
func GetCmdLibVersion ¶ added in v0.27.0
GetCmdLibVersion gets current libwasmvm version.
func GetCmdListCode ¶
GetCmdListCode lists all wasm code uploaded
func GetCmdListContractByCode ¶
GetCmdListContractByCode lists all wasm code uploaded for given code id
func GetCmdListPinnedCode ¶ added in v0.20.0
GetCmdListPinnedCode lists all wasm code ids that are pinned
func GetCmdQueryCode ¶
GetCmdQueryCode returns the bytecode for a given contract
func GetCmdQueryCodeInfo ¶ added in v0.27.0
GetCmdQueryCodeInfo returns the code info for a given code id
func GetCmdQueryParams ¶ added in v0.29.0
GetCmdQueryParams implements a command to return the current wasm parameters.
func GetQueryCmd ¶
func InstantiateContractCmd ¶
InstantiateContractCmd will instantiate a contract from previously uploaded code.
func MigrateContractCmd ¶ added in v0.9.0
MigrateContractCmd will migrate a contract to a new code version
func ProposalClearContractAdminCmd ¶ added in v0.10.0
func ProposalExecuteContractCmd ¶ added in v0.22.0
func ProposalInstantiateContractCmd ¶ added in v0.10.0
func ProposalMigrateContractCmd ¶ added in v0.10.0
func ProposalPinCodesCmd ¶ added in v0.22.0
func ProposalStoreCodeCmd ¶ added in v0.10.0
func ProposalSudoContractCmd ¶ added in v0.22.0
func ProposalUnpinCodesCmd ¶ added in v0.22.0
func ProposalUpdateContractAdminCmd ¶ added in v0.10.0
func ProposalUpdateInstantiateConfigCmd ¶ added in v0.27.0
func UpdateContractAdminCmd ¶ added in v0.9.0
UpdateContractAdminCmd sets an new admin for a contract
Types ¶
type CodeMeta ¶ added in v0.24.0
func GetAllCodes ¶ added in v0.24.0
func GetAllCodes(state *types.GenesisState) []CodeMeta
type ContractMeta ¶ added in v0.24.0
type ContractMeta struct { ContractAddress string `json:"contract_address"` Info types.ContractInfo `json:"info"` }
func GetAllContracts ¶ added in v0.24.0
func GetAllContracts(state *types.GenesisState) ([]ContractMeta, error)
type DefaultGenesisIO ¶ added in v0.16.0
type DefaultGenesisIO struct {
DefaultGenesisReader
}
DefaultGenesisIO implements both interfaces to read and modify the genesis state for this module. This implementation uses the default data structure that is used by the module.go genesis import/ export.
func NewDefaultGenesisIO ¶ added in v0.16.0
func NewDefaultGenesisIO() *DefaultGenesisIO
NewDefaultGenesisIO constructor to create a new instance
func (DefaultGenesisIO) AlterWasmModuleState ¶ added in v0.16.0
func (x DefaultGenesisIO) AlterWasmModuleState(cmd *cobra.Command, callback func(state *types.GenesisState, appState map[string]json.RawMessage) error) error
AlterWasmModuleState loads the genesis from the default or set home dir, unmarshalls the wasm module section into the object representation calls the callback function to modify it and marshals the modified state back into the genesis file
type DefaultGenesisReader ¶ added in v0.16.0
type DefaultGenesisReader struct{}
func (DefaultGenesisReader) ReadWasmGenesis ¶ added in v0.16.0
func (d DefaultGenesisReader) ReadWasmGenesis(cmd *cobra.Command) (*GenesisData, error)
type GenesisData ¶ added in v0.16.0
type GenesisData struct { GenesisFile string GenDoc *tmtypes.GenesisDoc AppState map[string]json.RawMessage WasmModuleState *types.GenesisState }
GenesisData contains raw and unmarshalled data from the genesis file
func NewGenesisData ¶ added in v0.16.0
func NewGenesisData(genesisFile string, genDoc *tmtypes.GenesisDoc, appState map[string]json.RawMessage, wasmModuleState *types.GenesisState) *GenesisData
type GenesisMutator ¶ added in v0.16.0
type GenesisMutator interface { // AlterWasmModuleState loads the genesis from the default or set home dir, // unmarshalls the wasm module section into the object representation // calls the callback function to modify it // and marshals the modified state back into the genesis file AlterWasmModuleState(cmd *cobra.Command, callback func(state *types.GenesisState, appState map[string]json.RawMessage) error) error }
GenesisMutator extension point to modify the wasm module genesis state. This gives flexibility to customize the data structure in the genesis file a bit.
type GenesisReader ¶ added in v0.16.0
type GenesisReader interface {
ReadWasmGenesis(cmd *cobra.Command) (*GenesisData, error)
}
GenesisReader reads genesis data. Extension point for custom genesis state readers.