You’re a fintech engineer who’s working at one of the five largest banks in the world. You were recently promoted to act as the lead developer on their decentralized finance team. Your task is to build a blockchain-based ledger system, complete with a user-friendly web interface. This ledger should allow partner banks to conduct financial transactions (that is, to transfer money between senders and receivers) and to verify the integrity of the data in the ledger.
You’ll make the following updates to the provided Python file for this assignment, which already contains the basic PyChain
ledger structure that you created throughout the module:
This project requires streamlit, dataclasses, typing, datetime, pandas and hashlib
-
In the terminal, navigate to the folder where
pychain.py
is stored. -
In the terminal, run the Streamlit application by using
streamlit run pychain.py
. -
Enter values for the sender, receiver, and amount, and then click the "Add Block" button. You can do this several times to store several blocks in the ledger. You can even toggle the block difficulty with the slider on the lefthand side of the web interface.
-
Verify the block contents and hashes in the Streamlit dropdown menu.
-
Test the blockchain validation process by clicking the 'Validate Chain' button.