genesis

package
v15.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

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")
)

Functions

This section is empty.

Types

type AccumObject

type AccumObject struct {
	// Accumulator's name (pulled from AccumulatorContent)
	Name         string                    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" yaml:"name"`
	AccumContent *accum.AccumulatorContent `protobuf:"bytes,2,opt,name=accum_content,json=accumContent,proto3" json:"accum_content,omitempty"`
}

func (*AccumObject) Descriptor

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

func (*AccumObject) GetAccumContent

func (m *AccumObject) GetAccumContent() *accum.AccumulatorContent

func (*AccumObject) GetName

func (m *AccumObject) GetName() string

func (*AccumObject) Marshal

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

func (*AccumObject) MarshalTo

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

func (*AccumObject) MarshalToSizedBuffer

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

func (*AccumObject) ProtoMessage

func (*AccumObject) ProtoMessage()

func (*AccumObject) Reset

func (m *AccumObject) Reset()

func (*AccumObject) Size

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

func (*AccumObject) String

func (m *AccumObject) String() string

func (*AccumObject) Unmarshal

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

func (*AccumObject) XXX_DiscardUnknown

func (m *AccumObject) XXX_DiscardUnknown()

func (*AccumObject) XXX_Marshal

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

func (*AccumObject) XXX_Merge

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

func (*AccumObject) XXX_Size

func (m *AccumObject) XXX_Size() int

func (*AccumObject) XXX_Unmarshal

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

type FullTick

type FullTick struct {
	// pool id associated with the tick.
	PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"`
	// tick's index.
	TickIndex int64 `protobuf:"varint,2,opt,name=tick_index,json=tickIndex,proto3" json:"tick_index,omitempty" yaml:"tick_index"`
	// tick's info.
	Info model.TickInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info" yaml:"tick_info"`
}

FullTick contains tick index and pool id along with other tick model information.

func (*FullTick) Descriptor

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

func (*FullTick) GetInfo

func (m *FullTick) GetInfo() model.TickInfo

func (*FullTick) GetPoolId

func (m *FullTick) GetPoolId() uint64

func (*FullTick) GetTickIndex

func (m *FullTick) GetTickIndex() int64

func (*FullTick) Marshal

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

func (*FullTick) MarshalTo

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

func (*FullTick) MarshalToSizedBuffer

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

func (*FullTick) ProtoMessage

func (*FullTick) ProtoMessage()

func (*FullTick) Reset

func (m *FullTick) Reset()

func (*FullTick) Size

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

func (*FullTick) String

func (m *FullTick) String() string

func (*FullTick) Unmarshal

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

func (*FullTick) XXX_DiscardUnknown

func (m *FullTick) XXX_DiscardUnknown()

func (*FullTick) XXX_Marshal

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

func (*FullTick) XXX_Merge

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

func (*FullTick) XXX_Size

func (m *FullTick) XXX_Size() int

func (*FullTick) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// params are all the parameters of the module
	Params types1.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// pool data containining serialized pool struct and ticks.
	PoolData       []PoolData     `protobuf:"bytes,2,rep,name=pool_data,json=poolData,proto3" json:"pool_data"`
	PositionData   []PositionData `protobuf:"bytes,3,rep,name=position_data,json=positionData,proto3" json:"position_data"`
	NextPositionId uint64         `` /* 130-byte string literal not displayed */
}

GenesisState defines the concentrated liquidity module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default GenesisState for the concentrated-liquidity module.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetNextPositionId

func (m *GenesisState) GetNextPositionId() uint64

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() types1.Params

func (*GenesisState) GetPoolData

func (m *GenesisState) GetPoolData() []PoolData

func (*GenesisState) GetPositionData added in v15.5.0

func (m *GenesisState) GetPositionData() []PositionData

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 PoolData

type PoolData struct {
	// pool struct
	Pool *types.Any `protobuf:"bytes,1,opt,name=pool,proto3" json:"pool,omitempty"`
	// pool's ticks
	Ticks                  []FullTick    `protobuf:"bytes,2,rep,name=ticks,proto3" json:"ticks" yaml:"ticks"`
	FeeAccumulator         AccumObject   `protobuf:"bytes,3,opt,name=fee_accumulator,json=feeAccumulator,proto3" json:"fee_accumulator" yaml:"fee_accumulator"`
	IncentivesAccumulators []AccumObject `` /* 147-byte string literal not displayed */
	// incentive records to be set
	IncentiveRecords []types1.IncentiveRecord `protobuf:"bytes,5,rep,name=incentive_records,json=incentiveRecords,proto3" json:"incentive_records"`
}

PoolData represents a serialized pool along with its ticks for genesis state.

func (*PoolData) Descriptor

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

func (*PoolData) GetFeeAccumulator

func (m *PoolData) GetFeeAccumulator() AccumObject

func (*PoolData) GetIncentiveRecords

func (m *PoolData) GetIncentiveRecords() []types1.IncentiveRecord

func (*PoolData) GetIncentivesAccumulators

func (m *PoolData) GetIncentivesAccumulators() []AccumObject

func (*PoolData) GetPool

func (m *PoolData) GetPool() *types.Any

func (*PoolData) GetTicks

func (m *PoolData) GetTicks() []FullTick

func (*PoolData) Marshal

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

func (*PoolData) MarshalTo

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

func (*PoolData) MarshalToSizedBuffer

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

func (*PoolData) ProtoMessage

func (*PoolData) ProtoMessage()

func (*PoolData) Reset

func (m *PoolData) Reset()

func (*PoolData) Size

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

func (*PoolData) String

func (m *PoolData) String() string

func (*PoolData) Unmarshal

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

func (*PoolData) XXX_DiscardUnknown

func (m *PoolData) XXX_DiscardUnknown()

func (*PoolData) XXX_Marshal

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

func (*PoolData) XXX_Merge

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

func (*PoolData) XXX_Size

func (m *PoolData) XXX_Size() int

func (*PoolData) XXX_Unmarshal

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

type PositionData added in v15.5.0

type PositionData struct {
	Position       *model.Position `protobuf:"bytes,1,opt,name=position,proto3" json:"position,omitempty"`
	LockId         uint64          `protobuf:"varint,2,opt,name=lock_id,json=lockId,proto3" json:"lock_id,omitempty" yaml:"lock_id"`
	FeeAccumRecord accum.Record    `protobuf:"bytes,3,opt,name=fee_accum_record,json=feeAccumRecord,proto3" json:"fee_accum_record"`
}

func (*PositionData) Descriptor added in v15.5.0

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

func (*PositionData) GetFeeAccumRecord added in v15.5.0

func (m *PositionData) GetFeeAccumRecord() accum.Record

func (*PositionData) GetLockId added in v15.5.0

func (m *PositionData) GetLockId() uint64

func (*PositionData) GetPosition added in v15.5.0

func (m *PositionData) GetPosition() *model.Position

func (*PositionData) Marshal added in v15.5.0

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

func (*PositionData) MarshalTo added in v15.5.0

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

func (*PositionData) MarshalToSizedBuffer added in v15.5.0

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

func (*PositionData) ProtoMessage added in v15.5.0

func (*PositionData) ProtoMessage()

func (*PositionData) Reset added in v15.5.0

func (m *PositionData) Reset()

func (*PositionData) Size added in v15.5.0

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

func (*PositionData) String added in v15.5.0

func (m *PositionData) String() string

func (*PositionData) Unmarshal added in v15.5.0

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

func (*PositionData) XXX_DiscardUnknown added in v15.5.0

func (m *PositionData) XXX_DiscardUnknown()

func (*PositionData) XXX_Marshal added in v15.5.0

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

func (*PositionData) XXX_Merge added in v15.5.0

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

func (*PositionData) XXX_Size added in v15.5.0

func (m *PositionData) XXX_Size() int

func (*PositionData) XXX_Unmarshal added in v15.5.0

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

Jump to

Keyboard shortcuts

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