forked from cerc-io/ipld-eth-server
655d1b1d6f
* Functions in pkg should return errors * If aborting is desired, that behavior should be left to the consumer
18 lines
454 B
Go
18 lines
454 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
|
|
"github.com/8thlight/vulcanizedb/cmd"
|
|
"github.com/8thlight/vulcanizedb/pkg/core"
|
|
)
|
|
|
|
func main() {
|
|
environment := flag.String("environment", "", "Environment name")
|
|
contractHash := flag.String("contract-hash", "", "contract-hash=x1234")
|
|
flag.Parse()
|
|
config := cmd.LoadConfig(*environment)
|
|
repository := cmd.LoadPostgres(config.Database)
|
|
repository.CreateWatchedContract(core.WatchedContract{Hash: *contractHash})
|
|
}
|