ugov

package
v5.1.0-rc1 Latest Latest
Warning

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

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

README

UGov Module

Abstract

The x/ugov is a Cosmos SDK module extending x/gov capabilities. In particular, this module defines set of parameters controlled by the x/gov proposals. These parameters can be used in various places of the Umee app (other modules or the app core).

Content

Design

Min Gas Prices

MsgGovUpdateMinGasPrice allows to set a consensus controlled transaction min gas prices. All validators must set their min gas prices that includes QueryMinGasPrice and is not smaller than it. Blocks, that include accepted transactions with smaller gas prices will be out of the consensus.

Services

Messages

The RPC Messages provide an access to the x/gov to change the module parameters.

Queries

The RPC Queries allow to query module parameters and current outflow sums.

Events

All events with description are listed in the events.proto file.

Documentation

Overview

Package ugov is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

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

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

Variables

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = 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 (
	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 (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Amino codecs Note, the ModuleCdc should ONLY be used in certain instances of tests and for JSON encoding as Amino is still used for that purpose.

Functions

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/uibc interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type EventMinTxFees

type EventMinTxFees struct {
	MinTxFees []types.DecCoin `protobuf:"bytes,1,rep,name=min_tx_fees,json=minTxFees,proto3" json:"min_tx_fees"`
}

EventMinTxFees is emitted when MsgGovUpdateMinFees is correctly executed.

func (*EventMinTxFees) Descriptor

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

func (*EventMinTxFees) Marshal

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

func (*EventMinTxFees) MarshalTo

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

func (*EventMinTxFees) MarshalToSizedBuffer

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

func (*EventMinTxFees) ProtoMessage

func (*EventMinTxFees) ProtoMessage()

func (*EventMinTxFees) Reset

func (m *EventMinTxFees) Reset()

func (*EventMinTxFees) Size

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

func (*EventMinTxFees) String

func (m *EventMinTxFees) String() string

func (*EventMinTxFees) Unmarshal

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

func (*EventMinTxFees) XXX_DiscardUnknown

func (m *EventMinTxFees) XXX_DiscardUnknown()

func (*EventMinTxFees) XXX_Marshal

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

func (*EventMinTxFees) XXX_Merge

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

func (*EventMinTxFees) XXX_Size

func (m *EventMinTxFees) XXX_Size() int

func (*EventMinTxFees) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	MinGasPrice types.DecCoin `protobuf:"bytes,1,opt,name=min_gas_price,json=minGasPrice,proto3" json:"min_gas_price"`
}

GenesisState of the ugov module.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis creates a default genesis state

func (*GenesisState) Descriptor

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

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

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 MsgClient

type MsgClient interface {
	// GovUpdateMinGasPrice sets protocol controlled tx min fees.
	GovUpdateMinGasPrice(ctx context.Context, in *MsgGovUpdateMinGasPrice, opts ...grpc.CallOption) (*MsgGovUpdateMinGasPriceResponse, 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

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgGovUpdateMinGasPrice

type MsgGovUpdateMinGasPrice struct {
	// authority must be the address of the governance account.
	Authority   string        `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	MinGasPrice types.DecCoin `protobuf:"bytes,2,opt,name=min_gas_price,json=minGasPrice,proto3" json:"min_gas_price"`
}

MsgGovUpdateMinGasPrice is a request type for the Msg/GovUpdateMinGasPrice.

func (*MsgGovUpdateMinGasPrice) Descriptor

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

func (MsgGovUpdateMinGasPrice) GetSignBytes

func (msg MsgGovUpdateMinGasPrice) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg.GetSignBytes

func (*MsgGovUpdateMinGasPrice) GetSigners

func (msg *MsgGovUpdateMinGasPrice) GetSigners() []sdk.AccAddress

GetSignBytes implements Msg

func (*MsgGovUpdateMinGasPrice) Marshal

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

func (*MsgGovUpdateMinGasPrice) MarshalTo

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

func (*MsgGovUpdateMinGasPrice) MarshalToSizedBuffer

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

func (*MsgGovUpdateMinGasPrice) ProtoMessage

func (*MsgGovUpdateMinGasPrice) ProtoMessage()

func (*MsgGovUpdateMinGasPrice) Reset

func (m *MsgGovUpdateMinGasPrice) Reset()

func (MsgGovUpdateMinGasPrice) Route

func (msg MsgGovUpdateMinGasPrice) Route() string

Route implements LegacyMsg.Route

func (*MsgGovUpdateMinGasPrice) Size

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

func (*MsgGovUpdateMinGasPrice) String

func (msg *MsgGovUpdateMinGasPrice) String() string

String implements Stringer interface

func (MsgGovUpdateMinGasPrice) Type

func (msg MsgGovUpdateMinGasPrice) Type() string

GetSignBytes implements the LegacyMsg.Type

func (*MsgGovUpdateMinGasPrice) Unmarshal

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

func (*MsgGovUpdateMinGasPrice) ValidateBasic

func (msg *MsgGovUpdateMinGasPrice) ValidateBasic() error

ValidateBasic implements Msg

func (*MsgGovUpdateMinGasPrice) XXX_DiscardUnknown

func (m *MsgGovUpdateMinGasPrice) XXX_DiscardUnknown()

func (*MsgGovUpdateMinGasPrice) XXX_Marshal

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

func (*MsgGovUpdateMinGasPrice) XXX_Merge

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

func (*MsgGovUpdateMinGasPrice) XXX_Size

func (m *MsgGovUpdateMinGasPrice) XXX_Size() int

func (*MsgGovUpdateMinGasPrice) XXX_Unmarshal

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

type MsgGovUpdateMinGasPriceResponse

type MsgGovUpdateMinGasPriceResponse struct {
}

MsgGovUpdateMinGasPriceResponse is a response type for the Msg/GovUpdateMinGasPrice.

func (*MsgGovUpdateMinGasPriceResponse) Descriptor

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

func (*MsgGovUpdateMinGasPriceResponse) Marshal

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

func (*MsgGovUpdateMinGasPriceResponse) MarshalTo

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

func (*MsgGovUpdateMinGasPriceResponse) MarshalToSizedBuffer

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

func (*MsgGovUpdateMinGasPriceResponse) ProtoMessage

func (*MsgGovUpdateMinGasPriceResponse) ProtoMessage()

func (*MsgGovUpdateMinGasPriceResponse) Reset

func (*MsgGovUpdateMinGasPriceResponse) Size

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

func (*MsgGovUpdateMinGasPriceResponse) String

func (*MsgGovUpdateMinGasPriceResponse) Unmarshal

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

func (*MsgGovUpdateMinGasPriceResponse) XXX_DiscardUnknown

func (m *MsgGovUpdateMinGasPriceResponse) XXX_DiscardUnknown()

func (*MsgGovUpdateMinGasPriceResponse) XXX_Marshal

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

func (*MsgGovUpdateMinGasPriceResponse) XXX_Merge

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

func (*MsgGovUpdateMinGasPriceResponse) XXX_Size

func (m *MsgGovUpdateMinGasPriceResponse) XXX_Size() int

func (*MsgGovUpdateMinGasPriceResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// GovUpdateMinGasPrice sets protocol controlled tx min fees.
	GovUpdateMinGasPrice(context.Context, *MsgGovUpdateMinGasPrice) (*MsgGovUpdateMinGasPriceResponse, error)
}

MsgServer is the server API for Msg service.

type QueryClient

type QueryClient interface {
	// MinGasPrice returns minimum transaction fees.
	MinGasPrice(ctx context.Context, in *QueryMinGasPrice, opts ...grpc.CallOption) (*QueryMinGasPriceResponse, 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 QueryMinGasPrice

type QueryMinGasPrice struct {
}

QueryMinGasPrice is a request type.

func (*QueryMinGasPrice) Descriptor

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

func (*QueryMinGasPrice) Marshal

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

func (*QueryMinGasPrice) MarshalTo

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

func (*QueryMinGasPrice) MarshalToSizedBuffer

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

func (*QueryMinGasPrice) ProtoMessage

func (*QueryMinGasPrice) ProtoMessage()

func (*QueryMinGasPrice) Reset

func (m *QueryMinGasPrice) Reset()

func (*QueryMinGasPrice) Size

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

func (*QueryMinGasPrice) String

func (m *QueryMinGasPrice) String() string

func (*QueryMinGasPrice) Unmarshal

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

func (*QueryMinGasPrice) XXX_DiscardUnknown

func (m *QueryMinGasPrice) XXX_DiscardUnknown()

func (*QueryMinGasPrice) XXX_Marshal

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

func (*QueryMinGasPrice) XXX_Merge

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

func (*QueryMinGasPrice) XXX_Size

func (m *QueryMinGasPrice) XXX_Size() int

func (*QueryMinGasPrice) XXX_Unmarshal

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

type QueryMinGasPriceResponse

type QueryMinGasPriceResponse struct {
	MinGasPrice types.DecCoin `protobuf:"bytes,1,opt,name=min_gas_price,json=minGasPrice,proto3" json:"min_gas_price"`
}

QueryMinGasPriceResponse response type.

func (*QueryMinGasPriceResponse) Descriptor

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

func (*QueryMinGasPriceResponse) Marshal

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

func (*QueryMinGasPriceResponse) MarshalTo

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

func (*QueryMinGasPriceResponse) MarshalToSizedBuffer

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

func (*QueryMinGasPriceResponse) ProtoMessage

func (*QueryMinGasPriceResponse) ProtoMessage()

func (*QueryMinGasPriceResponse) Reset

func (m *QueryMinGasPriceResponse) Reset()

func (*QueryMinGasPriceResponse) Size

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

func (*QueryMinGasPriceResponse) String

func (m *QueryMinGasPriceResponse) String() string

func (*QueryMinGasPriceResponse) Unmarshal

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

func (*QueryMinGasPriceResponse) XXX_DiscardUnknown

func (m *QueryMinGasPriceResponse) XXX_DiscardUnknown()

func (*QueryMinGasPriceResponse) XXX_Marshal

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

func (*QueryMinGasPriceResponse) XXX_Merge

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

func (*QueryMinGasPriceResponse) XXX_Size

func (m *QueryMinGasPriceResponse) XXX_Size() int

func (*QueryMinGasPriceResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// MinGasPrice returns minimum transaction fees.
	MinGasPrice(context.Context, *QueryMinGasPrice) (*QueryMinGasPriceResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) GovUpdateMinGasPrice

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) MinGasPrice

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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