For this project I will be a hypothetical fintech engineer who’s working at one of the five largest banks in the world. I've been recently promoted to act as the lead developer on their decentralized finance team. My 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.
In this assignment, I will use the PyChain Legder to build a blockchain that runs locally and can be interacted with and verified using a user-friendly Streamlit interface.
Use the following link to jump right into the Python Code:
This notebook contains the Python Code of the Streamlit App
To create the PyChain Ledger and Streamlit App I will complete the following steps:
- I will create a new dataclass called Record.
- This class will serve as the blueprint for the financial transaction records that the blocks of the ledger will store.
- Create and modify the existing Block data class to store Record data.
- Add Relevant User Inputs to the Streamlit interface.
- These user input interfaces will allow the user to transact, interact, & verify aspects of the PyChain.
- I will preform transactions on the local blockchain to showcase how its usage.
If you like the visual apperance of my application you can replecate the theme in your own using the following custom streamlit theme:
[theme]
# Primary accent for interactive elements
primaryColor = '#30C731'
# Background color for the main content area
backgroundColor = '#F7F7F7'
# Background color for sidebar and most interactive widgets
secondaryBackgroundColor = '#DADAD8'
# Color used for almost all text
textColor = '#01011E'
# Font family for all text in the app, except code blocks
# Accepted values (serif | sans serif | monospace)
# Default: "sans serif"
font = "serif"