Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# explorers
ETHERSCAN_TOKEN=
#explorers
ETHERSCAN_TOKEN=
POLYGONSCAN_TOKEN=

# rpcs
ALCHEMY_KEY_GOERLI=
ALCHEMY_KEY_POLYGON=
61 changes: 61 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
on:
# https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#pull_request
pull_request:
branches:
- main
types: [opened, synchronize, reopened]

name: brownie tests

env:
ETHERSCAN_TOKEN: ${{ secrets.ETHERSCAN_TOKEN }}
POLYGONSCAN_TOKEN: ${{ secrets.POLYGONSCAN_TOKEN }}
ALCHEMY_KEY_GOERLI: ${{ secrets.ALCHEMY_KEY_GOERLI }}
ALCHEMY_KEY_POLYGON: ${{ secrets.ALCHEMY_KEY_POLYGON }}
PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# increasing available memory for node reduces issues with ganache crashing
# https://nodejs.org/api/cli.html#cli_max_old_space_size_size_in_megabytes
NODE_OPTIONS: --max_old_space_size=4096

jobs:

full_test_suite:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install compiler caches
uses: actions/cache@v2
with:
path: |
~/.solcx
~/.vvm
key: compiler-cache

- name: Set up Node.js
uses: actions/setup-node@v1

- name: Install Ganache CLI
run: npm install -g ganache-cli@6.12.2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install requirements
run: pip install -r requirements.txt

- name: Prepare environment
run: touch .env && brownie networks delete goerli && brownie networks import ./network-config.yaml

- name: Test on Goerli
run: brownie test --network goerli-fork

- name: Test on Gnosis
run: brownie test --network gnosis-fork

- name: Test on Polygon
run: brownie test --network polygon-fork
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,10 @@ We thought that the factory could hook up the deployed module automatically, but
## Goerli testnet deployment

- `ModuleFactory`
- Goerli: [0xbaAcd51a21e9047E8E58249574532F3dc55BFC28](https://goerli.etherscan.io/address/0xbaAcd51a21e9047E8E58249574532F3dc55BFC28)
- Goerli: [0xbaAcd51a21e9047E8E58249574532F3dc55BFC28](https://goerli.etherscan.io/address/0xbaAcd51a21e9047E8E58249574532F3dc55BFC28)


## Regenerate `requirements.txt` after updating packages
```
poetry export -f requirements.txt --output requirements.txt --without-hashes
```
62 changes: 62 additions & 0 deletions network-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
live:
- name: Goerli
networks:
- name: Goerli
chainid: 5
id: goerli
host: https://eth-goerli.g.alchemy.com/v2/$ALCHEMY_KEY_GOERLI
explorer: https://api-goerli.etherscan.io/api
multicall2: "0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696"
- name: Polygon
networks:
- name: Polygon
chainid: 137
id: polygon
host: https://polygon-mainnet.g.alchemy.com/v2/$ALCHEMY_KEY_POLYGON
explorer: https://api.polygonscan.com/api
multicall2: "0xc8E51042792d7405184DfCa245F2d27B94D013b6"
- name: Gnosis
networks:
- name: Gnosis
chainid: 100
id: gnosis
host: https://rpc.gnosis.gateway.fm
explorer: https://gnosisscan.io/

development:
- name: Ganache-CLI (Goerli Fork)
id: goerli-fork
cmd: ganache-cli
host: http://127.0.0.1
timeout: 120
cmd_settings:
port: 8545
gas_limit: 20000000
accounts: 10
evm_version: istanbul
mnemonic: brownie
fork: goerli
- name: Ganache-CLI (Gnosis Fork)
id: gnosis-fork
cmd: ganache-cli
host: http://127.0.0.1
timeout: 120
cmd_settings:
port: 8545
gas_limit: 20000000
accounts: 10
evm_version: istanbul
mnemonic: brownie
fork: gnosis
- name: Ganache-CLI (Polygon Fork)
id: polygon-fork
cmd: ganache-cli
host: http://127.0.0.1
timeout: 120
cmd_settings:
port: 8545
gas_limit: 20000000
accounts: 10
evm_version: istanbul
mnemonic: brownie
fork: polygon
89 changes: 89 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
aiohttp==3.8.3 ; python_version >= "3.9" and python_version < "3.11"
aiosignal==1.2.0 ; python_version >= "3.9" and python_version < "3.11"
asttokens==2.0.5 ; python_version >= "3.9" and python_version < "3.11"
async-timeout==4.0.2 ; python_version >= "3.9" and python_version < "3.11"
atomicwrites==1.4.1 ; python_version >= "3.9" and python_version < "3.11" and sys_platform == "win32"
attrs==22.1.0 ; python_version >= "3.9" and python_version < "3.11"
base58==2.1.1 ; python_version >= "3.9" and python_version < "3.11"
bitarray==2.6.0 ; python_version >= "3.9" and python_version < "3.11"
black==22.10.0 ; python_version >= "3.9" and python_version < "3.11"
certifi==2022.9.24 ; python_version >= "3.9" and python_version < "3.11"
charset-normalizer==2.1.1 ; python_version >= "3.9" and python_version < "3.11"
click==8.1.3 ; python_version >= "3.9" and python_version < "3.11"
colorama==0.4.6 ; python_version >= "3.9" and python_version < "3.11" and platform_system == "Windows" or python_version >= "3.9" and python_version < "3.11" and sys_platform == "win32"
cytoolz==0.12.0 ; python_version >= "3.9" and python_version < "3.11"
dataclassy==0.11.1 ; python_version >= "3.9" and python_version < "3.11"
eip712==0.1.0 ; python_version >= "3.9" and python_version < "3.11"
eth-abi==2.2.0 ; python_version >= "3.9" and python_version < "3.11"
eth-account==0.5.9 ; python_version >= "3.9" and python_version < "3.11"
eth-brownie==1.19.3 ; python_version >= "3.9" and python_version < "3.11"
eth-event==1.2.3 ; python_version >= "3.9" and python_version < "3.11"
eth-hash==0.3.3 ; python_version >= "3.9" and python_version < "3.11"
eth-hash[pycryptodome]==0.3.3 ; python_version >= "3.9" and python_version < "3.11"
eth-keyfile==0.5.1 ; python_version >= "3.9" and python_version < "3.11"
eth-keys==0.3.4 ; python_version >= "3.9" and python_version < "3.11"
eth-rlp==0.2.1 ; python_version >= "3.9" and python_version < "3.11"
eth-typing==2.3.0 ; python_version >= "3.9" and python_version < "3.11"
eth-utils==1.10.0 ; python_version >= "3.9" and python_version < "3.11"
execnet==1.9.0 ; python_version >= "3.9" and python_version < "3.11"
frozenlist==1.3.1 ; python_version >= "3.9" and python_version < "3.11"
hexbytes==0.2.3 ; python_version >= "3.9" and python_version < "3.11"
hypothesis==6.27.3 ; python_version >= "3.9" and python_version < "3.11"
idna==3.4 ; python_version >= "3.9" and python_version < "3.11"
inflection==0.5.0 ; python_version >= "3.9" and python_version < "3.11"
iniconfig==1.1.1 ; python_version >= "3.9" and python_version < "3.11"
ipfshttpclient==0.8.0a2 ; python_version >= "3.9" and python_version < "3.11"
jsonschema==3.2.0 ; python_version >= "3.9" and python_version < "3.11"
lazy-object-proxy==1.7.1 ; python_version >= "3.9" and python_version < "3.11"
lru-dict==1.1.8 ; python_version >= "3.9" and python_version < "3.11"
multiaddr==0.0.9 ; python_version >= "3.9" and python_version < "3.11"
multidict==6.0.2 ; python_version >= "3.9" and python_version < "3.11"
mypy-extensions==0.4.3 ; python_version >= "3.9" and python_version < "3.11"
mythx-models==1.9.1 ; python_version >= "3.9" and python_version < "3.11"
netaddr==0.8.0 ; python_version >= "3.9" and python_version < "3.11"
packaging==21.3 ; python_version >= "3.9" and python_version < "3.11"
parsimonious==0.8.1 ; python_version >= "3.9" and python_version < "3.11"
pathspec==0.10.1 ; python_version >= "3.9" and python_version < "3.11"
platformdirs==2.5.2 ; python_version >= "3.9" and python_version < "3.11"
pluggy==1.0.0 ; python_version >= "3.9" and python_version < "3.11"
prompt-toolkit==3.0.31 ; python_version >= "3.9" and python_version < "3.11"
protobuf==3.19.5 ; python_version >= "3.9" and python_version < "3.11"
psutil==5.9.2 ; python_version >= "3.9" and python_version < "3.11"
py-solc-ast==1.2.9 ; python_version >= "3.9" and python_version < "3.11"
py-solc-x==1.1.1 ; python_version >= "3.9" and python_version < "3.11"
py==1.11.0 ; python_version >= "3.9" and python_version < "3.11"
pycryptodome==3.15.0 ; python_version >= "3.9" and python_version < "3.11"
pygments-lexer-solidity==0.7.0 ; python_version >= "3.9" and python_version < "3.11"
pygments==2.13.0 ; python_version >= "3.9" and python_version < "3.11"
pyjwt==1.7.1 ; python_version >= "3.9" and python_version < "3.11"
pyparsing==3.0.9 ; python_version >= "3.9" and python_version < "3.11"
pyrsistent==0.18.1 ; python_version >= "3.9" and python_version < "3.11"
pytest-forked==1.4.0 ; python_version >= "3.9" and python_version < "3.11"
pytest-xdist==1.34.0 ; python_version >= "3.9" and python_version < "3.11"
pytest==6.2.5 ; python_version >= "3.9" and python_version < "3.11"
python-dateutil==2.8.1 ; python_version >= "3.9" and python_version < "3.11"
python-dotenv==0.16.0 ; python_version >= "3.9" and python_version < "3.11"
pythx==1.6.1 ; python_version >= "3.9" and python_version < "3.11"
pywin32==306 ; python_version >= "3.9" and python_version < "3.11" and platform_system == "Windows"
pyyaml==5.4.1 ; python_version >= "3.9" and python_version < "3.11"
requests==2.28.1 ; python_version >= "3.9" and python_version < "3.11"
rlp==2.0.1 ; python_version >= "3.9" and python_version < "3.11"
semantic-version==2.10.0 ; python_version >= "3.9" and python_version < "3.11"
setuptools==67.6.1 ; python_version >= "3.9" and python_version < "3.11"
six==1.16.0 ; python_version >= "3.9" and python_version < "3.11"
sortedcontainers==2.4.0 ; python_version >= "3.9" and python_version < "3.11"
toml==0.10.2 ; python_version >= "3.9" and python_version < "3.11"
tomli==2.0.1 ; python_version >= "3.9" and python_version < "3.11"
toolz==0.12.0 ; python_version >= "3.9" and python_version < "3.11"
tqdm==4.64.1 ; python_version >= "3.9" and python_version < "3.11"
typing-extensions==4.4.0 ; python_version >= "3.9" and python_version < "3.11"
urllib3==1.26.12 ; python_version >= "3.9" and python_version < "3.11"
varint==1.0.2 ; python_version >= "3.9" and python_version < "3.11"
vvm==0.1.0 ; python_version >= "3.9" and python_version < "3.11"
vyper==0.3.7 ; python_version >= "3.9" and python_version < "3.11"
wcwidth==0.2.5 ; python_version >= "3.9" and python_version < "3.11"
web3==5.31.3 ; python_version >= "3.9" and python_version < "3.11"
websockets==9.1 ; python_version >= "3.9" and python_version < "3.11"
wheel==0.37.1 ; python_version >= "3.9" and python_version < "3.11"
wrapt==1.14.1 ; python_version >= "3.9" and python_version < "3.11"
yarl==1.8.1 ; python_version >= "3.9" and python_version < "3.11"