eth-erc20/Dockerfile

36 lines
919 B
Docker
Raw Normal View History

2020-12-01 23:54:17 +01:00
FROM ethereum/solc:0.6.12
2021-12-08 02:46:25 +01:00
FROM python:3.8.6
2020-12-01 23:54:17 +01:00
COPY --from=0 /usr/bin/solc /usr/bin/solc
2021-12-08 02:46:25 +01:00
#RUN apk update &&\
# apk add gcc bash cargo
RUN apt update && \
apt install -y gcc bash cargo
2020-12-01 23:54:17 +01:00
WORKDIR /usr/src
# Try to keep everything above here re-usable!
2021-12-08 02:46:25 +01:00
COPY . .
2020-12-01 23:54:17 +01:00
2021-11-23 00:30:03 +01:00
RUN chmod +x ./python/run_tests.sh
2021-12-08 02:46:25 +01:00
RUN cd ./solidity && \
2020-12-01 23:54:17 +01:00
solc GiftableToken.sol --abi | awk 'NR>3' > GiftableToken.abi.json
2021-12-08 02:46:25 +01:00
RUN cd ./solidity && \
2020-12-01 23:54:17 +01:00
solc GiftableToken.sol --bin | awk 'NR>3' > GiftableToken.bin && \
truncate -s "$((`stat -t -c "%s" GiftableToken.bin`-1))" GiftableToken.bin
2021-12-08 02:46:25 +01:00
RUN cd ./python && \
pip install --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple \
--extra-index-url https://pip.grassrootseconomics.net:8433 \
-r requirements.txt -r test_requirements.txt
2020-12-01 23:54:17 +01:00
2021-12-08 02:46:25 +01:00
#RUN pip install slither-analyzer
2021-11-23 00:30:03 +01:00
2020-12-01 23:54:17 +01:00
# To deploy:
# giftable-token-deploy --contracts-dir giftable_erc20_token/solidity/ <amount>