LE0xUL / contract-backend-fastapi

FastAPI implementation to interact with solidity contracts in blockchain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

contract-backend-fastapi

FastAPI implementation to interact with solidity contracts in blockchain

How to install

Once you have cloned the repo, run in the terminal:

python -m venv venv
source ./venv/bin/activate
pip install fastapi uvicorn web3

How to run

To initiate the server run in the terminal:

source ./venv/bin/activate
export URL_HTTP_PROVIDER="put your url from alchemy, infura or any other provider that you use"
export ACC_PRIVATE_KEY=PrivateKeyOfTheWalletToPayTransacctions
uvicorn main:app --port 8002    #toTesting: --reload    #toProduction: --host 0.0.0.0

This starts uvicorn running on http://127.0.0.1:8002

About

FastAPI implementation to interact with solidity contracts in blockchain

License:GNU General Public License v3.0


Languages

Language:Python 100.0%