Closed josojo closed 2 years ago
One thing I noticed that we could probably move towards with these kinds of python projects is writing a single bash script containing all of this stuff
python3 -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
cp .env_sample .env
PS - the reason CI is failing is because duneapi
requires python@3.10
Unfortunately, this integration comes with a bigger refactor.
The package offers the ability to wait until a query calculation is finished. This is really nice and allows us to cut the amount of python script by a factor of 2: Previously, we had one script for executing the queries and a second one for fetching the results. Now, with the waiting feature, we can do it all in one go.
The duneapi package also allowed me to store the fetched dune data in a cleaner structure, as the parsing of the fetched result is better. Due to that I also needed to touch the rust code.
There is still a lot to be refactored to make the repo clean, but this should be okay as a first go.
testplan:
Now, the referral data needs to be downloaded from ipfs. This takes quite long, if this should be done for all appdata. Hence, I would recommend deleting all entries, but 1, from the newly created
distinct_app_data.json
file in the data folder. Once it is done, one can runAnd wait until
app_data_referral_relationship.json
is written.Now, one can run:
and check that trading volume was downloaded and is served by checking: