ipld-eth-server/pkg/transformers/test_data/mocks/vat_flux/converter.go
2018-10-17 10:53:53 -05:00

23 lines
554 B
Go

package vat_flux
import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
"github.com/vulcanize/vulcanizedb/pkg/transformers/vat_flux"
)
type MockVatFlux struct {
err error
PassedLogs []types.Log
}
func (converter *MockVatFlux) ToModels(ethLogs []types.Log) ([]vat_flux.VatFluxModel, error) {
converter.PassedLogs = ethLogs
return []vat_flux.VatFluxModel{test_data.VatFluxModel}, converter.err
}
func (converter *MockVatFlux) SetConverterError(e error) {
converter.err = e
}