keeper

package
v18.0.0-...-023d2bd Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMsgServerImpl

func NewMsgServerImpl(k Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the x/cw-hooks MsgServer interface.

Types

type Delegation

type Delegation struct {
	ValidatorAddress string `json:"validator_address"`
	DelegatorAddress string `json:"delegator_address"`
	Shares           string `json:"shares"`
}

func NewDelegation

func NewDelegation(del stakingtypes.DelegationI) *Delegation

type GovHooks

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

func (GovHooks) AfterProposalDeposit

func (h GovHooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, _ sdk.AccAddress)

func (GovHooks) AfterProposalFailedMinDeposit

func (h GovHooks) AfterProposalFailedMinDeposit(_ sdk.Context, _ uint64)

func (GovHooks) AfterProposalSubmission

func (h GovHooks) AfterProposalSubmission(ctx sdk.Context, proposalID uint64)

func (GovHooks) AfterProposalVote

func (h GovHooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress)

func (GovHooks) AfterProposalVotingPeriodEnded

func (h GovHooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64)

type Keeper

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

func NewKeeper

func NewKeeper(
	key storetypes.StoreKey,
	cdc codec.BinaryCodec,
	stakingKeeper slashingtypes.StakingKeeper,
	govKeeper govkeeper.Keeper,
	wasmkeeper wasmkeeper.Keeper,
	contractKeeper wasmtypes.ContractOpsKeeper,
	authority string,
) Keeper

func (Keeper) DeleteContract

func (k Keeper) DeleteContract(ctx sdk.Context, keyPrefix []byte, contractAddr sdk.AccAddress)

func (Keeper) ExecuteMessageOnContracts

func (k Keeper) ExecuteMessageOnContracts(ctx sdk.Context, keyPrefix []byte, msgBz []byte) error

func (Keeper) GetAllContracts

func (k Keeper) GetAllContracts(ctx sdk.Context, keyPrefix []byte) (list []sdk.Address)

func (Keeper) GetAllContractsBech32

func (k Keeper) GetAllContractsBech32(ctx sdk.Context, keyPrefix []byte) []string

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the x/cw-hooks module's authority.

func (Keeper) GetContractKeeper

func (k Keeper) GetContractKeeper() wasmtypes.ContractOpsKeeper

GetContractKeeper returns the x/wasm module's contract keeper.

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)

GetParams returns the current x/cw-hooks module parameters.

func (Keeper) GetStakingKeeper

func (k Keeper) GetStakingKeeper() slashingtypes.StakingKeeper

func (Keeper) GetWasmKeeper

func (k Keeper) GetWasmKeeper() wasmkeeper.Keeper

func (Keeper) GovHooks

func (k Keeper) GovHooks() GovHooks

func (Keeper) IsContractRegistered

func (k Keeper) IsContractRegistered(ctx sdk.Context, keyPrefix []byte, contractAddr sdk.AccAddress) bool

func (Keeper) IterateContracts

func (k Keeper) IterateContracts(
	ctx sdk.Context,
	keyPrefix []byte,
	handlerFn func(contractAddr []byte) (stop bool),
)

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) SetContract

func (k Keeper) SetContract(ctx sdk.Context, keyPrefix []byte, contractAddr sdk.AccAddress)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error

SetParams sets the x/cw-hooks module parameters.

func (Keeper) StakingHooks

func (k Keeper) StakingHooks() StakingHooks

Create new distribution hooks

type Proposal

type Proposal struct {
	ProposalID uint64 `json:"proposal_id"`
	Proposer   string `json:"proposer"`
	Status     uint   `json:"status"`
	SubmitTime string `json:"submit_time"`
	Metadata   string `json:"metadata"`
	Title      string `json:"title"`
	Summary    string `json:"summary"`
}

func NewProposal

func NewProposal(prop v1.Proposal) Proposal

type Querier

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

func NewQuerier

func NewQuerier(k Keeper) Querier

func (Querier) Params

Params returns the total set of clock parameters.

type StakingHooks

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

func (StakingHooks) AfterDelegationModified

func (h StakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

create new delegation period record

func (StakingHooks) AfterUnbondingInitiated

func (h StakingHooks) AfterUnbondingInitiated(_ sdk.Context, _ uint64) error

func (StakingHooks) AfterValidatorBeginUnbonding

func (h StakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error

func (StakingHooks) AfterValidatorBonded

func (h StakingHooks) AfterValidatorBonded(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error

func (StakingHooks) AfterValidatorCreated

func (h StakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error

initialize validator distribution record

func (StakingHooks) AfterValidatorRemoved

func (h StakingHooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error

AfterValidatorRemoved performs clean up after a validator is removed

func (StakingHooks) BeforeDelegationCreated

func (h StakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

increment period

func (StakingHooks) BeforeDelegationRemoved

func (h StakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

func (StakingHooks) BeforeDelegationSharesModified

func (h StakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error

withdraw delegation rewards (which also increments period)

func (StakingHooks) BeforeValidatorModified

func (h StakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error

func (StakingHooks) BeforeValidatorSlashed

func (h StakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error

record the slash event

type SudoAfterProposalVotingPeriodEnded

type SudoAfterProposalVotingPeriodEnded struct {
	AfterProposalVotingPeriodEnded string `json:"after_proposal_voting_period_ended"`
}

type SudoMsgAfterDelegationModified

type SudoMsgAfterDelegationModified struct {
	AfterDelegationModified *Delegation `json:"after_delegation_modified"`
}

type SudoMsgAfterProposalDeposit

type SudoMsgAfterProposalDeposit struct {
	AfterProposalDeposit Proposal `json:"after_proposal_deposit"`
}

type SudoMsgAfterProposalSubmission

type SudoMsgAfterProposalSubmission struct {
	AfterProposalSubmission Proposal `json:"after_proposal_submission"`
}

type SudoMsgAfterProposalVote

type SudoMsgAfterProposalVote struct {
	AfterProposalVote Vote `json:"after_proposal_vote"`
}

type SudoMsgAfterValidatorBeginUnbonding

type SudoMsgAfterValidatorBeginUnbonding struct {
	AfterValidatorBeginUnbonding *Validator `json:"after_validator_begin_unbonding"`
}

type SudoMsgAfterValidatorBonded

type SudoMsgAfterValidatorBonded struct {
	AfterValidatorBonded *Validator `json:"after_validator_bonded"`
}

type SudoMsgAfterValidatorCreated

type SudoMsgAfterValidatorCreated struct {
	AfterValidatorCreated *Validator `json:"after_validator_created"`
}

Validators

type SudoMsgAfterValidatorModified

type SudoMsgAfterValidatorModified struct {
	AfterValidatorModified *Validator `json:"after_validator_modified"`
}

type SudoMsgAfterValidatorRemoved

type SudoMsgAfterValidatorRemoved struct {
	AfterValidatorRemoved *Validator `json:"after_validator_removed"`
}

type SudoMsgBeforeDelegationCreated

type SudoMsgBeforeDelegationCreated struct {
	BeforeDelegationCreated *Delegation `json:"before_delegation_created"`
}

Delegations

type SudoMsgBeforeDelegationRemoved

type SudoMsgBeforeDelegationRemoved struct {
	BeforeDelegationRemoved *Delegation `json:"before_delegation_removed"`
}

type SudoMsgBeforeDelegationSharesModified

type SudoMsgBeforeDelegationSharesModified struct {
	BeforeDelegationSharesModified *Delegation `json:"before_delegation_shares_modified"`
}

type SudoMsgBeforeValidatorModified

type SudoMsgBeforeValidatorModified struct {
	BeforeValidatorModified *Validator `json:"before_validator_modified"`
}

type SudoMsgBeforeValidatorSlashed

type SudoMsgBeforeValidatorSlashed struct {
	BeforeValidatorSlashed *ValidatorSlashed `json:"before_validator_slashed"`
}

type Validator

type Validator struct {
	Moniker          string `json:"moniker"`
	ValidatorAddress string `json:"validator_address"`
	Commission       string `json:"commission"`
	ValidatorTokens  string `json:"validator_tokens"`
	BondedTokens     string `json:"bonded_tokens"`
	BondStatus       string `json:"bond_status"`
}

func NewValidator

func NewValidator(val stakingtypes.ValidatorI) *Validator

type ValidatorSlashed

type ValidatorSlashed struct {
	Moniker          string `json:"moniker"`
	ValidatorAddress string `json:"validator_address"`
	SlashedAmount    string `json:"slashed_amount"`
}

func NewValidatorSlashed

func NewValidatorSlashed(val stakingtypes.ValidatorI, fraction sdk.Dec) *ValidatorSlashed

type Vote

type Vote struct {
	ProposalID   uint64                   `json:"proposal_id"`
	VoterAddress string                   `json:"voter_address"`
	VoteOption   []*v1.WeightedVoteOption `json:"vote_option"`
}

func NewVote

func NewVote(vote v1.Vote) Vote

Jump to

Keyboard shortcuts

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