Documentation ¶
Index ¶
- Constants
- Variables
- func BeginBlockForks(ctx sdk.Context, app *BlackApp, baseApp baseapp.BaseApp)
- func ConsumeMultisignatureVerificationGas(meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, ...) error
- func GenesisStateWithValSet(app *BlackApp, 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 BlackApp
- func (app *BlackApp) AppCodec() codec.Codec
- func (app *BlackApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *BlackApp) BlockedAddrs() map[string]bool
- func (app *BlackApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *BlackApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *BlackApp) GetBaseApp() *baseapp.BaseApp
- func (app *BlackApp) GetIBCKeeper() *ibckeeper.Keeper
- func (app *BlackApp) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *BlackApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *BlackApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *BlackApp) GetStakingKeeper() ibctestingtypes.StakingKeeper
- func (app *BlackApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *BlackApp) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *BlackApp) GetTxConfig() client.TxConfig
- func (app *BlackApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *BlackApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *BlackApp) LegacyAmino() *codec.LegacyAmino
- func (app *BlackApp) LoadHeight(height int64) error
- func (app *BlackApp) ModuleAccountAddrs() map[string]bool
- func (app *BlackApp) Name() string
- func (app *BlackApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *BlackApp) RegisterTendermintService(clientCtx client.Context)
- func (app *BlackApp) RegisterTxService(clientCtx client.Context)
- func (app *BlackApp) SimulationManager() *module.SimulationManager
Constants ¶
const Name = "blackd"
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 Black testing.
var DefaultTestingAppInit func() (ibctesting.TestingApp, map[string]json.RawMessage) = SetupTestingApp
DefaultTestingAppInit defines the IBC application used for testing
Functions ¶
func BeginBlockForks ¶
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 *BlackApp, 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 Black 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 BlackApp ¶
type BlackApp struct { *baseapp.BaseApp keepers.AppKeepers // contains filtered or unexported fields }
BlackApp implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func NewBlackApp ¶
func NewBlackApp( 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), ) *BlackApp
NewBlackApp returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, ) *BlackApp
Setup initializes a new BlackApp. A Nop logger is set in BlackApp.
func (*BlackApp) AppCodec ¶
AppCodec returns BlackApp'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 (*BlackApp) BeginBlocker ¶
func (app *BlackApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker updates every begin block
func (*BlackApp) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*BlackApp) EndBlocker ¶
func (app *BlackApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*BlackApp) ExportAppStateAndValidators ¶
func (app *BlackApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*BlackApp) GetBaseApp ¶
func (*BlackApp) GetIBCKeeper ¶
func (*BlackApp) GetKey ¶
func (app *BlackApp) 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 (*BlackApp) GetMemKey ¶
func (app *BlackApp) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*BlackApp) GetScopedIBCKeeper ¶
func (app *BlackApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
func (*BlackApp) GetStakingKeeper ¶
func (app *BlackApp) GetStakingKeeper() ibctestingtypes.StakingKeeper
func (*BlackApp) GetSubspace ¶
func (app *BlackApp) 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 (*BlackApp) GetTKey ¶
func (app *BlackApp) 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 (*BlackApp) GetTxConfig ¶
func (*BlackApp) InitChainer ¶
func (app *BlackApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*BlackApp) InterfaceRegistry ¶
func (app *BlackApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns BlackApp's InterfaceRegistry
func (*BlackApp) LegacyAmino ¶
func (app *BlackApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns BlackApp'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 (*BlackApp) LoadHeight ¶
LoadHeight loads state at a particular height
func (*BlackApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*BlackApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*BlackApp) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*BlackApp) RegisterTxService ¶
RegisterTxService implements the Application.RegisterTxService method.
func (*BlackApp) SimulationManager ¶
func (app *BlackApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface