- Create a new data class named Record.
- Modify the existing Block data class to store Record data.
- Add Relevant User Inputs to the Streamlit interface.
- Test the PyChain Ledger by Storing Records.
- The pychain.py file (open in Spyder) for code details and the screenshot_streamlit.png and screenshot_streamlit2.png files in the images folder.
@dataclass
class Record:
sender: str
receiver: str
amount: float
record: Record
sender = st.text_input("Sender")
receiver = st.text_input("Receiver")
amount = st.text_input("Amount")
This task included entering values for sender, receiver, and amount several times to add transactions to the chain. Then I clicked Validate, result = True. Refer to screenshots.