v0

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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AspectCodeKeyPrefix is the prefix to retrieve all AspectCodeStore
	V0AspectCodeKeyPrefix        = "AspectStore/Code/"
	V0AspectCodeVersionKeyPrefix = "AspectStore/Version/"
	V0AspectPropertyKeyPrefix    = "AspectStore/Property/"
	V0ContractBindKeyPrefix      = "AspectStore/ContractBind/"
	V0VerifierBindingKeyPrefix   = "AspectStore/VerifierBind/"
	V0AspectRefKeyPrefix         = "AspectStore/AspectRef/"
	V0AspectStateKeyPrefix       = "AspectStore/State/"

	V0AspectJoinPointRunKeyPrefix = "AspectStore/JoinPointRun/"

	V0AspectIDMapKey = "aspectId"
	V0VersionMapKey  = "version"
	V0PriorityMapKey = "priority"

	V0AspectAccountKey           = "Aspect_@Acount@_"
	V0AspectProofKey             = "Aspect_@Proof@_"
	V0AspectRunJoinPointKey      = "Aspect_@Run@JoinPoint@_"
	V0AspectPropertyAllKeyPrefix = "Aspect_@Property@AllKey@_"
	V0AspectPropertyAllKeySplit  = "^^^"
)

v0 keys

Variables

View Source
var (
	PathSeparator    = []byte("/")
	PathSeparatorLen = len(PathSeparator)
)

Functions

func AccountKey

func AccountKey(
	account []byte,
) []byte

func AspectArrayKey

func AspectArrayKey(keys ...[]byte) []byte

func AspectBlockKey

func AspectBlockKey() []byte

func AspectIDKey

func AspectIDKey(
	aspectID []byte,
) []byte

func AspectPropertyKey

func AspectPropertyKey(
	aspectID []byte,
	propertyKey []byte,
) []byte

AspectCodeStoreKey returns the Store key to retrieve a AspectCodeStore from the index fields

func AspectVersionKey

func AspectVersionKey(
	aspectID []byte,
	version []byte,
) []byte

func NewAccountStore

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

NewAccountStore creates a new instance of account Store. Deprecated

func NewAspectMetaStore

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

NewAspectMetaStore creates a new instance of aspect meta Store. Deprecated

func NewStateStore

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

NewStateStore creates a new instance of account state. Deprecated

Types

type BaseStore

type BaseStore interface {
	NewPrefixStore(prefixKey string) prefix.Store
	Load(prefixStore prefix.Store, key []byte) ([]byte, error)
	Store(prefixStore prefix.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(gasMeter GasMeter, kvStore sdk.KVStore) BaseStore

type GasMeter

type GasMeter interface {
	MeasureStorageUpdate(dataLen int) error
	MeasureStorageCodeSave(dataLen int) error
	MeasureStorageStore(dataLen int) error
	MeasureStorageLoad(dataLen int) error
	RemainingGas() uint64
	UpdateGas(newGas uint64)
	Consume(dataLen int, gasCostPer32Bytes uint64) error
}

func NewGasMeter

func NewGasMeter(ctx types.StoreContext) GasMeter

func NewNoOpGasMeter

func NewNoOpGasMeter(ctx types.StoreContext) GasMeter

Jump to

Keyboard shortcuts

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