Skip to content

Commit

Permalink
Merge branch 'dev' into fix-metadata-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
montyly authored Dec 6, 2022
2 parents d59e0b0 + a2c7147 commit f1d1c3e
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up Python 3.6
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.8

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ steps.node.outputs.version }}
- name: Set up Python 3.6
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.6
python-version: 3.8
- name: Install dependencies
run: |
pip install "solc-select>=v1.0.0b1"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/darglint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.6
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.6
python-version: 3.8
- name: Run Tests
run: |
bash scripts/ci_darglint.sh
4 changes: 2 additions & 2 deletions .github/workflows/etherscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
run: |
echo 'C:\msys64\mingw64\bin' >> "$GITHUB_PATH"
echo 'C:\msys64\usr\bin' >> "$GITHUB_PATH"
- name: Set up Python 3.6
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.6
python-version: 3.8
- name: Install dependencies
run: |
pip install "solc-select>=v1.0.0b1"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up Python 3.6
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.8

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up Python 3.6
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.8

- name: Install dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up Python 3.6
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.8

- name: Install dependencies
run: |
Expand Down
5 changes: 3 additions & 2 deletions crytic_compile/platform/brownie.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ def _get_version(compiler: Dict) -> str:
str: Compiler version
"""
version = compiler.get("version", "")
version = version[len("Version: ") :]
version = version[0 : version.find("+")]
if "Version:" in version:
version = version.split("Version:")[1].strip()
version = version[0 : version.find("+")] # TODO handle not "+" not found
return version


Expand Down
4 changes: 3 additions & 1 deletion crytic_compile/platform/solc_standard_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import logging
import os
from pathlib import Path
import shutil
import subprocess
from typing import TYPE_CHECKING, Dict, List, Optional, Union, Any
Expand Down Expand Up @@ -132,7 +133,8 @@ def run_solc_standard_json(
Returns:
Dict: Solc json output
"""
cmd = [compiler_version.compiler, "--standard-json", "--allow-paths", "."]
working_dir_resolved = Path(working_dir if working_dir else ".").resolve()
cmd = [compiler_version.compiler, "--standard-json", "--allow-paths", str(working_dir_resolved)]
additional_kwargs: Dict = {"cwd": working_dir} if working_dir else {}

env = dict(os.environ)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.black]
target-version = ["py36"]
target-version = ["py38"]
line-length = 100
[tool.pylint.messages_control]
disable = """
Expand Down
5 changes: 5 additions & 0 deletions scripts/ci_test_dapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

### Test dapp integration

# work around having two python versions loading libraries from each other in CI
OLD_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
alias crytic-compile='LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH crytic-compile'
unset LD_LIBRARY_PATH

DIR=$(mktemp -d)
cd "$DIR" || exit 255

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
author="Trail of Bits",
version="0.2.4",
packages=find_packages(),
python_requires=">=3.6",
python_requires=">=3.8",
install_requires=["pysha3>=1.0.2", "cbor2"],
license="AGPL-3.0",
long_description=long_description,
Expand Down

0 comments on commit f1d1c3e

Please sign in to comment.