vyper icon indicating copy to clipboard operation
vyper copied to clipboard

Add the contract name to the json key when requesting a combined_json format to match that of solidity

Open gballet opened this issue 5 years ago • 6 comments

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

gballet avatar Dec 03 '19 07:12 gballet

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.

jacqueswww avatar Dec 05 '19 22:12 jacqueswww

That is my preferred outcome as well. Just use the filename (minus the extension) as the contract name for compatibility.

fubuloubu avatar Dec 05 '19 22:12 fubuloubu

Also, this may not need to be an VIP?

fubuloubu avatar Dec 05 '19 22:12 fubuloubu

That mycontract.vy:mycontract format would be perfect.

gballet avatar Dec 16 '19 08:12 gballet

we should probably have the contract name be the basename of the filename

charles-cooper avatar Mar 13 '24 15:03 charles-cooper

@gballet is this still something you need?

charles-cooper avatar Apr 03 '24 17:04 charles-cooper