Skip to content

Commit

Permalink
Merge pull request eth-brownie#1335 from skellet0r/fix/verifier-unlin…
Browse files Browse the repository at this point in the history
…ked-libraries

fix: add libraries for linkage with solc in verification info
  • Loading branch information
iamdefinitelyahuman authored and pygeek committed Nov 25, 2021
2 parents 767cab0 + e70269f commit ed0ed2b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions brownie/network/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,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
2 changes: 1 addition & 1 deletion requirements-windows.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ wcwidth==0.2.5
# prompt-toolkit
web3==5.24.0
# via -r requirements.txt
websockets==9.1
websockets==10.1
# via
# -r requirements.txt
# web3
Expand Down
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,10 @@ wcwidth==0.2.5
# via prompt-toolkit
web3==5.24.0
# via -r requirements.in
websockets==9.1
# via web3
websockets==10.1
# via
# -r requirements.in
# web3
wrapt==1.13.2
# via -r requirements.in
yarl==1.7.0
Expand Down

0 comments on commit ed0ed2b

Please sign in to comment.