feat: add slither and unit test run

This commit is contained in:
2021-11-24 21:03:14 +00:00
parent 84ce22e8b6
commit 31e45656a2
3 changed files with 33 additions and 1 deletions

View File

@@ -5,7 +5,8 @@ FROM python:3.8.6-alpine
COPY --from=0 /usr/bin/solc /usr/bin/solc
RUN apk update &&\
apk add gcc bash musl-dev
apk add gcc bash musl-dev libffi-dev openssl-dev autoconf automake build-base \
libtool pkgconfig python3-dev cargo
WORKDIR /usr/src
@@ -14,6 +15,8 @@ WORKDIR /usr/src
COPY ./solidity/ /usr/src/giftable_erc20_token/solidity/
COPY ./python/ /usr/src/giftable_erc20_token/python/
RUN chmod +x ./python/run_tests.sh
RUN cd giftable_erc20_token/solidity && \
solc GiftableToken.sol --abi | awk 'NR>3' > GiftableToken.abi.json
@@ -24,5 +27,7 @@ RUN cd giftable_erc20_token/solidity && \
RUN cd giftable_erc20_token/python && \
pip install --extra-index-url https://pip.grassrootseconomics.net:8433 .
RUN pip install slither-analyzer
# To deploy:
# giftable-token-deploy --contracts-dir giftable_erc20_token/solidity/ <amount>