Skip to content

Commit c35b815

Browse files
adapt to gif-interface v1.5.0-staging-j, fix solc to 0.8.2 and oz to 4.7
1 parent 49e5ef9 commit c35b815

File tree

5 files changed

+39
-7
lines changed

5 files changed

+39
-7
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,12 @@ cd gif-sandbox
5757
export SANDBOX=$PWD
5858
```
5959

60-
The next step is to build the Brownie docker image in the directory of the GIF sandbox repository.
60+
Build the Brownie docker image.
6161

6262
```bash
63+
cd docker
6364
docker build . -t brownie
65+
cd $SANDBOX
6466
```
6567

6668
## Start a Local Ganache Chain

brownie-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
compiler:
33
evm_version: null
44
solc:
5-
version: null
5+
version: 0.8.2
66
optimizer:
77
enabled: true
88
runs: 200
99
# https://eth-brownie.readthedocs.io/en/stable/compile.html#compiler-settings
1010
remappings:
11-
- "@openzeppelin=OpenZeppelin/openzeppelin-contracts@4.6.0"
12-
- "@gif-interface=etherisc/gif-interface@1.5.0-staging-i"
11+
- "@openzeppelin=OpenZeppelin/openzeppelin-contracts@4.7.0"
12+
- "@gif-interface=etherisc/gif-interface@1.5.0-staging-j"
1313
vyper:
1414
version: null
1515

@@ -18,8 +18,8 @@ compiler:
1818
# to list the packages installed via the dependency list below
1919
dependencies:
2020
# github dependency format: <owner>/<repository>@<release>
21-
- OpenZeppelin/openzeppelin-contracts@4.6.0
22-
- etherisc/gif-interface@1.5.0-staging-i
21+
- OpenZeppelin/openzeppelin-contracts@4.7.0
22+
- etherisc/gif-interface@1.5.0-staging-j
2323

2424
# exclude Ownable when calculating test coverage
2525
# https://eth-brownie.readthedocs.io/en/v1.10.3/config.html#exclude_paths

Dockerfile renamed to docker/Dockerfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM python:3.7
33

44
# Set up code directory
5-
RUN mkdir -p /usr/src/app
5+
RUN mkdir -p /usr/src/app/brownie-setup
66
WORKDIR /usr/src/app
77

88
# Install linux dependencies
@@ -13,6 +13,7 @@ RUN apt-get update && apt-get install -y npm
1313
RUN npm install --global ganache-cli
1414

1515
# Install Brownie
16+
RUN echo force-brownie-upgrade-0
1617
RUN wget https://raw.githubusercontent.com/eth-brownie/brownie/master/requirements.txt
1718

1819
RUN pip install -r requirements.txt
@@ -22,6 +23,16 @@ RUN pip install eth-brownie
2223
RUN pip install fastapi
2324
RUN pip install uvicorn
2425

26+
# force installation of solc in docker image
27+
# solc version is defined in brownie-config.yaml
28+
WORKDIR /usr/src/app/brownie-setup
29+
RUN echo force-dependency-upgrade-0
30+
31+
RUN brownie init -f
32+
COPY brownie-config.yaml /usr/src/app/brownie-setup
33+
COPY Dummy.sol /usr/src/app/brownie-setup/contracts
34+
RUN brownie compile --all
35+
2536
EXPOSE 8000
2637

2738
# Add some aliases

docker/Dummy.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
pragma solidity ^0.8.0;
3+
contract Dummy {}

docker/brownie-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# brownie default values made explicit
2+
compiler:
3+
evm_version: null
4+
solc:
5+
version: 0.8.2
6+
optimizer:
7+
enabled: true
8+
runs: 200
9+
remappings:
10+
- "@openzeppelin=OpenZeppelin/openzeppelin-contracts@4.7.0"
11+
vyper:
12+
version: null
13+
14+
dependencies:
15+
# github dependency format: <owner>/<repository>@<release>
16+
- OpenZeppelin/openzeppelin-contracts@4.7.0

0 commit comments

Comments
 (0)