forked from cerc-io/ipld-eth-server
Extract constants package
- Reduce clutter in the shared package
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
package vat_tune
|
||||
|
||||
import "github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
import (
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
)
|
||||
|
||||
var VatTuneConfig = shared.TransformerConfig{
|
||||
TransformerName: shared.VatTuneLabel,
|
||||
ContractAddresses: []string{shared.VatContractAddress},
|
||||
ContractAbi: shared.VatABI,
|
||||
Topic: shared.VatTuneSignature,
|
||||
TransformerName: constants.VatTuneLabel,
|
||||
ContractAddresses: []string{constants.VatContractAddress},
|
||||
ContractAbi: constants.VatABI,
|
||||
Topic: constants.VatTuneSignature,
|
||||
StartingBlockNumber: 0,
|
||||
EndingBlockNumber: 10000000,
|
||||
}
|
||||
|
||||
@@ -6,10 +6,11 @@ import (
|
||||
"errors"
|
||||
"math/big"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
)
|
||||
|
||||
type VatTuneConverter struct{}
|
||||
@@ -55,7 +56,7 @@ func verifyLog(log types.Log) error {
|
||||
if len(log.Topics) < 4 {
|
||||
return errors.New("log missing topics")
|
||||
}
|
||||
if len(log.Data) < shared.DataItemLength {
|
||||
if len(log.Data) < constants.DataItemLength {
|
||||
return errors.New("log missing data")
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user