ipld-eth-server/pkg/transformers/test_data/mocks/vat_flux/converter.go
2018-10-25 10:02:06 -05:00

22 lines
499 B
Go

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