ipld-eth-server/cmd/subscribe_contract/main.go
2017-11-13 10:11:27 -06:00

19 lines
514 B
Go

package main
import (
"flag"
"github.com/8thlight/vulcanizedb/cmd"
"github.com/8thlight/vulcanizedb/pkg/core"
"github.com/8thlight/vulcanizedb/pkg/repositories"
)
func main() {
environment := flag.String("environment", "", "Environment name")
contractHash := flag.String("contract-hash", "", "contract-hash=x1234")
flag.Parse()
config := cmd.LoadConfig(*environment)
repository := repositories.NewPostgres(config.Database)
repository.CreateWatchedContract(core.WatchedContract{Hash: *contractHash})
}