ipld-eth-server/libraries/shared/transformer_interface.go

24 lines
542 B
Go
Raw Normal View History

package shared
import (
"github.com/ethereum/go-ethereum/common"
"github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
)
2018-03-16 19:34:18 +00:00
type Transformer interface {
Execute() error
}
2018-03-16 19:34:18 +00:00
type TransformerInitializer func(db *postgres.DB, blockchain core.Blockchain) Transformer
func HexToInt64(byteString string) int64 {
2018-03-16 19:34:18 +00:00
value := common.HexToHash(byteString)
return value.Big().Int64()
}
func HexToString(byteString string) string {
value := common.HexToHash(byteString)
return value.Big().String()
}