types

package
v4.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

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

Variables

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 (
	KeyShare                = []byte("Share")
	KeyDistributionEntities = []byte("DistributionEntities")
	KeyTransferFees         = []byte("TransferFees")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	GetModuleAccount(ctx sdk.Context, name string) types.ModuleAccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type BankKeeper

type BankKeeper interface {
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type DistributionEntity

type DistributionEntity struct {
	Address string                                 `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Share   github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=share,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"share" yaml:"share"`
}

DistributionEntity defines a distribution entity

func (*DistributionEntity) Descriptor

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

func (*DistributionEntity) Equal

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

func (*DistributionEntity) GetAddress

func (m *DistributionEntity) GetAddress() string

func (*DistributionEntity) Marshal

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

func (*DistributionEntity) MarshalTo

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

func (*DistributionEntity) MarshalToSizedBuffer

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

func (*DistributionEntity) ProtoMessage

func (*DistributionEntity) ProtoMessage()

func (*DistributionEntity) Reset

func (m *DistributionEntity) Reset()

func (*DistributionEntity) Size

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

func (*DistributionEntity) String

func (m *DistributionEntity) String() string

func (*DistributionEntity) Unmarshal

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

func (*DistributionEntity) XXX_DiscardUnknown

func (m *DistributionEntity) XXX_DiscardUnknown()

func (*DistributionEntity) XXX_Marshal

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

func (*DistributionEntity) XXX_Merge

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

func (*DistributionEntity) XXX_Size

func (m *DistributionEntity) XXX_Size() int

func (*DistributionEntity) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

GenesisState defines the tariff module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

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

Validate performs basic genesis state validation returning an error upon any failure.

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 Params

type Params struct {
	// share is % of tx fees or rewards allocated to distribution_entities
	Share github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=share,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"share" yaml:"share"`
	// % of tx fees or rewards allocated to a set of global distribution entities
	// these shares must add up to 1
	DistributionEntities []DistributionEntity `` /* 140-byte string literal not displayed */
	TransferFees         []TransferFee        `protobuf:"bytes,3,rep,name=transfer_fees,json=transferFees,proto3" json:"transfer_fees"`
}

Params defines the set of params for the distribution module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func (*Params) Descriptor

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

func (*Params) Equal

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

func (*Params) GetDistributionEntities

func (m *Params) GetDistributionEntities() []DistributionEntity

func (*Params) GetTransferFees

func (m *Params) GetTransferFees() []TransferFee

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 get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

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 TransferFee

type TransferFee struct {
	Bps   github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=bps,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"bps"`
	Max   github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=max,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"max"`
	Denom string                                 `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"`
}

TransferFee defines the fee configuration for a specific denom.

func (*TransferFee) Descriptor

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

func (*TransferFee) Equal

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

func (*TransferFee) GetDenom

func (m *TransferFee) GetDenom() string

func (*TransferFee) Marshal

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

func (*TransferFee) MarshalTo

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

func (*TransferFee) MarshalToSizedBuffer

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

func (*TransferFee) ProtoMessage

func (*TransferFee) ProtoMessage()

func (*TransferFee) Reset

func (m *TransferFee) Reset()

func (*TransferFee) Size

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

func (*TransferFee) String

func (m *TransferFee) String() string

func (*TransferFee) Unmarshal

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

func (*TransferFee) XXX_DiscardUnknown

func (m *TransferFee) XXX_DiscardUnknown()

func (*TransferFee) XXX_Marshal

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

func (*TransferFee) XXX_Merge

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

func (*TransferFee) XXX_Size

func (m *TransferFee) XXX_Size() int

func (*TransferFee) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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