storage

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IndexZero   = "0000000000000000000000000000000000000000000000000000000000000000"
	IndexOne    = "0000000000000000000000000000000000000000000000000000000000000001"
	IndexTwo    = "0000000000000000000000000000000000000000000000000000000000000002"
	IndexThree  = "0000000000000000000000000000000000000000000000000000000000000003"
	IndexFour   = "0000000000000000000000000000000000000000000000000000000000000004"
	IndexFive   = "0000000000000000000000000000000000000000000000000000000000000005"
	IndexSix    = "0000000000000000000000000000000000000000000000000000000000000006"
	IndexSeven  = "0000000000000000000000000000000000000000000000000000000000000007"
	IndexEight  = "0000000000000000000000000000000000000000000000000000000000000008"
	IndexNine   = "0000000000000000000000000000000000000000000000000000000000000009"
	IndexTen    = "000000000000000000000000000000000000000000000000000000000000000a"
	IndexEleven = "000000000000000000000000000000000000000000000000000000000000000b"
)

Variables

This section is empty.

Functions

func GetIncrementedKey

func GetIncrementedKey(original common.Hash, incrementBy int64) common.Hash

func GetMapping

func GetMapping(indexOnContract, key string) common.Hash

func GetNestedMapping

func GetNestedMapping(indexOnContract, primaryKey, secondaryKey string) common.Hash

Types

type IStorageQueue

type IStorageQueue interface {
	Add(row utils.StorageDiffRow) error
	Delete(id int) error
	GetAll() ([]utils.StorageDiffRow, error)
}

type Mappings

type Mappings interface {
	Lookup(key common.Hash) (utils.StorageValueMetadata, error)
	SetDB(db *postgres.DB)
}

type StorageQueue

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

func NewStorageQueue

func NewStorageQueue(db *postgres.DB) StorageQueue

func (StorageQueue) Add

func (queue StorageQueue) Add(row utils.StorageDiffRow) error

func (StorageQueue) Delete added in v0.0.2

func (queue StorageQueue) Delete(id int) error

func (StorageQueue) GetAll added in v0.0.2

func (queue StorageQueue) GetAll() ([]utils.StorageDiffRow, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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