argotorg / argotorg/solidity

Introduce solidity.evmVersion() to query the target EVM

Open
#10,283 9 comments 1 reaction 0 assignees View on GitHub
language design :rage4:
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

Introduce `solidity.evmVersion()` function which returns an enum of `enum solidity.EvmVersion { Homstead, TangerineWhistle, SpuriousDragon, ... }`.

This would mean the `solidity` identifier is reserved for "language magic", but we could consider such functions to be explicitly importable instead from the special solidity source:
```
import evmVersion from solidity; // notice that `solidity` is not a literal, but an identifier
```

This would be useful for implementing features in #10282.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how the special `solidity` source and language-magic identifiers are handled. Compare the proposed `EvmVersion` enum with the compiler's target EVM version support, and resolve whether the API or explicit import form is intended. Done means the selected interface can report the target EVM version and supports the feature described in #10282.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.