shared

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InsertIlkQuery = `INSERT INTO maker.ilks (ilk, identifier) VALUES ($1, $2) RETURNING id`
	InsertUrnQuery = `INSERT INTO maker.urns (identifier, ilk_id) VALUES ($1, $2) RETURNING id`
)

Variables

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 GetLogNoteArgumentAtIndex added in v0.2.6

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

func GetOrCreateIlk

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

func GetOrCreateIlkInTransaction

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

func GetOrCreateUrn added in v0.2.2

func GetOrCreateUrn(guy string, ilkID int, db *postgres.DB) (int, error)

func GetOrCreateUrnInTransaction added in v0.2.2

func GetOrCreateUrnInTransaction(guy string, ilkID int, tx *sqlx.Tx) (int, error)

func GetTicInTx

func GetTicInTx(headerID int64, tx *sqlx.Tx) (int64, error)

func MinInt64

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

Types

type LogNoteConverter added in v0.2.3

type LogNoteConverter interface {
	ToModels(ethLog []types.Log) ([]interface{}, error)
}

type LogNoteTransformer added in v0.2.3

type LogNoteTransformer struct {
	Config     transformer.EventTransformerConfig
	Converter  LogNoteConverter
	Repository event.Repository
}

func (LogNoteTransformer) Execute added in v0.2.3

func (tr LogNoteTransformer) Execute(logs []types.Log, header core.Header) error

func (LogNoteTransformer) GetConfig added in v0.2.3

func (LogNoteTransformer) GetName added in v0.2.3

func (tr LogNoteTransformer) GetName() string

func (LogNoteTransformer) NewLogNoteTransformer added in v0.2.3

func (tr LogNoteTransformer) NewLogNoteTransformer(db *postgres.DB) transformer.EventTransformer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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