types

package
v23.0.10-iavl-v1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 37 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   = "txfees"
	KeySeparator = "|"

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

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

	// FeeCollectorName the module account name for the fee collector account address.
	FeeCollectorName = "fee_collector"

	// FeeCollectorForStakingRewardsName the module account name for the alt fee collector account address (used for auto-swapping non-OSMO tx fees).
	// These fees go to the staking rewards pool.
	FeeCollectorForStakingRewardsName = "non_native_fee_collector"

	// FeeCollectorForCommunityPoolName the module account name for the alt fee collector account address (used for auto-swapping non-OSMO tx fees).
	// These fees go to the community pool.
	FeeCollectorForCommunityPoolName = "non_native_fee_collector_community_pool"

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName
)
View Source
const (
	ProposalTypeUpdateFeeToken = "UpdateFeeToken"
)

Variables

View Source
var (
	ErrNoBaseDenom     = errorsmod.Register(ModuleName, 1, "no base denom was set")
	ErrTooManyFeeCoins = errorsmod.Register(ModuleName, 2, "too many fee coins. only accepts fees in one denom")
	ErrInvalidFeeToken = errorsmod.Register(ModuleName, 3, "invalid fee token")
)

x/txfees module errors.

View Source
var (
	ErrInvalidLengthFeetoken        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowFeetoken          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupFeetoken = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ErrInvalidLengthGov        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGov          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	BaseDenomKey                       = []byte("base_denom")
	FeeTokensStorePrefix               = []byte("fee_tokens")
	KeyTxFeeProtorevTracker            = []byte("txfee_protorev_tracker")
	KeyTxFeeProtorevTrackerStartHeight = []byte("txfee_protorev_tracker_start_height")
)
View Source
var (
	DefaultMinGasPriceForHighGasTx = osmomath.ZeroDec()
	DefaultMaxGasWantedPerTx       = uint64(30 * 1000 * 1000)
	DefaultHighGasTxThreshold      = uint64(2.5 * 1000 * 1000)
	DefaultMempool1559Enabled      = true
)
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 (
	// takerfee_failed_staking_reward_update
	//
	// counter that is increased if taker fee staking distribution fails
	//
	// Has the following labels:
	// * coins - the coins that fail to be sent.
	// * err - the error occurred
	TakerFeeFailedNativeRewardUpdateMetricName = formatTxFeesMetricName("takerfee_failed_staking_reward_update")
	// txfees_takerfee_failed_community_pool_update
	//
	// counter that is increased if taker fee distribution to community pool fails
	// Has the following labels:
	// * coins - the coins that fail to be sent.
	// * err - the error occurred
	TakerFeeFailedCommunityPoolUpdateMetricName = formatTxFeesMetricName("takerfee_failed_community_pool_update")
	// txfees_takerfee_swap_failed
	//
	// counter that is increased if taker fee swap to native denom fails
	//
	// Has the following labels:
	// * coin_in - the coin being swapped in.
	// * pool_id - the pool_id being swapped against.
	// * err - the error occurred
	TakerFeeSwapFailedMetricName = formatTxFeesMetricName("takerfee_swap_failed")
	// txfees_takerfee_no_skip_route
	//
	// counter that is increased if taker fee logic fails to find a route to swap between two denoms
	// Has the following labels:
	// * base_denom - the base denom to swap to.
	// * match_denom - the match denom to swap to.
	// * err - the error occurred
	TakerFeeNoSkipRouteMetricName = formatTxFeesMetricName("takerfee_no_skip_route")
)
View Source
var ConsensusMinFee osmomath.Dec = osmomath.NewDecWithPrec(25, 4)

ConsensusMinFee is a governance set parameter from prop 354 (https://www.mintscan.io/osmosis/proposals/354) Its intended to be .0025 uosmo / gas

View Source
var DefaultMinGasPriceForArbitrageTx = osmomath.ZeroDec()

DefaultMinGasPriceForArbitrageTx represents minimum gas price for arbitrage transactions.

View Source
var GlobalMempool1559Enabled = false
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	GetModuleAddress(moduleName string) sdk.AccAddress
}

AccountKeeper defines the contract needed for AccountKeeper related APIs. Interface provides support to use non-sdk AccountKeeper for AnteHandler's decorators.

type BankKeeper

type BankKeeper interface {
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
	IsSendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error
	SendCoins(ctx sdk.Context, from, to sdk.AccAddress, amt sdk.Coins) error
}

BankKeeper defines the contract needed for supply related APIs (noalias)

type ConsensusKeeper

type ConsensusKeeper interface {
	GetParamsNoUnmarshal(ctx sdk.Context) []byte
	UnmarshalParamBytes(ctx sdk.Context, bz []byte) (*tmproto.ConsensusParams, error)
}

type DistributionKeeper

type DistributionKeeper interface {
	FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
}

type FeeToken

type FeeToken struct {
	Denom  string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"`
	PoolID uint64 `protobuf:"varint,2,opt,name=poolID,proto3" json:"poolID,omitempty" yaml:"pool_id"`
}

FeeToken is a struct that specifies a coin denom, and pool ID pair. This marks the token as eligible for use as a tx fee asset in Osmosis. Its price in osmo is derived through looking at the provided pool ID. The pool ID must have osmo as one of its assets.

func (*FeeToken) Descriptor

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

func (*FeeToken) Equal

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

func (*FeeToken) GetDenom

func (m *FeeToken) GetDenom() string

func (*FeeToken) GetPoolID

func (m *FeeToken) GetPoolID() uint64

func (*FeeToken) Marshal

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

func (*FeeToken) MarshalTo

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

func (*FeeToken) MarshalToSizedBuffer

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

func (*FeeToken) ProtoMessage

func (*FeeToken) ProtoMessage()

func (*FeeToken) Reset

func (m *FeeToken) Reset()

func (*FeeToken) Size

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

func (*FeeToken) String

func (m *FeeToken) String() string

func (*FeeToken) Unmarshal

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

func (*FeeToken) XXX_DiscardUnknown

func (m *FeeToken) XXX_DiscardUnknown()

func (*FeeToken) XXX_Marshal

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

func (*FeeToken) XXX_Merge

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

func (*FeeToken) XXX_Size

func (m *FeeToken) XXX_Size() int

func (*FeeToken) XXX_Unmarshal

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

type FeegrantKeeper

type FeegrantKeeper interface {
	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 {
	Basedenom string     `protobuf:"bytes,1,opt,name=basedenom,proto3" json:"basedenom,omitempty"`
	Feetokens []FeeToken `protobuf:"bytes,2,rep,name=feetokens,proto3" json:"feetokens"`
}

GenesisState defines the txfees module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default txfee genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetBasedenom

func (m *GenesisState) GetBasedenom() string

func (*GenesisState) GetFeetokens

func (m *GenesisState) GetFeetokens() []FeeToken

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 (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure. It does not verify that the corresponding pool IDs actually exist. This is done in InitGenesis.

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 MempoolFeeOptions

type MempoolFeeOptions struct {
	MaxGasWantedPerTx         uint64
	MinGasPriceForArbitrageTx osmomath.Dec
	HighGasTxThreshold        uint64
	MinGasPriceForHighGasTx   osmomath.Dec
	Mempool1559Enabled        bool
}

func NewDefaultMempoolFeeOptions

func NewDefaultMempoolFeeOptions() MempoolFeeOptions

func NewMempoolFeeOptions

func NewMempoolFeeOptions(opts servertypes.AppOptions) MempoolFeeOptions

type PoolManager

type PoolManager interface {
	RouteExactAmountIn(
		ctx sdk.Context,
		sender sdk.AccAddress,
		routes []poolmanagertypes.SwapAmountInRoute,
		tokenIn sdk.Coin,
		tokenOutMinAmount osmomath.Int) (tokenOutAmount osmomath.Int, err error)

	SwapExactAmountIn(
		ctx sdk.Context,
		sender sdk.AccAddress,
		poolId uint64,
		tokenIn sdk.Coin,
		tokenOutDenom string,
		tokenOutMinAmount osmomath.Int,
	) (osmomath.Int, error)

	SwapExactAmountInNoTakerFee(
		ctx sdk.Context,
		sender sdk.AccAddress,
		poolId uint64,
		tokenIn sdk.Coin,
		tokenOutDenom string,
		tokenOutMinAmount osmomath.Int,
	) (osmomath.Int, error)

	GetParams(ctx sdk.Context) (params poolmanagertypes.Params)

	RouteCalculateSpotPrice(
		ctx sdk.Context,
		poolId uint64,
		quoteAssetDenom string,
		baseAssetDenom string,
	) (price osmomath.BigDec, err error)
}

PoolManager defines the contract needed for swap related APIs.

type ProtorevKeeper

type ProtorevKeeper interface {
	GetPoolForDenomPairNoOrder(ctx sdk.Context, baseDenom, denomToMatch string) (uint64, error)
}

type QueryBaseDenomRequest

type QueryBaseDenomRequest struct {
}

func (*QueryBaseDenomRequest) Descriptor

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

func (*QueryBaseDenomRequest) Marshal

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

func (*QueryBaseDenomRequest) MarshalTo

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

func (*QueryBaseDenomRequest) MarshalToSizedBuffer

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

func (*QueryBaseDenomRequest) ProtoMessage

func (*QueryBaseDenomRequest) ProtoMessage()

func (*QueryBaseDenomRequest) Reset

func (m *QueryBaseDenomRequest) Reset()

func (*QueryBaseDenomRequest) Size

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

func (*QueryBaseDenomRequest) String

func (m *QueryBaseDenomRequest) String() string

func (*QueryBaseDenomRequest) Unmarshal

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

func (*QueryBaseDenomRequest) XXX_DiscardUnknown

func (m *QueryBaseDenomRequest) XXX_DiscardUnknown()

func (*QueryBaseDenomRequest) XXX_Marshal

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

func (*QueryBaseDenomRequest) XXX_Merge

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

func (*QueryBaseDenomRequest) XXX_Size

func (m *QueryBaseDenomRequest) XXX_Size() int

func (*QueryBaseDenomRequest) XXX_Unmarshal

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

type QueryBaseDenomResponse

type QueryBaseDenomResponse struct {
	BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty" yaml:"base_denom"`
}

func (*QueryBaseDenomResponse) Descriptor

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

func (*QueryBaseDenomResponse) GetBaseDenom

func (m *QueryBaseDenomResponse) GetBaseDenom() string

func (*QueryBaseDenomResponse) Marshal

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

func (*QueryBaseDenomResponse) MarshalTo

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

func (*QueryBaseDenomResponse) MarshalToSizedBuffer

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

func (*QueryBaseDenomResponse) ProtoMessage

func (*QueryBaseDenomResponse) ProtoMessage()

func (*QueryBaseDenomResponse) Reset

func (m *QueryBaseDenomResponse) Reset()

func (*QueryBaseDenomResponse) Size

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

func (*QueryBaseDenomResponse) String

func (m *QueryBaseDenomResponse) String() string

func (*QueryBaseDenomResponse) Unmarshal

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

func (*QueryBaseDenomResponse) XXX_DiscardUnknown

func (m *QueryBaseDenomResponse) XXX_DiscardUnknown()

func (*QueryBaseDenomResponse) XXX_Marshal

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

func (*QueryBaseDenomResponse) XXX_Merge

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

func (*QueryBaseDenomResponse) XXX_Size

func (m *QueryBaseDenomResponse) XXX_Size() int

func (*QueryBaseDenomResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// FeeTokens returns a list of all the whitelisted fee tokens and their
	// corresponding pools. It does not include the BaseDenom, which has its own
	// query endpoint
	FeeTokens(ctx context.Context, in *QueryFeeTokensRequest, opts ...grpc.CallOption) (*QueryFeeTokensResponse, error)
	// DenomSpotPrice returns all spot prices by each registered token denom.
	DenomSpotPrice(ctx context.Context, in *QueryDenomSpotPriceRequest, opts ...grpc.CallOption) (*QueryDenomSpotPriceResponse, error)
	// Returns the poolID for a specified denom input.
	DenomPoolId(ctx context.Context, in *QueryDenomPoolIdRequest, opts ...grpc.CallOption) (*QueryDenomPoolIdResponse, error)
	// Returns a list of all base denom tokens and their corresponding pools.
	BaseDenom(ctx context.Context, in *QueryBaseDenomRequest, opts ...grpc.CallOption) (*QueryBaseDenomResponse, error)
	// Returns a list of all base denom tokens and their corresponding pools.
	GetEipBaseFee(ctx context.Context, in *QueryEipBaseFeeRequest, opts ...grpc.CallOption) (*QueryEipBaseFeeResponse, 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 QueryDenomPoolIdRequest

type QueryDenomPoolIdRequest struct {
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"`
}

func (*QueryDenomPoolIdRequest) Descriptor

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

func (*QueryDenomPoolIdRequest) GetDenom

func (m *QueryDenomPoolIdRequest) GetDenom() string

func (*QueryDenomPoolIdRequest) Marshal

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

func (*QueryDenomPoolIdRequest) MarshalTo

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

func (*QueryDenomPoolIdRequest) MarshalToSizedBuffer

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

func (*QueryDenomPoolIdRequest) ProtoMessage

func (*QueryDenomPoolIdRequest) ProtoMessage()

func (*QueryDenomPoolIdRequest) Reset

func (m *QueryDenomPoolIdRequest) Reset()

func (*QueryDenomPoolIdRequest) Size

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

func (*QueryDenomPoolIdRequest) String

func (m *QueryDenomPoolIdRequest) String() string

func (*QueryDenomPoolIdRequest) Unmarshal

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

func (*QueryDenomPoolIdRequest) XXX_DiscardUnknown

func (m *QueryDenomPoolIdRequest) XXX_DiscardUnknown()

func (*QueryDenomPoolIdRequest) XXX_Marshal

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

func (*QueryDenomPoolIdRequest) XXX_Merge

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

func (*QueryDenomPoolIdRequest) XXX_Size

func (m *QueryDenomPoolIdRequest) XXX_Size() int

func (*QueryDenomPoolIdRequest) XXX_Unmarshal

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

type QueryDenomPoolIdResponse

type QueryDenomPoolIdResponse struct {
	PoolID uint64 `protobuf:"varint,1,opt,name=poolID,proto3" json:"poolID,omitempty" yaml:"pool_id"`
}

func (*QueryDenomPoolIdResponse) Descriptor

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

func (*QueryDenomPoolIdResponse) GetPoolID

func (m *QueryDenomPoolIdResponse) GetPoolID() uint64

func (*QueryDenomPoolIdResponse) Marshal

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

func (*QueryDenomPoolIdResponse) MarshalTo

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

func (*QueryDenomPoolIdResponse) MarshalToSizedBuffer

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

func (*QueryDenomPoolIdResponse) ProtoMessage

func (*QueryDenomPoolIdResponse) ProtoMessage()

func (*QueryDenomPoolIdResponse) Reset

func (m *QueryDenomPoolIdResponse) Reset()

func (*QueryDenomPoolIdResponse) Size

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

func (*QueryDenomPoolIdResponse) String

func (m *QueryDenomPoolIdResponse) String() string

func (*QueryDenomPoolIdResponse) Unmarshal

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

func (*QueryDenomPoolIdResponse) XXX_DiscardUnknown

func (m *QueryDenomPoolIdResponse) XXX_DiscardUnknown()

func (*QueryDenomPoolIdResponse) XXX_Marshal

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

func (*QueryDenomPoolIdResponse) XXX_Merge

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

func (*QueryDenomPoolIdResponse) XXX_Size

func (m *QueryDenomPoolIdResponse) XXX_Size() int

func (*QueryDenomPoolIdResponse) XXX_Unmarshal

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

type QueryDenomSpotPriceRequest

type QueryDenomSpotPriceRequest struct {
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"`
}

QueryDenomSpotPriceRequest defines grpc request structure for querying spot price for the specified tx fee denom

func (*QueryDenomSpotPriceRequest) Descriptor

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

func (*QueryDenomSpotPriceRequest) GetDenom

func (m *QueryDenomSpotPriceRequest) GetDenom() string

func (*QueryDenomSpotPriceRequest) Marshal

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

func (*QueryDenomSpotPriceRequest) MarshalTo

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

func (*QueryDenomSpotPriceRequest) MarshalToSizedBuffer

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

func (*QueryDenomSpotPriceRequest) ProtoMessage

func (*QueryDenomSpotPriceRequest) ProtoMessage()

func (*QueryDenomSpotPriceRequest) Reset

func (m *QueryDenomSpotPriceRequest) Reset()

func (*QueryDenomSpotPriceRequest) Size

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

func (*QueryDenomSpotPriceRequest) String

func (m *QueryDenomSpotPriceRequest) String() string

func (*QueryDenomSpotPriceRequest) Unmarshal

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

func (*QueryDenomSpotPriceRequest) XXX_DiscardUnknown

func (m *QueryDenomSpotPriceRequest) XXX_DiscardUnknown()

func (*QueryDenomSpotPriceRequest) XXX_Marshal

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

func (*QueryDenomSpotPriceRequest) XXX_Merge

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

func (*QueryDenomSpotPriceRequest) XXX_Size

func (m *QueryDenomSpotPriceRequest) XXX_Size() int

func (*QueryDenomSpotPriceRequest) XXX_Unmarshal

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

type QueryDenomSpotPriceResponse

type QueryDenomSpotPriceResponse struct {
	PoolID    uint64                      `protobuf:"varint,1,opt,name=poolID,proto3" json:"poolID,omitempty" yaml:"pool_id"`
	SpotPrice cosmossdk_io_math.LegacyDec `` /* 135-byte string literal not displayed */
}

QueryDenomSpotPriceRequest defines grpc response structure for querying spot price for the specified tx fee denom

func (*QueryDenomSpotPriceResponse) Descriptor

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

func (*QueryDenomSpotPriceResponse) GetPoolID

func (m *QueryDenomSpotPriceResponse) GetPoolID() uint64

func (*QueryDenomSpotPriceResponse) Marshal

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

func (*QueryDenomSpotPriceResponse) MarshalTo

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

func (*QueryDenomSpotPriceResponse) MarshalToSizedBuffer

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

func (*QueryDenomSpotPriceResponse) ProtoMessage

func (*QueryDenomSpotPriceResponse) ProtoMessage()

func (*QueryDenomSpotPriceResponse) Reset

func (m *QueryDenomSpotPriceResponse) Reset()

func (*QueryDenomSpotPriceResponse) Size

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

func (*QueryDenomSpotPriceResponse) String

func (m *QueryDenomSpotPriceResponse) String() string

func (*QueryDenomSpotPriceResponse) Unmarshal

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

func (*QueryDenomSpotPriceResponse) XXX_DiscardUnknown

func (m *QueryDenomSpotPriceResponse) XXX_DiscardUnknown()

func (*QueryDenomSpotPriceResponse) XXX_Marshal

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

func (*QueryDenomSpotPriceResponse) XXX_Merge

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

func (*QueryDenomSpotPriceResponse) XXX_Size

func (m *QueryDenomSpotPriceResponse) XXX_Size() int

func (*QueryDenomSpotPriceResponse) XXX_Unmarshal

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

type QueryEipBaseFeeRequest

type QueryEipBaseFeeRequest struct {
}

func (*QueryEipBaseFeeRequest) Descriptor

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

func (*QueryEipBaseFeeRequest) Marshal

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

func (*QueryEipBaseFeeRequest) MarshalTo

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

func (*QueryEipBaseFeeRequest) MarshalToSizedBuffer

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

func (*QueryEipBaseFeeRequest) ProtoMessage

func (*QueryEipBaseFeeRequest) ProtoMessage()

func (*QueryEipBaseFeeRequest) Reset

func (m *QueryEipBaseFeeRequest) Reset()

func (*QueryEipBaseFeeRequest) Size

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

func (*QueryEipBaseFeeRequest) String

func (m *QueryEipBaseFeeRequest) String() string

func (*QueryEipBaseFeeRequest) Unmarshal

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

func (*QueryEipBaseFeeRequest) XXX_DiscardUnknown

func (m *QueryEipBaseFeeRequest) XXX_DiscardUnknown()

func (*QueryEipBaseFeeRequest) XXX_Marshal

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

func (*QueryEipBaseFeeRequest) XXX_Merge

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

func (*QueryEipBaseFeeRequest) XXX_Size

func (m *QueryEipBaseFeeRequest) XXX_Size() int

func (*QueryEipBaseFeeRequest) XXX_Unmarshal

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

type QueryEipBaseFeeResponse

type QueryEipBaseFeeResponse struct {
	BaseFee cosmossdk_io_math.LegacyDec `` /* 127-byte string literal not displayed */
}

func (*QueryEipBaseFeeResponse) Descriptor

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

func (*QueryEipBaseFeeResponse) Marshal

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

func (*QueryEipBaseFeeResponse) MarshalTo

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

func (*QueryEipBaseFeeResponse) MarshalToSizedBuffer

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

func (*QueryEipBaseFeeResponse) ProtoMessage

func (*QueryEipBaseFeeResponse) ProtoMessage()

func (*QueryEipBaseFeeResponse) Reset

func (m *QueryEipBaseFeeResponse) Reset()

func (*QueryEipBaseFeeResponse) Size

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

func (*QueryEipBaseFeeResponse) String

func (m *QueryEipBaseFeeResponse) String() string

func (*QueryEipBaseFeeResponse) Unmarshal

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

func (*QueryEipBaseFeeResponse) XXX_DiscardUnknown

func (m *QueryEipBaseFeeResponse) XXX_DiscardUnknown()

func (*QueryEipBaseFeeResponse) XXX_Marshal

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

func (*QueryEipBaseFeeResponse) XXX_Merge

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

func (*QueryEipBaseFeeResponse) XXX_Size

func (m *QueryEipBaseFeeResponse) XXX_Size() int

func (*QueryEipBaseFeeResponse) XXX_Unmarshal

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

type QueryFeeTokensRequest

type QueryFeeTokensRequest struct {
}

func (*QueryFeeTokensRequest) Descriptor

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

func (*QueryFeeTokensRequest) Marshal

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

func (*QueryFeeTokensRequest) MarshalTo

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

func (*QueryFeeTokensRequest) MarshalToSizedBuffer

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

func (*QueryFeeTokensRequest) ProtoMessage

func (*QueryFeeTokensRequest) ProtoMessage()

func (*QueryFeeTokensRequest) Reset

func (m *QueryFeeTokensRequest) Reset()

func (*QueryFeeTokensRequest) Size

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

func (*QueryFeeTokensRequest) String

func (m *QueryFeeTokensRequest) String() string

func (*QueryFeeTokensRequest) Unmarshal

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

func (*QueryFeeTokensRequest) XXX_DiscardUnknown

func (m *QueryFeeTokensRequest) XXX_DiscardUnknown()

func (*QueryFeeTokensRequest) XXX_Marshal

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

func (*QueryFeeTokensRequest) XXX_Merge

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

func (*QueryFeeTokensRequest) XXX_Size

func (m *QueryFeeTokensRequest) XXX_Size() int

func (*QueryFeeTokensRequest) XXX_Unmarshal

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

type QueryFeeTokensResponse

type QueryFeeTokensResponse struct {
	FeeTokens []FeeToken `protobuf:"bytes,1,rep,name=fee_tokens,json=feeTokens,proto3" json:"fee_tokens" yaml:"fee_tokens"`
}

func (*QueryFeeTokensResponse) Descriptor

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

func (*QueryFeeTokensResponse) GetFeeTokens

func (m *QueryFeeTokensResponse) GetFeeTokens() []FeeToken

func (*QueryFeeTokensResponse) Marshal

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

func (*QueryFeeTokensResponse) MarshalTo

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

func (*QueryFeeTokensResponse) MarshalToSizedBuffer

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

func (*QueryFeeTokensResponse) ProtoMessage

func (*QueryFeeTokensResponse) ProtoMessage()

func (*QueryFeeTokensResponse) Reset

func (m *QueryFeeTokensResponse) Reset()

func (*QueryFeeTokensResponse) Size

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

func (*QueryFeeTokensResponse) String

func (m *QueryFeeTokensResponse) String() string

func (*QueryFeeTokensResponse) Unmarshal

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

func (*QueryFeeTokensResponse) XXX_DiscardUnknown

func (m *QueryFeeTokensResponse) XXX_DiscardUnknown()

func (*QueryFeeTokensResponse) XXX_Marshal

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

func (*QueryFeeTokensResponse) XXX_Merge

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

func (*QueryFeeTokensResponse) XXX_Size

func (m *QueryFeeTokensResponse) XXX_Size() int

func (*QueryFeeTokensResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// FeeTokens returns a list of all the whitelisted fee tokens and their
	// corresponding pools. It does not include the BaseDenom, which has its own
	// query endpoint
	FeeTokens(context.Context, *QueryFeeTokensRequest) (*QueryFeeTokensResponse, error)
	// DenomSpotPrice returns all spot prices by each registered token denom.
	DenomSpotPrice(context.Context, *QueryDenomSpotPriceRequest) (*QueryDenomSpotPriceResponse, error)
	// Returns the poolID for a specified denom input.
	DenomPoolId(context.Context, *QueryDenomPoolIdRequest) (*QueryDenomPoolIdResponse, error)
	// Returns a list of all base denom tokens and their corresponding pools.
	BaseDenom(context.Context, *QueryBaseDenomRequest) (*QueryBaseDenomResponse, error)
	// Returns a list of all base denom tokens and their corresponding pools.
	GetEipBaseFee(context.Context, *QueryEipBaseFeeRequest) (*QueryEipBaseFeeResponse, error)
}

QueryServer is the server API for Query service.

type SpotPriceCalculator

type SpotPriceCalculator interface {
	CalculateSpotPrice(ctx sdk.Context, poolId uint64, quoteDenom, baseDenom string) (osmomath.BigDec, error)
}

SpotPriceCalculator defines the contract that must be fulfilled by a spot price calculator The x/gamm keeper is expected to satisfy this interface.

type TxFeesKeeper

type TxFeesKeeper interface {
	ConvertToBaseToken(ctx sdk.Context, inputFee sdk.Coin) (sdk.Coin, error)
	GetBaseDenom(ctx sdk.Context) (denom string, err error)
	GetFeeToken(ctx sdk.Context, denom string) (FeeToken, error)
}

TxFeesKeeper defines the expected transaction fee keeper

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) BaseDenom

func (*UnimplementedQueryServer) DenomPoolId

func (*UnimplementedQueryServer) DenomSpotPrice

func (*UnimplementedQueryServer) FeeTokens

func (*UnimplementedQueryServer) GetEipBaseFee

type UpdateFeeTokenProposal

type UpdateFeeTokenProposal struct {
	Title       string     `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"`
	Description string     `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"`
	Feetokens   []FeeToken `protobuf:"bytes,3,rep,name=feetokens,proto3" json:"feetokens" yaml:"fee_tokens"`
}

UpdateFeeTokenProposal is a gov Content type for adding new whitelisted fee token(s). It must specify a denom along with gamm pool ID to use as a spot price calculator. It can be used to add new denoms to the whitelist. It can also be used to update the Pool to associate with the denom. If Pool ID is set to 0, it will remove the denom from the whitelisted set.

func NewUpdateFeeTokenProposal

func NewUpdateFeeTokenProposal(title, description string, feeTokens []FeeToken) UpdateFeeTokenProposal

func (*UpdateFeeTokenProposal) Descriptor

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

func (*UpdateFeeTokenProposal) Equal

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

func (*UpdateFeeTokenProposal) GetDescription

func (p *UpdateFeeTokenProposal) GetDescription() string

func (*UpdateFeeTokenProposal) GetTitle

func (p *UpdateFeeTokenProposal) GetTitle() string

func (*UpdateFeeTokenProposal) Marshal

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

func (*UpdateFeeTokenProposal) MarshalTo

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

func (*UpdateFeeTokenProposal) MarshalToSizedBuffer

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

func (*UpdateFeeTokenProposal) ProposalRoute

func (p *UpdateFeeTokenProposal) ProposalRoute() string

func (*UpdateFeeTokenProposal) ProposalType

func (p *UpdateFeeTokenProposal) ProposalType() string

func (*UpdateFeeTokenProposal) ProtoMessage

func (*UpdateFeeTokenProposal) ProtoMessage()

func (*UpdateFeeTokenProposal) Reset

func (m *UpdateFeeTokenProposal) Reset()

func (*UpdateFeeTokenProposal) Size

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

func (UpdateFeeTokenProposal) String

func (p UpdateFeeTokenProposal) String() string

func (*UpdateFeeTokenProposal) Unmarshal

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

func (*UpdateFeeTokenProposal) ValidateBasic

func (p *UpdateFeeTokenProposal) ValidateBasic() error

func (*UpdateFeeTokenProposal) XXX_DiscardUnknown

func (m *UpdateFeeTokenProposal) XXX_DiscardUnknown()

func (*UpdateFeeTokenProposal) XXX_Marshal

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

func (*UpdateFeeTokenProposal) XXX_Merge

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

func (*UpdateFeeTokenProposal) XXX_Size

func (m *UpdateFeeTokenProposal) XXX_Size() int

func (*UpdateFeeTokenProposal) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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