Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brownie configuration structure mismatch #113

Open
zivkovicmilos opened this issue Nov 13, 2022 · 0 comments
Open

Brownie configuration structure mismatch #113

zivkovicmilos opened this issue Nov 13, 2022 · 0 comments

Comments

@zivkovicmilos
Copy link
Contributor

Description

The current go specification that is used to unmarshal Brownie configuration YAML files does not conform to the official Brownie configuration file layout:

type Config struct {
ProjectDirectory string `json:"project_directory" yaml:"project_directory"`
BuildDirectory string `json:"contracts_build_directory" yaml:"build_directory"`
Networks map[string]NetworkConfig `json:"networks" yaml:"-"`
Solc map[string]Optimizer `json:"solc" yaml:"solc"`
Compilers map[string]Compiler `json:"compilers" yaml:"compiler"`
ConfigType string `json:"-"`
Paths Paths `json:"paths" yaml:"paths"`
}

The Brownie config is currently unmarshalled into this structure here.

Proposed solution

Currently, I have a draft PR that includes a Brownie configuration read test, but doesn't modify the common Config structure.

The obvious solution here would probably be to create a separate configuration structure for each provider, because they can have subtle differences, and use that.

Should I open a separate PR that standardizes these configuration reads?

@delta003 @Riphal @mspuz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant