Skip to content

Commit

Permalink
upgrade to new solcx
Browse files Browse the repository at this point in the history
Co-authored by: Alex Newman <[email protected]>
Co-authored by: Vlad Silviu Farcas <[email protected]>
  • Loading branch information
posix4e authored and uivlis committed Jun 29, 2020
1 parent 557b6a9 commit b22ea5b
Show file tree
Hide file tree
Showing 27 changed files with 11,792 additions and 8,209 deletions.
129 changes: 120 additions & 9 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,125 @@
node_modules/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
build/**
venv
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# vim
*.swp

# emacs
*~
*[#]*

.idea
venv*
het/secrets.json


# Generated stuff
# ================================================
src
src/**
.mypy_cache/
.mypy_cache/**
.git
.git/**
*.png
.vscode
docker-compose
build/
node_modules/
coverage/
coverage.json
minio/
.git
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ ENV/
venv*
het/secrets.json

# requirements (we use Pipfile)
requirements.txt

# Generated stuff
# ================================================
Expand Down
43 changes: 14 additions & 29 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,25 @@
FROM ubuntu:bionic
FROM ubuntu:focal
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONPATH "/usr/lib/python3.6/:/usr/local/lib/python3.6/dist-packages/:/work:/work/banhammer:/work/hmt-servers"
ENV PYTHONUNBUFFERED True

WORKDIR /work
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install -y build-essential libffi-dev autoconf libtool \
python3-dev python3-pip \
git curl wget bash pandoc pkg-config jq && \
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt-get install -y nodejs && \
npm install -g yarn && \
yarn global add truffle

ENV LANG C.UTF-8
apt-get install -y automake bash black build-essential curl git jq libffi-dev libgmp-dev libtool mypy nodejs npm \
pandoc pkg-config python3-boto python3-dev python3-pip

COPY package.json /work/
COPY yarn.lock /work/
RUN yarn
RUN npm install

COPY Pipfile Pipfile.lock /work/
COPY requirements.txt /work/
RUN pip3 install -r requirements.txt

# Pin to specific version that's guaranteed to work
RUN pip3 install 'pipenv==2018.11.26'
RUN pipenv install --system --deploy

RUN python3 -m solc.install v0.4.24
ENV SOLC_BINARY="/root/.py-solc/solc-v0.4.24/bin/solc"
ENV SOLC_VERSION="v0.6.2"
RUN python3 -m solcx.install ${SOLC_VERSION}
ENV SOLC_BINARY="/root/.py-solc-x/solc-${SOLC_VERSION}/bin/solc"

# Necessary files for smart contract compilation, migration and testing
COPY contracts /work/contracts/
COPY migrations /work/migrations/
COPY test /work/test/
COPY truffle.js /work/

# Necessary files for the API to function properly
COPY *.py /work/
COPY hmt_escrow /work/hmt_escrow/
COPY bin /work/bin/
COPY . /work/

CMD ./test.py
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include README.md
include contracts/*.sol
include migrations/*.js
recursive-include contracts
recursive-include migrations
23 changes: 0 additions & 23 deletions Pipfile

This file was deleted.

Loading

0 comments on commit b22ea5b

Please sign in to comment.