ipld-eth-server/pkg/geth/testing/helpers.go

25 lines
517 B
Go
Raw Normal View History

package testing
import (
"log"
2018-01-06 20:31:53 +00:00
"github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/geth"
"github.com/vulcanize/vulcanizedb/test_config"
)
2017-12-04 22:54:35 +00:00
func SampleContract() core.Contract {
return core.Contract{
Abi: sampleAbiFileContents(),
Hash: "0xd26114cd6EE289AccF82350c8d8487fedB8A0C07",
}
}
func sampleAbiFileContents() string {
abiFileContents, err := geth.ReadAbiFile(test_config.ABIFilePath + "sample_abi.json")
if err != nil {
log.Fatal(err)
}
return abiFileContents
}