Decodes transaction data providing a human-readable output.
cp .env.sample .env
docker compose build
docker compose up
Then go to http://localhost:8000 to see the service documentation.
Use a virtualenv if possible:
python -m venv venv
Then enter the virtualenv and install the dependencies:
source venv/bin/activate
pip install -r requirements/dev.txt
pre-commit install -f
cp .env.sample .env
This projects is using Alembic to manage database migrations. To create a new migration based on changes made to the model code, run the following command:
alembic revision --autogenerate -m "MIGRATION TITLE"
To open an interactive Python shell within a Docker container and query the database, use the following command:
docker exec -it safe-decoder-service-web-1 python -m IPython -i ./scripts/db_profile.py
Example usage:
In [11]: contracts = await Contract.get_all(session)
In [12]: contracts[0].address
Out[12]: b'J\xdb\xaa\xc7\xbc#\x9e%\x19\xcb\xfd#\x97\xe0\xf7Z\x1d\xe3U\xc8'