shared

package
v1.0.0-mainnet.rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TwoTopicsRequired   = 2
	ThreeTopicsRequired = 3
	FourTopicsRequired  = 4
	LogDataRequired     = true
	LogDataNotRequired  = false
)

Variables

View Source
var (
	ErrLogMissingTopics = func(expectedNumTopics, actualNumTopics int) error {
		return fmt.Errorf("log missing topics: has %d, want %d", actualNumTopics, expectedNumTopics)
	}
	ErrLogMissingData   = errors.New("log missing data")
	ErrCouldNotCreateFK = func(err error) error {
		return fmt.Errorf("transformer could not create FK: %v", err)
	}
)
View Source
var ErrInvalidIndex = func(index int) error {
	return errors.New(fmt.Sprintf("unsupported log data index: %d", index))
}

Functions

func BigIntToInt64

func BigIntToInt64(value *big.Int) int64

func BigIntToString

func BigIntToString(value *big.Int) string

func ConvertInt256HexToBigInt added in v0.2.3

func ConvertInt256HexToBigInt(hex string) *big.Int

func ConvertIntStringToHex added in v0.2.2

func ConvertIntStringToHex(n string) (string, error)

func ConvertUint256HexToBigInt added in v0.2.3

func ConvertUint256HexToBigInt(hex string) *big.Int

func DecodeHexToText added in v0.2.4

func DecodeHexToText(payload string) string

func FormatRollbackError added in v0.2.15

func FormatRollbackError(field, err string) error

func GetEventTransformerConfig added in v0.2.15

func GetEventTransformerConfig(transformerLabel, signature string) transformer.EventTransformerConfig

Creates a transformer config by pulling values from configuration environment

func GetFullTableName added in v0.2.17

func GetFullTableName(schema, table string) string

func GetLogNoteArgumentAtIndex added in v0.2.6

func GetLogNoteArgumentAtIndex(index int, logData []byte) ([]byte, error)

func GetOrCreateAddress added in v0.2.15

func GetOrCreateAddress(address string, db *postgres.DB) (int64, error)

func GetOrCreateAddressInTransaction added in v0.2.15

func GetOrCreateAddressInTransaction(address string, tx *sqlx.Tx) (int64, error)

func GetOrCreateIlk

func GetOrCreateIlk(ilk string, db *postgres.DB) (int64, error)

func GetOrCreateIlkInTransaction

func GetOrCreateIlkInTransaction(ilk string, tx *sqlx.Tx) (int64, error)

func GetOrCreateUrn added in v0.2.2

func GetOrCreateUrn(guy string, hexIlk string, db *postgres.DB) (urnID int64, err error)

func GetOrCreateUrnInTransaction added in v0.2.2

func GetOrCreateUrnInTransaction(guy string, hexIlk string, tx *sqlx.Tx) (urnID int64, err error)

func MinInt64

func MinInt64(ints []int64) (min int64)

func VerifyLog added in v0.2.15

func VerifyLog(log types.Log, expectedNumTopics int, isDataRequired bool) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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