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 RegisterSwaggerAPI(_ client.Context, rtr *mux.Router)
- func SetupTestingApp() (ibctesting.TestingApp, 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) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *Quicksilver) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *Quicksilver) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper
- func (app *Quicksilver) GetStakingKeeper() ibctestingtypes.StakingKeeper
- func (app *Quicksilver) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *Quicksilver) GetTKey(storeKey string) *storetypes.TransientStoreKey
- 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 ( // PROPOSALS 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 ( ProductionChainID = "quicksilver-2" InnuendoChainID = "innuendo-4" DevnetChainID = "quicktest-1" )
upgrade name consts: vMMmmppUpgradeName (M=Major, m=minor, p=patch)
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 = "quicksilverd"
)
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{}, 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{}, ica.AppModuleBasic{}, vesting.AppModuleBasic{}, claimsmanager.AppModuleBasic{}, epochs.AppModuleBasic{}, interchainstaking.AppModuleBasic{}, interchainquery.AppModuleBasic{}, participationrewards.AppModuleBasic{}, airdrop.AppModuleBasic{}, tokenfactory.AppModuleBasic{}, wasm.AppModuleBasic{}, ) )
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.
Functions ¶
func DefaultConfig ¶ added in v0.4.1
func GasRegisterConfig ¶ added in v0.9.0
func GasRegisterConfig() wasmkeeper.WasmGasRegisterConfig
GasRegisterConfig is defaults plus a custom compile amount
func GetEnabledProposals ¶ added in v0.9.0
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 ¶ added in v0.9.0
func GetWasmOpts(appOpts servertypes.AppOptions) []wasm.Option
func NewAnteHandler ¶
func NewAnteHandler(options HandlerOptions) sdk.AnteHandler
func NewAppConstructor ¶ added in v0.4.1
func NewAppConstructor(encCfg EncodingConfig) network.AppConstructor
func NewWasmGasRegister ¶ added in v0.9.0
func NewWasmGasRegister() wasmkeeper.WasmGasRegister
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 EmptyAppOptions ¶ added in v0.9.0
type EmptyAppOptions struct{}
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 ¶ added in v0.9.0
type GenesisState map[string]json.RawMessage
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 AccountKeeper authkeeper.AccountKeeper BankKeeper bankkeeper.BaseKeeper CapabilityKeeper *capabilitykeeper.Keeper StakingKeeper stakingkeeper.Keeper SlashingKeeper slashingkeeper.Keeper DistrKeeper distrkeeper.Keeper MintKeeper mintkeeper.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 ICAControllerKeeper icacontrollerkeeper.Keeper ICAHostKeeper icahostkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper // Quicksilver keepers EpochsKeeper epochskeeper.Keeper ClaimsManagerKeeper claimsmanagerkeeper.Keeper InterchainstakingKeeper interchainstakingkeeper.Keeper InterchainQueryKeeper interchainquerykeeper.Keeper ParticipationRewardsKeeper participationrewardskeeper.Keeper AirdropKeeper airdropkeeper.Keeper TokenFactoryKeeper *tokenfactorykeeper.Keeper // make scoped keepers public for test purposes ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper ScopedICAControllerKeeper capabilitykeeper.ScopedKeeper ScopedICAHostKeeper capabilitykeeper.ScopedKeeper ScopedInterchainStakingAccountKeeper capabilitykeeper.ScopedKeeper WasmKeeper wasm.Keeper // contains filtered or unexported fields }
Quicksilver implements an extended ABCI application.
func GetAppWithContext ¶ added in v0.9.0
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)
We are intentionally decomposing the DeliverTx method so as to calculate the 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) GetKey ¶
func (app *Quicksilver) 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 (*Quicksilver) GetMemKey ¶
func (app *Quicksilver) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
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) GetTKey ¶
func (app *Quicksilver) 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 (*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