Skip to content

Commit 9a930f5

Browse files
committed
Initial commit
0 parents  commit 9a930f5

19 files changed

+4269
-0
lines changed

.env.example

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ETHERSCAN_TOKEN=<your-token-here>
2+
WEB3_INFURA_PROJECT_ID=<your-token-here>
3+

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.vy linguist-language=Python

.github/workflows/lint.yaml

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
pull_request:
9+
10+
jobs:
11+
12+
solidity:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Check out github repository
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 1
20+
21+
- name: Setup node.js
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: '12.x'
25+
26+
- name: Set yarn cache directory path
27+
id: yarn-cache-dir-path
28+
run: echo "::set-output name=dir::$(yarn cache dir)"
29+
30+
- name: Restore yarn cache
31+
uses: actions/cache@v2
32+
id: yarn-cache
33+
with:
34+
path: |
35+
${{ steps.yarn-cache-dir-path.outputs.dir }}
36+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
37+
restore-keys: |
38+
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
39+
${{ runner.os }}-yarn-
40+
41+
- name: Install node.js dependencies
42+
run: yarn --frozen-lockfile
43+
44+
- name: Run linter on *.sol and *.json
45+
run: yarn lint:check
46+
47+
commits:
48+
runs-on: ubuntu-latest
49+
50+
steps:
51+
- name: Check out github repository
52+
uses: actions/checkout@v2
53+
with:
54+
fetch-depth: 0
55+
56+
- name: Run commitlint
57+
uses: wagoid/commitlint-github-action@v2
58+
59+
brownie:
60+
runs-on: ubuntu-latest
61+
62+
steps:
63+
- name: Check out github repository
64+
uses: actions/checkout@v2
65+
with:
66+
fetch-depth: 1
67+
68+
- name: Set up python 3.8
69+
uses: actions/setup-python@v2
70+
with:
71+
python-version: 3.8
72+
73+
- name: Set pip cache directory path
74+
id: pip-cache-dir-path
75+
run: |
76+
echo "::set-output name=dir::$(pip cache dir)"
77+
78+
- name: Restore pip cache
79+
uses: actions/cache@v2
80+
id: pip-cache
81+
with:
82+
path: |
83+
${{ steps.pip-cache-dir-path.outputs.dir }}
84+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
85+
restore-keys: |
86+
${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
87+
${{ runner.os }}-pip-
88+
89+
- name: Install python dependencies
90+
run: pip install -r requirements-dev.txt
91+
92+
- name: Run black
93+
run: black --check --include "(tests|scripts)" .
94+
95+
# TODO: Add Slither Static Analyzer

.github/workflows/test.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
17+
- name: Cache compiler installations
18+
uses: actions/cache@v2
19+
with:
20+
path: |
21+
~/.solcx
22+
~/.vvm
23+
key: ${{ runner.os }}-compiler-cache
24+
25+
- name: Setup node.js
26+
uses: actions/setup-node@v1
27+
with:
28+
node-version: '12.x'
29+
30+
- name: Install ganache
31+
run: npm install -g ganache-cli@6.12.1
32+
33+
- name: Set up python 3.8
34+
uses: actions/setup-python@v2
35+
with:
36+
python-version: 3.8
37+
38+
- name: Set pip cache directory path
39+
id: pip-cache-dir-path
40+
run: |
41+
echo "::set-output name=dir::$(pip cache dir)"
42+
43+
- name: Restore pip cache
44+
uses: actions/cache@v2
45+
id: pip-cache
46+
with:
47+
path: |
48+
${{ steps.pip-cache-dir-path.outputs.dir }}
49+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
50+
restore-keys: |
51+
${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
52+
${{ runner.os }}-pip-
53+
54+
- name: Install python dependencies
55+
run: pip install -r requirements-dev.txt
56+
57+
- name: Compile Code
58+
run: brownie compile --size
59+
60+
- name: Run Tests
61+
env:
62+
ETHERSCAN_TOKEN: MW5CQA6QK5YMJXP2WP3RA36HM5A7RA1IHA
63+
WEB3_INFURA_PROJECT_ID: b7821200399e4be2b4e5dbdf06fbe85b
64+
run: brownie test

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Brownie
2+
__pycache__
3+
.history
4+
.hypothesis/
5+
build/
6+
reports/
7+
.env
8+
9+
# Node/npm
10+
node_modules/

0 commit comments

Comments
 (0)