Closed danceratopz closed 1 year ago
The settings in get_compiler_settings
should return compliant JSON for publishing; that was the intent anyway. Having validation in ape-etherscan
is good to though, but the main bug is ape-solidity
so I am going to fix it there.
thank you for reporting and sorry it took so long to get to this!
ape-solidity PR: https://github.com/ApeWorX/ape-solidity/pull/79/files
Environment information
ape
and plugin versions:What went wrong?
If
ape-config.xml
contains a library remapping such as:and a previously deployed contract is published with the command:
it fails with the error:
Upon inspection in the debugger it seems to be caused by an
import_remapping
config inape-config.xml
(as included above):which is of Python type
set
.We can see that the
standard_json_output
provided tojson.dumps
(inape_etherscan/client.py:210
) contains asettings
dict with a top-level "remappings" entry whose value is a set:The
settings
are obtained from the compiler's settings inattempt_verification()
fromverify.py
.How can it be fixed?
The remappings entry in the settings should be a list, for example
ape-etherscan
should probably do some type checking or casting before submitting the published settings. We could check if there's any advantage to holding the "remappings" in a set in https://github.com/ApeWorX/ape-solidity, if not, it could potentially also be changed there.