Documentation ¶
Index ¶
- func NewMsgServerImpl(k Keeper) types.MsgServer
- type Delegation
- type GovHooks
- func (h GovHooks) AfterProposalDeposit(ctx sdk.Context, proposalID uint64, _ sdk.AccAddress)
- func (h GovHooks) AfterProposalFailedMinDeposit(_ sdk.Context, _ uint64)
- func (h GovHooks) AfterProposalSubmission(ctx sdk.Context, proposalID uint64)
- func (h GovHooks) AfterProposalVote(ctx sdk.Context, proposalID uint64, voterAddr sdk.AccAddress)
- func (h GovHooks) AfterProposalVotingPeriodEnded(ctx sdk.Context, proposalID uint64)
- type Keeper
- func (k Keeper) DeleteContract(ctx sdk.Context, keyPrefix []byte, contractAddr sdk.AccAddress)
- func (k Keeper) ExecuteMessageOnContracts(ctx sdk.Context, keyPrefix []byte, msgBz []byte) error
- func (k Keeper) GetAllContracts(ctx sdk.Context, keyPrefix []byte) (list []sdk.Address)
- func (k Keeper) GetAllContractsBech32(ctx sdk.Context, keyPrefix []byte) []string
- func (k Keeper) GetAuthority() string
- func (k Keeper) GetContractKeeper() wasmtypes.ContractOpsKeeper
- func (k Keeper) GetParams(ctx sdk.Context) (p types.Params)
- func (k Keeper) GetStakingKeeper() slashingtypes.StakingKeeper
- func (k Keeper) GetWasmKeeper() wasmkeeper.Keeper
- func (k Keeper) GovHooks() GovHooks
- func (k Keeper) IsContractRegistered(ctx sdk.Context, keyPrefix []byte, contractAddr sdk.AccAddress) bool
- func (k Keeper) IterateContracts(ctx sdk.Context, keyPrefix []byte, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetContract(ctx sdk.Context, keyPrefix []byte, contractAddr sdk.AccAddress)
- func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error
- func (k Keeper) StakingHooks() StakingHooks
- type Proposal
- type Querier
- func (q Querier) GovernanceContracts(stdCtx context.Context, _ *types.QueryGovernanceContractsRequest) (*types.QueryGovernanceContractsResponse, error)
- func (q Querier) Params(stdCtx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (q Querier) StakingContracts(stdCtx context.Context, _ *types.QueryStakingContractsRequest) (*types.QueryStakingContractsResponse, error)
- type StakingHooks
- func (h StakingHooks) AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterUnbondingInitiated(_ sdk.Context, _ uint64) error
- func (h StakingHooks) AfterValidatorBeginUnbonding(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorBonded(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (h StakingHooks) AfterValidatorRemoved(ctx sdk.Context, _ sdk.ConsAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationRemoved(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeDelegationSharesModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeValidatorModified(ctx sdk.Context, valAddr sdk.ValAddress) error
- func (h StakingHooks) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) error
- type SudoAfterProposalVotingPeriodEnded
- type SudoMsgAfterDelegationModified
- type SudoMsgAfterProposalDeposit
- type SudoMsgAfterProposalSubmission
- type SudoMsgAfterProposalVote
- type SudoMsgAfterValidatorBeginUnbonding
- type SudoMsgAfterValidatorBonded
- type SudoMsgAfterValidatorCreated
- type SudoMsgAfterValidatorModified
- type SudoMsgAfterValidatorRemoved
- type SudoMsgBeforeDelegationCreated
- type SudoMsgBeforeDelegationRemoved
- type SudoMsgBeforeDelegationSharesModified
- type SudoMsgBeforeValidatorModified
- type SudoMsgBeforeValidatorSlashed
- type Validator
- type ValidatorSlashed
- type Vote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
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"` }
func NewDelegation ¶
func NewDelegation(del stakingtypes.DelegationI) *Delegation
type GovHooks ¶
type GovHooks struct {
// contains filtered or unexported fields
}
func (GovHooks) AfterProposalDeposit ¶
func (GovHooks) AfterProposalFailedMinDeposit ¶
func (GovHooks) AfterProposalSubmission ¶
func (GovHooks) AfterProposalVote ¶
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 (Keeper) ExecuteMessageOnContracts ¶
func (Keeper) GetAllContracts ¶
func (Keeper) GetAllContractsBech32 ¶
func (Keeper) GetAuthority ¶
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) GetStakingKeeper ¶
func (k Keeper) GetStakingKeeper() slashingtypes.StakingKeeper
func (Keeper) GetWasmKeeper ¶
func (k Keeper) GetWasmKeeper() wasmkeeper.Keeper
func (Keeper) IsContractRegistered ¶
func (Keeper) IterateContracts ¶
func (Keeper) SetContract ¶
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 ¶
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
func NewQuerier ¶
func (Querier) GovernanceContracts ¶
func (q Querier) GovernanceContracts(stdCtx context.Context, _ *types.QueryGovernanceContractsRequest) (*types.QueryGovernanceContractsResponse, error)
func (Querier) Params ¶
func (q Querier) Params(stdCtx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params returns the total set of clock parameters.
func (Querier) StakingContracts ¶
func (q Querier) StakingContracts(stdCtx context.Context, _ *types.QueryStakingContractsRequest) (*types.QueryStakingContractsResponse, error)
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 {
}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
Click to show internal directories.
Click to hide internal directories.