argotorg / argotorg/solidity

Type-Checking for ``immutable`` as data location.

Open
#13,369 4 comments 0 reactions 0 assignees View on GitHub
breaking change :warning: has dependencies high impact medium effort roadmap selected for development
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

Depends on https://github.com/ethereum/solidity/issues/13368.
As a second step of https://github.com/ethereum/solidity/issues/13323, we properly type check the new ``code`` data location.

This entails removing the syntax error introduced in https://github.com/ethereum/solidity/issues/13368 and instead implementing the type checker logic for the ``code`` data location.

This will mostly involve conscious copying of the behaviour of the ``calldata`` location in runtime context and of the ``memory`` location in creation context. Since ``code`` variables behave differently depending on creation vs runtime context, this will require some refactoring of the type checking logic (may overlap with https://github.com/ethereum/solidity/issues/13365).

This should be accompanied by extensive syntax tests that demonstrate the type checking behaviour.

Finally, in code generation, any attempt to generate code for a ``code`` variable should result in an ``solUnimplementedAssert`` to be eliminated in subsequent steps.

Contributor guide

Open the contributing guide

Research direction

Start by reading issues 13368, 13323, and 13365, then compare the existing type-checking behavior for calldata and memory in runtime and creation contexts. Review the syntax-test coverage and code-generation path described in the issue; done means code-location type checking is implemented, syntax tests cover it, and code generation emits solUnimplementedAssert for code variables.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.