types

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "msgfees"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_msgfees"
)
View Source
const (
	// ProposalTypeAddMsgFee to add a new msg based fee
	ProposalTypeAddMsgFee string = "AddMsgFee"
	// ProposalTypeUpdateMsgFee to update an existing msg based fee
	ProposalTypeUpdateMsgFee string = "UpdateMsgFee"
	// ProposalTypeRemoveMsgFee to remove an existing msg based fee
	ProposalTypeRemoveMsgFee string = "RemoveMsgFee"
)

Variables

View Source
var (
	ErrEmptyMsgType        = sdkerrors.Register(ModuleName, 2, "msg type is empty")
	ErrInvalidFee          = sdkerrors.Register(ModuleName, 3, "invalid fee amount")
	ErrMsgFeeAlreadyExists = sdkerrors.Register(ModuleName, 4, "fee for type already exists.")
	ErrMsgFeeDoesNotExist  = sdkerrors.Register(ModuleName, 5, "fee for type does not exist.")
	ErrInvalidFeeProposal  = sdkerrors.Register(ModuleName, 6, "invalid fee proposal")
)

x/msgfees module sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMsgfees        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMsgfees          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMsgfees = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthProposals        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProposals          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProposals = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var DefaultFloorGasPrice = sdk.Coin{
	Amount: sdk.NewInt(1905),
	Denom:  "nhash",
}

DefaultFloorGasPrice to differentiate between base fee and additional fee when additional fee is in same denom as default base denom i.e nhash cannot be a const unfortunately because it's a custom type.

View Source
var (
	// moving to protoCodec since this is a new module and should not use the
	// amino codec..someone to double verify
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
View Source
var (
	MsgFeeKeyPrefix = []byte{0x00}
)
View Source
var (
	// ParamStoreKeyFloorGasPrice if msg fees are paid in the same denom as base default gas is paid, then use this to differentiate between base price
	// and additional fees.
	ParamStoreKeyFloorGasPrice = []byte("FloorGasPrice")
)

Functions

func GetMsgFeeKey

func GetMsgFeeKey(msgType string) []byte

GetMsgFeeKey takes in msgType name and returns key

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable for marker module

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	IterateAccounts(ctx sdk.Context, process func(authtypes.AccountI) (stop bool))
	GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI
	SetAccount(sdk.Context, authtypes.AccountI)
	NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI
}

AccountKeeper defines the expected account keeper (noalias)

type AddMsgFeeProposal

type AddMsgFeeProposal struct {
	Title         string     `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description   string     `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	MsgTypeUrl    string     `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
	AdditionalFee types.Coin `` /* 166-byte string literal not displayed */
}

AddMsgFeeProposal defines a governance proposal to add additional msg based fee

func NewAddMsgFeeProposal

func NewAddMsgFeeProposal(
	title string,
	description string,
	msg string,
	additionalFee sdk.Coin) *AddMsgFeeProposal

func (*AddMsgFeeProposal) Descriptor

func (*AddMsgFeeProposal) Descriptor() ([]byte, []int)

func (*AddMsgFeeProposal) Equal

func (this *AddMsgFeeProposal) Equal(that interface{}) bool

func (*AddMsgFeeProposal) GetAdditionalFee

func (m *AddMsgFeeProposal) GetAdditionalFee() types.Coin

func (*AddMsgFeeProposal) GetDescription

func (m *AddMsgFeeProposal) GetDescription() string

func (*AddMsgFeeProposal) GetMsgTypeUrl

func (m *AddMsgFeeProposal) GetMsgTypeUrl() string

func (*AddMsgFeeProposal) GetTitle

func (m *AddMsgFeeProposal) GetTitle() string

func (*AddMsgFeeProposal) Marshal

func (m *AddMsgFeeProposal) Marshal() (dAtA []byte, err error)

func (*AddMsgFeeProposal) MarshalTo

func (m *AddMsgFeeProposal) MarshalTo(dAtA []byte) (int, error)

func (*AddMsgFeeProposal) MarshalToSizedBuffer

func (m *AddMsgFeeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (AddMsgFeeProposal) ProposalRoute

func (ambfp AddMsgFeeProposal) ProposalRoute() string

func (AddMsgFeeProposal) ProposalType

func (ambfp AddMsgFeeProposal) ProposalType() string

func (*AddMsgFeeProposal) ProtoMessage

func (*AddMsgFeeProposal) ProtoMessage()

func (*AddMsgFeeProposal) Reset

func (m *AddMsgFeeProposal) Reset()

func (*AddMsgFeeProposal) Size

func (m *AddMsgFeeProposal) Size() (n int)

func (AddMsgFeeProposal) String

func (ambfp AddMsgFeeProposal) String() string

func (*AddMsgFeeProposal) Unmarshal

func (m *AddMsgFeeProposal) Unmarshal(dAtA []byte) error

func (AddMsgFeeProposal) ValidateBasic

func (ambfp AddMsgFeeProposal) ValidateBasic() error

func (*AddMsgFeeProposal) XXX_DiscardUnknown

func (m *AddMsgFeeProposal) XXX_DiscardUnknown()

func (*AddMsgFeeProposal) XXX_Marshal

func (m *AddMsgFeeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AddMsgFeeProposal) XXX_Merge

func (m *AddMsgFeeProposal) XXX_Merge(src proto.Message)

func (*AddMsgFeeProposal) XXX_Size

func (m *AddMsgFeeProposal) XXX_Size() int

func (*AddMsgFeeProposal) XXX_Unmarshal

func (m *AddMsgFeeProposal) XXX_Unmarshal(b []byte) error

type BankKeeper

type BankKeeper interface {
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
}

BankKeeper defines the expected bank keeper (keeper, sendkeeper, viewkeeper) (noalias)

type CalculateTxFeesRequest

type CalculateTxFeesRequest struct {
	// tx_bytes is the transaction to simulate.
	TxBytes []byte `protobuf:"bytes,1,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"`
	// default_base_denom is used to set the denom used for gas fees
	// if not set it will default to nhash.
	DefaultBaseDenom string `protobuf:"bytes,2,opt,name=default_base_denom,json=defaultBaseDenom,proto3" json:"default_base_denom,omitempty"`
	// gas_adjustment is the adjustment factor to be multiplied against the estimate returned by the tx simulation
	GasAdjustment float32 `protobuf:"fixed32,3,opt,name=gas_adjustment,json=gasAdjustment,proto3" json:"gas_adjustment,omitempty"`
}

CalculateTxFeesRequest is the request type for the Query RPC method.

func (*CalculateTxFeesRequest) Descriptor

func (*CalculateTxFeesRequest) Descriptor() ([]byte, []int)

func (*CalculateTxFeesRequest) GetDefaultBaseDenom

func (m *CalculateTxFeesRequest) GetDefaultBaseDenom() string

func (*CalculateTxFeesRequest) GetGasAdjustment

func (m *CalculateTxFeesRequest) GetGasAdjustment() float32

func (*CalculateTxFeesRequest) GetTxBytes

func (m *CalculateTxFeesRequest) GetTxBytes() []byte

func (*CalculateTxFeesRequest) Marshal

func (m *CalculateTxFeesRequest) Marshal() (dAtA []byte, err error)

func (*CalculateTxFeesRequest) MarshalTo

func (m *CalculateTxFeesRequest) MarshalTo(dAtA []byte) (int, error)

func (*CalculateTxFeesRequest) MarshalToSizedBuffer

func (m *CalculateTxFeesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CalculateTxFeesRequest) ProtoMessage

func (*CalculateTxFeesRequest) ProtoMessage()

func (*CalculateTxFeesRequest) Reset

func (m *CalculateTxFeesRequest) Reset()

func (*CalculateTxFeesRequest) Size

func (m *CalculateTxFeesRequest) Size() (n int)

func (*CalculateTxFeesRequest) String

func (m *CalculateTxFeesRequest) String() string

func (*CalculateTxFeesRequest) Unmarshal

func (m *CalculateTxFeesRequest) Unmarshal(dAtA []byte) error

func (*CalculateTxFeesRequest) XXX_DiscardUnknown

func (m *CalculateTxFeesRequest) XXX_DiscardUnknown()

func (*CalculateTxFeesRequest) XXX_Marshal

func (m *CalculateTxFeesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CalculateTxFeesRequest) XXX_Merge

func (m *CalculateTxFeesRequest) XXX_Merge(src proto.Message)

func (*CalculateTxFeesRequest) XXX_Size

func (m *CalculateTxFeesRequest) XXX_Size() int

func (*CalculateTxFeesRequest) XXX_Unmarshal

func (m *CalculateTxFeesRequest) XXX_Unmarshal(b []byte) error

type CalculateTxFeesResponse

type CalculateTxFeesResponse struct {
	// additional_fees are the amount of coins to be for addition msg fees
	AdditionalFees github_com_cosmos_cosmos_sdk_types.Coins `` /* 147-byte string literal not displayed */
	// total_fees are the total amount of fees needed for the transactions (msg fees + gas fee)
	// note: the gas fee is calculated with the floor gas price module param.
	TotalFees github_com_cosmos_cosmos_sdk_types.Coins `` /* 132-byte string literal not displayed */
	// estimated_gas is the amount of gas needed for the transaction
	EstimatedGas uint64 `protobuf:"varint,3,opt,name=estimated_gas,json=estimatedGas,proto3" json:"estimated_gas,omitempty" yaml:"estimated_gas"`
}

CalculateTxFeesResponse is the response type for the Query RPC method.

func (*CalculateTxFeesResponse) Descriptor

func (*CalculateTxFeesResponse) Descriptor() ([]byte, []int)

func (*CalculateTxFeesResponse) GetAdditionalFees

func (*CalculateTxFeesResponse) GetEstimatedGas

func (m *CalculateTxFeesResponse) GetEstimatedGas() uint64

func (*CalculateTxFeesResponse) GetTotalFees

func (*CalculateTxFeesResponse) Marshal

func (m *CalculateTxFeesResponse) Marshal() (dAtA []byte, err error)

func (*CalculateTxFeesResponse) MarshalTo

func (m *CalculateTxFeesResponse) MarshalTo(dAtA []byte) (int, error)

func (*CalculateTxFeesResponse) MarshalToSizedBuffer

func (m *CalculateTxFeesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CalculateTxFeesResponse) ProtoMessage

func (*CalculateTxFeesResponse) ProtoMessage()

func (*CalculateTxFeesResponse) Reset

func (m *CalculateTxFeesResponse) Reset()

func (*CalculateTxFeesResponse) Size

func (m *CalculateTxFeesResponse) Size() (n int)

func (*CalculateTxFeesResponse) String

func (m *CalculateTxFeesResponse) String() string

func (*CalculateTxFeesResponse) Unmarshal

func (m *CalculateTxFeesResponse) Unmarshal(dAtA []byte) error

func (*CalculateTxFeesResponse) XXX_DiscardUnknown

func (m *CalculateTxFeesResponse) XXX_DiscardUnknown()

func (*CalculateTxFeesResponse) XXX_Marshal

func (m *CalculateTxFeesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CalculateTxFeesResponse) XXX_Merge

func (m *CalculateTxFeesResponse) XXX_Merge(src proto.Message)

func (*CalculateTxFeesResponse) XXX_Size

func (m *CalculateTxFeesResponse) XXX_Size() int

func (*CalculateTxFeesResponse) XXX_Unmarshal

func (m *CalculateTxFeesResponse) XXX_Unmarshal(b []byte) error

type EventMsgFee added in v1.9.0

type EventMsgFee struct {
	MsgType string `protobuf:"bytes,1,opt,name=msg_type,json=msgType,proto3" json:"msg_type,omitempty"`
	Count   string `protobuf:"bytes,2,opt,name=count,proto3" json:"count,omitempty"`
	Total   string `protobuf:"bytes,3,opt,name=total,proto3" json:"total,omitempty"`
}

EventMsgFee final event property for msg fee on type

func (*EventMsgFee) Descriptor added in v1.9.0

func (*EventMsgFee) Descriptor() ([]byte, []int)

func (*EventMsgFee) GetCount added in v1.9.0

func (m *EventMsgFee) GetCount() string

func (*EventMsgFee) GetMsgType added in v1.9.0

func (m *EventMsgFee) GetMsgType() string

func (*EventMsgFee) GetTotal added in v1.9.0

func (m *EventMsgFee) GetTotal() string

func (*EventMsgFee) Marshal added in v1.9.0

func (m *EventMsgFee) Marshal() (dAtA []byte, err error)

func (*EventMsgFee) MarshalTo added in v1.9.0

func (m *EventMsgFee) MarshalTo(dAtA []byte) (int, error)

func (*EventMsgFee) MarshalToSizedBuffer added in v1.9.0

func (m *EventMsgFee) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventMsgFee) ProtoMessage added in v1.9.0

func (*EventMsgFee) ProtoMessage()

func (*EventMsgFee) Reset added in v1.9.0

func (m *EventMsgFee) Reset()

func (*EventMsgFee) Size added in v1.9.0

func (m *EventMsgFee) Size() (n int)

func (*EventMsgFee) String added in v1.9.0

func (m *EventMsgFee) String() string

func (*EventMsgFee) Unmarshal added in v1.9.0

func (m *EventMsgFee) Unmarshal(dAtA []byte) error

func (*EventMsgFee) XXX_DiscardUnknown added in v1.9.0

func (m *EventMsgFee) XXX_DiscardUnknown()

func (*EventMsgFee) XXX_Marshal added in v1.9.0

func (m *EventMsgFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventMsgFee) XXX_Merge added in v1.9.0

func (m *EventMsgFee) XXX_Merge(src proto.Message)

func (*EventMsgFee) XXX_Size added in v1.9.0

func (m *EventMsgFee) XXX_Size() int

func (*EventMsgFee) XXX_Unmarshal added in v1.9.0

func (m *EventMsgFee) XXX_Unmarshal(b []byte) error

type EventMsgFees added in v1.9.0

type EventMsgFees struct {
	MsgFees []EventMsgFee `protobuf:"bytes,1,rep,name=msg_fees,json=msgFees,proto3" json:"msg_fees"`
}

EventMsgFees event emitted with summary of msg fees

func NewEventMsgs added in v1.9.0

func NewEventMsgs(totalCalls map[string]uint64, totalFees map[string]sdk.Coin) *EventMsgFees

func (*EventMsgFees) Descriptor added in v1.9.0

func (*EventMsgFees) Descriptor() ([]byte, []int)

func (*EventMsgFees) GetMsgFees added in v1.9.0

func (m *EventMsgFees) GetMsgFees() []EventMsgFee

func (*EventMsgFees) Marshal added in v1.9.0

func (m *EventMsgFees) Marshal() (dAtA []byte, err error)

func (*EventMsgFees) MarshalTo added in v1.9.0

func (m *EventMsgFees) MarshalTo(dAtA []byte) (int, error)

func (*EventMsgFees) MarshalToSizedBuffer added in v1.9.0

func (m *EventMsgFees) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EventMsgFees) ProtoMessage added in v1.9.0

func (*EventMsgFees) ProtoMessage()

func (*EventMsgFees) Reset added in v1.9.0

func (m *EventMsgFees) Reset()

func (*EventMsgFees) Size added in v1.9.0

func (m *EventMsgFees) Size() (n int)

func (*EventMsgFees) String added in v1.9.0

func (m *EventMsgFees) String() string

func (*EventMsgFees) Unmarshal added in v1.9.0

func (m *EventMsgFees) Unmarshal(dAtA []byte) error

func (*EventMsgFees) XXX_DiscardUnknown added in v1.9.0

func (m *EventMsgFees) XXX_DiscardUnknown()

func (*EventMsgFees) XXX_Marshal added in v1.9.0

func (m *EventMsgFees) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EventMsgFees) XXX_Merge added in v1.9.0

func (m *EventMsgFees) XXX_Merge(src proto.Message)

func (*EventMsgFees) XXX_Size added in v1.9.0

func (m *EventMsgFees) XXX_Size() int

func (*EventMsgFees) XXX_Unmarshal added in v1.9.0

func (m *EventMsgFees) XXX_Unmarshal(b []byte) error

type FeegrantKeeper

type FeegrantKeeper interface {
	GetAllowance(ctx sdk.Context, granter sdk.AccAddress, grantee sdk.AccAddress) (feegrant.FeeAllowanceI, error)
	UseGrantedFees(ctx sdk.Context, granter, grantee sdk.AccAddress, fee sdk.Coins, msgs []sdk.Msg) error
}

FeegrantKeeper defines the expected feegrant keeper.

type GenesisState

type GenesisState struct {
	// params defines all the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// msg_based_fees are the additional fees on specific tx msgs
	MsgFees []MsgFee `protobuf:"bytes,2,rep,name=msg_fees,json=msgFees,proto3" json:"msg_fees"`
}

GenesisState contains a set of msg fees, persisted from the store

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns default state for msgfee module.

func GetGenesisStateFromAppState added in v1.9.0

func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMessage) GenesisState

GetGenesisStateFromAppState returns x/msgfees GenesisState given raw application genesis state.

func NewGenesisState

func NewGenesisState(params Params, entries []MsgFee) *GenesisState

NewGenesisState creates new GenesisState object

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetMsgFees

func (m *GenesisState) GetMsgFees() []MsgFee

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (state GenesisState) Validate() error

Validate ensures all grants in the genesis state are valid

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgFee

type MsgFee struct {
	MsgTypeUrl string `protobuf:"bytes,1,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
	// additional_fee can pay in any Coin( basically a Denom and Amount, Amount can be zero)
	AdditionalFee types.Coin `protobuf:"bytes,2,opt,name=additional_fee,json=additionalFee,proto3" json:"additional_fee" yaml:"additional_fee"`
}

MsgFee is the core of what gets stored on the blockchain it consists of two parts 1. the msg type url, i.e. /cosmos.bank.v1beta1.MsgSend 2. minimum additional fees(can be of any denom)

func NewMsgFee

func NewMsgFee(msgTypeURL string, additionalFee sdk.Coin) MsgFee

func (*MsgFee) Descriptor

func (*MsgFee) Descriptor() ([]byte, []int)

func (*MsgFee) GetAdditionalFee

func (m *MsgFee) GetAdditionalFee() types.Coin

func (*MsgFee) GetMsgTypeUrl

func (m *MsgFee) GetMsgTypeUrl() string

func (*MsgFee) Marshal

func (m *MsgFee) Marshal() (dAtA []byte, err error)

func (*MsgFee) MarshalTo

func (m *MsgFee) MarshalTo(dAtA []byte) (int, error)

func (*MsgFee) MarshalToSizedBuffer

func (m *MsgFee) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgFee) ProtoMessage

func (*MsgFee) ProtoMessage()

func (*MsgFee) Reset

func (m *MsgFee) Reset()

func (*MsgFee) Size

func (m *MsgFee) Size() (n int)

func (*MsgFee) String

func (m *MsgFee) String() string

func (*MsgFee) Unmarshal

func (m *MsgFee) Unmarshal(dAtA []byte) error

func (*MsgFee) ValidateBasic

func (msg *MsgFee) ValidateBasic() error

func (*MsgFee) XXX_DiscardUnknown

func (m *MsgFee) XXX_DiscardUnknown()

func (*MsgFee) XXX_Marshal

func (m *MsgFee) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgFee) XXX_Merge

func (m *MsgFee) XXX_Merge(src proto.Message)

func (*MsgFee) XXX_Size

func (m *MsgFee) XXX_Size() int

func (*MsgFee) XXX_Unmarshal

func (m *MsgFee) XXX_Unmarshal(b []byte) error

type MsgFeesKeeper

type MsgFeesKeeper interface {
	GetMsgFee(ctx sdk.Context, msgType string) (*MsgFee, error)
	GetFeeCollectorName() string
	DeductFees(bankKeeper authtypes.BankKeeper, ctx sdk.Context, acc authtypes.AccountI, fees sdk.Coins) error
	GetFloorGasPrice(ctx sdk.Context) sdk.Coin
}

MsgFeesKeeper for additional msg fees.

type Params

type Params struct {
	// constant used to calculate fees when gas fees shares denom with msg fee
	FloorGasPrice types.Coin `protobuf:"bytes,2,opt,name=floor_gas_price,json=floorGasPrice,proto3" json:"floor_gas_price" yaml:"floor_gas_price"`
}

Params defines the set of params for the msgfees module.

func DefaultParams

func DefaultParams() Params

DefaultParams is the default parameter configuration for the bank module

func NewParams

func NewParams(
	floorGasPrice sdk.Coin,
) Params

NewParams creates a new parameter object

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) Equal

func (p *Params) Equal(that interface{}) bool

Equal returns true if the given value is equivalent to the current instance of params

func (*Params) GetFloorGasPrice

func (m *Params) GetFloorGasPrice() types.Coin

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs

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

ParamSetPairs - Implements params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type QueryAllMsgFeesRequest

type QueryAllMsgFeesRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAllMsgFeesRequest queries all Msg which have fees associated with them.

func (*QueryAllMsgFeesRequest) Descriptor

func (*QueryAllMsgFeesRequest) Descriptor() ([]byte, []int)

func (*QueryAllMsgFeesRequest) GetPagination

func (m *QueryAllMsgFeesRequest) GetPagination() *query.PageRequest

func (*QueryAllMsgFeesRequest) Marshal

func (m *QueryAllMsgFeesRequest) Marshal() (dAtA []byte, err error)

func (*QueryAllMsgFeesRequest) MarshalTo

func (m *QueryAllMsgFeesRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllMsgFeesRequest) MarshalToSizedBuffer

func (m *QueryAllMsgFeesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllMsgFeesRequest) ProtoMessage

func (*QueryAllMsgFeesRequest) ProtoMessage()

func (*QueryAllMsgFeesRequest) Reset

func (m *QueryAllMsgFeesRequest) Reset()

func (*QueryAllMsgFeesRequest) Size

func (m *QueryAllMsgFeesRequest) Size() (n int)

func (*QueryAllMsgFeesRequest) String

func (m *QueryAllMsgFeesRequest) String() string

func (*QueryAllMsgFeesRequest) Unmarshal

func (m *QueryAllMsgFeesRequest) Unmarshal(dAtA []byte) error

func (*QueryAllMsgFeesRequest) XXX_DiscardUnknown

func (m *QueryAllMsgFeesRequest) XXX_DiscardUnknown()

func (*QueryAllMsgFeesRequest) XXX_Marshal

func (m *QueryAllMsgFeesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllMsgFeesRequest) XXX_Merge

func (m *QueryAllMsgFeesRequest) XXX_Merge(src proto.Message)

func (*QueryAllMsgFeesRequest) XXX_Size

func (m *QueryAllMsgFeesRequest) XXX_Size() int

func (*QueryAllMsgFeesRequest) XXX_Unmarshal

func (m *QueryAllMsgFeesRequest) XXX_Unmarshal(b []byte) error

type QueryAllMsgFeesResponse

type QueryAllMsgFeesResponse struct {
	MsgFees []*MsgFee `protobuf:"bytes,1,rep,name=msg_fees,json=msgFees,proto3" json:"msg_fees,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

response for querying all msg's with fees associated with them

func (*QueryAllMsgFeesResponse) Descriptor

func (*QueryAllMsgFeesResponse) Descriptor() ([]byte, []int)

func (*QueryAllMsgFeesResponse) GetMsgFees

func (m *QueryAllMsgFeesResponse) GetMsgFees() []*MsgFee

func (*QueryAllMsgFeesResponse) GetPagination

func (m *QueryAllMsgFeesResponse) GetPagination() *query.PageResponse

func (*QueryAllMsgFeesResponse) Marshal

func (m *QueryAllMsgFeesResponse) Marshal() (dAtA []byte, err error)

func (*QueryAllMsgFeesResponse) MarshalTo

func (m *QueryAllMsgFeesResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryAllMsgFeesResponse) MarshalToSizedBuffer

func (m *QueryAllMsgFeesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryAllMsgFeesResponse) ProtoMessage

func (*QueryAllMsgFeesResponse) ProtoMessage()

func (*QueryAllMsgFeesResponse) Reset

func (m *QueryAllMsgFeesResponse) Reset()

func (*QueryAllMsgFeesResponse) Size

func (m *QueryAllMsgFeesResponse) Size() (n int)

func (*QueryAllMsgFeesResponse) String

func (m *QueryAllMsgFeesResponse) String() string

func (*QueryAllMsgFeesResponse) Unmarshal

func (m *QueryAllMsgFeesResponse) Unmarshal(dAtA []byte) error

func (*QueryAllMsgFeesResponse) XXX_DiscardUnknown

func (m *QueryAllMsgFeesResponse) XXX_DiscardUnknown()

func (*QueryAllMsgFeesResponse) XXX_Marshal

func (m *QueryAllMsgFeesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryAllMsgFeesResponse) XXX_Merge

func (m *QueryAllMsgFeesResponse) XXX_Merge(src proto.Message)

func (*QueryAllMsgFeesResponse) XXX_Size

func (m *QueryAllMsgFeesResponse) XXX_Size() int

func (*QueryAllMsgFeesResponse) XXX_Unmarshal

func (m *QueryAllMsgFeesResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Params queries the parameters for x/msgfees
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Query all Msgs which have fees associated with them.
	QueryAllMsgFees(ctx context.Context, in *QueryAllMsgFeesRequest, opts ...grpc.CallOption) (*QueryAllMsgFeesResponse, error)
	// CalculateTxFees simulates executing a transaction for estimating gas usage and additional fees.
	CalculateTxFees(ctx context.Context, in *CalculateTxFeesRequest, opts ...grpc.CallOption) (*CalculateTxFeesResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

func (*QueryParamsRequest) Descriptor() ([]byte, []int)

func (*QueryParamsRequest) Marshal

func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryParamsRequest) MarshalTo

func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsRequest) MarshalToSizedBuffer

func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

func (m *QueryParamsRequest) Size() (n int)

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsRequest) XXX_Merge

func (m *QueryParamsRequest) XXX_Merge(src proto.Message)

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error

type QueryParamsResponse

type QueryParamsResponse struct {
	// params defines the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

func (*QueryParamsResponse) Descriptor() ([]byte, []int)

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryParamsResponse) MarshalTo

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsResponse) MarshalToSizedBuffer

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

func (m *QueryParamsResponse) Size() (n int)

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsResponse) XXX_Merge

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Params queries the parameters for x/msgfees
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Query all Msgs which have fees associated with them.
	QueryAllMsgFees(context.Context, *QueryAllMsgFeesRequest) (*QueryAllMsgFeesResponse, error)
	// CalculateTxFees simulates executing a transaction for estimating gas usage and additional fees.
	CalculateTxFees(context.Context, *CalculateTxFeesRequest) (*CalculateTxFeesResponse, error)
}

QueryServer is the server API for Query service.

type RemoveMsgFeeProposal

type RemoveMsgFeeProposal struct {
	Title       string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	MsgTypeUrl  string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
}

RemoveMsgFeeProposal defines a governance proposal to delete a current msg based fee

func NewRemoveMsgFeeProposal

func NewRemoveMsgFeeProposal(
	title string,
	description string,
	msgTypeURL string,
) *RemoveMsgFeeProposal

func (*RemoveMsgFeeProposal) Descriptor

func (*RemoveMsgFeeProposal) Descriptor() ([]byte, []int)

func (*RemoveMsgFeeProposal) Equal

func (this *RemoveMsgFeeProposal) Equal(that interface{}) bool

func (*RemoveMsgFeeProposal) GetDescription

func (m *RemoveMsgFeeProposal) GetDescription() string

func (*RemoveMsgFeeProposal) GetMsgTypeUrl

func (m *RemoveMsgFeeProposal) GetMsgTypeUrl() string

func (*RemoveMsgFeeProposal) GetTitle

func (m *RemoveMsgFeeProposal) GetTitle() string

func (*RemoveMsgFeeProposal) Marshal

func (m *RemoveMsgFeeProposal) Marshal() (dAtA []byte, err error)

func (*RemoveMsgFeeProposal) MarshalTo

func (m *RemoveMsgFeeProposal) MarshalTo(dAtA []byte) (int, error)

func (*RemoveMsgFeeProposal) MarshalToSizedBuffer

func (m *RemoveMsgFeeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (RemoveMsgFeeProposal) ProposalRoute

func (rmbfp RemoveMsgFeeProposal) ProposalRoute() string

func (RemoveMsgFeeProposal) ProposalType

func (rmbfp RemoveMsgFeeProposal) ProposalType() string

func (*RemoveMsgFeeProposal) ProtoMessage

func (*RemoveMsgFeeProposal) ProtoMessage()

func (*RemoveMsgFeeProposal) Reset

func (m *RemoveMsgFeeProposal) Reset()

func (*RemoveMsgFeeProposal) Size

func (m *RemoveMsgFeeProposal) Size() (n int)

func (RemoveMsgFeeProposal) String

func (rmbfp RemoveMsgFeeProposal) String() string

func (*RemoveMsgFeeProposal) Unmarshal

func (m *RemoveMsgFeeProposal) Unmarshal(dAtA []byte) error

func (RemoveMsgFeeProposal) ValidateBasic

func (rmbfp RemoveMsgFeeProposal) ValidateBasic() error

func (*RemoveMsgFeeProposal) XXX_DiscardUnknown

func (m *RemoveMsgFeeProposal) XXX_DiscardUnknown()

func (*RemoveMsgFeeProposal) XXX_Marshal

func (m *RemoveMsgFeeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RemoveMsgFeeProposal) XXX_Merge

func (m *RemoveMsgFeeProposal) XXX_Merge(src proto.Message)

func (*RemoveMsgFeeProposal) XXX_Size

func (m *RemoveMsgFeeProposal) XXX_Size() int

func (*RemoveMsgFeeProposal) XXX_Unmarshal

func (m *RemoveMsgFeeProposal) XXX_Unmarshal(b []byte) error

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) CalculateTxFees

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) QueryAllMsgFees

type UpdateMsgFeeProposal

type UpdateMsgFeeProposal struct {
	Title         string     `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description   string     `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	MsgTypeUrl    string     `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
	AdditionalFee types.Coin `` /* 166-byte string literal not displayed */
}

UpdateMsgFeeProposal defines a governance proposal to update a current msg based fee

func NewUpdateMsgFeeProposal

func NewUpdateMsgFeeProposal(
	title string,
	description string,
	msg string,
	additionalFee sdk.Coin) *UpdateMsgFeeProposal

func (*UpdateMsgFeeProposal) Descriptor

func (*UpdateMsgFeeProposal) Descriptor() ([]byte, []int)

func (*UpdateMsgFeeProposal) Equal

func (this *UpdateMsgFeeProposal) Equal(that interface{}) bool

func (*UpdateMsgFeeProposal) GetAdditionalFee

func (m *UpdateMsgFeeProposal) GetAdditionalFee() types.Coin

func (*UpdateMsgFeeProposal) GetDescription

func (m *UpdateMsgFeeProposal) GetDescription() string

func (*UpdateMsgFeeProposal) GetMsgTypeUrl

func (m *UpdateMsgFeeProposal) GetMsgTypeUrl() string

func (*UpdateMsgFeeProposal) GetTitle

func (m *UpdateMsgFeeProposal) GetTitle() string

func (*UpdateMsgFeeProposal) Marshal

func (m *UpdateMsgFeeProposal) Marshal() (dAtA []byte, err error)

func (*UpdateMsgFeeProposal) MarshalTo

func (m *UpdateMsgFeeProposal) MarshalTo(dAtA []byte) (int, error)

func (*UpdateMsgFeeProposal) MarshalToSizedBuffer

func (m *UpdateMsgFeeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (UpdateMsgFeeProposal) ProposalRoute

func (umbfp UpdateMsgFeeProposal) ProposalRoute() string

func (UpdateMsgFeeProposal) ProposalType

func (umbfp UpdateMsgFeeProposal) ProposalType() string

func (*UpdateMsgFeeProposal) ProtoMessage

func (*UpdateMsgFeeProposal) ProtoMessage()

func (*UpdateMsgFeeProposal) Reset

func (m *UpdateMsgFeeProposal) Reset()

func (*UpdateMsgFeeProposal) Size

func (m *UpdateMsgFeeProposal) Size() (n int)

func (UpdateMsgFeeProposal) String

func (umbfp UpdateMsgFeeProposal) String() string

func (*UpdateMsgFeeProposal) Unmarshal

func (m *UpdateMsgFeeProposal) Unmarshal(dAtA []byte) error

func (UpdateMsgFeeProposal) ValidateBasic

func (umbfp UpdateMsgFeeProposal) ValidateBasic() error

func (*UpdateMsgFeeProposal) XXX_DiscardUnknown

func (m *UpdateMsgFeeProposal) XXX_DiscardUnknown()

func (*UpdateMsgFeeProposal) XXX_Marshal

func (m *UpdateMsgFeeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UpdateMsgFeeProposal) XXX_Merge

func (m *UpdateMsgFeeProposal) XXX_Merge(src proto.Message)

func (*UpdateMsgFeeProposal) XXX_Size

func (m *UpdateMsgFeeProposal) XXX_Size() int

func (*UpdateMsgFeeProposal) XXX_Unmarshal

func (m *UpdateMsgFeeProposal) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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