Skip to content

Nothing prevents abi-to-sol from generating invalid identifiers #131

@gnidan

Description

@gnidan

Discovered while investigating #130.

Solidity has a bunch of keywords that cannot be used as identifiers for variable names. This list of keywords of course is unlikely to (and does not) match the list of keywords from other languages, like Vyper. So if a Vyper contract defines, e.g., an event event Payment:\n type: uint256, abi-to-sol will produce event Payment(uint256 type), which is invalid.

Likely the fix for this is to cross-reference variable identifiers with a list of Solidity keywords, then to append an underscore when there's a collision.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions