Skip to content

Commit

Permalink
Made the func BaseConfig and ChainID exportable
Browse files Browse the repository at this point in the history
  • Loading branch information
VeerChaurasia committed Sep 20, 2024
1 parent 9d72f4a commit 118827c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Config struct {
// only if we are using CLI
func (c Config) from_file(configPath *string, network *string, cliConfig *CliConfig) Config {
n := Network(*network)
baseConfig, err := n.baseConfig(*network)
baseConfig, err := n.BaseConfig(*network)
if err != nil {
baseConfig = BaseConfig{}.Default()
}
Expand Down
4 changes: 2 additions & 2 deletions config/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const (
GOERLI Network = "GOERLI"
SEPOLIA Network = "SEPOLIA"
)
func (n Network) baseConfig(s string) (BaseConfig, error) {
func (n Network) BaseConfig(s string) (BaseConfig, error) {
switch strings.ToUpper(s) {
case "MAINNET":
config, err := Mainnet()
Expand All @@ -37,7 +37,7 @@ func (n Network) baseConfig(s string) (BaseConfig, error) {
return BaseConfig{}, errors.New("network not recognized")
}
}
func (n Network) chainID (id uint64) (BaseConfig, error) {
func (n Network) ChainID(id uint64) (BaseConfig, error) {
switch id {
case 1:
config, err := Mainnet()
Expand Down

0 comments on commit 118827c

Please sign in to comment.