state

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_state_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BinaryNode

type BinaryNode struct {
	LeftH  []byte `protobuf:"bytes,1,opt,name=leftH,proto3" json:"leftH,omitempty"`
	RightH []byte `protobuf:"bytes,2,opt,name=rightH,proto3" json:"rightH,omitempty"`
	// contains filtered or unexported fields
}

func (*BinaryNode) Descriptor deprecated

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

Deprecated: Use BinaryNode.ProtoReflect.Descriptor instead.

func (*BinaryNode) GetLeftH

func (x *BinaryNode) GetLeftH() []byte

func (*BinaryNode) GetRightH

func (x *BinaryNode) GetRightH() []byte

func (*BinaryNode) ProtoMessage

func (*BinaryNode) ProtoMessage()

func (*BinaryNode) ProtoReflect

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

func (*BinaryNode) Reset

func (x *BinaryNode) Reset()

func (*BinaryNode) String

func (x *BinaryNode) String() string

type Code

type Code struct {
	Code [][]byte `protobuf:"bytes,1,rep,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*Code) Descriptor deprecated

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

Deprecated: Use Code.ProtoReflect.Descriptor instead.

func (*Code) GetCode

func (x *Code) GetCode() [][]byte

func (*Code) ProtoMessage

func (*Code) ProtoMessage()

func (*Code) ProtoReflect

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

func (*Code) Reset

func (x *Code) Reset()

func (*Code) String

func (x *Code) String() string

type CodeDefinition

type CodeDefinition struct {
	Definition string `protobuf:"bytes,1,opt,name=definition,proto3" json:"definition,omitempty"`
	// contains filtered or unexported fields
}

func (*CodeDefinition) Descriptor deprecated

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

Deprecated: Use CodeDefinition.ProtoReflect.Descriptor instead.

func (*CodeDefinition) GetDefinition

func (x *CodeDefinition) GetDefinition() string

func (*CodeDefinition) ProtoMessage

func (*CodeDefinition) ProtoMessage()

func (*CodeDefinition) ProtoReflect

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

func (*CodeDefinition) Reset

func (x *CodeDefinition) Reset()

func (*CodeDefinition) String

func (x *CodeDefinition) String() string

type ContractState

type ContractState struct {
	ContractHash []byte `protobuf:"bytes,1,opt,name=contractHash,proto3" json:"contractHash,omitempty"`
	StorageRoot  []byte `protobuf:"bytes,2,opt,name=storageRoot,proto3" json:"storageRoot,omitempty"`
	// contains filtered or unexported fields
}

func (*ContractState) Descriptor deprecated

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

Deprecated: Use ContractState.ProtoReflect.Descriptor instead.

func (*ContractState) GetContractHash

func (x *ContractState) GetContractHash() []byte

func (*ContractState) GetStorageRoot

func (x *ContractState) GetStorageRoot() []byte

func (*ContractState) ProtoMessage

func (*ContractState) ProtoMessage()

func (*ContractState) ProtoReflect

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

func (*ContractState) Reset

func (x *ContractState) Reset()

func (*ContractState) String

func (x *ContractState) String() string

type EdgeNode

type EdgeNode struct {
	Length uint32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
	Path   []byte `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Bottom []byte `protobuf:"bytes,3,opt,name=bottom,proto3" json:"bottom,omitempty"`
	// contains filtered or unexported fields
}

func (*EdgeNode) Descriptor deprecated

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

Deprecated: Use EdgeNode.ProtoReflect.Descriptor instead.

func (*EdgeNode) GetBottom

func (x *EdgeNode) GetBottom() []byte

func (*EdgeNode) GetLength

func (x *EdgeNode) GetLength() uint32

func (*EdgeNode) GetPath

func (x *EdgeNode) GetPath() []byte

func (*EdgeNode) ProtoMessage

func (*EdgeNode) ProtoMessage()

func (*EdgeNode) ProtoReflect

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

func (*EdgeNode) Reset

func (x *EdgeNode) Reset()

func (*EdgeNode) String

func (x *EdgeNode) String() string

type Manager

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

Manager is a database manager, with the objective of managing the contract codes and contract storages databases.

func NewManager

func NewManager(stateDatabase, contractDef db.Database) *Manager

NewManager returns a new instance of Manager with the given database sources.

func (*Manager) Close

func (m *Manager) Close()

func (*Manager) GetContract

func (m *Manager) GetContract(contractHash *felt.Felt) (*types.Contract, error)

func (*Manager) GetContractState

func (m *Manager) GetContractState(hash *felt.Felt) (*state.ContractState, error)

func (*Manager) GetTrieNode

func (m *Manager) GetTrieNode(hash *felt.Felt) (trie.TrieNode, error)

func (*Manager) PutContract

func (x *Manager) PutContract(contractHash *felt.Felt, contract *types.Contract) error

func (*Manager) PutContractState

func (m *Manager) PutContractState(cs *state.ContractState) error

func (*Manager) StoreTrieNode

func (m *Manager) StoreTrieNode(node trie.TrieNode) error

type TrieNode

type TrieNode struct {

	// Types that are assignable to Node:
	//	*TrieNode_BinaryNode
	//	*TrieNode_EdgeNode
	Node isTrieNode_Node `protobuf_oneof:"node"`
	// contains filtered or unexported fields
}

func (*TrieNode) Descriptor deprecated

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

Deprecated: Use TrieNode.ProtoReflect.Descriptor instead.

func (*TrieNode) GetBinaryNode

func (x *TrieNode) GetBinaryNode() *BinaryNode

func (*TrieNode) GetEdgeNode

func (x *TrieNode) GetEdgeNode() *EdgeNode

func (*TrieNode) GetNode

func (m *TrieNode) GetNode() isTrieNode_Node

func (*TrieNode) ProtoMessage

func (*TrieNode) ProtoMessage()

func (*TrieNode) ProtoReflect

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

func (*TrieNode) Reset

func (x *TrieNode) Reset()

func (*TrieNode) String

func (x *TrieNode) String() string

type TrieNode_BinaryNode

type TrieNode_BinaryNode struct {
	BinaryNode *BinaryNode `protobuf:"bytes,1,opt,name=binary_node,json=binaryNode,proto3,oneof"`
}

type TrieNode_EdgeNode

type TrieNode_EdgeNode struct {
	EdgeNode *EdgeNode `protobuf:"bytes,2,opt,name=edge_node,json=edgeNode,proto3,oneof"`
}

Jump to

Keyboard shortcuts

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