Skip to content

Commit

Permalink
Dockerfile for running brownie
Browse files Browse the repository at this point in the history
  • Loading branch information
ineiti committed Dec 5, 2023
1 parent 30805c7 commit b079cab
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
Empty file added .env
Empty file.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3.9

RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
RUN . /root/.bashrc
ENV NVM_DIR /root/.nvm
RUN . $NVM_DIR/nvm.sh && \
nvm install 18 && npm install i -g ganache
RUN pip install eth-brownie
WORKDIR /root
RUN touch .env
COPY . ./
#COPY brownie-config.yaml ./
#COPY contracts contracts/
RUN . $NVM_DIR/nvm.sh && \
brownie compile
16 changes: 16 additions & 0 deletions test_compile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from ape import accounts, compilers

CODE = """
... source code here
"""

container = compilers.compile_source(
"vyper",
CODE,
settings={"vyper": {"version": "0.3.7"}},
contractName="MyContract",
)

owner = accounts.test_accounts[0]

instance = container.deploy(sender=owner)

0 comments on commit b079cab

Please sign in to comment.