keepers

package
v23.0.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 142 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountAddressPrefix = "osmo"
)

Variables

View Source
var AppModuleBasics = []module.AppModuleBasic{
	auth.AppModuleBasic{},
	genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator),
	bank.AppModuleBasic{},
	capability.AppModuleBasic{},
	staking.AppModuleBasic{},
	mint.AppModuleBasic{},
	downtimemodule.AppModuleBasic{},
	distr.AppModuleBasic{},
	gov.NewAppModuleBasic(
		[]govclient.ProposalHandler{
			paramsclient.ProposalHandler,
			upgradeclient.LegacyProposalHandler,
			upgradeclient.LegacyCancelProposalHandler,
			poolincentivesclient.UpdatePoolIncentivesHandler,
			poolincentivesclient.ReplacePoolIncentivesHandler,
			ibcclientclient.UpdateClientProposalHandler,
			ibcclientclient.UpgradeProposalHandler,
			superfluidclient.SetSuperfluidAssetsProposalHandler,
			superfluidclient.RemoveSuperfluidAssetsProposalHandler,
			superfluidclient.UpdateUnpoolWhitelistProposalHandler,
			gammclient.ReplaceMigrationRecordsProposalHandler,
			gammclient.UpdateMigrationRecordsProposalHandler,
			gammclient.CreateCLPoolAndLinkToCFMMProposalHandler,
			gammclient.SetScalingFactorControllerProposalHandler,
			clclient.CreateConcentratedLiquidityPoolProposalHandler,
			clclient.TickSpacingDecreaseProposalHandler,
			cwpoolclient.UploadCodeIdAndWhitelistProposalHandler,
			cwpoolclient.MigratePoolContractsProposalHandler,
			txfeesclient.SubmitUpdateFeeTokenProposalHandler,
			poolmanagerclient.DenomPairTakerFeeProposalHandler,
			incentivesclient.HandleCreateGroupsProposal,
		},
	),
	params.AppModuleBasic{},
	crisis.AppModuleBasic{},
	slashing.AppModuleBasic{},
	authzmodule.AppModuleBasic{},
	consensus.AppModuleBasic{},
	ibc.AppModuleBasic{},
	upgrade.AppModuleBasic{},
	evidence.AppModuleBasic{},
	transfer.AppModuleBasic{},
	vesting.AppModuleBasic{},
	gamm.AppModuleBasic{},
	poolmanager.AppModuleBasic{},
	twapmodule.AppModuleBasic{},
	concentratedliquidity.AppModuleBasic{},
	protorev.AppModuleBasic{},
	txfees.AppModuleBasic{},
	incentives.AppModuleBasic{},
	lockup.AppModuleBasic{},
	poolincentives.AppModuleBasic{},
	epochs.AppModuleBasic{},
	superfluid.AppModuleBasic{},
	tokenfactory.AppModuleBasic{},
	valsetprefmodule.AppModuleBasic{},
	wasm.AppModuleBasic{},
	icq.AppModuleBasic{},
	ica.AppModuleBasic{},
	ibc_hooks.AppModuleBasic{},
	ibcratelimitmodule.AppModuleBasic{},
	packetforward.AppModuleBasic{},
	cosmwasmpoolmodule.AppModuleBasic{},
	tendermint.AppModuleBasic{},
}

AppModuleBasics returns ModuleBasics for the module BasicManager.

Functions

func KVStoreKeys

func KVStoreKeys() []string

TODO: We need to automate this, by bundling with a module struct...

Types

type AppKeepers

type AppKeepers struct {
	// keepers, by order of initialization
	// "Special" keepers
	ParamsKeeper          *paramskeeper.Keeper
	CapabilityKeeper      *capabilitykeeper.Keeper
	CrisisKeeper          *crisiskeeper.Keeper
	UpgradeKeeper         *upgradekeeper.Keeper
	ConsensusParamsKeeper *consensusparamkeeper.Keeper

	// make scoped keepers public for test purposes
	ScopedIBCKeeper      capabilitykeeper.ScopedKeeper
	ScopedICAHostKeeper  capabilitykeeper.ScopedKeeper
	ScopedTransferKeeper capabilitykeeper.ScopedKeeper
	ScopedWasmKeeper     capabilitykeeper.ScopedKeeper
	ScopedICQKeeper      capabilitykeeper.ScopedKeeper

	// "Normal" keepers
	AccountKeeper                *authkeeper.AccountKeeper
	BankKeeper                   *bankkeeper.BaseKeeper
	AuthzKeeper                  *authzkeeper.Keeper
	StakingKeeper                *stakingkeeper.Keeper
	DistrKeeper                  *distrkeeper.Keeper
	DowntimeKeeper               *downtimedetector.Keeper
	SlashingKeeper               *slashingkeeper.Keeper
	IBCKeeper                    *ibckeeper.Keeper
	IBCHooksKeeper               *ibchookskeeper.Keeper
	ICAHostKeeper                *icahostkeeper.Keeper
	ICQKeeper                    *icqkeeper.Keeper
	TransferKeeper               *ibctransferkeeper.Keeper
	EvidenceKeeper               *evidencekeeper.Keeper
	GAMMKeeper                   *gammkeeper.Keeper
	TwapKeeper                   *twap.Keeper
	LockupKeeper                 *lockupkeeper.Keeper
	EpochsKeeper                 *epochskeeper.Keeper
	IncentivesKeeper             *incentiveskeeper.Keeper
	ProtoRevKeeper               *protorevkeeper.Keeper
	MintKeeper                   *mintkeeper.Keeper
	PoolIncentivesKeeper         *poolincentiveskeeper.Keeper
	TxFeesKeeper                 *txfeeskeeper.Keeper
	SuperfluidKeeper             *superfluidkeeper.Keeper
	GovKeeper                    *govkeeper.Keeper
	WasmKeeper                   *wasmkeeper.Keeper
	ContractKeeper               *wasmkeeper.PermissionedKeeper
	TokenFactoryKeeper           *tokenfactorykeeper.Keeper
	PoolManagerKeeper            *poolmanager.Keeper
	ValidatorSetPreferenceKeeper *valsetpref.Keeper
	ConcentratedLiquidityKeeper  *concentratedliquidity.Keeper
	CosmwasmPoolKeeper           *cosmwasmpool.Keeper

	IngestManager ingest.IngestManager

	// IBC modules
	// transfer module
	RawIcs20TransferAppModule transfer.AppModule
	RateLimitingICS4Wrapper   *ibcratelimit.ICS4Wrapper
	TransferStack             *ibchooks.IBCMiddleware
	Ics20WasmHooks            *ibchooks.WasmHooks
	HooksICS4Wrapper          ibchooks.ICS4Middleware
	PacketForwardKeeper       *packetforwardkeeper.Keeper
	// contains filtered or unexported fields
}

func (*AppKeepers) GenerateKeys

func (appKeepers *AppKeepers) GenerateKeys()

GenerateKeys generates new keys (KV Store, Transient store, and memory store).

func (*AppKeepers) GetKVStoreKey

func (appKeepers *AppKeepers) GetKVStoreKey() map[string]*storetypes.KVStoreKey

GetKVStoreKey gets KV Store keys.

func (*AppKeepers) GetKey

func (appKeepers *AppKeepers) 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 (*AppKeepers) GetMemKey

func (appKeepers *AppKeepers) GetMemKey(storeKey string) *storetypes.MemoryStoreKey

GetMemKey returns the MemStoreKey for the provided mem key.

NOTE: This is solely used for testing purposes.

func (*AppKeepers) GetMemoryStoreKey

func (appKeepers *AppKeepers) GetMemoryStoreKey() map[string]*storetypes.MemoryStoreKey

GetMemoryStoreKey get memory Store keys.

func (*AppKeepers) GetSubspace

func (appKeepers *AppKeepers) GetSubspace(moduleName string) paramstypes.Subspace

GetSubspace gets existing substore from keeper.

func (*AppKeepers) GetTKey

func (appKeepers *AppKeepers) 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 (*AppKeepers) GetTransientStoreKey

func (appKeepers *AppKeepers) GetTransientStoreKey() map[string]*storetypes.TransientStoreKey

GetTransientStoreKey gets Transient Store keys.

func (*AppKeepers) InitNormalKeepers

func (appKeepers *AppKeepers) InitNormalKeepers(
	appCodec codec.Codec,
	encodingConfig appparams.EncodingConfig,
	bApp *baseapp.BaseApp,
	maccPerms map[string][]string,
	dataDir string,
	wasmDir string,
	wasmConfig wasmtypes.WasmConfig,
	wasmOpts []wasmkeeper.Option,
	blockedAddress map[string]bool,
)

InitNormalKeepers initializes all 'normal' keepers (account, app, bank, auth, staking, distribution, slashing, transfer, gamm, IBC router, pool incentives, governance, mint, txfees keepers).

func (*AppKeepers) InitSpecialKeepers

func (appKeepers *AppKeepers) InitSpecialKeepers(
	appCodec codec.Codec,
	bApp *baseapp.BaseApp,
	wasmDir string,
	cdc *codec.LegacyAmino,
	invCheckPeriod uint,
	skipUpgradeHeights map[int64]bool,
	homePath string,
)

InitSpecialKeepers initiates special keepers (crisis appkeeper, upgradekeeper, params keeper)

func (*AppKeepers) SetupHooks

func (appKeepers *AppKeepers) SetupHooks()

SetupHooks sets up hooks for modules.

func (*AppKeepers) WireICS20PreWasmKeeper

func (appKeepers *AppKeepers) WireICS20PreWasmKeeper(
	appCodec codec.Codec,
	bApp *baseapp.BaseApp,
	hooksKeeper *ibchookskeeper.Keeper,
)

WireICS20PreWasmKeeper Create the IBC Transfer Stack from bottom to top:

* SendPacket. Originates from the transferKeeper and goes up the stack: transferKeeper.SendPacket -> ibc_rate_limit.SendPacket -> ibc_hooks.SendPacket -> channel.SendPacket * RecvPacket, message that originates from core IBC and goes down to app, the flow is the other way channel.RecvPacket -> ibc_hooks.OnRecvPacket -> ibc_rate_limit.OnRecvPacket -> forward.OnRecvPacket -> transfer.OnRecvPacket

Note that the forward middleware is only integrated on the "receive" direction. It can be safely skipped when sending. Note also that the forward middleware is called "router", but we are using the name "forward" for clarity This may later be renamed upstream: https://github.com/ibc-apps/middleware/packet-forward-middleware/issues/10

After this, the wasm keeper is required to be set on both appkeepers.WasmHooks AND appKeepers.RateLimitingICS4Wrapper

type QuerierWrapper

type QuerierWrapper struct {
	// contains filtered or unexported fields
}

QuerierWrapper is a local wrapper around BaseApp that exports only the Queryable interface. This is used to pass the baseApp to Async ICQ without exposing all methods

func NewQuerierWrapper

func NewQuerierWrapper(querier sdk.Queryable) QuerierWrapper

func (QuerierWrapper) Query

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL