This device is not compatible.

PROJECT


Create a Simple Bank Smart Contract Using Solidity

In this project, we’ll write a smart contract for a bank in Solidity and deploy it using Brownie. We’ll also demonstrate how to connect to a contract and then call its functions using Brownie and Python scripts.

Create a Simple Bank Smart Contract Using Solidity

You will learn to:

Write smart contracts in Solidity.

Access contract functions using Web3.py.

Deploy smart contracts on a local network.

Send funds to and from a smart contract.

Skills

Blockchain Development

Blockchain Deployment

Web 3.0 App Development

Prerequisites

Intermediate understanding of Solidity

Basic understanding of Python

Basic understanding of Web3.py

Technologies

Web3

Python

Brownie

Solidity

Blockchain

Project Description

Brownie is a framework commonly used for developing and testing smart contracts for the Ethereum virtual machine. It supports both Solidity and Vyper as smart contract languages, but we’ll use Solidity in this project.

Brownie is relatively simpler for people who prefer Python over Truffle or Hardhat, which are both JavaScript-based frameworks.

In the first part of the project, we’ll create a smart contract that provides basic services provided by a bank. These services include depositing, withdrawing, and transferring funds to another account, as well as viewing an account’s transaction history.

Next, we’ll deploy the contract on a local blockchain using Ganache.

Lastly, we’ll look into different ways of interacting with our smart contract. We’ll also look into the differences between scripts that are run using Brownie and Python.

Project Tasks

1

Create the Smart Contract

Task 0: Get Started

Task 1: Deposit Funds

Task 2: Withdraw Funds

Task 3: Transfer Funds

Task 4: Get Balance

Task 5: Get Transaction History

2

Deploy the Smart Contract

Task 6: Write a Deployment Script

Task 7: Deploy the Contract

Task 8: Test the Contract Functions in the Console

3

Interact using a Brownie Script

Task 9: Call the Contract Functions

Task 10: Get Transaction History

4

Interact using a Python Script

Task 11: Connect to the Contract

Task 12: Verify Connection with the Contract

Task 13: Get Transaction History

Congratulations!