Skip to content

Commit

Permalink
fix(contracts): Remove unused contract and make script compatible wit…
Browse files Browse the repository at this point in the history
…h Python <3.12 (evmos#2613)

* remove unused contract and run make contracts-compile

* remove Union operator to support Python <3.12

* add changelog entry
  • Loading branch information
MalteHerrmann authored Jun 10, 2024
1 parent e813f30 commit adb7b91
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 70 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
- (ibc) [#2504](https://github.com/evmos/evmos/pull/2504) Refactor repeated unpacking of IBC packet data.
- (make) [#2487](https://github.com/evmos/evmos/pull/2487) Improve make command to compile all smart contracts in repository.
- (evm) [#2594](https://github.com/evmos/evmos/pull/2594) Move `CallEVM` and `CallEVMWithData` to `x/evm` module.
- (contracts) [#2613](https://github.com/evmos/evmos/pull/2613) Remove unused contract and make script useable with Python <3.12.

## [v18.1.0](https://github.com/evmos/evmos/releases/tag/v18.1.0) - 2024-05-31

Expand Down
4 changes: 2 additions & 2 deletions precompiles/staking/testdata/StakingCaller.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions scripts/compile_smart_contracts/compile_smart_contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from dataclasses import dataclass
from pathlib import Path
from shutil import copy, rmtree
from typing import List
from typing import List, Union

# The path to the main level of the Evmos repository.
REPO_PATH = Path(__file__).parent.parent.parent
Expand Down Expand Up @@ -60,15 +60,15 @@ class Contract:
as well as the path to where the compiled JSON data is stored.
"""

compiledJSONPath: Path | None
compiledJSONPath: Union[Path, None]
filename: str
path: Path
relative_path: Path


def find_solidity_contracts(
path: Path,
added_contract: str | None = None,
added_contract: Union[str, None] = None,
) -> List[Contract]:
"""
Finds all Solidity files in the given Path.
Expand Down Expand Up @@ -273,7 +273,7 @@ def is_relative_target(path: Path) -> bool:
return path == RELATIVE_TARGET


def compile_files(repo_path: Path, added_contract: str | None = None):
def compile_files(repo_path: Path, added_contract: Union[str, None] = None):
"""
This function compiles the Solidity contracts in the repository
with Hardhat.
Expand Down
6 changes: 3 additions & 3 deletions x/erc20/keeper/testdata/ERC20DirectBalanceManipulation.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions x/erc20/keeper/testdata/ERC20MaliciousDelayed.json

Large diffs are not rendered by default.

26 changes: 0 additions & 26 deletions x/erc20/keeper/testdata/tokenTransfer.go

This file was deleted.

4 changes: 0 additions & 4 deletions x/erc20/keeper/testdata/tokenTransfer.json

This file was deleted.

26 changes: 0 additions & 26 deletions x/erc20/keeper/testdata/tokenTransfer.sol

This file was deleted.

Loading

0 comments on commit adb7b91

Please sign in to comment.