vyper
vyper copied to clipboard
Add the contract name to the json key when requesting a combined_json format to match that of solidity
Simple Summary
Solidity will output a combined_json whose primary keys are of the format <file name>:<contract name>. Vyper only uses <file name>. This forces geth to have an overly complex piece of code
Specification
-f combined_json should return a json whose primary keys follow the <file name>:<contract name> convention adopted by solidity.
Backwards Compatibility
If this new format causes an issue to other clients, it would be possible to guard it with an extra solidity_compat flag, e.g. -f combined_json,solidity_compat
Copyright
Copyright and related rights waived via CC0
Well Vyper doesn't have a contract name the contract name would then just be mycontract.vy:mycontract. We have talked about having contract names; but I quite like the simplicity of just having the file be contract name.
That is my preferred outcome as well. Just use the filename (minus the extension) as the contract name for compatibility.
Also, this may not need to be an VIP?
That mycontract.vy:mycontract format would be perfect.
we should probably have the contract name be the basename of the filename
@gballet is this still something you need?