forked from cerc-io/ipld-eth-server
Extract constants package
- Reduce clutter in the shared package
This commit is contained in:
@@ -16,13 +16,14 @@ package vat_fold
|
||||
|
||||
import (
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
)
|
||||
|
||||
var VatFoldConfig = shared.TransformerConfig{
|
||||
TransformerName: shared.VatFoldLabel,
|
||||
ContractAddresses: []string{shared.VatContractAddress},
|
||||
ContractAbi: shared.VatABI,
|
||||
Topic: shared.VatFoldSignature,
|
||||
TransformerName: constants.VatFoldLabel,
|
||||
ContractAddresses: []string{constants.VatContractAddress},
|
||||
ContractAbi: constants.VatABI,
|
||||
Topic: constants.VatFoldSignature,
|
||||
StartingBlockNumber: 0,
|
||||
EndingBlockNumber: 10000000,
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"errors"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
|
||||
)
|
||||
|
||||
type VatFoldConverter struct{}
|
||||
@@ -62,7 +62,7 @@ func verifyLog(log types.Log) error {
|
||||
}
|
||||
|
||||
sig := log.Topics[0].String()
|
||||
if sig != shared.VatFoldSignature {
|
||||
if sig != constants.VatFoldSignature {
|
||||
return errors.New("log is not a Vat.fold event")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user