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

22 lines
499 B
Go
Raw Normal View History

2018-10-17 15:53:06 +00:00
package vat_flux
import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/vulcanize/vulcanizedb/pkg/transformers/test_data"
)
2018-10-24 21:40:31 +00:00
type MockVatFluxConverter struct {
2018-10-17 15:53:06 +00:00
err error
PassedLogs []types.Log
}
2018-10-24 21:40:31 +00:00
func (converter *MockVatFluxConverter) ToModels(ethLogs []types.Log) ([]interface{}, error) {
2018-10-17 15:53:06 +00:00
converter.PassedLogs = ethLogs
2018-10-24 21:40:31 +00:00
return []interface{}{test_data.VatFluxModel}, converter.err
2018-10-17 15:53:06 +00:00
}
2018-10-24 21:40:31 +00:00
func (converter *MockVatFluxConverter) SetConverterError(e error) {
2018-10-17 15:53:06 +00:00
converter.err = e
}