Caution
This demo is no longer active. The project indexed Basin v1 (MVP) data, but Basin v2 is now live and replaces v1. Thus, this demo is no longer maintained or useful.
Fetch & inspect the latest Basin vaults.
This project is a simple tool to track the new vaults that are created with Basin.
The script fetches data from onchain events at the Basin storage contract on Filecoin Calibration (0xaB16d51Fa80EaeAF9668CE102a783237A045FC37), retrieves relevant information from the Basin HTTP API, and does this all on a weekly cron schedule with GitHub Actions. For every run, it will write the results to:
- Data: Summary data for all vaults ever created.
- State: A JSON file containing the full history of all runs, along with the relevant log/event data and cumulative vaults created.
For working on your machine, make sure pipx and pipenv are installed.
brew install pipx
pipx install pipenvThen, install dependencies:
pipenv install --devAnd set up pre-commit and pre-push hooks:
pipenv run pre-commit install -t pre-commit
pipenv run pre-commit install -t pre-pushThese latter steps are also available in the Makefile as make install and make setup. This project also uses python 3.12, so make sure you have that installed. You can see a full list of requirements in the Pipfile.
Note: This project was created with Cookiecutter and the sourcery-ai project template—check it out!
The vaults_tracker module is the main entrypoint for the project. You can run it with:
make runThis will fetch new events that have occurred after the latest run & block number in the state file, and write the results to the Data file. The data file lists out each vault owner's address, the vault's name, and a link to the vault mutation "events" (CIDs) for subsequent retrieval. You can see the GitHub actions setup in the workflow file.
The following defines all commands available in the Makefile:
make install: Install dependencies withpipenv.make setup: Install pre-commit and pre-push hooks that run checks on the code.make format: Directly runblack,isort,flake8, andmypyon the project.make coverage: Not used but available if tests are written.
PRs accepted. Be sure to run the pre-commit and pre-push hooks, and the make format command also does similar actions.
Small note: If editing the README, please conform to the standard-readme specification.