Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper *Keeper) types.MsgServer
- type CustomMessenger
- type Keeper
- func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetParams(ctx sdk.Context) (params types.Params)
- func (k Keeper) HandleBondMsg(ctx sdk.Context, actor sdk.AccAddress, bondMsg *contract.BondMsg) ([]sdk.Event, [][]byte, error)
- func (k Keeper) HandleRestakeMsg(ctx sdk.Context, actor sdk.AccAddress, restakeMsg *contract.RestakeMsg) ([]sdk.Event, [][]byte, error)
- func (k Keeper) HandleUnbondMsg(ctx sdk.Context, actor sdk.AccAddress, unbondMsg *contract.UnbondMsg) ([]sdk.Event, [][]byte, error)
- func (k Keeper) HandleUnstakeMsg(ctx sdk.Context, actor sdk.AccAddress, unstakeMsg *contract.UnstakeMsg) ([]sdk.Event, [][]byte, error)
- func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
- func (k Keeper) InstantUndelegate(ctx sdk.Context, delAddr sdk.AccAddress, validator stakingtypes.Validator, ...) (sdk.Coin, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) NativeStakingAddress(ctx sdk.Context) string
- func (k Keeper) SendJailHandlingMsg(ctx sdk.Context, contractAddr sdk.AccAddress, jailed []contract.ValidatorAddr, ...) error
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params) error
- func (k Keeper) VaultAddress(ctx sdk.Context) string
- type StakingDecorator
- func (s StakingDecorator) Jail(ctx sdk.Context, consAddr sdk.ConsAddress)
- func (s StakingDecorator) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, power int64, height int64, ...) math.Int
- func (s StakingDecorator) SlashWithInfractionReason(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeight int64, power int64, ...) math.Int
- func (s StakingDecorator) Unjail(ctx sdk.Context, consAddr sdk.ConsAddress)
- type StakingKeeperAdapter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the bank MsgServer interface for the provided Keeper.
Types ¶
type CustomMessenger ¶
type CustomMessenger struct {
// contains filtered or unexported fields
}
func CustomMessageDecorator ¶
func CustomMessageDecorator(provKeeper *Keeper) *CustomMessenger
CustomMessageDecorator returns decorator for custom CosmWasm bindings messages
func (CustomMessenger) DispatchMsg ¶
func (h CustomMessenger) DispatchMsg(ctx sdk.Context, contractAddr sdk.AccAddress, _ string, msg wasmvmtypes.CosmosMsg) ([]sdk.Event, [][]byte, error)
DispatchMsg executes on the contractMsg.
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey, authority string, bankKeeper types.BankKeeper, wasmKeeper types.WasmKeeper, stakingKeeper types.StakingKeeper, meshConsumer types.MeshSecurityConsumer, ) *Keeper
func (Keeper) ExportGenesis ¶
func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState
ExportGenesis returns the meshsecurity provider module's exported genesis.
func (Keeper) GetAuthority ¶
GetAuthority returns the x/staking module's authority.
func (Keeper) HandleBondMsg ¶
func (Keeper) HandleRestakeMsg ¶
func (Keeper) HandleUnbondMsg ¶
func (Keeper) HandleUnstakeMsg ¶
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis(ctx sdk.Context, genState *types.GenesisState)
InitGenesis initializes the meshsecurity provider module's state from a provided genesis state.
func (Keeper) InstantUndelegate ¶
func (Keeper) NativeStakingAddress ¶
NativeStakingAddress - Address of native staking contract
func (Keeper) SendJailHandlingMsg ¶
func (k Keeper) SendJailHandlingMsg(ctx sdk.Context, contractAddr sdk.AccAddress, jailed []contract.ValidatorAddr, tombstoned []contract.ValidatorAddr) error
SendJailHandlingMsg send jail handling message to contract via sudo
type StakingDecorator ¶
type StakingDecorator struct { slashingtypes.StakingKeeper // contains filtered or unexported fields }
StakingDecorator decorate vanilla staking keeper to capture the jail and unjail events
func NewStakingDecorator ¶
func NewStakingDecorator(stakingKeeper slashingtypes.StakingKeeper, k *Keeper) *StakingDecorator
NewStakingDecorator constructor
func (StakingDecorator) Jail ¶
func (s StakingDecorator) Jail(ctx sdk.Context, consAddr sdk.ConsAddress)
Jail captures the jail event and calls the decorated staking keeper jail method
func (StakingDecorator) Slash ¶
func (s StakingDecorator) Slash(ctx sdk.Context, consAddr sdk.ConsAddress, power int64, height int64, slashRatio sdk.Dec) math.Int
Slash captures the slash event and calls the decorated staking keeper slash method
func (StakingDecorator) SlashWithInfractionReason ¶
func (s StakingDecorator) SlashWithInfractionReason(ctx sdk.Context, consAddr sdk.ConsAddress, infractionHeight int64, power int64, slashFactor sdk.Dec, infraction stakingtypes.Infraction) math.Int
SlashWithInfractionReason implementation doesn't require the infraction (types.Infraction) to work but is required by Interchain Security.
func (StakingDecorator) Unjail ¶
func (s StakingDecorator) Unjail(ctx sdk.Context, consAddr sdk.ConsAddress)
Unjail captures the unjail event and calls the decorated staking keeper unjail method
type StakingKeeperAdapter ¶
type StakingKeeperAdapter struct { types.SDKStakingKeeper // contains filtered or unexported fields }
StakingKeeperAdapter is an adapter to enhance the vanilla sdk staking keeper with additional functionality required for MS. The methods match Osmosis SDK fork.
func NewStakingKeeperAdapter ¶
func NewStakingKeeperAdapter(k types.SDKStakingKeeper, b types.SDKBankKeeper) *StakingKeeperAdapter
NewStakingKeeperAdapter constructor
func (StakingKeeperAdapter) InstantUndelegate ¶
func (s StakingKeeperAdapter) InstantUndelegate(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, sharesAmount sdk.Dec) (sdk.Coins, error)
InstantUndelegate allows another module account to undelegate while bypassing unbonding time. This function is a combination of Undelegate and CompleteUnbonding, but skips the creation and deletion of UnbondingDelegationEntry
The code is copied from the Osmosis SDK fork https://github.com/osmosis-labs/cosmos-sdk/blob/v0.45.0x-osmo-v9.3/x/staking/keeper/delegation.go#L757