Documentation
¶
Index ¶
- Constants
- Variables
- func GenesisStateWithValSet(app *Haqq, genesisState simapp.GenesisState, valSet *tmtypes.ValidatorSet, ...) simapp.GenesisState
- func GetMaccPerms() map[string][]string
- func NewDefaultGenesisState() simapp.GenesisState
- func NewHaqqAnteHandlerDecorator(_ keeper.Keeper, h types.AnteHandler) types.AnteHandler
- func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
- func ObservabilityViews() (views []*view.View)
- func RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func SetupTestingApp() (ibctesting.TestingApp, map[string]json.RawMessage)
- type Haqq
- func (app *Haqq) AppCodec() codec.Codec
- func (app *Haqq) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *Haqq) BlockedAddrs() map[string]bool
- func (app *Haqq) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *Haqq) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *Haqq) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *Haqq) GetBaseApp() *baseapp.BaseApp
- func (app *Haqq) GetIBCKeeper() *ibckeeper.Keeper
- func (app *Haqq) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *Haqq) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *Haqq) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *Haqq) GetStakingKeeper() ibctestingtypes.StakingKeeper
- func (app *Haqq) GetStakingKeeperSDK() stakingkeeper.Keeper
- func (app *Haqq) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *Haqq) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *Haqq) GetTxConfig() client.TxConfig
- func (app *Haqq) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *Haqq) InterfaceRegistry() types.InterfaceRegistry
- func (app *Haqq) LegacyAmino() *codec.LegacyAmino
- func (app *Haqq) LoadHeight(height int64) error
- func (app *Haqq) ModuleAccountAddrs() map[string]bool
- func (app *Haqq) Name() string
- func (app *Haqq) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *Haqq) RegisterNodeService(clientCtx client.Context)
- func (app *Haqq) RegisterTendermintService(clientCtx client.Context)
- func (app *Haqq) RegisterTxService(clientCtx client.Context)
- func (app *Haqq) ScheduleForkUpgrade(ctx sdk.Context)
- func (app *Haqq) SimulationManager() *module.SimulationManager
Constants ¶
const ( // Name defines the application binary name Name = "haqqd" UpgradeName = "v1.6.0" MainnetChainID = "haqq_11235" )
const PremintAmount = 20_000_000_000
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, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, erc20client.RegisterCoinProposalHandler, erc20client.RegisterERC20ProposalHandler, erc20client.ToggleTokenConversionProposalHandler, }, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, ica.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{AppModuleBasic: &ibctransfer.AppModuleBasic{}}, vesting.AppModuleBasic{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, coinomics.AppModuleBasic{}, erc20.AppModuleBasic{}, epochs.AppModuleBasic{}, ) )
var ( MinGasPrices = sdk.NewDec(20_000_000_000) MinGasMultiplier = 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 Evmos testing.
var DefaultTestingAppInit func() (ibctesting.TestingApp, map[string]json.RawMessage) = SetupTestingApp
DefaultTestingAppInit defines the IBC application used for testing
var ErrCommunitySpendingComingLater = sdkerrors.Register("haqq-ante", 6001, "community fund spend coming later")
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 HaqqApp testing.
Functions ¶
func GenesisStateWithValSet ¶ added in v1.3.0
func GenesisStateWithValSet(app *Haqq, 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 NewHaqqAnteHandlerDecorator ¶
func NewHaqqAnteHandlerDecorator(_ keeper.Keeper, h types.AnteHandler) types.AnteHandler
func NewTestGenesisState ¶ added in v1.6.0
func NewTestGenesisState(codec codec.Codec) simapp.GenesisState
NewTestGenesisState generate genesis state with single validator
func ObservabilityViews ¶
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
Types ¶
type Haqq ¶
type Haqq 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
IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly
ICAHostKeeper icahostkeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper transferkeeper.Keeper
// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
// Ethermint keepers
EvmKeeper *evmkeeper.Keeper
FeeMarketKeeper feemarketkeeper.Keeper
// Evmos keepers
Erc20Keeper erc20keeper.Keeper
EpochsKeeper epochskeeper.Keeper
VestingKeeper vestingkeeper.Keeper
// Haqq keepers
CoinomicsKeeper coinomicskeeper.Keeper
// contains filtered or unexported fields
}
Haqq implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func EthSetup ¶ added in v1.6.0
func EthSetup(isCheckTx bool, patchGenesis func(*Haqq, simapp.GenesisState) simapp.GenesisState) *Haqq
EthSetup initializes a new HaqqApp. A Nop logger is set in HaqqApp.
func EthSetupWithDB ¶ added in v1.6.0
func EthSetupWithDB(isCheckTx bool, patchGenesis func(*Haqq, simapp.GenesisState) simapp.GenesisState, db dbm.DB) *Haqq
EthSetupWithDB initializes a new HaqqApp. A Nop logger is set in HaqqApp.
func NewHaqq ¶
func NewHaqq( 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), ) *Haqq
NewHaqq returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, ) (*Haqq, []byte)
Setup initializes a new Evmos. A Nop logger is set in Evmos.
func (*Haqq) AppCodec ¶
AppCodec returns Haqq'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 (*Haqq) BeginBlocker ¶
func (app *Haqq) 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 (*Haqq) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*Haqq) DeliverTx ¶
func (app *Haqq) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
We are intentionally decomposing the DeliverTx method so as to calculate the transactions per second.
func (*Haqq) EndBlocker ¶
func (app *Haqq) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*Haqq) ExportAppStateAndValidators ¶
func (app *Haqq) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*Haqq) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*Haqq) GetIBCKeeper ¶
GetIBCKeeper implements the TestingApp interface.
func (*Haqq) GetKey ¶
func (app *Haqq) 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 (*Haqq) GetMemKey ¶
func (app *Haqq) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*Haqq) GetScopedIBCKeeper ¶
func (app *Haqq) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper implements the TestingApp interface.
func (*Haqq) GetStakingKeeper ¶
func (app *Haqq) GetStakingKeeper() ibctestingtypes.StakingKeeper
GetStakingKeeper implements the TestingApp interface.
func (*Haqq) GetStakingKeeperSDK ¶ added in v1.6.0
func (app *Haqq) GetStakingKeeperSDK() stakingkeeper.Keeper
GetStakingKeeperSDK implements the TestingApp interface.
func (*Haqq) GetSubspace ¶
func (app *Haqq) 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 (*Haqq) GetTKey ¶
func (app *Haqq) 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 (*Haqq) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*Haqq) InitChainer ¶
func (app *Haqq) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*Haqq) InterfaceRegistry ¶
func (app *Haqq) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Haqq's InterfaceRegistry
func (*Haqq) LegacyAmino ¶
func (app *Haqq) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns Haqq'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 (*Haqq) LoadHeight ¶
LoadHeight loads state at a particular height
func (*Haqq) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*Haqq) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*Haqq) RegisterNodeService ¶ added in v1.6.0
RegisterNodeService registers the node gRPC service on the provided application gRPC query router.
func (*Haqq) RegisterTendermintService ¶
func (*Haqq) RegisterTxService ¶
func (*Haqq) ScheduleForkUpgrade ¶ added in v1.1.9
ScheduleForkUpgrade executes any necessary fork logic for based upon the current block height and chain ID (mainnet or testnet). It sets an upgrade plan once the chain reaches the pre-defined upgrade height.
CONTRACT: for this logic to work properly it is required to:
- Release a non-breaking patch version so that the chain can set the scheduled upgrade plan at upgrade-height.
- Release the software defined in the upgrade-info
func (*Haqq) SimulationManager ¶
func (app *Haqq) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface