In this repository my task was to build a blockchain-based ledger system, complete with a user-friendly web interface (using Streamlit).
This ledger should allow individuals to conduct financial transactions (that is, to transfer money between senders and receivers) and to verify the integrity of the data in the ledger.
I was required to make the following updates to the provided Python file:
- Create a new data class named
Record
. - Modify the existing
Block
data class to storeRecord
data. - Add Relevant User Inputs to the Streamlit interface.
- Test the PyChain Ledger by Storing Records.
I defined a new Python data class named Record.
I gave this new class a formalized data structure that consists of the sender, receiver, and amount attributes.
I renamed the data attribute in the Block class to record, and then set it to use an instance of the new Record class that I created in the previous section.
I coded additional input areas for the user interface of your Streamlit application.
I created these input areas to capture the sender, receiver, and amount, for each transaction that will be stored in the Block record.
I tested the complete PyChain ledger and user interface by running the Streamlit application and storing some mined blocks in the PyChain ledger.
I then tested the blockchain validation process by using the web interface.