types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeAddFeeExcludedMessage    = "AddFeeExcludedMessage"
	EventTypeRemoveFeeExcludedMessage = "RemoveFeeExcludedMessage"

	AttributeKeyMessageType = "message_type"
	AttributeKeyTitle       = "title"
	AttributeKeyDescription = "description"

	AttributeKeySystemFee = "system_fee"
	AttributeKeyTotalFee  = "total_fee"

	AttributeValueModule = ModuleName
)
View Source
const (
	ModuleName = "fee"

	StoreKey = ModuleName

	RouterKey = ModuleName

	QuerierRoute = ModuleName

	DefaultParamspace = ModuleName
)
View Source
const (
	ProposalTypeAddFeeExcludedMessage    = "AddFeeExcludedMessage"
	ProposalTypeRemoveFeeExcludedMessage = "RemoveFeeExcludedMessage"
)

Variables

View Source
var (
	FeeExcludedMessageKeyPrefix = []byte{0x10}

	StatusPresent = []byte{0x01}
)
View Source
var (
	DefaultFeePercentage = sdk.NewDecWithPrec(2, 3)
	DefaultMinimumFee    = sdk.NewCoins(sdk.NewInt64Coin(config.DefaultDenom, 200))       // 200pin
	DefaultMaximumFee    = sdk.NewCoins(sdk.NewInt64Coin(config.DefaultDenom, 100000000)) // 1 anatha

	DefaultFeeExcludedMessages = []string{
		"treasury/disburse",
		"treasury/disburse_to_escrow",
		"treasury/disburse_from_escrow",
		"treasury/revert_from_escrow",
		"governance/submit_proposal",
		"governance/vote",
		"governance/expedite",
	}

	KeyFeePercentage = []byte("FeePercentage")
	KeyMinimumFee    = []byte("MinimumFee")
	KeyMaximumFee    = []byte("MaximumFee")
)
View Source
var ModuleCdc = codec.New()

ModuleCdc defines the module codec

Functions

func GetFeeExcludedMessageIteratorKey

func GetFeeExcludedMessageIteratorKey() []byte

func GetFeeExcludedMessageKey

func GetFeeExcludedMessageKey(msgType string) []byte

func NewAddFeeExcludedMessageProposal

func NewAddFeeExcludedMessageProposal(title string, description string, messageType string) gov.Content

func NewRemoveFeeExcludedMessageProposal

func NewRemoveFeeExcludedMessageProposal(title string, description string, messageType string) gov.Content

func ParamKeyTable

func ParamKeyTable() params.KeyTable

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on codec

func SplitFeeExcludedMessageKey

func SplitFeeExcludedMessageKey(key []byte) string

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

Types

type AddFeeExcludedMessageProposal

type AddFeeExcludedMessageProposal struct {
	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`
	MessageType string `json:"message_type" yaml:"message_type"`
}

AddFeeExcludedMessageProposal

func (AddFeeExcludedMessageProposal) GetDescription

func (p AddFeeExcludedMessageProposal) GetDescription() string

func (AddFeeExcludedMessageProposal) GetTitle

nolint

func (AddFeeExcludedMessageProposal) ProposalRoute

func (p AddFeeExcludedMessageProposal) ProposalRoute() string

func (AddFeeExcludedMessageProposal) ProposalType

func (p AddFeeExcludedMessageProposal) ProposalType() string

func (AddFeeExcludedMessageProposal) String

func (AddFeeExcludedMessageProposal) ValidateBasic

func (p AddFeeExcludedMessageProposal) ValidateBasic() error

type GenesisState

type GenesisState struct {
	Params              Params   `json:"params" yaml:"params"`
	FeeExcludedMessages []string `json:"fee_excluded_messages" yaml:"fee_excluded_messages"`
}

func DefaultGenesisState

func DefaultGenesisState() GenesisState

func NewGenesisState

func NewGenesisState(params Params, feeExcludedMessages []string) GenesisState

type Params

type Params struct {
	FeePercentage sdk.Dec   `json:"fee_percentage" yaml:"fee_percentage"`
	MinimumFee    sdk.Coins `json:"minimum_fee" yaml:"minimum_fee"`
	MaximumFee    sdk.Coins `json:"maximum_fee" yaml:"maximum_fee"`
}

func DefaultParams

func DefaultParams() Params

DefaultParams defines the parameters for this module

func NewParams

func NewParams(feePercentage sdk.Dec, minimumFee sdk.Coins, maximumFee sdk.Coins) Params

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() params.ParamSetPairs

ParamSetPairs - Implements params.ParamSet

func (Params) String

func (p Params) String() string

String implements the stringer interface for Params

func (Params) Validate

func (p Params) Validate() error

type RemoveFeeExcludedMessageProposal

type RemoveFeeExcludedMessageProposal struct {
	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`
	MessageType string `json:"message_type" yaml:"message_type"`
}

RemoveFeeExcludedMessageProposal

func (RemoveFeeExcludedMessageProposal) GetDescription

func (p RemoveFeeExcludedMessageProposal) GetDescription() string

func (RemoveFeeExcludedMessageProposal) GetTitle

nolint

func (RemoveFeeExcludedMessageProposal) ProposalRoute

func (p RemoveFeeExcludedMessageProposal) ProposalRoute() string

func (RemoveFeeExcludedMessageProposal) ProposalType

func (p RemoveFeeExcludedMessageProposal) ProposalType() string

func (RemoveFeeExcludedMessageProposal) String

func (RemoveFeeExcludedMessageProposal) ValidateBasic

func (p RemoveFeeExcludedMessageProposal) ValidateBasic() error

Jump to

Keyboard shortcuts

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