Documentation
¶
Index ¶
- Constants
- Variables
- func BlockedAddresses() map[string]bool
- func ConvertToProposals(keys []string) ([]wasmtypes.ProposalType, error)
- func GenerateSHA256FromFile(filePath string) (string, error)
- func GenerateSha256Hex(dataToVerify []byte) (actualHashHex string)
- func GetEnabledProposals() []wasmtypes.ProposalType
- func GetMaccPerms() map[string][]string
- func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
- func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router)
- func SetConfig()
- func VerifyAddressPrefix(addr string, expectedPrefix string) error
- func VerifySha256(dataToVerify []byte, expectedSha256Hex *string) (isVerified bool, actualHashHex string, err error)
- type App
- func (app *App) AppCodec() codec.Codec
- func (app *App) AutoCliOpts() autocli.AppOptions
- func (app *App) BeginBlocker(ctx sdk.Context) (sdk.BeginBlock, error)
- func (a *App) DefaultGenesis() map[string]json.RawMessage
- func (app *App) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error)
- func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
- func (app *App) GetKey(storeKey string) *storetypes.KVStoreKey
- func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
- func (app *App) GetStoreKeys() []storetypes.StoreKey
- func (app *App) GetSubspace(moduleName string) paramstypes.Subspace
- func (app *App) GetTKey(storeKey string) *storetypes.TransientStoreKey
- func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
- func (app *App) InterfaceRegistry() types.InterfaceRegistry
- func (app *App) LegacyAmino() *codec.LegacyAmino
- func (app *App) LoadHeight(height int64) error
- func (app *App) ModuleAccountAddrs() map[string]bool
- func (app *App) Name() string
- func (app *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
- func (app *App) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APIConfig)
- func (app *App) RegisterNodeService(clientCtx client.Context, cfg config.Config)
- func (app *App) RegisterTendermintService(clientCtx client.Context)
- func (app *App) RegisterTxService(clientCtx client.Context)
- func (app *App) RegisterUpgradeHandlers(cfg module.Configurator)
- func (app *App) SimulationManager() *module.SimulationManager
- func (app *App) TxConfig() client.TxConfig
- type GenesisState
- type HandlerOptions
- type OrderedMap
- func (om *OrderedMap[K, V]) Delete(key K)
- func (om *OrderedMap[K, V]) Get(key K) (V, bool)
- func (om *OrderedMap[K, V]) GetOrSetDefault(key K, defaultValue V) (V, bool)
- func (om *OrderedMap[K, V]) Has(key K) bool
- func (om *OrderedMap[K, V]) IsSorted() bool
- func (om *OrderedMap[K, V]) Iterate() <-chan Pair[K, V]
- func (om *OrderedMap[K, V]) Keys() []K
- func (om *OrderedMap[K, V]) MustGet(key K) V
- func (om *OrderedMap[K, V]) PrintOrdered()
- func (om *OrderedMap[K, V]) Set(key K, value V)
- func (om *OrderedMap[K, V]) SetNew(key K, value V)
- func (om *OrderedMap[K, V]) SortKeys(lessFunc func(i, j K) bool)
- type Pair
Constants ¶
const (
AccountAddressPrefix = "fetch"
)
const CapabilityMemStoreKey = "mem_capability"
MemStoreKey defines the in-memory store key
const CapabilityStoreKey = "capability"
const IBCHostStoreKey = "ibc_host"
const Name = "fetchd"
const UpgradeNameV053 = "v0.15.0-rc1-gemini"
---- Match this to the plan name that is already stored on disk and halted the chain.
Variables ¶
var ( // ProposalsEnabled controls x/wasm Proposals // 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. ProposalsEnabled = "false" // EnableSpecificProposals allows to enable only specific x/wasm proposals // 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 = "" )
var ( AccountPubKeyPrefix = AccountAddressPrefix + "pub" ValidatorAddressPrefix = AccountAddressPrefix + "valoper" ValidatorPubKeyPrefix = AccountAddressPrefix + "valoperpub" ConsNodeAddressPrefix = AccountAddressPrefix + "valcons" ConsNodePubKeyPrefix = AccountAddressPrefix + "valconspub" )
var ( // DefaultNodeHome default home directories for the application daemon DefaultNodeHome string )
var Upgrades = []upgrades.Upgrade{v060.Upgrade}
Keep your existing wasmd upgrades
Functions ¶
func BlockedAddresses ¶
BlockedAddresses returns all the app's blocked account addresses.
func ConvertToProposals ¶
func ConvertToProposals(keys []string) ([]wasmtypes.ProposalType, error)
func GenerateSHA256FromFile ¶ added in v0.14.0
func GenerateSha256Hex ¶ added in v0.14.0
func GetEnabledProposals ¶
func GetEnabledProposals() []wasmtypes.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 NewAnteHandler ¶ added in v0.10.0
func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error)
NewAnteHandler constructor
func RegisterSwaggerAPI ¶ added in v0.8.4
RegisterSwaggerAPI registers swagger route with API Server
func VerifyAddressPrefix ¶ added in v0.14.0
Types ¶
type App ¶ added in v0.8.0
type App struct {
*baseapp.BaseApp
// keepers
AccountKeeper authkeeper.AccountKeeper
BankKeeper bankkeeper.BaseKeeper
StakingKeeper *stakingkeeper.Keeper
SlashingKeeper slashingkeeper.Keeper
MintKeeper mintkeeper.Keeper
DistrKeeper distrkeeper.Keeper
GovKeeper govkeeper.Keeper
UpgradeKeeper *upgradekeeper.Keeper
EvidenceKeeper evidencekeeper.Keeper
ConsensusParamsKeeper consensusparamkeeper.Keeper
ParamsKeeper paramskeeper.Keeper
CircuitKeeper circuitkeeper.Keeper
// supplementary keepers
FeeGrantKeeper feegrantkeeper.Keeper
GroupKeeper groupkeeper.Keeper
AuthzKeeper authzkeeper.Keeper
NFTKeeper nftkeeper.Keeper
EpochsKeeper epochskeeper.Keeper
ProtocolPoolKeeper protocolpoolkeeper.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
TransferKeeper ibctransferkeeper.Keeper
WasmKeeper wasmkeeper.Keeper
BasicModuleManager module.BasicManager
// contains filtered or unexported fields
}
App extends an ABCI application, but with most of its parameters exported. They are exported for convenience in creating helper functions, as object capabilities aren't needed for testing.
func New ¶ added in v0.8.0
func New( logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, invCheckPeriod uint, appOpts servertypes.AppOptions, wasmOpts []wasmkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *App
New returns a reference to an initialized App. NewSimApp returns a reference to an initialized SimApp.
func (*App) AppCodec ¶ added in v0.8.0
AppCodec returns 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 (*App) AutoCliOpts ¶
func (app *App) AutoCliOpts() autocli.AppOptions
AutoCliOpts returns the autocli options for the app.
func (*App) BeginBlocker ¶ added in v0.8.0
BeginBlocker application updates every begin block
func (*App) DefaultGenesis ¶
func (a *App) DefaultGenesis() map[string]json.RawMessage
DefaultGenesis returns a default genesis from the registered AppModuleBasic's.
func (*App) EndBlocker ¶ added in v0.8.0
EndBlocker application updates every end block
func (*App) ExportAppStateAndValidators ¶ added in v0.8.0
func (app *App) ExportAppStateAndValidators(forZeroHeight bool, jailAllowedAddrs, modulesToExport []string) (servertypes.ExportedApp, error)
ExportAppStateAndValidators exports the state of the application for a genesis file.
func (*App) GetKey ¶ added in v0.8.0
func (app *App) 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 (*App) GetMemKey ¶ added in v0.8.0
func (app *App) GetMemKey(storeKey string) *storetypes.MemoryStoreKey
GetMemKey returns the MemStoreKey for the provided mem key.
NOTE: This is solely used for testing purposes.
func (*App) GetStoreKeys ¶
func (app *App) GetStoreKeys() []storetypes.StoreKey
GetStoreKeys returns all the stored store keys.
func (*App) GetSubspace ¶ added in v0.8.0
func (app *App) 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 (*App) GetTKey ¶ added in v0.8.0
func (app *App) 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 (*App) InitChainer ¶ added in v0.8.0
func (app *App) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error)
InitChainer application update at chain initialization
func (*App) InterfaceRegistry ¶ added in v0.8.0
func (app *App) InterfaceRegistry() types.InterfaceRegistry
InterfaceRegistry returns InterfaceRegistry
func (*App) LegacyAmino ¶ added in v0.8.0
func (app *App) LegacyAmino() *codec.LegacyAmino
LegacyAmino returns SimApp'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 (*App) LoadHeight ¶ added in v0.8.0
LoadHeight loads a particular height
func (*App) ModuleAccountAddrs ¶ added in v0.8.0
ModuleAccountAddrs returns all the app's module account addresses.
func (*App) PreBlocker ¶
func (app *App) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error)
PreBlocker application updates every pre block
func (*App) RegisterAPIRoutes ¶ added in v0.8.0
RegisterAPIRoutes registers all application module routes with the provided API server.
func (*App) RegisterNodeService ¶
func (*App) RegisterTendermintService ¶ added in v0.8.0
RegisterTendermintService implements the Application.RegisterTendermintService method.
func (*App) RegisterTxService ¶ added in v0.8.0
RegisterTxService implements the Application.RegisterTxService method.
func (*App) RegisterUpgradeHandlers ¶ added in v0.10.4
func (app *App) RegisterUpgradeHandlers(cfg module.Configurator)
func (*App) SimulationManager ¶
func (app *App) SimulationManager() *module.SimulationManager
SimulationManager implements the SimulationApp interface
type GenesisState ¶
type GenesisState map[string]json.RawMessage
The genesis state 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.
type HandlerOptions ¶ added in v0.10.0
type HandlerOptions struct {
ante.HandlerOptions
IBCKeeper *keeper.Keeper
NodeConfig *wasmTypes.NodeConfig
WasmKeeper *wasmkeeper.Keeper
TXCounterStoreService corestoretypes.KVStoreService
CircuitKeeper *circuitkeeper.Keeper
}
HandlerOptions extend the SDK's AnteHandler options by requiring the IBC channel keeper.
type OrderedMap ¶ added in v0.14.0
type OrderedMap[K comparable, V any] struct { // contains filtered or unexported fields }
func NewOrderedMap ¶ added in v0.14.0
func NewOrderedMap[K comparable, V any]() *OrderedMap[K, V]
NewOrderedMap creates a new OrderedMap empty instance
func NewOrderedMapFromPairs ¶ added in v0.14.0
func NewOrderedMapFromPairs[K comparable, V any](pairs []Pair[K, V]) *OrderedMap[K, V]
NewOrderedMapFromPairs creates an OrderedMap from the keys-value pairs
func NewOrderedSet ¶ added in v0.14.0
func NewOrderedSet[K comparable](keys []K) *OrderedMap[K, bool]
NewOrderedSet creates an OrderedMap with the keys set to true
func (*OrderedMap[K, V]) Delete ¶ added in v0.14.0
func (om *OrderedMap[K, V]) Delete(key K)
Delete removes a key-value pair from the map
func (*OrderedMap[K, V]) Get ¶ added in v0.14.0
func (om *OrderedMap[K, V]) Get(key K) (V, bool)
Get retrieves the value associated with the key
func (*OrderedMap[K, V]) GetOrSetDefault ¶ added in v0.14.0
func (om *OrderedMap[K, V]) GetOrSetDefault(key K, defaultValue V) (V, bool)
func (*OrderedMap[K, V]) Has ¶ added in v0.14.0
func (om *OrderedMap[K, V]) Has(key K) bool
func (*OrderedMap[K, V]) IsSorted ¶ added in v0.14.0
func (om *OrderedMap[K, V]) IsSorted() bool
IsSorted returns true *IF* order in the map is *still* sorted after calling `SortKeys(...)` method.
func (*OrderedMap[K, V]) Iterate ¶ added in v0.14.0
func (om *OrderedMap[K, V]) Iterate() <-chan Pair[K, V]
Iterate returns a channel that yields key-value pairs in insertion order
func (*OrderedMap[K, V]) Keys ¶ added in v0.14.0
func (om *OrderedMap[K, V]) Keys() []K
Keys returns the keys in insertion order
func (*OrderedMap[K, V]) MustGet ¶ added in v0.14.0
func (om *OrderedMap[K, V]) MustGet(key K) V
MustGet retrieves the value associated with the key, panics otherwise
func (*OrderedMap[K, V]) PrintOrdered ¶ added in v0.14.0
func (om *OrderedMap[K, V]) PrintOrdered()
PrintOrdered prints the map in current order
func (*OrderedMap[K, V]) Set ¶ added in v0.14.0
func (om *OrderedMap[K, V]) Set(key K, value V)
Set adds a key-value pair to the map
func (*OrderedMap[K, V]) SetNew ¶ added in v0.14.0
func (om *OrderedMap[K, V]) SetNew(key K, value V)
SetNew adds a key-value pair to the map - it must not exist before
func (*OrderedMap[K, V]) SortKeys ¶ added in v0.14.0
func (om *OrderedMap[K, V]) SortKeys(lessFunc func(i, j K) bool)
SortKeys sorts the keys in ascending order
type Pair ¶ added in v0.14.0
type Pair[K comparable, V any] struct { Key K `json:"key"` Value V `json:"value"` }