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

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

Open
gballet opened this issue Dec 3, 2019 · 6 comments

Comments

@gballet
Copy link

gballet commented Dec 3, 2019

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

@jacqueswww
Copy link
Contributor

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.

@fubuloubu
Copy link
Member

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

@fubuloubu
Copy link
Member

Also, this may not need to be an VIP?

@gballet
Copy link
Author

gballet commented Dec 16, 2019

That mycontract.vy:mycontract format would be perfect.

@charles-cooper
Copy link
Member

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

@charles-cooper charles-cooper added this to the v0.4.0 milestone Mar 13, 2024
@charles-cooper
Copy link
Member

@gballet is this still something you need?

@charles-cooper charles-cooper removed this from the v0.4.0 milestone May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants