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

fix: add libraries for linkage with solc in verification info #1335

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions brownie/network/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,13 @@ def get_verification_info(self) -> Dict:
compiler._get_solc_remappings(config["solc"]["remappings"]),
)
)
libs = {lib.strip("_") for lib in re.findall("_{1,}[^_]*_{1,}", self.bytecode)}
compiler_settings = {
"evmVersion": self._build["compiler"]["evm_version"],
"optimizer": config["solc"]["optimizer"],
"libraries": {
Path(source_fp).name: {lib: self._project[lib][-1].address for lib in libs}
},
}
self._flattener = Flattener(source_fp, self._name, remaps, compiler_settings)

Expand Down