Skip to content

Commit

Permalink
✨ Add support for Solidity 0.8.21
Browse files Browse the repository at this point in the history
  • Loading branch information
michprev committed Oct 8, 2023
1 parent 174dd86 commit 2deba22
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions woke/compiler/solc_frontend/input_data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ class SolcOutputSelectionEnum(StrEnum):
METADATA = "metadata"
IR = "ir"
"""Yul intermediate representation of the code before optimization"""
IR_AST = "irAst"
"""AST of Yul intermediate representation of the code before optimization"""
IR_OPTIMIZED = "irOptimized"
"""Intermediate representation after optimization"""
IR_OPTIMIZED_AST = "irOptimizedAst"
"""AST of intermediate representation after optimization"""
STORAGE_LAYOUT = "storageLayout"
"""Slots, offsets and types of the contract's state variables"""
EVM_ALL = "evm"
Expand Down
8 changes: 7 additions & 1 deletion woke/compiler/solc_frontend/output_data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,13 @@ class SolcOutputContractInfo(SolcOutputModel):
devdoc: Optional[Dict] = None
"""Developer documentation (natspec)"""
ir: Optional[str] = None
"""Intermediate representation (string)"""
"""Intermediate representation before optimization (string)"""
ir_ast: Optional[Dict] = None
"""AST of intermediate representation before optimization"""
ir_optimized: Optional[str] = None
"""Intermediate representation after optimization (string)"""
ir_optimized_ast: Optional[Dict] = None
"""AST of intermediate representation after optimization"""
storage_layout: Optional[SolcOutputStorageLayout] = None
"""See https://docs.soliditylang.org/en/latest/internals/layout_in_storage.html#json-output"""
evm: Optional[SolcOutputEvmData] = None
Expand Down
2 changes: 1 addition & 1 deletion woke/config/woke_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def min_solidity_version(self) -> SolidityVersion:

@property
def max_solidity_version(self) -> SolidityVersion:
return SolidityVersion.fromstring("0.8.20")
return SolidityVersion.fromstring("0.8.21")

@property
def detectors(self) -> DetectorsConfig:
Expand Down
2 changes: 1 addition & 1 deletion woke/ir/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def iter_list(l: List):


class YulNode(SolcNode):
pass
native_src: Optional[Src] # new in 0.8.21


class SolcSourceUnit(SolidityNode):
Expand Down

0 comments on commit 2deba22

Please sign in to comment.