keeper

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: GPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_halo_evmstaking_keeper_evmstaking_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type EVMEvent

type EVMEvent struct {
	Id    uint64          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Event *types.EVMEvent `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"`
	// contains filtered or unexported fields
}

EVMEvent is an unparsed EVM event.

func (*EVMEvent) Descriptor deprecated

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

Deprecated: Use EVMEvent.ProtoReflect.Descriptor instead.

func (*EVMEvent) GetEvent

func (x *EVMEvent) GetEvent() *types.EVMEvent

func (*EVMEvent) GetId

func (x *EVMEvent) GetId() uint64

func (*EVMEvent) ProtoMessage

func (*EVMEvent) ProtoMessage()

func (*EVMEvent) ProtoReflect

func (x *EVMEvent) ProtoReflect() protoreflect.Message

func (*EVMEvent) Reset

func (x *EVMEvent) Reset()

func (*EVMEvent) String

func (x *EVMEvent) String() string

type EVMEventIdIndexKey

type EVMEventIdIndexKey struct {
	// contains filtered or unexported fields
}

func (EVMEventIdIndexKey) WithId

type EVMEventIndexKey

type EVMEventIndexKey interface {
	// contains filtered or unexported methods
}

type EVMEventIterator

type EVMEventIterator struct {
	ormtable.Iterator
}

func (EVMEventIterator) Value

func (i EVMEventIterator) Value() (*EVMEvent, error)

type EVMEventPrimaryKey

type EVMEventPrimaryKey = EVMEventIdIndexKey

primary key starting index..

type EVMEventTable

type EVMEventTable interface {
	Insert(ctx context.Context, evmevent *EVMEvent) error
	InsertReturningId(ctx context.Context, evmevent *EVMEvent) (uint64, error)
	LastInsertedSequence(ctx context.Context) (uint64, error)
	Update(ctx context.Context, evmevent *EVMEvent) error
	Save(ctx context.Context, evmevent *EVMEvent) error
	Delete(ctx context.Context, evmevent *EVMEvent) error
	Has(ctx context.Context, id uint64) (found bool, err error)
	// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
	Get(ctx context.Context, id uint64) (*EVMEvent, error)
	List(ctx context.Context, prefixKey EVMEventIndexKey, opts ...ormlist.Option) (EVMEventIterator, error)
	ListRange(ctx context.Context, from, to EVMEventIndexKey, opts ...ormlist.Option) (EVMEventIterator, error)
	DeleteBy(ctx context.Context, prefixKey EVMEventIndexKey) error
	DeleteRange(ctx context.Context, from, to EVMEventIndexKey) error
	// contains filtered or unexported methods
}

func NewEVMEventTable

func NewEVMEventTable(db ormtable.Schema) (EVMEventTable, error)

type EvmstakingStore

type EvmstakingStore interface {
	EVMEventTable() EVMEventTable
	// contains filtered or unexported methods
}

func NewEvmstakingStore

func NewEvmstakingStore(db ormtable.Schema) (EvmstakingStore, error)

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper also implements the evmenginetypes.EvmEventProcessor interface.

func NewKeeper

func NewKeeper(
	storeService store.KVStoreService,
	aKeeper types.AuthKeeper,
	bKeeper types.WrappedBankKeeper,
	sKeeper types.StakingKeeper,
	sServer types.StakingMsgServer,
	deliverInterval int64,
) (*Keeper, error)

func (Keeper) Deliver

func (k Keeper) Deliver(ctx context.Context, _ common.Hash, elog evmenginetypes.EVMEvent) error

Deliver processes a omni deposit log event, which must be one of: - CreateValidator - Delegate. Note that the event delivery is not immediate. Instead, every event is first stored in keeper's state. Then all stored events are periodically delivered from `EndBlock` at once.

func (Keeper) EndBlock

func (k Keeper) EndBlock(ctx context.Context) error

EndBlock delivers all pending EVM events on every `k.deliverInterval`'th block.

func (Keeper) FilterParams

func (k Keeper) FilterParams() ([]common.Address, [][]common.Hash)

FilterParams defines the matching EVM log events, see github.com/ethereum/go-ethereum#FilterQuery.

func (Keeper) Name

func (Keeper) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳