Documentation
¶
Index ¶
- Constants
- Variables
- func ConsumeMultisignatureVerificationGas(meter sdk.GasMeter, sig *signing.MultiSignatureData, pubkey multisig.PubKey, ...) error
- func GetEnabledProposals() []wasm.ProposalType
- func GetMaccPerms() map[string][]string
- func NewDefaultGenesisState() simapp.GenesisState
- func ObservabilityViews() (views []*view.View)
- 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 EmptyAppOptions
- type EncodingConfig
- type TestApp
- func NewTestChain(logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, ...) *TestApp
- func Setup(isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState) *TestApp
- func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, ...) *TestApp
- func (app *TestApp) AppCodec() codec.Codec
- func (app *TestApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *TestApp) BlockedAddrs() map[string]bool
- func (app *TestApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *TestApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *TestApp) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *TestApp) GetBaseApp() *baseapp.BaseApp
- func (app *TestApp) GetIBCKeeper() *ibckeeper.Keeper
- func (app *TestApp) GetKey(storeKey string) *sdk.KVStoreKey
- func (app *TestApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
- func (app *TestApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *TestApp) GetStakingKeeper() stakingkeeper.Keeper
- func (app *TestApp) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *TestApp) GetTKey(storeKey string) *sdk.TransientStoreKey
- func (app *TestApp) GetTxConfig() client.TxConfig
- func (app *TestApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *TestApp) InterfaceRegistry() types.InterfaceRegistry
- func (app *TestApp) LegacyAmino() *codec.LegacyAmino
- func (app *TestApp) LoadHeight(height int64) error
- func (app *TestApp) ModuleAccountAddrs() map[string]bool
- func (app *TestApp) Name() string
- func (app *TestApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *TestApp) RegisterTendermintService(clientCtx client.Context)
- func (app *TestApp) RegisterTxService(clientCtx client.Context)
- func (app *TestApp) SimulationManager() *module.SimulationManager
Constants ¶
const Name = "testd"
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{}, mint.AppModuleBasic{}, distr.AppModuleBasic{}, gov.NewAppModuleBasic( append(wasmclient.ProposalHandlers, paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.ProposalHandler, upgradeclient.CancelProposalHandler, 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{}, evm.AppModuleBasic{}, feemarket.AppModuleBasic{}, erc20.AppModuleBasic{}, wasm.AppModuleBasic{}, ) // If EnabledSpecificProposals is "", and this is "true", then enable all x/wasm proposals. // If EnabledSpecificProposals is "", and this is not "true", then disable all x/wasm proposals. WasmProposalsEnabled = "true" // If set to non-empty string it must be comma-separated list of values that are all a subset // of "EnableAllProposals" (takes precedence over ProposalsEnabled) // https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34 WasmEnableSpecificProposals = "" )
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 Acreapp testing.
var DefaultTestingAppInit func() (ibctesting.TestingApp, map[string]json.RawMessage) = SetupTestingApp
DefaultTestingAppInit defines the IBC application used for testing
var EmptyWasmOpts []wasm.Option
use this for clarity in argument list
Functions ¶
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 GetEnabledProposals ¶ added in v0.1.2
func GetEnabledProposals() []wasm.ProposalType
GetEnabledProposals parses the ProposalsEnabled / EnableSpecificProposals values to produce a list of enabled proposals to pass into wasmd app.
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 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
func SigVerificationGasConsumer ¶
func SigVerificationGasConsumer( meter sdk.GasMeter, sig signing.SignatureV2, params authtypes.Params, ) error
SigVerificationGasConsumer is the Acrechain 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 EmptyAppOptions ¶ added in v0.1.2
type EmptyAppOptions struct{}
type EncodingConfig ¶ added in v0.1.2
type EncodingConfig struct {
Amino *codec.LegacyAmino
InterfaceRegistry codectypes.InterfaceRegistry
Marshaler codec.ProtoCodecMarshaler
TxConfig client.TxConfig
}
func MakeEncodingConfig ¶ added in v0.1.2
func MakeEncodingConfig() EncodingConfig
func NewEncodingConfig ¶ added in v0.1.2
func NewEncodingConfig() EncodingConfig
type TestApp ¶
type TestApp struct {
*baseapp.BaseApp
// keepers
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.Keeper
CapabilityKeeper *capabilitykeeper.Keeper
StakingKeeper stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
MintKeeper mintkeeper.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
EvidenceKeeper evidencekeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
WasmKeeper wasm.Keeper
// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
ScopedWasmKeeper capabilitykeeper.ScopedKeeper
// Ethermint keepers
EvmKeeper *evmkeeper.Keeper
FeeMarketKeeper feemarketkeeper.Keeper
Erc20Keeper erc20keeper.Keeper
// contains filtered or unexported fields
}
TestApp implements an extended ABCI application. It is an application that may process transactions through Ethereum's EVM running atop of Tendermint consensus.
func NewTestChain ¶
func NewTestChain( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig testparams.EncodingConfig, enabledProposals []wasm.ProposalType, appOpts servertypes.AppOptions, wasmOpts []wasm.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *TestApp
NewTestChain returns a reference to a new initialized Ethermint application.
func Setup ¶
func Setup( isCheckTx bool, feemarketGenesis *feemarkettypes.GenesisState, ) *TestApp
Setup initializes a new AcreApp. A Nop logger is set in AcreApp.
func SetupWithGenesisValSet ¶ added in v0.1.2
func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, chainID string, opts []wasm.Option, balances ...banktypes.Balance) *TestApp
SetupWithGenesisValSet initializes a new WasmApp with a validator set and genesis accounts that also act as delegators. For simplicity, each validator is bonded with a delegation of one consensus engine unit (10^6) in the default token of the WasmApp from first genesis account. A Nop logger is set in WasmApp.
func (*TestApp) AppCodec ¶
AppCodec returns TestApp'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 (*TestApp) BeginBlocker ¶
func (app *TestApp) 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 (*TestApp) BlockedAddrs ¶
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*TestApp) DeliverTx ¶
func (app *TestApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
We are intentionally decomposing the DeliverTx method so as to calculate the transactions per second.
func (*TestApp) EndBlocker ¶
func (app *TestApp) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block
func (*TestApp) ExportAppStateAndValidators ¶
func (app *TestApp) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*TestApp) GetBaseApp ¶
GetBaseApp implements the TestingApp interface.
func (*TestApp) GetIBCKeeper ¶
GetIBCKeeper implements the TestingApp interface.
func (*TestApp) GetKey ¶
func (app *TestApp) 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 (*TestApp) GetMemKey ¶
func (app *TestApp) GetMemKey(storeKey string) *sdk.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*TestApp) GetScopedIBCKeeper ¶
func (app *TestApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper implements the TestingApp interface.
func (*TestApp) GetStakingKeeper ¶
func (app *TestApp) GetStakingKeeper() stakingkeeper.Keeper
GetStakingKeeper implements the TestingApp interface.
func (*TestApp) GetSubspace ¶
func (app *TestApp) 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 (*TestApp) GetTKey ¶
func (app *TestApp) 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 (*TestApp) GetTxConfig ¶
GetTxConfig implements the TestingApp interface.
func (*TestApp) InitChainer ¶
func (app *TestApp) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization
func (*TestApp) InterfaceRegistry ¶
func (app *TestApp) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns TestApp's InterfaceRegistry
func (*TestApp) LegacyAmino ¶
func (app *TestApp) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns TestApp'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 (*TestApp) LoadHeight ¶
LoadHeight loads state at a particular height
func (*TestApp) ModuleAccountAddrs ¶
ModuleAccountAddrs returns all the app's module account addresses.
func (*TestApp) RegisterAPIRoutes ¶
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*TestApp) RegisterTendermintService ¶
func (*TestApp) RegisterTxService ¶
func (*TestApp) SimulationManager ¶
func (app *TestApp) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
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). |