Documentation ¶
Overview ¶
Copyright 2022 Match Foundation This file is part of the Match Network packages.
Match is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Match packages are distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Match packages. If not, see https://github.com/matchain/match/blob/main/LICENSE
Index ¶
- Constants
- Variables
- func GenesisStateWithValSet(app *Match, genesisState simapp.GenesisState, valSet *tmtypes.ValidatorSet, ...) simapp.GenesisState
- func GetMaccPerms() map[string][]string
- func NewDefaultGenesisState() simapp.GenesisState
- func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
- func ObservabilityViews() (views []*view.View)
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- type Match
- func (app *Match) AppCodec() codec.Codec
- func (app *Match) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *Match) BlockedAddrs() map[string]bool
- func (app *Match) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *Match) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *Match) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *Match) GetBaseApp() *baseapp.BaseApp
- func (app *Match) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *Match) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *Match) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *Match) GetStakingKeeperSDK() stakingkeeper.Keeper
- func (app *Match) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *Match) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *Match) GetTxConfig() client.TxConfig
- func (app *Match) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *Match) InterfaceRegistry() types.InterfaceRegistry
- func (app *Match) LegacyAmino() *codec.LegacyAmino
- func (app *Match) LoadHeight(height int64) error
- func (app *Match) ModuleAccountAddrs() map[string]bool
- func (app *Match) Name() string
- func (app *Match) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *Match) RegisterNodeService(clientCtx client.Context)
- func (app *Match) RegisterTendermintService(clientCtx client.Context)
- func (app *Match) RegisterTxService(clientCtx client.Context)
Constants ¶
const Name = "matchd"
Name defines the application binary name
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{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, }, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, vesting.AppModuleBasic{}, reward.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, ) )
var ( // MainnetMinGasPrices defines 20B amatch (or atmatch) as the minimum gas price value on the fee market module. // See https://commonwealth.im/match/discussion/5073-global-min-gas-price-value-for-cosmos-sdk-and-evm-transaction-choosing-a-value for reference MainnetMinGasPrices = sdk.NewDec(20_000_000_000) // MainnetMinGasMultiplier defines the min gas multiplier value on the fee market module. // 50% of the leftover gas will be refunded MainnetMinGasMultiplier = sdk.NewDecWithPrec(5, 1) )
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 Match testing.
var EthDefaultConsensusParams = &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, }, }, }
EthDefaultConsensusParams defines the default Tendermint consensus params used in MatchApp testing.
Functions ¶
func GenesisStateWithValSet ¶
func GenesisStateWithValSet(app *Match, 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 NewTestGenesisState ¶
func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
NewTestGenesisState generate genesis state with single validator
func ObservabilityViews ¶
Types ¶
type Match ¶
type Match struct { *baseapp.BaseApp // keepers AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.Keeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper DistrKeeper distrkeeper.Keeper GovKeeper govkeeper.Keeper CrisisKeeper crisiskeeper.Keeper UpgradeKeeper upgradekeeper.Keeper ParamsKeeper paramskeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper AuthzKeeper authzkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper // Ethermint keepers EvmKeeper *evmkeeper.Keeper FeeMarketKeeper feemarketkeeper.Keeper // Match keepers RewardKeeper rewardkeeper.Keeper // contains filtered or unexported fields }
Match implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func EthSetup ¶
func EthSetup(isCheckTx bool, patchGenesis func(*Match, simapp.GenesisState) simapp.GenesisState) *Match
EthSetup initializes a new MatchApp. A Nop logger is set in MatchApp.
func EthSetupWithDB ¶
func EthSetupWithDB(isCheckTx bool, patchGenesis func(*Match, simapp.GenesisState) simapp.GenesisState, db dbm.DB) *Match
EthSetupWithDB initializes a new MatchApp. A Nop logger is set in MatchApp.
func NewMatch ¶
func NewMatch( 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), ) *Match
NewMatch returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, ) *Match
Setup initializes a new Match. A Nop logger is set in Match.
func (*Match) AppCodec ¶
AppCodec returns Match'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 (*Match) BeginBlocker ¶
func (app *Match) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker runs the Tendermint ABCI BeginBlock logic. It executes state changes at the beginning of the new block for every registered module. If there is a registered fork at the current height, BeginBlocker will schedule the upgrade plan and perform the state migration (if any).
func (*Match) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*Match) DeliverTx ¶
func (app *Match) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
The DeliverTx method is intentionally decomposed to calculate the transactions per second.
func (*Match) EndBlocker ¶
func (app *Match) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*Match) ExportAppStateAndValidators ¶
func (app *Match) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*Match) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*Match) GetKey ¶
func (app *Match) 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 (*Match) GetMemKey ¶
func (app *Match) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*Match) GetScopedIBCKeeper ¶
func (app *Match) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper implements the TestingApp interface.
func (*Match) GetStakingKeeperSDK ¶
func (app *Match) GetStakingKeeperSDK() stakingkeeper.Keeper
GetStakingKeeperSDK implements the TestingApp interface.
func (*Match) GetSubspace ¶
func (app *Match) 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 (*Match) GetTKey ¶
func (app *Match) 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 (*Match) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*Match) InitChainer ¶
func (app *Match) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*Match) InterfaceRegistry ¶
func (app *Match) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Match's InterfaceRegistry
func (*Match) LegacyAmino ¶
func (app *Match) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns Match'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 (*Match) LoadHeight ¶
LoadHeight loads state at a particular height
func (*Match) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*Match) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*Match) RegisterNodeService ¶
RegisterNodeService registers the node gRPC service on the provided application gRPC query router.
func (*Match) RegisterTendermintService ¶
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*Match) RegisterTxService ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx).
|
Package ante defines the SDK auth module's AnteHandler as well as an internal AnteHandler for an Ethereum transaction (i.e MsgEthereumTx). |