Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultConfig() network.Config
- func GasRegisterConfig() wasmkeeper.WasmGasRegisterConfig
- func GetEnabledProposals() []wasm.ProposalType
- func GetMaccPerms() map[string][]string
- func GetWasmOpts(appOpts servertypes.AppOptions) []wasm.Option
- func Init()
- func NewAnteHandler(options HandlerOptions) sdk.AnteHandler
- func NewAppConstructor(encCfg EncodingConfig) network.AppConstructor
- func NewWasmGasRegister() wasmkeeper.WasmGasRegister
- func ObservabilityViews() (views []*view.View)
- func SetupTestingApp() (testApp ibctesting.TestingApp, genesisState map[string]json.RawMessage)
- type EmptyAppOptions
- type EncodingConfig
- type GenesisState
- type HandlerOptions
- type Quicksilver
- func (app *Quicksilver) AppCodec() codec.Codec
- func (app *Quicksilver) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
- func (app *Quicksilver) BlockedAddrs() map[string]bool
- func (app *Quicksilver) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
- func (app *Quicksilver) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
- func (app *Quicksilver) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs []string) (servertypes.ExportedApp, error)
- func (app *Quicksilver) GetBaseApp() *baseapp.BaseApp
- func (app *Quicksilver) GetIBCKeeper() *ibckeeper.Keeper
- func (app *Quicksilver) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *Quicksilver) GetStakingKeeper() ibctestingtypes.StakingKeeper
- func (app *Quicksilver) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *Quicksilver) GetTxConfig() client.TxConfig
- func (app *Quicksilver) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
- func (app *Quicksilver) InterfaceRegistry() types.InterfaceRegistry
- func (app *Quicksilver) LegacyAmino() *codec.LegacyAmino
- func (app *Quicksilver) LoadHeight(height int64) error
- func (app *Quicksilver) ModuleAccountAddrs() map[string]bool
- func (app *Quicksilver) Name() string
- func (app *Quicksilver) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *Quicksilver) RegisterTendermintService(clientCtx client.Context)
- func (app *Quicksilver) RegisterTxService(clientCtx client.Context)
- func (app *Quicksilver) SimulationManager() *module.SimulationManager
Constants ¶
const ( ProposalsEnabled = "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 EnableSpecificProposals = "" )
const ( // DefaultInstanceCost is initially set the same as in wasmd. DefaultInstanceCost uint64 = 60_000 // DefaultCompileCost set to a large number for testing. DefaultCompileCost uint64 = 100 )
const (
// Name defines the application binary name.
Name = "blackfuryd"
)
Variables ¶
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 Quicksilver testing.
var ( // DefaultNodeHome default home directories for the application daemon. DefaultNodeHome string )
var ( // 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{}, mint.AppModuleBasic{}, gov.NewAppModuleBasic( []govclient.ProposalHandler{ paramsclient.ProposalHandler, distrclient.ProposalHandler, upgradeclient.LegacyProposalHandler, upgradeclient.LegacyCancelProposalHandler, ibcclientclient.UpdateClientProposalHandler, ibcclientclient.UpgradeProposalHandler, interchainstakingclient.RegisterProposalHandler, interchainstakingclient.UpdateProposalHandler, participationrewardsclient.AddProtocolDataProposalHandler, }, ), params.AppModuleBasic{}, crisis.AppModuleBasic{}, slashing.AppModuleBasic{}, ibc.AppModuleBasic{}, authzmodule.AppModuleBasic{}, feegrantmodule.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, packetforward.AppModuleBasic{}, ica.AppModuleBasic{}, vesting.AppModuleBasic{}, claimsmanager.AppModuleBasic{}, epochs.AppModuleBasic{}, interchainstaking.AppModuleBasic{}, interchainquery.AppModuleBasic{}, participationrewards.AppModuleBasic{}, airdrop.AppModuleBasic{}, tokenfactory.AppModuleBasic{}, wasm.AppModuleBasic{}, ) )
Functions ¶
func DefaultConfig ¶
func GasRegisterConfig ¶
func GasRegisterConfig() wasmkeeper.WasmGasRegisterConfig
GasRegisterConfig is defaults plus a custom compile amount.
func GetEnabledProposals ¶
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 GetWasmOpts ¶
func GetWasmOpts(appOpts servertypes.AppOptions) []wasm.Option
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) sdk.AnteHandler
func NewAppConstructor ¶
func NewAppConstructor(encCfg EncodingConfig) network.AppConstructor
func NewWasmGasRegister ¶
func NewWasmGasRegister() wasmkeeper.WasmGasRegister
func ObservabilityViews ¶
func SetupTestingApp ¶
func SetupTestingApp() (testApp ibctesting.TestingApp, genesisState map[string]json.RawMessage)
SetupTestingApp initializes the IBC-go testing application.
Types ¶
type EmptyAppOptions ¶
type EmptyAppOptions struct{}
EmptyAppOptions is a stub implementing AppOptions.
func (EmptyAppOptions) Get ¶
func (ao EmptyAppOptions) Get(_ string) interface{}
Get implements AppOptions.
type EncodingConfig ¶
type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry Marshaler codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino }
func MakeEncodingConfig ¶
func MakeEncodingConfig() EncodingConfig
MakeEncodingConfig creates an EncodingConfig for an amino based test configuration.
type GenesisState ¶
type GenesisState map[string]json.RawMessage
The GenesisState of the blockchain is represented here as a map of raw json messages key'd by a identifier string. The identifier is used to determine which module genesis information belongs to so it may be appropriately routed during init chain. Within this application default genesis information is retrieved from the ModuleBasicManager which populates json from each BasicModule object provided to it during init.
func GenesisStateWithValSet ¶
func GenesisStateWithValSet(t *testing.T, app *Quicksilver, genesisState GenesisState, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance, ) GenesisState
GenesisStateWithValSet creates a quicksilver genesis state with the given validator set.
func NewDefaultGenesisState ¶
func NewDefaultGenesisState() GenesisState
NewDefaultGenesisState generates the default state for the application.
type HandlerOptions ¶
type HandlerOptions struct { ante.HandlerOptions TxCounterStoreKey storetypes.StoreKey WasmConfig wasmTypes.WasmConfig IBCKeeper *ibckeeper.Keeper }
HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.
type Quicksilver ¶
type Quicksilver struct { *baseapp.BaseApp keepers.AppKeepers // contains filtered or unexported fields }
Quicksilver implements an extended ABCI application.
func GetAppWithContext ¶
func NewQuicksilver ¶
func NewQuicksilver( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, homePath string, invCheckPeriod uint, encodingConfig EncodingConfig, enabledProposals []wasm.ProposalType, appOpts servertypes.AppOptions, wasmOpts []wasm.Option, mock bool, baseAppOptions ...func(*baseapp.BaseApp), ) *Quicksilver
NewQuicksilver returns a reference to a new initialized Quicksilver application.
func Setup ¶
func Setup(t *testing.T, isCheckTx bool) *Quicksilver
Setup initializes a new Quicksilver. A Nop logger is set in Quicksilver.
func (*Quicksilver) AppCodec ¶
func (app *Quicksilver) AppCodec() codec.Codec
AppCodec returns Quicksilver'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 (*Quicksilver) BeginBlocker ¶
func (app *Quicksilver) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock
BeginBlocker updates every begin block.
func (*Quicksilver) BlockedAddrs ¶
func (app *Quicksilver) BlockedAddrs() map[string]bool
BlockedAddrs returns all the app's module account addresses that are not allowed to receive external tokens.
func (*Quicksilver) DeliverTx ¶
func (app *Quicksilver) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliverTx)
DeliverTx calls BaseApp.DeliverTx and calculates transactions per second.
func (*Quicksilver) EndBlocker ¶
func (app *Quicksilver) EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock
EndBlocker updates every end block.
func (*Quicksilver) ExportAppStateAndValidators ¶
func (app *Quicksilver) ExportAppStateAndValidators( forZeroHeight bool, jailAllowedAddrs []string, ) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*Quicksilver) GetBaseApp ¶
func (app *Quicksilver) GetBaseApp() *baseapp.BaseApp
GetBaseApp implements the TestingApp interface.
func (*Quicksilver) GetIBCKeeper ¶
func (app *Quicksilver) GetIBCKeeper() *ibckeeper.Keeper
GetIBCKeeper implements the TestingApp interface.
func (*Quicksilver) GetScopedIBCKeeper ¶
func (app *Quicksilver) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
GetScopedIBCKeeper implements the TestingApp interface.
func (*Quicksilver) GetStakingKeeper ¶
func (app *Quicksilver) GetStakingKeeper() ibctestingtypes.StakingKeeper
GetStakingKeeper implements the TestingApp interface.
func (*Quicksilver) GetSubspace ¶
func (app *Quicksilver) 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 (*Quicksilver) GetTxConfig ¶
func (app *Quicksilver) GetTxConfig() client.TxConfig
GetTxConfig implements the TestingApp interface.
func (*Quicksilver) InitChainer ¶
func (app *Quicksilver) InitChainer(ctx sdk.Context, req abci.RequestInitChain) abci.ResponseInitChain
InitChainer updates at chain initialization.
func (*Quicksilver) InterfaceRegistry ¶
func (app *Quicksilver) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns Quicksilver's InterfaceRegistry.
func (*Quicksilver) LegacyAmino ¶
func (app *Quicksilver) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns Quicksilver'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 (*Quicksilver) LoadHeight ¶
func (app *Quicksilver) LoadHeight(height int64) error
LoadHeight loads state at a particular height.
func (*Quicksilver) ModuleAccountAddrs ¶
func (app *Quicksilver) ModuleAccountAddrs() map[string]bool
ModuleAccountAddrs returns all the app's module account addresses.
func (*Quicksilver) RegisterAPIRoutes ¶
func (app *Quicksilver) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*Quicksilver) RegisterTendermintService ¶
func (app *Quicksilver) RegisterTendermintService(clientCtx client.Context)
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*Quicksilver) RegisterTxService ¶
func (app *Quicksilver) RegisterTxService(clientCtx client.Context)
func (*Quicksilver) SimulationManager ¶
func (app *Quicksilver) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface.