v1

package
v0.4.9-rc9 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	V1AspectMetaKeyPrefix       = []byte{store.AspectScope, 0x00, 0x01, 0x00, 0x01}
	V1AspectBindingKeyPrefix    = []byte{store.AspectScope, 0x00, 0x01, 0x00, 0x02}
	V1AspectCodeKeyPrefix       = []byte{store.AspectScope, 0x00, 0x01, 0x00, 0x03}
	V1AspectPropertiesKeyPrefix = []byte{store.AspectScope, 0x00, 0x01, 0x00, 0x04}
	V1AspectStateKeyPrefix      = []byte{store.AspectScope, 0x00, 0x01, 0x00, 0xff}

	V1AccountBindingKeyPrefix = []byte{store.AccountScope, 0x00, 0x01, 0x00, 0x01}
)

v1 keys, first 1 byte for scope, second 2 bytes for version, next 2 bytes for type

View Source
var (
	V1AspectBindingFilterKeyPrefix = byte(0x01)
	V1AspectBindingDataKeyPrefix   = byte(0x02)
)

Functions

func NewAccountStore

func NewAccountStore(ctx *types.AccountStoreContext) store.AccountStore

NewAccountStore creates a new instance of account store.

func NewAspectMetaStore

func NewAspectMetaStore(ctx *types.AspectStoreContext, protocolExtension []byte) store.AspectMetaStore

NewAspectMetaStore creates a new instance of aspect meta Store.

func NewStateStore

func NewStateStore(ctx *types.AspectStoreContext) store.AspectStateStore

NewStateStore creates a new instance of account state.

Types

type BaseStore

type BaseStore interface {
	Load(key []byte) ([]byte, error)
	Store(key, value []byte) error
	Version() store.ProtocolVersion

	store.GasMeteredStore
}

BaseStore defines a shared base store which can be implemented by all other stores

func NewBaseStore

func NewBaseStore(logger log.Logger, gasMeter v0.GasMeter, kvStore sdk.KVStore) BaseStore

type Binding

type Binding struct {
	Account   common.Address
	Version   uint64
	Priority  int8
	JoinPoint uint16
}

func (Binding) MarshalText

func (b Binding) MarshalText() (text []byte, err error)

func (*Binding) UnmarshalText

func (b *Binding) UnmarshalText(text []byte) error

type Bindings

type Bindings []Binding

func (Bindings) MarshalText

func (b Bindings) MarshalText() (text []byte, err error)

func (*Bindings) UnmarshalText

func (b *Bindings) UnmarshalText(text []byte) error

type DataLength

type DataLength uint64

func (DataLength) MarshalText

func (l DataLength) MarshalText() (text []byte, err error)

func (*DataLength) UnmarshalText

func (l *DataLength) UnmarshalText(text []byte) error

type Extension

type Extension struct {
	AspectVersion uint64
	PayMaster     common.Address
	Proof         []byte
}

func (Extension) MarshalText

func (e Extension) MarshalText() (text []byte, err error)

func (*Extension) UnmarshalText

func (e *Extension) UnmarshalText(text []byte) error

type VersionMeta

type VersionMeta struct {
	JoinPoint uint64
	CodeHash  common.Hash
}

VersionMeta is the data model for holding the metadata of a specific version of aspect

func (VersionMeta) MarshalText

func (v VersionMeta) MarshalText() (text []byte, err error)

func (*VersionMeta) UnmarshalText

func (v *VersionMeta) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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