mirror of
https://github.com/GrassrootsEconomics/cic-dw.git
synced 2026-05-28 15:27:56 +02:00
refactor: move pkg's out
- to cic_go
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"cic-dw/pkg/cicnet"
|
||||
"context"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/grassrootseconomics/cic_go/cic_net"
|
||||
"github.com/hibiken/asynq"
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/knadh/koanf"
|
||||
@@ -69,7 +69,7 @@ func parseRedis(dsn string) (asynq.RedisConnOpt, error) {
|
||||
func connectCicNet(rpcProvider string, tokenIndex common.Address) error {
|
||||
var err error
|
||||
|
||||
cicnetClient, err = cicnet.NewCicNet(rpcProvider, tokenIndex)
|
||||
cicnetClient, err = cic_net.NewCicNet(rpcProvider, tokenIndex)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"cic-dw/pkg/cicnet"
|
||||
"github.com/grassrootseconomics/cic_go/cic_net"
|
||||
"github.com/jackc/pgx/v4/pgxpool"
|
||||
"github.com/knadh/koanf"
|
||||
"github.com/lmittmann/w3"
|
||||
@@ -19,7 +19,7 @@ var (
|
||||
queries goyesql.Queries
|
||||
conf config
|
||||
db *pgxpool.Pool
|
||||
cicnetClient *cicnet.CicNet
|
||||
cicnetClient *cic_net.CicNet
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -37,7 +37,6 @@ func init() {
|
||||
log.Fatal().Err(err).Msg("failed to connect to postgres")
|
||||
}
|
||||
|
||||
// TODO: Not core, should be handled by job processor
|
||||
if err := connectCicNet(conf.Chain.RpcProvider, w3.A(conf.Chain.TokenRegistry)); err != nil {
|
||||
log.Fatal().Err(err).Msg("failed to connect to postgres")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user