ipld-eth-server/pkg/transformers/test_data/mocks/vat_tune/converter.go

22 lines
580 B
Go
Raw Normal View History

2018-10-04 21:49:09 +00:00
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
}