types

package
v1.16.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// EventTypeAssessCustomMsgFee is the event that is emitted when assess custom fee is submitted as msg
	EventTypeAssessCustomMsgFee string = "assess_custom_msg_fee"
	// KeyAttributeAmount is the key for the custom additional amount of fee
	KeyAttributeAmount string = "amount"
	// KeyAttributeRecipient is the key for the optional recipient of the request, if empty the full fee amount is sent to fee module
	KeyAttributeRecipient string = "recipient"
	// KeyAttributeName is the key for the optional name for assess custom fee
	KeyAttributeName string = "name"
	// KeyAttributeBips is the bips value for recipient
	KeyAttributeBips = "recipient_basis_points"
)
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"

	// CompositeKeyDelimiter is the delimiter of msgTypeUrl and recipient
	CompositeKeyDelimiter = "\n"
)
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"
	// ProposalTypeUpdateUsdConversionRate to update the usd conversion rate param
	ProposalTypeUpdateUsdConversionRate string = "UpdateUsdConversionRate"
	// ProposalTypeUpdateConversionFeeDenom to update the conversion rate denom
	ProposalTypeUpdateConversionFeeDenom string = "UpdateConversionFeeDenom"
)
View Source
const (

	// AssessCustomMsgFeeBips is the bips the recipient will get
	// This should be a message level data (present in TypeAssessCustomMsgFee = "assess_custom_msg_fee") i think so that it can be defined by the smart contract writer
	// or at the very least it can be a module param.
	// for now i am hard coding it to avoid breaking any clients and because of this ticket https://github.com/provenance-io/provenance/issues/1263
	AssessCustomMsgFeeBips = 10_000
)
View Source
const (
	DefaultMsgFeeBips = uint32(5_000)
)
View Source
const (
	UsdDenom string = "usd"
)

Variables

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

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 (
	// 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")
	ParamStoreKeyNhashPerUsdMil     = []byte("NhashPerUsdMil")
	ParamStoreKeyConversionFeeDenom = []byte("ConversionFeeDenom")
)
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 (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var DefaultNhashPerUsdMil = uint64(25_000_000)
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}
)

Functions

func DefaultFloorGasPrice

func DefaultFloorGasPrice() sdk.Coin

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.

func GetCompositeKey added in v1.11.0

func GetCompositeKey(msgType string, recipient string) string

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 RegisterMsgServer added in v1.11.0

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

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)

func SplitCoinByBips added in v1.13.0

func SplitCoinByBips(coin sdk.Coin, bips uint32) (recipientCoin sdk.Coin, feePayoutCoin sdk.Coin, err error)

SplitCoinByBips returns split to recipient and fee module based on basis points for recipient if bips set to 100bips recipient gets all the fees.

func SplitCompositeKey added in v1.11.0

func SplitCompositeKey(key string) (msgType, recipient string)

SplitCompositKey splits the composite key into msgType and recipient, if recipient is empty then it is for the fee module

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 {
	// propsal title
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// propsal description
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// type url of msg to add fee
	MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
	// additional fee for msg type
	AdditionalFee types.Coin `` /* 166-byte string literal not displayed */
	// optional recipient to recieve basis points
	Recipient string `protobuf:"bytes,5,opt,name=recipient,proto3" json:"recipient,omitempty"`
	// basis points to use when recipient is present (1 - 10,000)
	RecipientBasisPoints string `protobuf:"bytes,6,opt,name=recipient_basis_points,json=recipientBasisPoints,proto3" json:"recipient_basis_points,omitempty"`
}

AddMsgFeeProposal defines a governance proposal to add additional msg based fee

func NewAddMsgFeeProposal

func NewAddMsgFeeProposal(
	title string,
	description string,
	msg string,
	additionalFee sdk.Coin,
	recipient string,
	recipientBasisPoints string,
) *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) GetRecipient added in v1.13.0

func (m *AddMsgFeeProposal) GetRecipient() string

func (*AddMsgFeeProposal) GetRecipientBasisPoints added in v1.13.0

func (m *AddMsgFeeProposal) GetRecipientBasisPoints() 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 (p AddMsgFeeProposal) ProposalRoute() string

func (AddMsgFeeProposal) ProposalType

func (p 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 (m *AddMsgFeeProposal) String() string

func (*AddMsgFeeProposal) Unmarshal

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

func (AddMsgFeeProposal) ValidateBasic

func (p 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 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"`
}

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"`
	Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,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) GetRecipient added in v1.11.0

func (m *EventMsgFee) GetRecipient() 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.Coins) *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 MsgAssessCustomMsgFeeRequest added in v1.11.0

type MsgAssessCustomMsgFeeRequest struct {
	Name                 string     `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Amount               types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"`
	Recipient            string     `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"`
	From                 string     `protobuf:"bytes,4,opt,name=from,proto3" json:"from,omitempty"`
	RecipientBasisPoints string     `protobuf:"bytes,5,opt,name=recipient_basis_points,json=recipientBasisPoints,proto3" json:"recipient_basis_points,omitempty"`
}

MsgAssessCustomMsgFeeRequest defines an sdk.Msg type

func NewMsgAssessCustomMsgFeeRequest added in v1.11.0

func NewMsgAssessCustomMsgFeeRequest(
	name string,
	amount sdk.Coin,
	recipient string,
	from string,
	recipientBasisPoints string,
) MsgAssessCustomMsgFeeRequest

func (*MsgAssessCustomMsgFeeRequest) Descriptor added in v1.11.0

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

func (MsgAssessCustomMsgFeeRequest) GetBips added in v1.14.0

func (msg MsgAssessCustomMsgFeeRequest) GetBips() (uint32, error)

GetBips converts the msg RecipientBasisPoints to a uint32 basis point value 0 - 10,000

func (MsgAssessCustomMsgFeeRequest) GetSigners added in v1.11.0

func (msg MsgAssessCustomMsgFeeRequest) GetSigners() []sdk.AccAddress

GetSignBytes encodes the message for signing

func (*MsgAssessCustomMsgFeeRequest) Marshal added in v1.11.0

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

func (*MsgAssessCustomMsgFeeRequest) MarshalTo added in v1.11.0

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

func (*MsgAssessCustomMsgFeeRequest) MarshalToSizedBuffer added in v1.11.0

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

func (*MsgAssessCustomMsgFeeRequest) ProtoMessage added in v1.11.0

func (*MsgAssessCustomMsgFeeRequest) ProtoMessage()

func (*MsgAssessCustomMsgFeeRequest) Reset added in v1.11.0

func (m *MsgAssessCustomMsgFeeRequest) Reset()

func (*MsgAssessCustomMsgFeeRequest) Size added in v1.11.0

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

func (*MsgAssessCustomMsgFeeRequest) String added in v1.11.0

func (*MsgAssessCustomMsgFeeRequest) Unmarshal added in v1.11.0

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

func (MsgAssessCustomMsgFeeRequest) ValidateBasic added in v1.11.0

func (msg MsgAssessCustomMsgFeeRequest) ValidateBasic() error

ValidateBasic runs stateless validation checks on the message.

func (*MsgAssessCustomMsgFeeRequest) XXX_DiscardUnknown added in v1.11.0

func (m *MsgAssessCustomMsgFeeRequest) XXX_DiscardUnknown()

func (*MsgAssessCustomMsgFeeRequest) XXX_Marshal added in v1.11.0

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

func (*MsgAssessCustomMsgFeeRequest) XXX_Merge added in v1.11.0

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

func (*MsgAssessCustomMsgFeeRequest) XXX_Size added in v1.11.0

func (m *MsgAssessCustomMsgFeeRequest) XXX_Size() int

func (*MsgAssessCustomMsgFeeRequest) XXX_Unmarshal added in v1.11.0

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

type MsgAssessCustomMsgFeeResponse added in v1.11.0

type MsgAssessCustomMsgFeeResponse struct {
}

MsgAssessCustomMsgFeeResponse defines the Msg/AssessCustomMsgFeee response type.

func (*MsgAssessCustomMsgFeeResponse) Descriptor added in v1.11.0

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

func (*MsgAssessCustomMsgFeeResponse) Marshal added in v1.11.0

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

func (*MsgAssessCustomMsgFeeResponse) MarshalTo added in v1.11.0

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

func (*MsgAssessCustomMsgFeeResponse) MarshalToSizedBuffer added in v1.11.0

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

func (*MsgAssessCustomMsgFeeResponse) ProtoMessage added in v1.11.0

func (*MsgAssessCustomMsgFeeResponse) ProtoMessage()

func (*MsgAssessCustomMsgFeeResponse) Reset added in v1.11.0

func (m *MsgAssessCustomMsgFeeResponse) Reset()

func (*MsgAssessCustomMsgFeeResponse) Size added in v1.11.0

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

func (*MsgAssessCustomMsgFeeResponse) String added in v1.11.0

func (*MsgAssessCustomMsgFeeResponse) Unmarshal added in v1.11.0

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

func (*MsgAssessCustomMsgFeeResponse) XXX_DiscardUnknown added in v1.11.0

func (m *MsgAssessCustomMsgFeeResponse) XXX_DiscardUnknown()

func (*MsgAssessCustomMsgFeeResponse) XXX_Marshal added in v1.11.0

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

func (*MsgAssessCustomMsgFeeResponse) XXX_Merge added in v1.11.0

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

func (*MsgAssessCustomMsgFeeResponse) XXX_Size added in v1.11.0

func (m *MsgAssessCustomMsgFeeResponse) XXX_Size() int

func (*MsgAssessCustomMsgFeeResponse) XXX_Unmarshal added in v1.11.0

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

type MsgClient added in v1.11.0

type MsgClient interface {
	// AssessCustomMsgFee endpoint executes the additional fee charges.
	// This will only emit the event and not persist it to the keeper.  Fees are handled with the custom msg fee handlers
	// Use Case: smart contracts will be able to charge additional fees and direct partial funds to specified recipient
	// for executing contracts
	AssessCustomMsgFee(ctx context.Context, in *MsgAssessCustomMsgFeeRequest, opts ...grpc.CallOption) (*MsgAssessCustomMsgFeeResponse, error)
}

MsgClient is the client API for Msg service.

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

func NewMsgClient added in v1.11.0

func NewMsgClient(cc grpc1.ClientConn) MsgClient

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"`
	Recipient            string     `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"`
	RecipientBasisPoints uint32     `protobuf:"varint,4,opt,name=recipient_basis_points,json=recipientBasisPoints,proto3" json:"recipient_basis_points,omitempty"`
}

MsgFee is the core of what gets stored on the blockchain it consists of four parts 1. the msg type url, i.e. /cosmos.bank.v1beta1.MsgSend 2. minimum additional fees(can be of any denom) 3. optional recipient of fee based on `recipient_basis_points` 4. if recipient is declared they will recieve the basis points of the fee (0-10,000)

func NewMsgFee

func NewMsgFee(msgTypeURL string, additionalFee sdk.Coin, recipient string, recipientBasisPoints uint32) 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) GetRecipient added in v1.13.0

func (m *MsgFee) GetRecipient() string

func (*MsgFee) GetRecipientBasisPoints added in v1.13.0

func (m *MsgFee) GetRecipientBasisPoints() uint32

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) Validate added in v1.13.0

func (msg *MsgFee) Validate() 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 MsgFeesDistribution added in v1.13.0

type MsgFeesDistribution struct {
	// TotalAdditionalFees is the total of all additional fees.
	TotalAdditionalFees sdk.Coins
	// AdditionalModuleFees is just the additional fees to send to the module.
	AdditionalModuleFees sdk.Coins
	// RecipientDistributions is just the additional specific distribution fees.
	RecipientDistributions map[string]sdk.Coins
}

MsgFeesDistribution holds information on message based fees that should be collected.

func (*MsgFeesDistribution) Increase added in v1.13.0

func (d *MsgFeesDistribution) Increase(coin sdk.Coin, bips uint32, recipient string) error

Increase adds the provided coin to be distributed (as long as it's positive). If there's no recipient, it all goes to the module. Otherwise, it's split using bips between recipient and module.

type MsgFeesKeeper

type MsgFeesKeeper interface {
	GetMsgFee(ctx sdk.Context, msgType string) (*MsgFee, error)
	GetFeeCollectorName() string
	DeductFeesDistributions(bankKeeper bankkeeper.Keeper, ctx sdk.Context, acc authtypes.AccountI, remainingFees sdk.Coins, fees map[string]sdk.Coins) error
	GetFloorGasPrice(ctx sdk.Context) sdk.Coin
	GetNhashPerUsdMil(ctx sdk.Context) uint64
	ConvertDenomToHash(ctx sdk.Context, coin sdk.Coin) (sdk.Coin, error)
	CalculateAdditionalFeesToBePaid(ctx sdk.Context, msgs ...sdk.Msg) (MsgFeesDistribution, error)
}

MsgFeesKeeper for additional msg fees.

type MsgServer added in v1.11.0

type MsgServer interface {
	// AssessCustomMsgFee endpoint executes the additional fee charges.
	// This will only emit the event and not persist it to the keeper.  Fees are handled with the custom msg fee handlers
	// Use Case: smart contracts will be able to charge additional fees and direct partial funds to specified recipient
	// for executing contracts
	AssessCustomMsgFee(context.Context, *MsgAssessCustomMsgFeeRequest) (*MsgAssessCustomMsgFeeResponse, error)
}

MsgServer is the server API for Msg service.

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"`
	// total nhash per usd mil for converting usd to nhash
	NhashPerUsdMil uint64 `protobuf:"varint,3,opt,name=nhash_per_usd_mil,json=nhashPerUsdMil,proto3" json:"nhash_per_usd_mil,omitempty"`
	// conversion fee denom is the denom usd is converted to
	ConversionFeeDenom string `protobuf:"bytes,4,opt,name=conversion_fee_denom,json=conversionFeeDenom,proto3" json:"conversion_fee_denom,omitempty"`
}

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,
	nhashPerUsdMil uint64,
	conversionFeeDenom string,
) 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) GetConversionFeeDenom added in v1.13.0

func (m *Params) GetConversionFeeDenom() string

func (*Params) GetFloorGasPrice

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

func (*Params) GetNhashPerUsdMil added in v1.11.0

func (m *Params) GetNhashPerUsdMil() uint64

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 (m *Params) String() string

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 {
	// propsal title
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// propsal description
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// type url of msg fee to remove
	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 (p RemoveMsgFeeProposal) ProposalRoute() string

func (RemoveMsgFeeProposal) ProposalType

func (p 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 (m *RemoveMsgFeeProposal) String() string

func (*RemoveMsgFeeProposal) Unmarshal

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

func (RemoveMsgFeeProposal) ValidateBasic

func (p 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 UnimplementedMsgServer added in v1.11.0

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) AssessCustomMsgFee added in v1.11.0

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) CalculateTxFees

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) QueryAllMsgFees

type UpdateConversionFeeDenomProposal added in v1.13.0

type UpdateConversionFeeDenomProposal 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"`
	// conversion_fee_denom is the denom that usd will be converted to
	ConversionFeeDenom string `protobuf:"bytes,4,opt,name=conversion_fee_denom,json=conversionFeeDenom,proto3" json:"conversion_fee_denom,omitempty"`
}

UpdateConversionFeeDenomProposal defines a governance proposal to update the msg fee conversion denom

func NewUpdateConversionFeeDenomProposal added in v1.13.0

func NewUpdateConversionFeeDenomProposal(
	title string,
	description string,
	converstionFeeDenom string,
) *UpdateConversionFeeDenomProposal

func (*UpdateConversionFeeDenomProposal) Descriptor added in v1.13.0

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

func (*UpdateConversionFeeDenomProposal) Equal added in v1.13.0

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

func (*UpdateConversionFeeDenomProposal) GetConversionFeeDenom added in v1.13.0

func (m *UpdateConversionFeeDenomProposal) GetConversionFeeDenom() string

func (*UpdateConversionFeeDenomProposal) GetDescription added in v1.13.0

func (m *UpdateConversionFeeDenomProposal) GetDescription() string

func (*UpdateConversionFeeDenomProposal) GetTitle added in v1.13.0

func (*UpdateConversionFeeDenomProposal) Marshal added in v1.13.0

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

func (*UpdateConversionFeeDenomProposal) MarshalTo added in v1.13.0

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

func (*UpdateConversionFeeDenomProposal) MarshalToSizedBuffer added in v1.13.0

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

func (UpdateConversionFeeDenomProposal) ProposalRoute added in v1.13.0

func (p UpdateConversionFeeDenomProposal) ProposalRoute() string

func (UpdateConversionFeeDenomProposal) ProposalType added in v1.13.0

func (p UpdateConversionFeeDenomProposal) ProposalType() string

func (*UpdateConversionFeeDenomProposal) ProtoMessage added in v1.13.0

func (*UpdateConversionFeeDenomProposal) ProtoMessage()

func (*UpdateConversionFeeDenomProposal) Reset added in v1.13.0

func (*UpdateConversionFeeDenomProposal) Size added in v1.13.0

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

func (*UpdateConversionFeeDenomProposal) String added in v1.13.0

func (*UpdateConversionFeeDenomProposal) Unmarshal added in v1.13.0

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

func (UpdateConversionFeeDenomProposal) ValidateBasic added in v1.13.0

func (p UpdateConversionFeeDenomProposal) ValidateBasic() error

func (*UpdateConversionFeeDenomProposal) XXX_DiscardUnknown added in v1.13.0

func (m *UpdateConversionFeeDenomProposal) XXX_DiscardUnknown()

func (*UpdateConversionFeeDenomProposal) XXX_Marshal added in v1.13.0

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

func (*UpdateConversionFeeDenomProposal) XXX_Merge added in v1.13.0

func (*UpdateConversionFeeDenomProposal) XXX_Size added in v1.13.0

func (m *UpdateConversionFeeDenomProposal) XXX_Size() int

func (*UpdateConversionFeeDenomProposal) XXX_Unmarshal added in v1.13.0

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

type UpdateMsgFeeProposal

type UpdateMsgFeeProposal struct {
	// propsal title
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// propsal description
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// type url of msg to update fee
	MsgTypeUrl string `protobuf:"bytes,3,opt,name=msg_type_url,json=msgTypeUrl,proto3" json:"msg_type_url,omitempty"`
	// additional fee for msg type
	AdditionalFee types.Coin `` /* 144-byte string literal not displayed */
	// optional recipient to recieve basis points
	Recipient string `protobuf:"bytes,5,opt,name=recipient,proto3" json:"recipient,omitempty"`
	// basis points to use when recipient is present (1 - 10,000)
	RecipientBasisPoints string `protobuf:"bytes,6,opt,name=recipient_basis_points,json=recipientBasisPoints,proto3" json:"recipient_basis_points,omitempty"`
}

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,
	recipient string,
	recipientBasisPoints string,
) *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) GetRecipient added in v1.13.0

func (m *UpdateMsgFeeProposal) GetRecipient() string

func (*UpdateMsgFeeProposal) GetRecipientBasisPoints added in v1.13.0

func (m *UpdateMsgFeeProposal) GetRecipientBasisPoints() 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 (p UpdateMsgFeeProposal) ProposalRoute() string

func (UpdateMsgFeeProposal) ProposalType

func (p 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 (m *UpdateMsgFeeProposal) String() string

func (*UpdateMsgFeeProposal) Unmarshal

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

func (UpdateMsgFeeProposal) ValidateBasic

func (p 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

type UpdateNhashPerUsdMilProposal added in v1.11.0

type UpdateNhashPerUsdMilProposal 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"`
	// nhash_per_usd_mil is number of nhash per usd mil
	NhashPerUsdMil uint64 `protobuf:"varint,3,opt,name=nhash_per_usd_mil,json=nhashPerUsdMil,proto3" json:"nhash_per_usd_mil,omitempty"`
}

UpdateNhashPerUsdMilProposal defines a governance proposal to update the nhash per usd mil param

func NewUpdateNhashPerUsdMilProposal added in v1.11.0

func NewUpdateNhashPerUsdMilProposal(
	title string,
	description string,
	nhashPerUsdMil uint64,
) *UpdateNhashPerUsdMilProposal

func (*UpdateNhashPerUsdMilProposal) Descriptor added in v1.11.0

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

func (*UpdateNhashPerUsdMilProposal) Equal added in v1.11.0

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

func (*UpdateNhashPerUsdMilProposal) GetDescription added in v1.11.0

func (m *UpdateNhashPerUsdMilProposal) GetDescription() string

func (*UpdateNhashPerUsdMilProposal) GetNhashPerUsdMil added in v1.11.0

func (m *UpdateNhashPerUsdMilProposal) GetNhashPerUsdMil() uint64

func (*UpdateNhashPerUsdMilProposal) GetTitle added in v1.11.0

func (m *UpdateNhashPerUsdMilProposal) GetTitle() string

func (*UpdateNhashPerUsdMilProposal) Marshal added in v1.11.0

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

func (*UpdateNhashPerUsdMilProposal) MarshalTo added in v1.11.0

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

func (*UpdateNhashPerUsdMilProposal) MarshalToSizedBuffer added in v1.11.0

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

func (UpdateNhashPerUsdMilProposal) ProposalRoute added in v1.11.0

func (p UpdateNhashPerUsdMilProposal) ProposalRoute() string

func (UpdateNhashPerUsdMilProposal) ProposalType added in v1.11.0

func (p UpdateNhashPerUsdMilProposal) ProposalType() string

func (*UpdateNhashPerUsdMilProposal) ProtoMessage added in v1.11.0

func (*UpdateNhashPerUsdMilProposal) ProtoMessage()

func (*UpdateNhashPerUsdMilProposal) Reset added in v1.11.0

func (m *UpdateNhashPerUsdMilProposal) Reset()

func (*UpdateNhashPerUsdMilProposal) Size added in v1.11.0

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

func (*UpdateNhashPerUsdMilProposal) String added in v1.11.0

func (*UpdateNhashPerUsdMilProposal) Unmarshal added in v1.11.0

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

func (UpdateNhashPerUsdMilProposal) ValidateBasic added in v1.11.0

func (p UpdateNhashPerUsdMilProposal) ValidateBasic() error

func (*UpdateNhashPerUsdMilProposal) XXX_DiscardUnknown added in v1.11.0

func (m *UpdateNhashPerUsdMilProposal) XXX_DiscardUnknown()

func (*UpdateNhashPerUsdMilProposal) XXX_Marshal added in v1.11.0

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

func (*UpdateNhashPerUsdMilProposal) XXX_Merge added in v1.11.0

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

func (*UpdateNhashPerUsdMilProposal) XXX_Size added in v1.11.0

func (m *UpdateNhashPerUsdMilProposal) XXX_Size() int

func (*UpdateNhashPerUsdMilProposal) XXX_Unmarshal added in v1.11.0

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

Jump to

Keyboard shortcuts

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