diff --git a/file/router.go b/file/router.go index 02ef71f..7c90d66 100644 --- a/file/router.go +++ b/file/router.go @@ -18,11 +18,18 @@ var _ types.Router = (*fileRouter)(nil) // NewRouter creates a new file router. func NewRouter(configFile string) (types.Router, error) { + baseRouter, err := base.NewRouter() + if err != nil { + return nil, err + } + fileRouter := &fileRouter{ + BaseRouter: baseRouter, + configFile: configFile, } - err := fileRouter.loadConfigFile() + err = fileRouter.loadConfigFile() if err != nil { return nil, err } diff --git a/go.mod b/go.mod index dfb78b8..fa6608e 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/tessellated-io/router go 1.20 require ( - github.com/tessellated-io/pickaxe v1.0.14 + github.com/tessellated-io/pickaxe v1.1.0 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/go.sum b/go.sum index 5d18144..7be14e9 100644 --- a/go.sum +++ b/go.sum @@ -21,8 +21,8 @@ github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.29.1 h1:cO+d60CHkknCbvzEWxP0S9K6KqyTjrCNUy1LdQLCGPc= github.com/rs/zerolog v1.29.1/go.mod h1:Le6ESbR7hc+DP6Lt1THiV8CQSdkkNrd3R0XbEgp3ZBU= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/tessellated-io/pickaxe v1.0.14 h1:se9GbcTCdJHFo6Ej0MN2I2nTW9ruuauqjeU4tme2xDc= -github.com/tessellated-io/pickaxe v1.0.14/go.mod h1:wO7zNwLt2PbwH5C9j+p/KM+4I6K4zXY7rrq1567CPJE= +github.com/tessellated-io/pickaxe v1.1.0 h1:LSFhgK+GZw88w1F4M1T51FgIWePqTx952yliuuHM7rY= +github.com/tessellated-io/pickaxe v1.1.0/go.mod h1:G6FMTiWB8rLG4YH0THu2t2tZIMUC2Rykl22JotEIgLM= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/types/router.go b/types/router.go index 2ab5ce8..077d9af 100644 --- a/types/router.go +++ b/types/router.go @@ -4,5 +4,5 @@ package types type Router interface { Refresh() error - GrpcEndpoint(chainName string) (string, error) + GrpcEndpoint(ChainID string) (string, error) }