Any command in code blocks
is meant to be executed from a Mac/Linux terminal or Windows command prompt.
Note for Windows users: if you want to use the Windows Subsystem for Linux (WSL), go ahead and install it now
- After it's installed, launch your chosen Linux subsystem
- Follow the Linux instructions below from within your terminal, except for VSCode. Any VSCode installation happens in Windows, not the Linux subsystem.
-
Install VSCode
-
Install VSCode Extensions
- Python
- If you're using the WSL
- Install Remote - WSL
-
Install Python 3.8
- Linux: Refer to your distro documentation
- Mac installer
- Windows installer
-
python3 -m pip install --user pipx
- Note, if get you an error to the effect of python3 not being installed or recognized, run
python --version
, if it returns back something likePython 3.8.x
then just replacepython3
withpython
for all python commands in these instructions
- Note, if get you an error to the effect of python3 not being installed or recognized, run
python3 -m pipx ensurepath
pipx install eth-brownie
- If you're on Windows (pure Windows, not WSL), you'll need to install the C++ Build Tools before executing this
-
Install Ganache
npm install -g ganache-cli@6.12.1
-
Setup an account on Etherscan and create an API key
- Set
ETHERSCAN_TOKEN
environment variable to this key's value- Windows:
setx ETHERSCAN_TOKEN yourtokenvalue
- Mac/Linux:
echo "export ETHERSCAN_TOKEN=\"yourtokenvalue\"" | sudo tee -a ~/.bash_profile
- Windows:
- Set
-
Setup an account on Infura and create an API key
- Set
WEB3_INFURA_PROJECT_ID
environment variable to this key's value- Windows:
setx WEB3_INFURA_PROJECT_ID yourtokenvalue
- Mac/Linux:
echo "export WEB3_INFURA_PROJECT_ID=\"yourtokenvalue\"" | sudo tee -a ~/.bash_profile
- Windows:
- Set
-
Close & re-open your terminal before proceeding (to get the new environment variable values)
-
If you don't have git yet, go set it up
-
Pull the repository from GitHub and install its dependencies
git clone https://github.com/yearn/yearn-vaults
cd https://github.com/listonjesse/coordinape_scripts
pip3 install -r requirements.txt
-
Launch VSCode
- If you're in Windows using WSL, type
code .
to launch VSCode
- If you're in Windows using WSL, type
-
Lastly, you'll want to add .vscode to to your global .gitignore
- Use a terminal on Mac / Linux, use Git Bash on Windows
touch ~/.gitignore_global
- use your favorite editor and add
.vscode/
to the ignore file- Using vi:
vi ~/.gitignore_global
- copy
.vscode/
and hitp
in vi - type
:x
and hit enter
- Using vi:
git config --global core.excludesfile ~/.gitignore_global
-
Congratulations! You're all set up.
- Use
git pull
to stay up to date with any changes made to the source code
- Use
brownie run coordinape_disperse.py <function_name>
Go to scripts/coordinape_disperse.py, hit the debug button in VSCode and select Python: Current File as the target. This will run whatever function is called at the very end of the coordinape_disperse.py file. Feel free to change this when debugging with VSCode.
Add mapping of epoch to USD amount in DEFAULT_USD_REWARD_DICT found in configuration.py
In coordinape_disperse.py, add a function for your circle's epoch. Choose between various dispersement options defined in coordinape_enums.py