2020-12-01 23:54:17 +01:00
|
|
|
FROM ethereum/solc:0.6.12
|
|
|
|
|
|
|
|
FROM python:3.8.6-alpine
|
|
|
|
|
|
|
|
COPY --from=0 /usr/bin/solc /usr/bin/solc
|
|
|
|
|
|
|
|
RUN apk update &&\
|
2021-11-23 00:30:03 +01:00
|
|
|
apk add gcc bash musl-dev libffi-dev openssl-dev autoconf automake build-base \
|
|
|
|
libtool pkgconfig python3-dev cargo
|
2020-12-01 23:54:17 +01:00
|
|
|
|
|
|
|
WORKDIR /usr/src
|
|
|
|
|
|
|
|
# Try to keep everything above here re-usable!
|
|
|
|
|
|
|
|
COPY ./solidity/ /usr/src/giftable_erc20_token/solidity/
|
|
|
|
COPY ./python/ /usr/src/giftable_erc20_token/python/
|
|
|
|
|
2021-11-23 00:30:03 +01:00
|
|
|
RUN chmod +x ./python/run_tests.sh
|
|
|
|
|
2020-12-01 23:54:17 +01:00
|
|
|
RUN cd giftable_erc20_token/solidity && \
|
|
|
|
solc GiftableToken.sol --abi | awk 'NR>3' > GiftableToken.abi.json
|
|
|
|
|
|
|
|
RUN cd giftable_erc20_token/solidity && \
|
|
|
|
solc GiftableToken.sol --bin | awk 'NR>3' > GiftableToken.bin && \
|
|
|
|
truncate -s "$((`stat -t -c "%s" GiftableToken.bin`-1))" GiftableToken.bin
|
|
|
|
|
|
|
|
RUN cd giftable_erc20_token/python && \
|
|
|
|
pip install --extra-index-url https://pip.grassrootseconomics.net:8433 .
|
|
|
|
|
2021-11-23 00:30:03 +01:00
|
|
|
RUN pip install slither-analyzer
|
|
|
|
|
2020-12-01 23:54:17 +01:00
|
|
|
# To deploy:
|
|
|
|
# giftable-token-deploy --contracts-dir giftable_erc20_token/solidity/ <amount>
|