app

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 144 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "axelar"

Name is the name of the application

Variables

View Source
var (
	// DefaultNodeHome default home directories for the application daemon
	DefaultNodeHome string

	// WasmEnabled indicates whether wasm module is added to the app.
	// "true" setting means it will be, otherwise it won't.
	// This is configured during the build.
	WasmEnabled = ""

	// IBCWasmHooksEnabled indicates whether wasm hooks for ibc are enabled.
	// "true" setting means it will be, otherwise it won't.
	// When disabled, cosmwasm contracts cannot be called via IBC.
	// This is configured during the build.
	IBCWasmHooksEnabled = ""

	// WasmCapabilities specifies the capabilities of the wasm vm
	// capabilities are detailed here: https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md
	WasmCapabilities = ""

	// MaxWasmSize specifies the maximum wasm code size (in bytes) that can be uploaded. wasmd's setting is used by default
	// https://github.com/CosmWasm/wasmd/blob/main/README.md#compile-time-parameters
	MaxWasmSize = ""
)
View Source
var (
	AccountAddressPrefix   = "axelar"
	AccountPubKeyPrefix    = AccountAddressPrefix + sdk.PrefixPublic
	ValidatorAddressPrefix = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixOperator
	ValidatorPubKeyPrefix  = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixOperator + sdk.PrefixPublic
	ConsNodeAddressPrefix  = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixConsensus
	ConsNodePubKeyPrefix   = AccountAddressPrefix + sdk.PrefixValidator + sdk.PrefixConsensus + sdk.PrefixPublic
)

Bech32 prefixes

Functions

func CreateStoreKeys added in v0.35.3

func CreateStoreKeys() map[string]*sdk.KVStoreKey

func GetKeeper added in v0.36.0

func GetKeeper[T any](k *KeeperCache) *T

func GetModuleBasics added in v0.35.0

func GetModuleBasics() module.BasicManager

GetModuleBasics initializes the module BasicManager is in charge of setting up basic, non-dependant module elements, such as codec registration and genesis verification. Initialization is dependent on whether wasm is enabled.

func InitCustomAnteDecorators added in v0.36.0

func InitCustomAnteDecorators(
	encodingConfig axelarParams.EncodingConfig,
	keys map[string]*sdk.KVStoreKey,
	keepers *KeeperCache,
	appOpts servertypes.AppOptions,
) []sdk.AnteDecorator

func InitICS4Wrapper added in v0.35.3

func InitICS4Wrapper(keepers *KeeperCache, wasmHooks *ibchooks.WasmHooks) ibchooks.ICS4Middleware

func InitModuleAccountPermissions added in v0.35.3

func InitModuleAccountPermissions() map[string][]string

func InitWasmHooks added in v0.35.3

func InitWasmHooks(keys map[string]*sdk.KVStoreKey) *ibchooks.WasmHooks

func IsIBCWasmHooksEnabled added in v0.35.0

func IsIBCWasmHooksEnabled() bool

IsIBCWasmHooksEnabled returns whether ibc wasm hooks are enabled

func IsWasmEnabled added in v0.35.0

func IsWasmEnabled() bool

IsWasmEnabled returns whether wasm is enabled

func MakeEncodingConfig

func MakeEncodingConfig() params.EncodingConfig

MakeEncodingConfig creates an EncodingConfig for testing

func RegisterSwaggerAPI

func RegisterSwaggerAPI(rtr *mux.Router)

RegisterSwaggerAPI registers swagger route with API Server

func SetConfig

func SetConfig()

SetConfig sets the prefix config for the bech32 encoding

func SetKeeper added in v0.35.3

func SetKeeper[T any](k *KeeperCache, keeper T)

func WithAnteHandlers added in v0.35.0

func WithAnteHandlers(encoders wasmkeeper.MessageEncoders, anteHandler ante.MessageAnteHandler, messenger wasmkeeper.Messenger) wasmkeeper.Messenger

Types

type AnteHandlerMessenger added in v0.35.0

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

func (AnteHandlerMessenger) DispatchMsg added in v0.35.0

func (m AnteHandlerMessenger) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddress, contractIBCPortID string, msg wasmvmtypes.CosmosMsg) (events []sdk.Event, data [][]byte, err error)

type AxelarApp

type AxelarApp struct {
	*bam.BaseApp
	// Keys and Keepers are necessary for the app to interact with the cosmos-sdk and to be able to test the app in isolation without mocks
	Keepers *KeeperCache
	Keys    map[string]*sdk.KVStoreKey
	// contains filtered or unexported fields
}

AxelarApp defines the axelar Cosmos app that runs all modules

func NewAxelarApp

func NewAxelarApp(
	logger log.Logger,
	db dbm.DB,
	traceStore io.Writer,
	loadLatest bool,
	skipUpgradeHeights map[int64]bool,
	homePath string,
	wasmDir string,
	invCheckPeriod uint,
	encodingConfig axelarParams.EncodingConfig,
	appOpts servertypes.AppOptions,
	wasmOpts []wasm.Option,
	baseAppOptions ...func(*bam.BaseApp),
) *AxelarApp

NewAxelarApp is a constructor function for axelar

func (*AxelarApp) AppCodec

func (app *AxelarApp) AppCodec() codec.Codec

AppCodec returns AxelarApp's app codec.

NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom testing types.

func (*AxelarApp) BeginBlocker

func (app *AxelarApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock

BeginBlocker calls the BeginBlock() function of every module at the beginning of a new block

func (*AxelarApp) EndBlocker

func (app *AxelarApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock

EndBlocker calls the EndBlock() function of every module at the end of a block

func (*AxelarApp) ExportAppStateAndValidators

func (app *AxelarApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)

ExportAppStateAndValidators exports the state of the application for a genesis file.

func (*AxelarApp) InitChainer

func (app *AxelarApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain

InitChainer handles the chain initialization from a genesis file

func (*AxelarApp) LoadHeight

func (app *AxelarApp) LoadHeight(height int64) error

LoadHeight loads the application version at a given height. It will panic if called more than once on a running baseapp.

func (*AxelarApp) RegisterAPIRoutes

func (app *AxelarApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)

RegisterAPIRoutes registers all application module routes with the provided API server.

func (*AxelarApp) RegisterTendermintService

func (app *AxelarApp) RegisterTendermintService(clientCtx client.Context)

RegisterTendermintService implements the Application.RegisterTendermintService method.

func (*AxelarApp) RegisterTxService

func (app *AxelarApp) RegisterTxService(clientCtx client.Context)

RegisterTxService implements the Application.RegisterTxService method.

type GenesisState

type GenesisState map[string]json.RawMessage

GenesisState represents chain state at the start of the chain. Any initial state (account balances) are stored here.

type KeeperCache added in v0.35.3

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

func NewKeeperCache added in v0.35.3

func NewKeeperCache() *KeeperCache

type MsgTypeBlacklistMessenger added in v0.35.0

type MsgTypeBlacklistMessenger struct {
}

func NewMsgTypeBlacklistMessenger added in v0.35.0

func NewMsgTypeBlacklistMessenger() MsgTypeBlacklistMessenger

func (MsgTypeBlacklistMessenger) DispatchMsg added in v0.35.0

func (m MsgTypeBlacklistMessenger) DispatchMsg(_ sdk.Context, _ sdk.AccAddress, _ string, msg wasmvmtypes.CosmosMsg) (events []sdk.Event, data [][]byte, err error)

type PacketI added in v0.35.3

type PacketI ibcexported.PacketI

type WasmAppModuleBasicOverride added in v0.35.0

type WasmAppModuleBasicOverride struct {
	wasm.AppModuleBasic
}

func NewWasmAppModuleBasicOverride added in v0.35.0

func NewWasmAppModuleBasicOverride(wasmModule wasm.AppModuleBasic) WasmAppModuleBasicOverride

func (WasmAppModuleBasicOverride) DefaultGenesis added in v0.35.0

DefaultGenesis returns an override for the wasm module's DefaultGenesis, because as soon as the module is initialized the restriction to contract upload and instantiation must hold

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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