Skip to content

Commit

Permalink
Delete solidity_contracts/src/starknet directory (#1520)
Browse files Browse the repository at this point in the history
<!--- Please provide a general summary of your changes in the title
above -->

<!-- Give an estimate of the time you spent on this PR in terms of work
days.
Did you spend 0.5 days on this PR or rather 2 days?  -->

Time spent on this PR:

## Pull request type

<!-- Please try to limit your pull request to one type,
submit multiple pull requests if needed. -->

Please check the type of change your PR introduces:

- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying,
or link to a relevant issue. -->

Resolves #<Issue number>

## What is the new behavior?

<!-- Please describe the behavior or changes that are being added by
this PR. -->

-
-
-

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/kkrt-labs/kakarot/1520)
<!-- Reviewable:end -->
  • Loading branch information
ClementWalter authored Oct 21, 2024
1 parent d0d6e91 commit 8ff7b14
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 534 deletions.
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

0 comments on commit 8ff7b14

Please sign in to comment.