-
-
Notifications
You must be signed in to change notification settings - Fork 804
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
Question: Contract address syntax and hardcoded contracts #701
Comments
Personally I think it can be a good practice to add finalized ERCs to the as precompiled. I think it can be much more convenient and make the code more consistent. |
I may have misspoke on it being a precompile in gitter, it's just a shortcut to that finalized ERC layout. I agree with above about how it's good to have these sorts of built in types available, but ERC20 does have some optional components and that makes this shortcut a little prescriptive. Something to think about moving forward. I agree on the different syntax piece, it should be more standardized. |
I see, thanks for info. I'll implement then something similar to ERC20 interface in K-vyper. |
What's your issue about?
Question 1. I'm wondering why there's such a diversity of syntax for an address that refers to a contract.
Right now I see at least 3 different syntaxes:
For storage variables: https://github.com/ethereum/vyper/blob/5b70797a31ffcbdd90b1dfd98f7b38d306bca7a0/tests/parser/features/external_contracts/test_external_contract_calls.py#L390
For function parameters: https://github.com/ethereum/vyper/blob/5b70797a31ffcbdd90b1dfd98f7b38d306bca7a0/tests/parser/features/external_contracts/test_external_contract_calls.py#L393
For hardcoded
ERC20
contract: https://github.com/ethereum/vyper/blob/5b70797a31ffcbdd90b1dfd98f7b38d306bca7a0/tests/parser/features/external_contracts/test_erc20_abi.py#L20Could they be replaced with one syntax in all contexts?
Question 2: Why
ERC20
has to be hardcoded? Can it be explicitly defined in all contracts that need it? Are there any other hardcoded contracts?The text was updated successfully, but these errors were encountered: