Update NewSummary to take the blockchain

This commit is contained in:
Eric Meyer
2017-11-27 09:21:21 -06:00
parent 90edd15ead
commit 9c1051bfce
4 changed files with 21 additions and 7 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ import (
"fmt"
"github.com/8thlight/vulcanizedb/cmd"
"github.com/8thlight/vulcanizedb/pkg/geth"
"github.com/8thlight/vulcanizedb/pkg/repositories"
"github.com/8thlight/vulcanizedb/pkg/watched_contracts"
)
@@ -18,8 +19,9 @@ func main() {
flag.Parse()
config := cmd.LoadConfig(*environment)
blockchain := geth.NewGethBlockchain(config.Client.IPCPath)
repository := repositories.NewPostgres(config.Database)
contractSummary, err := watched_contracts.NewSummary(repository, *contractHash)
contractSummary, err := watched_contracts.NewSummary(blockchain, repository, *contractHash)
if err != nil {
log.Fatalln(err)
}