Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete solidity_contracts/src/starknet directory #1520

Merged
merged 4 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions kakarot_scripts/utils/kakarot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import functools
import json
import logging
import re
import time
from collections import defaultdict
from pathlib import Path
Expand Down Expand Up @@ -71,6 +72,7 @@ class StarknetTransactionError(Exception):
def get_solidity_artifacts(
contract_app: str,
contract_name: str,
version: Optional[str] = None,
):
import toml

Expand All @@ -82,11 +84,13 @@ def get_solidity_artifacts(
foundry_file = toml.loads(Path("foundry.toml").read_text())

src_path = Path(foundry_file["profile"]["default"]["src"])
version_pattern = version if version else r"(\.[\d.]+)?"
all_compilation_outputs = [
json.load(open(file))
for file in Path(foundry_file["profile"]["default"]["out"]).glob(
f"**/{contract_name}.json"
f"**/{contract_name}*.json"
)
if re.match(re.compile(f"{contract_name}{version_pattern}$"), file.stem)
]
if len(all_compilation_outputs) == 1:
target_compilation_output = all_compilation_outputs[0]
Expand All @@ -109,7 +113,7 @@ def get_solidity_artifacts(
)
]

if len(target_compilation_output) != 1:
if len(target_compilation_output) != 1 and version is not None:
raise ValueError(
f"Cannot locate a unique compilation output for target {target_solidity_file_path[0]}: "
f"found {len(target_compilation_output)} outputs:\n{target_compilation_output}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pragma solidity 0.8.27;

import {AddressAliasHelper} from "./AddressAliasHelper.sol";
import {IStarknetMessaging} from "../starknet/IStarknetMessaging.sol";
import {IStarknetMessaging} from "../Starknet/IStarknetMessaging.sol";

interface IL1KakarotMessaging {
function sendMessageToL2(address to, uint248 value, bytes memory data) external payable;
Expand Down
2 changes: 1 addition & 1 deletion solidity_contracts/src/L1L2Messaging/MessageAppL1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pragma solidity ^0.8.0;

import "./L1KakarotMessaging.sol";
import "./MessageAppL2.sol";
import "../starknet/IStarknetMessaging.sol";
import "../Starknet/IStarknetMessaging.sol";

// Define some custom error as an example.
// It saves a lot's of space to use those custom error instead of strings.
Expand Down
2 changes: 1 addition & 1 deletion solidity_contracts/src/Starknet/StarknetMessagingLocal.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: Apache-2.0.
pragma solidity ^0.8.0;

import "../starknet/StarknetMessaging.sol";
import "../Starknet/StarknetMessaging.sol";

/**
@notice Interface related to local messaging for Starknet.
Expand Down
76 changes: 0 additions & 76 deletions solidity_contracts/src/starknet/IStarknetMessaging.sol

This file was deleted.

66 changes: 0 additions & 66 deletions solidity_contracts/src/starknet/IStarknetMessagingEvents.sol

This file was deleted.

120 changes: 0 additions & 120 deletions solidity_contracts/src/starknet/NamedStorage.sol

This file was deleted.

Loading
Loading