Documentation ¶
Index ¶
- Constants
- Variables
- func AddTestAddrs(app *Warmage, ctx sdk.Context, accNum int, accAmt sdk.Int) []sdk.AccAddress
- func ConsumeMultisignatureVerificationGas(meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, ...) error
- func FundAccount(bankKeeper bankkeeper.Keeper, ctx sdk.Context, addr sdk.AccAddress, ...) error
- func FundModuleAccount(bankKeeper bankkeeper.Keeper, ctx sdk.Context, recipientMod string, ...) error
- func FundTestAddrs(app *Warmage, ctx sdk.Context, addrs []sdk.AccAddress, accAmt sdk.Int)
- func GetMaccPerms() map[string][]string
- func ObservabilityViews() (views []*view.View)
- func RegisterDenoms()
- func SetBech32Prefixes(config *sdk.Config, accountAddressPrefix string)
- func SetBip44CoinType(config *sdk.Config)
- func SetupConfig()
- func SigVerificationGasConsumer(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
- type App
- type ExportableApp
- type GenerateAccountStrategy
- type GenesisState
- type Warmage
- func (app *Warmage) AppCodec() codec.Codec
- func (app *Warmage) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *Warmage) BlockedAddrs() map[string]bool
- func (app *Warmage) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *Warmage) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *Warmage) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app Warmage) GetBaseApp() *baseapp.BaseApp
- func (app *Warmage) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *Warmage) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *Warmage) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *Warmage) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *Warmage) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *Warmage) InterfaceRegistry() types.InterfaceRegistry
- func (app *Warmage) LegacyAmino() *codec.LegacyAmino
- func (app *Warmage) LoadHeight(height int64) error
- func (app *Warmage) ModuleAccountAddrs() map[string]bool
- func (app *Warmage) Name() string
- func (app *Warmage) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *Warmage) RegisterTendermintService(clientCtx client.Context)
- func (app *Warmage) RegisterTxService(clientCtx client.Context)
- func (app *Warmage) SimulationManager() *module.SimulationManager
Constants ¶
const (
AccountAddressPrefix = "war"
)
const (
Name = "warmage"
)
Variables ¶
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string // 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{}, capability.AppModuleBasic{}, customstaking.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic(getGovProposalHandlers()...), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, erc20.AppModuleBasic{}, oracle.AppModuleBasic{}, maker.AppModuleBasic{}, nft.AppModuleBasic{}, ve.AppModuleBasic{}, gauge.AppModuleBasic{}, voter.AppModuleBasic{}, customvesting.AppModuleBasic{}, mgravity.AppModuleBasic{}, bech32ibc.AppModuleBasic{}, ) )
Functions ¶
func AddTestAddrs ¶
AddTestAddrs constructs and returns accNum amount of accounts with an initial balance of accAmt in random order
func ConsumeMultisignatureVerificationGas ¶
func ConsumeMultisignatureVerificationGas( meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, params authtypes.Params, accSeq uint64, ) error
ConsumeMultisignatureVerificationGas consumes gas from a GasMeter for verifying a multisig pubkey signature
func FundAccount ¶
func FundAccount(bankKeeper bankkeeper.Keeper, ctx sdk.Context, addr sdk.AccAddress, amounts sdk.Coins) error
FundAccount is a utility function that funds an account by minting and sending the coins to the address. This should be used for testing purposes only!
func FundModuleAccount ¶
func FundModuleAccount(bankKeeper bankkeeper.Keeper, ctx sdk.Context, recipientMod string, amounts sdk.Coins) error
FundModuleAccount is a utility function that funds a module account by minting and sending the coins to the address. This should be used for testing purposes only!
func FundTestAddrs ¶
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func ObservabilityViews ¶
func RegisterDenoms ¶
func RegisterDenoms()
RegisterDenoms registers the base and display denominations to the SDK.
func SetBech32Prefixes ¶
SetBech32Prefixes sets the global prefixes to be used when serializing addresses and public keys to Bech32 strings.
func SetBip44CoinType ¶
SetBip44CoinType sets the global coin type to be used in hierarchical deterministic wallets.
func SetupConfig ¶
func SetupConfig()
func SigVerificationGasConsumer ¶
func SigVerificationGasConsumer( meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params, ) error
SigVerificationGasConsumer is the Evmos implementation of SignatureVerificationGasConsumer. It consumes gas for signature verification based upon the public key type. The cost is fetched from the given params and is matched by the concrete type. The types of keys supported are:
- ethsecp256k1 (Ethereum keys)
- ed25519 (Validators)
- multisig (Cosmos SDK multisigs)
Types ¶
type App ¶
type App interface { servertypes.Application ExportableApp }
App represents a Cosmos SDK application that can be run as a server and with an exportable state
func NewWarmage ¶
func NewWarmage( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), ) App
NewWarmage returns a reference to an initialized blockchain app
type ExportableApp ¶
type ExportableApp interface { ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error) LoadHeight(height int64) error }
ExportableApp represents an app with an exportable state
type GenerateAccountStrategy ¶
type GenerateAccountStrategy func(int) []sdk.AccAddress
type GenesisState ¶
type GenesisState map[string]json.RawMessage
The genesis state of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() GenesisState
NewDefaultGenesisState generates the default state for the application.
type Warmage ¶
type Warmage struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper customstakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper CrisisKeeper crisiskeeper.Keeper UpgradeKeeper upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // Ethermint keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper Erc20Keeper erc20keeper.Keeper OracleKeeper oraclekeeper.Keeper MakerKeeper makerkeeper.Keeper NftKeeper vekeeper.NftKeeper VeKeeper vekeeper.Keeper GaugeKeeper gaugekeeper.Keeper VoterKeeper voterkeeper.Keeper VestingKeeper customvestingkeeper.Keeper GravityKeeper mgravitykeeper.Keeper Bech32IbcKeeper bech32ibckeeper.Keeper // contains filtered or unexported fields }
Warmage 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 (*Warmage) AppCodec ¶
AppCodec returns an 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 (*Warmage) BeginBlocker ¶
func (app *Warmage) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker application updates every begin block
func (*Warmage) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive tokens.
func (*Warmage) DeliverTx ¶
func (app *Warmage) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
func (*Warmage) EndBlocker ¶
func (app *Warmage) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker application updates every end block
func (*Warmage) ExportAppStateAndValidators ¶
func (app *Warmage) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (Warmage) GetBaseApp ¶
GetBaseApp returns the base app of the application
func (*Warmage) GetKey ¶
func (app *Warmage) GetKey(storeKey string) *sdk.KVStoreKey
GetKey returns the KVStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*Warmage) GetMemKey ¶
func (app *Warmage) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*Warmage) GetSubspace ¶
func (app *Warmage) 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 (*Warmage) GetTKey ¶
func (app *Warmage) GetTKey(storeKey string) *sdk.TransientStoreKey
GetTKey returns the TransientStoreKey for the provided store key.
NOTE: This is solely to be used for testing purposes.
func (*Warmage) InitChainer ¶
func (app *Warmage) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer application update at chain initialization
func (*Warmage) InterfaceRegistry ¶
func (app *Warmage) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns an InterfaceRegistry
func (*Warmage) LegacyAmino ¶
func (app *Warmage) 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 testing types.
func (*Warmage) LoadHeight ¶
LoadHeight loads a particular height
func (*Warmage) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*Warmage) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*Warmage) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*Warmage) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*Warmage) SimulationManager ¶
func (app *Warmage) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface