Documentation
¶
Index ¶
- Constants
- Variables
- func Decode(diff types.PersistedDiff, metadata types.ValueMetadata) interface{}
- func GetIncrementedKey(original common.Hash, incrementBy int64) common.Hash
- func GetKeyForMapping(indexOnContract, key string) common.Hash
- func GetKeyForNestedMapping(indexOnContract, primaryKey, secondaryKey string) common.Hash
- func NewDiffRepository(db *postgres.DB) diffRepository
- type DiffExtractor
- type DiffRepository
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" IndexTwelve = "000000000000000000000000000000000000000000000000000000000000000c" )
Variables ¶
View Source
var ( New = `new` Pending = `pending` Noncanonical = `noncanonical` Transformed = `transformed` Unrecognized = `unrecognized` Unwatched = `unwatched` )
Functions ¶
func Decode ¶ added in v0.1.0
func Decode(diff types.PersistedDiff, metadata types.ValueMetadata) interface{}
func GetIncrementedKey ¶
func GetKeyForMapping ¶ added in v0.1.0
func GetKeyForNestedMapping ¶ added in v0.1.0
func NewDiffRepository ¶ added in v0.1.0
Types ¶
type DiffExtractor ¶ added in v0.1.0
type DiffExtractor struct { StorageDiffRepository DiffRepository StorageFetcher fetcher.IStorageFetcher }
func NewDiffExtractor ¶ added in v0.1.0
func NewDiffExtractor(fetcher fetcher.IStorageFetcher, db *postgres.DB) DiffExtractor
func (DiffExtractor) ExtractDiffs ¶ added in v0.1.0
func (extractor DiffExtractor) ExtractDiffs() error
type DiffRepository ¶ added in v0.1.0
type DiffRepository interface { CreateStorageDiff(rawDiff types.RawDiff) (int64, error) CreateBackFilledStorageValue(rawDiff types.RawDiff) error GetNewDiffs(minID, limit int) ([]types.PersistedDiff, error) GetUnrecognizedDiffs(minID, limit int) ([]types.PersistedDiff, error) GetPendingDiffs(minID, limit int) ([]types.PersistedDiff, error) MarkTransformed(id int64) error MarkNoncanonical(id int64) error MarkNoncanonicalDiffsAsNew(blockNumber int64) error MarkUnrecognized(id int64) error MarkUnwatched(id int64) error MarkPending(id int64) error GetFirstDiffIDForBlockHeight(blockHeight int64) (int64, error) }
Click to show internal directories.
Click to hide internal directories.