Documentation ¶
Index ¶
- Constants
- Variables
- func BeginBlockForks(ctx sdk.Context, app *PlanqApp, baseApp baseapp.BaseApp)
- func ConsumeMultisignatureVerificationGas(meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, ...) error
- func GenesisStateWithValSet(app *PlanqApp, genesisState simapp.GenesisState, valSet *tmtypes.ValidatorSet, ...) simapp.GenesisState
- func GetMaccPerms() map[string][]string
- func NewDefaultGenesisState() simapp.GenesisState
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)
- func SigVerificationGasConsumer(meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params) error
- type PlanqApp
- func (app *PlanqApp) AppCodec() codec.Codec
- func (app *PlanqApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *PlanqApp) BlockedAddrs() map[string]bool
- func (app *PlanqApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *PlanqApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *PlanqApp) GetBaseApp() *baseapp.BaseApp
- func (app *PlanqApp) GetIBCKeeper() *ibckeeper.Keeper
- func (app *PlanqApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *PlanqApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *PlanqApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *PlanqApp) GetStakingKeeper() ibctestingtypes.StakingKeeper
- func (app *PlanqApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *PlanqApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *PlanqApp) GetTxConfig() client.TxConfig
- func (app *PlanqApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *PlanqApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *PlanqApp) LegacyAmino() *codec.LegacyAmino
- func (app *PlanqApp) LoadHeight(height int64) error
- func (app *PlanqApp) ModuleAccountAddrs() map[string]bool
- func (app *PlanqApp) Name() string
- func (app *PlanqApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *PlanqApp) RegisterTendermintService(clientCtx client.Context)
- func (app *PlanqApp) RegisterTxService(clientCtx client.Context)
- func (app *PlanqApp) SimulationManager() *module.SimulationManager
Constants ¶
const Name = "planqd"
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{}, staking.AppModuleBasic{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic([]govclient.ProposalHandler{ paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, erc20client.RegisterCoinProposalHandler, erc20client.RegisterERC20ProposalHandler, erc20client.ToggleTokenConversionProposalHandler, }), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, vesting.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, erc20.AppModuleBasic{}, ) Upgrades = []upgrades.Upgrade{} Forks = []upgrades.Fork{v1_0_1.Fork, v1_0_5.Fork} )
var DefaultConsensusParams = &abci.ConsensusParams{ Block: &abci.BlockParams{ MaxBytes: 200000, MaxGas: -1, }, Evidence: &tmproto.EvidenceParams{ MaxAgeNumBlocks: 302400, MaxAgeDuration: 504 * time.Hour, MaxBytes: 10000, }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ tmtypes.ABCIPubKeyTypeEd25519, }, }, }
DefaultConsensusParams defines the default Tendermint consensus params used in Planq testing.
var DefaultTestingAppInit func() (ibctesting.TestingApp, map[string]json.RawMessage) = SetupTestingApp
DefaultTestingAppInit defines the IBC application used for testing
Functions ¶
func BeginBlockForks ¶ added in v1.0.1
BeginBlockForks is intended to be ran in a chain upgrade.
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 GenesisStateWithValSet ¶
func GenesisStateWithValSet(app *PlanqApp, genesisState simapp.GenesisState, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) simapp.GenesisState
func GetMaccPerms ¶
GetMaccPerms returns a copy of the module account permissions
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() simapp.GenesisState
NewDefaultGenesisState generates the default state for the application.
func RegisterSwaggerAPI ¶
RegisterSwaggerAPI registers swagger route with API Server
func SetupTestingApp ¶
func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)
SetupTestingApp initializes the IBC-go testing application
func SigVerificationGasConsumer ¶
func SigVerificationGasConsumer( meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params, ) error
SigVerificationGasConsumer is the Planq 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 PlanqApp ¶
type PlanqApp struct { *baseapp.BaseApp keepers.AppKeepers // contains filtered or unexported fields }
PlanqApp implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func NewPlanqApp ¶
func NewPlanqApp( 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), ) *PlanqApp
NewPlanqApp returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, ) *PlanqApp
Setup initializes a new PlanqApp. A Nop logger is set in PlanqApp.
func (*PlanqApp) AppCodec ¶
AppCodec returns PlanqApp'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 (*PlanqApp) BeginBlocker ¶
func (app *PlanqApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker updates every begin block
func (*PlanqApp) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*PlanqApp) EndBlocker ¶
func (app *PlanqApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*PlanqApp) ExportAppStateAndValidators ¶
func (app *PlanqApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*PlanqApp) GetBaseApp ¶
func (*PlanqApp) GetIBCKeeper ¶
func (*PlanqApp) GetKey ¶
func (app *PlanqApp) 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 (*PlanqApp) GetMemKey ¶
func (app *PlanqApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*PlanqApp) GetScopedIBCKeeper ¶
func (app *PlanqApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
func (*PlanqApp) GetStakingKeeper ¶
func (app *PlanqApp) GetStakingKeeper() ibctestingtypes.StakingKeeper
func (*PlanqApp) GetSubspace ¶
func (app *PlanqApp) 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 (*PlanqApp) GetTKey ¶
func (app *PlanqApp) 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 (*PlanqApp) GetTxConfig ¶
func (*PlanqApp) InitChainer ¶
func (app *PlanqApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*PlanqApp) InterfaceRegistry ¶
func (app *PlanqApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns PlanqApp's InterfaceRegistry
func (*PlanqApp) LegacyAmino ¶
func (app *PlanqApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns PlanqApp'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 (*PlanqApp) LoadHeight ¶
LoadHeight loads state at a particular height
func (*PlanqApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*PlanqApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*PlanqApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*PlanqApp) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*PlanqApp) SimulationManager ¶
func (app *PlanqApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface