ipld-eth-server/pkg/fakes/mock_poller.go
Ian Norden 1aa849bcb4 PR fixes; remove all infura token references and setup travis to use encrypted env
variable; rest of the ethjson_rpc dependent tests extracted to integration_test
2019-03-21 18:36:51 -05:00

25 lines
607 B
Go

package fakes
import (
"github.com/vulcanize/vulcanizedb/pkg/contract_watcher/shared/contract"
)
type MockPoller struct {
ContractName string
}
func (*MockPoller) PollContract(con contract.Contract, lastBlock int64) error {
panic("implement me")
}
func (*MockPoller) PollContractAt(con contract.Contract, blockNumber int64) error {
panic("implement me")
}
func (poller *MockPoller) FetchContractData(contractAbi, contractAddress, method string, methodArgs []interface{}, result interface{}, blockNumber int64) error {
if p, ok := result.(*string); ok {
*p = poller.ContractName
}
return nil
}