solidity
solidity copied to clipboard
Add parser support for ``code`` data location.
First step in https://github.com/ethereum/solidity/issues/13323.
Targetting the breaking branch, we should make code
a proper keyword and allow its use as a data location.
A first step would then just disallowing any declaration in which code
actually occurs as data location a syntax error (i.e. "not yet supported").
As a side-remark: once this is done, we could have a breaking release any time and implement the rest of the code
data location non-breakingly.
When closing this issue, https://github.com/ethereum/solidity/issues/13369 should be moved to the Design/Decide
column of the Focus Board.
Since we realized that address types have a .code
member, this gets slightly more complicated.
In the call today, we decided to still keep both the address member and the data location called code
for now. But that means that we need a parser hack during parsing member accesses:
In fact there is also such a parser hack in place for parsing the .address
member.
In Parser::expectIdentifierTokenOrAddress
, we just need to do the same for Token::Code
as we do for Token::Address
.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 300.0 1INCH (169.62 USD @ $0.57/1INCH) attached to it.
- If you would like to work on this issue you can 'start work' on the Gitcoin Issue Details page.
- Want to chip in? Add your own contribution here.
- Questions? Checkout Gitcoin Help or the Gitcoin's Discord
- $1,003,799,911.71 more funded OSS Work available on the Gitcoin Issue Explorer
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 264 years, 1 month from now. Please review their action plans below:
1) theosch has been approved to start work.
The plan is simple: 1) Learn where the data locations are parsed; 2) Make the code
keyword be recognized and processed like it's requirefd (i.e. report a "not yet supported" error); that's all. As there is a lot of extra information in the discussion at GitHub, it's going to take a few hours only.
Thanks
Learn more on the Gitcoin Issue Details page.
expectIdentifierTokenOrAddress
I believe there is probably significant work already done here: https://github.com/ethereum/solidity/pull/13468, including the hack mentioned by @ekpyron 🧐🤔 : https://github.com/ethereum/solidity/blob/add_parser_support_for_code_data_location/libsolidity/parsing/Parser.cpp#L2388
Yes, this issue is actively being worked on by the core compiler team - so it's not a particularly good choice for an external gitcoin grant...
Didn't notice that I'm approved hours ago, the email notification was late; So can I try to make it? I think I can make it by tomorrow.
As I was trying to say: there is nothing to take here - the change will be handled by the core team and is already in progress. The gitcoin grant here is not coming from the compiler team, so I can't approve or disapprove anything, but there is little point in working on this, resp. creating a new PR on it.
@natalietop seems to have set up the bounty.