ipld-eth-server/pkg/transformers/test_data/mocks/vat_tune/converter.go
2018-10-09 14:37:26 -05:00

22 lines
580 B
Go

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