Documentation ¶
Index ¶
- func CheckContractAddressIsDisabled(disabledPrecompiles []string, addr common.Address, methodId []byte) error
- func NewLegacyQueryServer(qs v1.QueryServer, k *Keeper) v1beta1.QueryServer
- func NewMsgServerImpl(k *Keeper) types.MsgServerPro
- type Keeper
- func (keeper Keeper) ActivateVotingPeriod(ctx context.Context, proposal v1.Proposal) error
- func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress, ...) (bool, error)
- func (keeper Keeper) CheckDisabledPrecompiles(ctx sdk.Context, contractAddress common.Address, methodId []byte) error
- func (keeper Keeper) GetCustomMsgQuorum(ctx context.Context, defaultQuorum string, proposal v1.Proposal) string
- func (keeper Keeper) GetCustomMsgVotingPeriod(ctx context.Context, defaultVotingPeriod *time.Duration, proposal v1.Proposal) *time.Duration
- func (keeper Keeper) GetCustomParams(ctx context.Context, msgType string) (types.CustomParams, bool)
- func (keeper Keeper) GetDisabledMsgs(ctx sdk.Context) []string
- func (keeper Keeper) GetMinDepositAmountFromProposalMsgs(ctx context.Context, defaultMinDeposit sdk.Coins, proposal v1.Proposal) (sdk.Coins, error)
- func (keeper Keeper) GetSwitchParams(ctx sdk.Context) (params types.SwitchParams)
- func (keeper Keeper) HasDeposit(ctx sdk.Context, proposalId uint64, depositor sdk.AccAddress) (bool, error)
- func (keeper Keeper) HasVote(ctx sdk.Context, proposalId uint64, voter sdk.AccAddress) (bool, error)
- func (keeper Keeper) InitCustomParams(ctx sdk.Context) error
- func (keeper Keeper) IteratorActiveProposal(ctx sdk.Context, t time.Time, fn func(proposal v1.Proposal) (bool, error)) error
- func (keeper Keeper) IteratorInactiveProposal(ctx sdk.Context, t time.Time, fn func(proposal v1.Proposal) (bool, error)) error
- func (keeper Keeper) SetSwitchParams(ctx sdk.Context, params *types.SwitchParams) error
- func (keeper Keeper) Tally(ctx context.Context, proposal v1.Proposal) (passes, burnDeposits bool, tallyResults v1.TallyResult, err error)
- type QueryServer
- func (q QueryServer) CustomParams(ctx context.Context, req *types.QueryCustomParamsRequest) (*types.QueryCustomParamsResponse, error)
- func (q QueryServer) SwitchParams(ctx context.Context, _ *types.QuerySwitchParamsRequest) (*types.QuerySwitchParamsResponse, error)
- func (q QueryServer) TallyResult(ctx context.Context, req *v1.QueryTallyResultRequest) (*v1.QueryTallyResultResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLegacyQueryServer ¶
func NewLegacyQueryServer(qs v1.QueryServer, k *Keeper) v1beta1.QueryServer
func NewMsgServerImpl ¶
func NewMsgServerImpl(k *Keeper) types.MsgServerPro
NewMsgServerImpl returns an implementation of the gov msgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct { *govkeeper.Keeper CustomerParams collections.Map[string, types.CustomParams] FXSchema collections.Schema // contains filtered or unexported fields }
func NewKeeper ¶
func NewKeeper(storeService corestoretypes.KVStoreService, ak govtypes.AccountKeeper, bk govtypes.BankKeeper, sk govtypes.StakingKeeper, keys map[string]*storetypes.KVStoreKey, gk *govkeeper.Keeper, cdc codec.BinaryCodec, authority string) *Keeper
func (Keeper) ActivateVotingPeriod ¶
ActivateVotingPeriod activates the voting period of a proposal
func (Keeper) AddDeposit ¶
func (keeper Keeper) AddDeposit(ctx context.Context, proposalID uint64, depositorAddr sdk.AccAddress, depositAmount sdk.Coins) (bool, error)
AddDeposit adds or updates a deposit of a specific depositor on a specific proposal. Activates voting period when appropriate and returns true in that case, else returns false.
func (Keeper) CheckDisabledPrecompiles ¶
func (Keeper) GetCustomMsgQuorum ¶
func (Keeper) GetCustomMsgVotingPeriod ¶
func (Keeper) GetCustomParams ¶
func (Keeper) GetMinDepositAmountFromProposalMsgs ¶
func (Keeper) GetSwitchParams ¶
func (keeper Keeper) GetSwitchParams(ctx sdk.Context) (params types.SwitchParams)
func (Keeper) HasDeposit ¶
func (Keeper) IteratorActiveProposal ¶
func (Keeper) IteratorInactiveProposal ¶
func (Keeper) SetSwitchParams ¶
type QueryServer ¶
type QueryServer struct { v1.QueryServer // contains filtered or unexported fields }
func NewQueryServer ¶
func NewQueryServer(k *Keeper) QueryServer
func (QueryServer) CustomParams ¶
func (q QueryServer) CustomParams(ctx context.Context, req *types.QueryCustomParamsRequest) (*types.QueryCustomParamsResponse, error)
func (QueryServer) SwitchParams ¶
func (q QueryServer) SwitchParams(ctx context.Context, _ *types.QuerySwitchParamsRequest) (*types.QuerySwitchParamsResponse, error)
func (QueryServer) TallyResult ¶
func (q QueryServer) TallyResult(ctx context.Context, req *v1.QueryTallyResultRequest) (*v1.QueryTallyResultResponse, error)
TallyResult queries the tally of a proposal vote
Click to show internal directories.
Click to hide internal directories.