Documentation
¶
Index ¶
- Variables
- func GetMaccPerms() map[string][]string
- func NewCustomWasmKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey, ...) *wasmkeeper.Keeper
- func NewKVStoreServiceAdapter(storeKey *storetypes.KVStoreKey) cosmossdkstore.KVStoreService
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func ValidateGenesis(gs GenesisState, cdc codec.JSONCodec, txConfig client.TxEncodingConfig) error
- type AccountKeeperAdapter
- type App
- func (app *App) AppCodec() codec.Codec
- func (app *App) BlockedModuleAccountAddrs() map[string]bool
- func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *App) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) GenesisState
- func (app *App) GetBaseApp() *baseapp.BaseApp
- func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *App) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *App) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *App) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs GenesisState) []abci.ValidatorUpdate
- func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry
- func (app *App) LegacyAmino() *codec.LegacyAmino
- func (app *App) LoadHeight(height int64) error
- func (app *App) ModuleAccountAddrs() map[string]bool
- func (app *App) Name() string
- func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *App) RegisterNodeService(clientCtx client.Context, config config.Config)
- func (app *App) RegisterTendermintService(clientCtx client.Context)
- func (app *App) RegisterTxService(clientCtx client.Context)
- type BankKeeperAdapter
- func (b BankKeeperAdapter) BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
- func (b BankKeeperAdapter) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
- func (b BankKeeperAdapter) MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
- func (b BankKeeperAdapter) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
- func (b BankKeeperAdapter) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, ...) error
- func (b BankKeeperAdapter) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, ...) error
- func (b BankKeeperAdapter) SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
- type CustomWasmKeeper
- func (k *CustomWasmKeeper) GetCodeInfo(ctx sdk.Context, codeID uint64) (wasmtypes.CodeInfo, error)
- func (k *CustomWasmKeeper) GetContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) (*wasmtypes.ContractInfo, error)
- func (k *CustomWasmKeeper) ListCode(ctx sdk.Context) ([]wasmtypes.CodeInfo, error)
- func (k *CustomWasmKeeper) ListContractsByCode(ctx sdk.Context, codeID uint64) ([]sdk.AccAddress, error)
- func (k *CustomWasmKeeper) QueryRaw(ctx sdk.Context, contractAddress sdk.AccAddress, key []byte) ([]byte, error)
- func (k *CustomWasmKeeper) QuerySmart(ctx sdk.Context, contractAddr sdk.AccAddress, queryMsg []byte) ([]byte, error)
- type EncodingConfig
- type GenesisState
- type KVStoreServiceAdapter
- type KVStoreWrapper
- func (w *KVStoreWrapper) Delete(key []byte) error
- func (w *KVStoreWrapper) Get(key []byte) ([]byte, error)
- func (w *KVStoreWrapper) Has(key []byte) (bool, error)
- func (w *KVStoreWrapper) Iterator(start, end []byte) (store.Iterator, error)
- func (w *KVStoreWrapper) ReverseIterator(start, end []byte) (store.Iterator, error)
- func (w *KVStoreWrapper) Set(key, value []byte) error
- type SimpleAddressCodec
- type WasmKeeperAdapter
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome = os.ExpandEnv("$HOME/.fluentum") // ModuleBasics defines the module BasicManager is in charge of setting up basic, // non-dependant module elements, such as codec registration // and genesis verification. ModuleBasics = module.NewBasicManager( auth.AppModuleBasic{}, genutil.AppModuleBasic{}, bank.AppModuleBasic{}, params.AppModuleBasic{}, wasm.AppModuleBasic{}, fluentum.AppModuleBasic{}, ) )
Functions ¶
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func NewCustomWasmKeeper ¶
func NewCustomWasmKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, accountKeeper authkeeper.AccountKeeper, bankKeeper bankkeeper.Keeper, paramstore paramstypes.Subspace, ) *wasmkeeper.Keeper
NewCustomWasmKeeper creates a new custom wasm keeper
func NewKVStoreServiceAdapter ¶
func NewKVStoreServiceAdapter(storeKey *storetypes.KVStoreKey) cosmossdkstore.KVStoreService
NewKVStoreServiceAdapter creates a new KVStoreService adapter
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers the x/auth interfaces types with the interface registry Note: This is now handled by the module system automatically
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers Amino codec types
func ValidateGenesis ¶
func ValidateGenesis(gs GenesisState, cdc codec.JSONCodec, txConfig client.TxEncodingConfig) error
ValidateGenesis performs genesis state validation for the given app.
Types ¶
type AccountKeeperAdapter ¶
type AccountKeeperAdapter struct {
authkeeper.AccountKeeper
}
Adapter types to bridge interface differences
func (AccountKeeperAdapter) GetAccount ¶
func (a AccountKeeperAdapter) GetAccount(ctx sdk.Context, addr sdk.AccAddress) sdk.AccountI
func (AccountKeeperAdapter) NewAccount ¶
func (AccountKeeperAdapter) SetAccount ¶
func (a AccountKeeperAdapter) SetAccount(ctx sdk.Context, acc sdk.AccountI)
type App ¶
type App struct {
*baseapp.BaseApp
// keepers
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
ParamsKeeper paramskeeper.Keeper
// Wasm keeper
WasmKeeper wasmkeeper.Keeper
// Fluentum keepers
FluentumKeeper fluentumkeeper.Keeper
// contains filtered or unexported fields
}
App extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.
func New ¶
func New( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) *App
New returns a reference to an initialized blockchain app
func NewFluentumApp ¶
func NewFluentumApp( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, appOpts servertypes.AppOptions, encCfg EncodingConfig, ) *App
NewFluentumApp creates a new Fluentum application with the specified parameters
func (*App) AppCodec ¶
AppCodec returns SimApp'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 encoding types.
func (*App) BlockedModuleAccountAddrs ¶
BlockedModuleAccountAddrs returns all the app's blocked module account addresses.
func (*App) ExportAppStateAndValidators ¶
func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*App) ExportGenesis ¶
ExportGenesis returns the exported genesis state as raw bytes for the app.
func (*App) GetBaseApp ¶
GetBaseApp returns the base app of the application
func (*App) GetKey ¶
func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*App) GetMemKey ¶
func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*App) GetSubspace ¶
func (app *App) GetSubspace(moduleName string) paramstypes.Subspace
GetSubspace returns a param subspace for a given module name.
NOTE: This is solely to be used for testing purposes.
func (*App) GetTKey ¶
func (app *App) GetTKey(storeKey string) *storetypes.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*App) InitChainer ¶
func (app *App) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*App) InitGenesis ¶
func (app *App) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs GenesisState) []abci.ValidatorUpdate
InitGenesis performs genesis initialization for the app. It returns the validator updates (by bond) and the next validator set.
func (*App) InterfaceRegistry ¶
func (app *App) InterfaceRegistry() codectypes.InterfaceRegistry
InterfaceRegistry returns SimApp's InterfaceRegistry
func (*App) LegacyAmino ¶
func (app *App) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns SimApp's amino codec.
NOTE: This is solely to be used for testing purposes as it may be desirable for modules to register their own custom encoding types.
func (*App) LoadHeight ¶
LoadHeight loads a particular height
func (*App) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*App) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) RegisterNodeService ¶
RegisterNodeService implements the Application.RegisterNodeService method.
func (*App) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*App) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
type BankKeeperAdapter ¶
type BankKeeperAdapter struct {
bankkeeper.Keeper
}
func (BankKeeperAdapter) GetBalance ¶
func (b BankKeeperAdapter) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
func (BankKeeperAdapter) SendCoins ¶
func (b BankKeeperAdapter) SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
func (BankKeeperAdapter) SendCoinsFromAccountToModule ¶
func (b BankKeeperAdapter) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
func (BankKeeperAdapter) SendCoinsFromModuleToAccount ¶
func (b BankKeeperAdapter) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
func (BankKeeperAdapter) SendCoinsFromModuleToModule ¶
type CustomWasmKeeper ¶
type CustomWasmKeeper struct {
// contains filtered or unexported fields
}
CustomWasmKeeper provides a simplified wasm keeper implementation
func (*CustomWasmKeeper) GetCodeInfo ¶
Implement basic wasm keeper methods
func (*CustomWasmKeeper) GetContractInfo ¶
func (k *CustomWasmKeeper) GetContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) (*wasmtypes.ContractInfo, error)
func (*CustomWasmKeeper) ListContractsByCode ¶
func (k *CustomWasmKeeper) ListContractsByCode(ctx sdk.Context, codeID uint64) ([]sdk.AccAddress, error)
func (*CustomWasmKeeper) QueryRaw ¶
func (k *CustomWasmKeeper) QueryRaw(ctx sdk.Context, contractAddress sdk.AccAddress, key []byte) ([]byte, error)
func (*CustomWasmKeeper) QuerySmart ¶
func (k *CustomWasmKeeper) QuerySmart(ctx sdk.Context, contractAddr sdk.AccAddress, queryMsg []byte) ([]byte, error)
type EncodingConfig ¶
type EncodingConfig struct {
InterfaceRegistry codectypes.InterfaceRegistry
Marshaler codec.Codec
TxConfig client.TxConfig
Amino *codec.LegacyAmino
}
EncodingConfig specifies the concrete encoding types to use for a given app. This is provided for compatibility between protobuf and amino implementations.
func MakeEncodingConfig ¶
func MakeEncodingConfig() EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing This follows the recommended pattern for Cosmos SDK v0.50.6
func MakeTestEncodingConfig ¶
func MakeTestEncodingConfig() EncodingConfig
MakeTestEncodingConfig creates an EncodingConfig for testing This is the recommended pattern for Cosmos SDK v0.50.6 testing
type GenesisState ¶
type GenesisState map[string]json.RawMessage
GenesisState represents the genesis state of the blockchain
func NewDefaultGenesisState ¶
func NewDefaultGenesisState(cdc codec.JSONCodec) GenesisState
NewDefaultGenesisState generates the default state for the application.
type KVStoreServiceAdapter ¶
type KVStoreServiceAdapter struct {
// contains filtered or unexported fields
}
KVStoreServiceAdapter adapts the old KVStore interface to the new KVStoreService interface This is needed for Cosmos SDK v0.50.6 compatibility
func (*KVStoreServiceAdapter) OpenKVStore ¶
func (a *KVStoreServiceAdapter) OpenKVStore(ctx context.Context) store.KVStore
OpenKVStore implements cosmossdkstore.KVStoreService
type KVStoreWrapper ¶
type KVStoreWrapper struct {
// contains filtered or unexported fields
}
KVStoreWrapper wraps the underlying storetypes.KVStore to ensure it matches the new interface
func (*KVStoreWrapper) Delete ¶
func (w *KVStoreWrapper) Delete(key []byte) error
Delete implements cosmossdkstore.KVStore - returns error as required by new interface
func (*KVStoreWrapper) Get ¶
func (w *KVStoreWrapper) Get(key []byte) ([]byte, error)
Get implements cosmossdkstore.KVStore
func (*KVStoreWrapper) Has ¶
func (w *KVStoreWrapper) Has(key []byte) (bool, error)
Has implements cosmossdkstore.KVStore
func (*KVStoreWrapper) Iterator ¶
func (w *KVStoreWrapper) Iterator(start, end []byte) (store.Iterator, error)
Iterator implements cosmossdkstore.KVStore
func (*KVStoreWrapper) ReverseIterator ¶
func (w *KVStoreWrapper) ReverseIterator(start, end []byte) (store.Iterator, error)
ReverseIterator implements cosmossdkstore.KVStore
func (*KVStoreWrapper) Set ¶
func (w *KVStoreWrapper) Set(key, value []byte) error
Set implements cosmossdkstore.KVStore
type SimpleAddressCodec ¶
type SimpleAddressCodec struct {
Prefix string
}
Simple address codec implementation
func (SimpleAddressCodec) BytesToString ¶
func (c SimpleAddressCodec) BytesToString(bz []byte) (string, error)
func (SimpleAddressCodec) StringToBytes ¶
func (c SimpleAddressCodec) StringToBytes(text string) ([]byte, error)
type WasmKeeperAdapter ¶
type WasmKeeperAdapter struct {
CustomWasmKeeper
}
WasmKeeperAdapter adapts our custom keeper to the wasmkeeper interface