Documentation ¶
Index ¶
- Constants
- Variables
- func AddTestAddrsIncremental(app *WasmApp, ctx sdk.Context, accNum int, accAmt math.Int) []sdk.AccAddress
- func AllCapabilities() []string
- func GenesisStateWithValSet(codec codec.Codec, genesisState map[string]json.RawMessage, ...) (map[string]json.RawMessage, error)
- func GetEnabledProposals() []wasm.ProposalType
- func MakeEncodingConfig() params.EncodingConfig
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func SignAndDeliverWithoutCommit(t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header tmproto.Header, ...) (sdk.GasInfo, *sdk.Result, error)
- type GenesisInitOptions
- type GenesisState
- type HandlerOptions
- type SetupOptions
- type WasmApp
- func (app *WasmApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *WasmApp) GetAccountKeeper() authkeeper.AccountKeeper
- func (app *WasmApp) GetBankKeeper() bankkeeper.Keeper
- func (app *WasmApp) GetBaseApp() *baseapp.BaseApp
- func (app *WasmApp) GetIBCKeeper() *ibckeeper.Keeper
- func (app *WasmApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *WasmApp) GetStakingKeeper() *stakingkeeper.Keeper
- func (app *WasmApp) GetWasmKeeper() wasm.Keeper
- func (app WasmApp) RegisterUpgradeHandlers()
Constants ¶
const UpgradeName = "v046-to-v047"
UpgradeName defines the upgrade from v046 to v047, migrating from Cosmos SDK v0.46.x to v0.47.x.
Variables ¶
var ( NodeDir = ".wasmd" Bech32Prefix = "wasm" ProposalsEnabled = "false" EnableSpecificProposals = "" DefaultNodeHome = os.ExpandEnv("$HOME/") + NodeDir Bech32PrefixAccAddr = Bech32Prefix Bech32PrefixAccPub = Bech32Prefix + sdk.PrefixPublic Bech32PrefixValAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator Bech32PrefixValPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic Bech32PrefixConsAddr = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus Bech32PrefixConsPub = Bech32Prefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic ModuleBasics = module.NewBasicManager(getModuleBasics()...) )
Functions ¶
func AddTestAddrsIncremental ¶
func AllCapabilities ¶
func AllCapabilities() []string
AllCapabilities returns a list of all capabilities available with the current WasmVM. Reference: https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md Note: This functionality will be moved upstream: https://github.com/CosmWasm/wasmvm/issues/425
func GenesisStateWithValSet ¶
func GenesisStateWithValSet(codec codec.Codec, genesisState map[string]json.RawMessage, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) (map[string]json.RawMessage, error)
func GetEnabledProposals ¶
func GetEnabledProposals() []wasm.ProposalType
func MakeEncodingConfig ¶
func MakeEncodingConfig() params.EncodingConfig
MakeEncodingConfig creates and returns a new EncodingConfig with all modules registered.
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler creates a new AnteHandler for the application using the provided HandlerOptions.
Types ¶
type GenesisInitOptions ¶
type GenesisInitOptions struct { ValidatorSet *tmtypes.ValidatorSet GenesisAccounts []authtypes.GenesisAccount ChainID string WasmOpts []wasm.Option Balances []banktypes.Balance ConsensusParams *tmproto.ConsensusParams GenesisModifier func(genesis GenesisState) GenesisState }
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState represents the initial state of the blockchain, where each module's genesis data is stored as a raw JSON message, mapped by module name.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState
NewDefaultGenesisState generates the default genesis state for the application by using the ModuleBasicManager to retrieve the default genesis for each module.
type HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions IBCKeeper *keeper.Keeper WasmConfig *wasmTypes.WasmConfig TXCounterStoreKey storetypes.StoreKey }
HandlerOptions extends the SDK's AnteHandler options by requiring additional fields for IBC and Wasm modules.
type SetupOptions ¶
type WasmApp ¶
type WasmApp struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper *stakingkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper UpgradeKeeper *upgradekeeper.Keeper WasmKeeper wasm.Keeper IBCKeeper *ibckeeper.Keeper TransferKeeper ibctransferkeeper.Keeper // scoped keepers ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedWasmKeeper capabilitykeeper.ScopedKeeper ModuleManager *module.Manager // contains filtered or unexported fields }
func NewWasmApp ¶
func SetupWithGenesisValSet ¶
func SetupWithGenesisValSet(t *testing.T, options *GenesisInitOptions) *WasmApp
func (*WasmApp) ExportAppStateAndValidators ¶
func (app *WasmApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, modulesToExport []string, ) (servertypes.ExportedApp, error)
func (*WasmApp) GetAccountKeeper ¶
func (app *WasmApp) GetAccountKeeper() authkeeper.AccountKeeper
GetAccountKeeper returns the Account keeper instance.
func (*WasmApp) GetBankKeeper ¶
func (app *WasmApp) GetBankKeeper() bankkeeper.Keeper
GetBankKeeper returns the Bank keeper instance.
func (*WasmApp) GetBaseApp ¶
GetBaseApp returns the BaseApp instance.
func (*WasmApp) GetIBCKeeper ¶
GetIBCKeeper returns the IBC keeper instance.
func (*WasmApp) GetScopedIBCKeeper ¶
func (app *WasmApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper returns the scoped IBC keeper instance for capability management.
func (*WasmApp) GetStakingKeeper ¶
func (app *WasmApp) GetStakingKeeper() *stakingkeeper.Keeper
GetStakingKeeper returns the Staking keeper instance.
func (*WasmApp) GetWasmKeeper ¶
GetWasmKeeper returns the Wasm keeper instance.
func (WasmApp) RegisterUpgradeHandlers ¶
func (app WasmApp) RegisterUpgradeHandlers()
RegisterUpgradeHandlers registers the upgrade handlers for the application.