Basic contract interaction with a blockchain contract This is just a sample application to interact with a contract in polygon mumbai chain.
This is not intended to be used in production, if you do, you'll risk your self and other to expose their private keys.
Install Docker:
https://docs.docker.com/install/
After install Docker, proceed to install Docker Compose:
https://docs.docker.com/compose/install/
docker-compose -f docker-compose.yml build
Copy the .env.example
and complete it with your secrets.
cp .env.example .env
Replace any value if needed.
docker-compose -f docker-compose.yml up -d
Stop
docker-compose -f docker-compose.yml down
docker exec -ti api ipython
from src.event_subscription import polling_new_products
polling_new_products()
Now create a new product in another console or with the flask api, and see it printed out in the console.
docker exec -t api pytest src/tests