ipld-eth-server/pkg/transformers/storage_transformers.go
2019-02-08 13:36:30 -06:00

27 lines
1009 B
Go

package transformers
import (
"github.com/ethereum/go-ethereum/common"
"github.com/vulcanize/vulcanizedb/pkg/transformers/factories/storage"
"github.com/vulcanize/vulcanizedb/pkg/transformers/shared/constants"
"github.com/vulcanize/vulcanizedb/pkg/transformers/storage_diffs/maker"
"github.com/vulcanize/vulcanizedb/pkg/transformers/storage_diffs/maker/pit"
"github.com/vulcanize/vulcanizedb/pkg/transformers/storage_diffs/maker/vat"
)
func GetPitStorageTransformer() storage.Transformer {
return storage.Transformer{
Address: common.HexToAddress(constants.PitContractAddress()),
Mappings: &pit.PitMappings{StorageRepository: &maker.MakerStorageRepository{}},
Repository: &pit.PitStorageRepository{},
}
}
func GetVatStorageTransformer() storage.Transformer {
return storage.Transformer{
Address: common.HexToAddress(constants.VatContractAddress()),
Mappings: &vat.VatMappings{StorageRepository: &maker.MakerStorageRepository{}},
Repository: &vat.VatStorageRepository{},
}
}