Skip to content

Commit

Permalink
[Hotfix] Add support for latest foundry version (#399)
Browse files Browse the repository at this point in the history
* add support for latest foundry version

* Set Version: 0.1.172

---------

Co-authored-by: devops <devops@runtimeverification.com>
  • Loading branch information
anvacaru and devops authored Feb 28, 2024
1 parent fc9a495 commit 72d7a36
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.171
0.1.172
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "kontrol"
version = "0.1.171"
version = "0.1.172"
description = "Foundry integration for KEVM"
authors = [
"Runtime Verification, Inc. <contact@runtimeverification.com>",
Expand Down
2 changes: 1 addition & 1 deletion src/kontrol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
if TYPE_CHECKING:
from typing import Final

VERSION: Final = '0.1.171'
VERSION: Final = '0.1.172'
7 changes: 6 additions & 1 deletion src/kontrol/solc_to_k.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,12 @@ def __init__(self, contract_name: str, contract_json: dict, foundry: bool = Fals
self.contract_json = contract_json

self.contract_id = self.contract_json['id']
self.contract_path = self.contract_json['ast']['absolutePath']
try:
self.contract_path = self.contract_json['ast']['absolutePath']
except KeyError:
raise ValueError(
"Must have 'ast' field in solc output. Make sure `ast = true` is present in foundry.toml"
) from None

evm = self.contract_json['evm'] if not foundry else self.contract_json

Expand Down
2 changes: 1 addition & 1 deletion src/tests/integration/test-data/foundry/foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ out = 'out'
test = 'test'
extra_output = ['storageLayout', 'abi', 'evm.methodIdentifiers', 'evm.deployedBytecode.object', 'devdoc']
rpc_endpoints = { optimism = "https://optimism.alchemyapi.io/v2/...", mainnet = "${RPC_MAINNET}" }

ast = true

0 comments on commit 72d7a36

Please sign in to comment.