Handle events

- Adds interfaces for developers to build handlers that update data in
response to log events
- Resolves #29
This commit is contained in:
Matt Krump
2018-03-05 10:01:50 -06:00
parent ed907535e3
commit 06f78e0083
163 changed files with 586 additions and 22397 deletions
+6 -4
View File
@@ -1,11 +1,11 @@
package testing
import (
"path/filepath"
"log"
"github.com/vulcanize/vulcanizedb/pkg/config"
"github.com/vulcanize/vulcanizedb/pkg/core"
"github.com/vulcanize/vulcanizedb/pkg/geth"
"github.com/vulcanize/vulcanizedb/test_config"
)
func FindAttribute(contractAttributes core.ContractAttributes, attributeName string) *core.ContractAttribute {
@@ -25,7 +25,9 @@ func SampleContract() core.Contract {
}
func sampleAbiFileContents() string {
abiFilepath := filepath.Join(config.ProjectRoot(), "pkg", "geth", "testing", "sample_abi.json")
abiFileContents, _ := geth.ReadAbiFile(abiFilepath)
abiFileContents, err := geth.ReadAbiFile(test_config.ABIFilePath + "sample_abi.json")
if err != nil {
log.Fatal(err)
}
return abiFileContents
}