Our Blog

Bringing Blockchain to Project Management: A Developer’s Guide with Solidity & Python
Part 3
Starting Smart Contract Development
Bringing Blockchain to Project Management: A Developer’s Guide with Solidity & Python

Bringing Blockchain to Project Management: A Developer’s Guide with Solidity & Python

Part 3 - Starting Smart Contract Development

Part 1 | Bringing Blockchain to Project Management | Introduction : Read here

Part 2 | Bringing Blockchain to Project Management | Setting up Django Application : Read here

This multi-part blog series explores the creation of a smart contract using the Ethereum network, Solidity, and the Python Django framework. The objective is to provide an accessible introduction to smart contracts through a practical, real-world example.

In this episode, we will dig deeper into the Ethereum blockchain, set up a test wallet, create a local Ethereum network using Ganache, and compile and deploy a very simple contract on our local network. But first, we will start with a few key terminologies, concepts, and essential websites.

In the end, we will compile and deploy a very basic smart contract on our test Ethereum network.

Key Concepts

Before we begin developing smart contracts, we need to learn some key concepts and terminologies.

1. Local Test Ethereum Network

A local test Ethereum network is a developer-controlled blockchain environment that simulates Ethereum's functionality for testing smart contracts, dApps, and transactions without using real Ether or interacting with the mainnet.

Two of most popular Local Test Ethereum networks include:

a. The ganache Network : : A fast, personal Ethereum blockchain used for testing and development. It allows you to deploy contracts, develop applications, and run tests locally. You can read more about it here: Ganache Home Page

b. The Hardhat Network : A local Ethereum network built into the Hardhat development environment. It provides advanced debugging features, stack traces, and automatic mining for efficient smart contract development. You can read more about it here: Hardhat Home Page

2. Ethereum Test Networks

Ethereum test networks like Sepolia are public blockchains used for testing smart contracts and dApps in a realistic environment. They mirror mainnet behavior without using real ETH, enabling safer deployments and experimentation.

You can read more about it here: Sepolia Home Page.

3. Faucets

A faucet is a free web-based tool that dispenses small amounts of testnet Ether (ETH), allowing developers to pay for transactions on public testnets like Sepolia. Here is a list of the top faucets:

a. Google Cloud Web3 Faucet Instant Sepolia tokens via your Google account. Please visit Google Sepolia Faucet

b. Alchemy Sepolia Faucet Up to ~0.1 ETH every 72 hours, no auth needed. Please visit Alchemy Sepolia Faucet

c. QuickNode Sepolia Faucet Free ~0.05–0.1 ETH every 12 hours (bonus for tweeting). Please visit QuickNode Sepolia Faucet

4. Productivity Tools

a. Meta Mask is a non-custodial Ethereum wallet (browser extension and mobile app) that enables users to manage ETH/ERC‑20 tokens and securely connect to decentralized apps (dApps).

Sign up and download MetaMask here: MetaMask Signup.

MetaMask simplifies smart contract development by enabling quick wallet integration, seamless testnet interaction, and easy transaction signing directly from the browser.

b. Remix GUI (Web based) Remix UI is a browser-based IDE for writing, compiling, deploying, and debugging Ethereum smart contracts using Solidity, with built-in tools and test environment. Visit Remix Home page for more information.

Why it's important: It streamlines smart contract development without needing complex local setups, enabling quick testing, debugging, and deployment on local or test networks like Sepolia or Ganache.

5. Pre-requisite Software Installation

a. web3.py: web3.py is a Python library for interacting with Ethereum nodes, enabling smart contract deployment, transactions, and blockchain data access using Python code in decentralized application development.

It can be installed using the following command: pip3 install web3

b. Node JS / NPM Installation: We will be using the ganache local ethereum network on our Cloud Instance. It requires NPM to be installed. Follow this commands to install curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash source ~/.bashrc nvm list-remote nvm install lts/jod nvm --version

Step 6: Install Local ganache Ethereum Network on Cloud VM

We can install ganache on Ethereum local network using following set of commands: npm install -g @ganache/cli We can run it on all network interfaces as follows: ganache --host 0.0.0.0 --port 8545 --chain.chainId 1337 If we don’t mention --host 0.0.0.0, we will not be able to use it in our browser based MetaMask wallet.

Step 7: Install Brownie

Brownie is a Python-based development and testing framework for Ethereum smart contracts, supporting Solidity and Vyper, with tools for deployment, testing, debugging, and interaction via scripts.

Brownie simplifies smart contract workflows by integrating Python scripting, automated testing, and network management—ideal for developers comfortable with Python. You can get more information: Brownie Home Page. You can install it using pip installer as follows: pip3 install eth-brownie We can verify installation using the following command: brownie --version

Connecting MetaMask with ganache network running on VM

1. Ensure ganache is running on your remote VM. It will be listening on 0.0.0.0:8545.

2. Open metamask wallet on your browser as shown below: MetaMask Extension

3. Plesae Login or sign up for MetaMask. Then you will be redirected to the following screen: MetaMask Main Page

4. Now we will add the custom ganache network to meta mask.Copy following:

4.1. Private key from the local ganache network as shown in the following screen: Copy Private Key

4.2. RPC URL for the ganache network which is http://35.226.208.133:8545. Note chainid = 1337 RPC URL

5. Click on the context menu on MetaMask plugin and select Expanded View. This will open up MetaMask as tab on your browser. Expanded View The expanded view is shown below: MetaMask Browser Tab

6. Let's add our test network. Click on the Network drop down on the left hand side. Please review the attached image. Expanded View When you click on the drop down, you will see the list of available network as shown below: List of networks You will see button at the bottom called 'Add a custom network'. Click on the button and you will be redirected to the following page: Add a custom network page

7. Set name of the network to be: Localhost 8545. Chain id to be: 1337. Currency symbol: ETH. Custom Network page In order to add Default RPC URL click on the drop down. You will be redirect to the following screen: Add Default RPC URL Now paste RPC URL (copied in Step# 4.2) and click 'Save' button. Click on the Save network button

8. Let's verify if it is added. Again click on the dropdown for the networks and you will see Localhost 8545. RPC URL Now click on our test network Localhost 8545. You will be redirected to the following page: View LocalHost 8545

9. Let's add a test account in our test network. So we can get some test Ethereum. Click on the drop down (next to account account name) as highlighted below: Test Accounts List When you click on the drop down, you will be presented following screen: Test Accounts List Click on the 'Add account or hardware wallet'. You will be redirected to the following screen: Add new account From the options presented, please click on 'Private Key'. You will be redirected to the following screen: Click on Private Key link Now paste the private key copied in Step# 4.2 and click on 'Import' button. You will see the test balance added to the our test account as shown in the following screen: Click on Import button

Deploying Sample Smart Contract with Remix

1. Let's add a very basic smart contract on our test network running at http://35.226.208.133:8545. Now open following URL on your browser: Remix Web IDE. Remix Web IDE Ensure Remix and Test Account is connected as shown below: Remix and Test Account are connected

2. On Remix UI select contracts link on the left hand side as shown below image: Select Contracts on Remix UI 3. Click on the folder icon to expand contracts to show the list current Solidity contracts. List of solidity contracts

4. Now create a new solidity contract called payable_contract.sol by clicking 'file' icon: Click new smart contract

A new file will be created and please name it as as payable_contract.sol. It will look like this: New Contract file created

5. Add the following solidity code for payable_contract. // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract PayableDemo { event PaymentReceived(address indexed sender, uint256 amount); // Constructor now accepts ETH at deployment time constructor() payable { emit PaymentReceived(msg.sender, msg.value); } receive() external payable { emit PaymentReceived(msg.sender, msg.value); } fallback() external payable { emit PaymentReceived(msg.sender, msg.value); } function getBalance() external view returns (uint256) { return address(this).balance; } } Add code for new smart contract

Compiling payable_contract using Remix

1. Click on the Play button on the top row (as shown below) to compile our payable_contract.sol file Compile our Soliditity contract 2. If your contract compiles successfully, you will see a green tick next to Solitiy Compilier link on your left hand side. Please check following screenshot: Successful compilation

Deploying payable_contract using Remix

1. Click on 'Deploy and run transactions' as shown on the following screen: Deploy and run transactions

2. You will be redirected to the following screen: Deploy and run transactions screen 3. Ensure, we select the correct Environment (i.e., Injected Provider MetaMask) so that we can utilize our test ganache network. Click on the drop down as shown in the following screenshot: Select correct environment 4. Once you have selected 'Injected Provider - Metamask', you will see the test account with test ether populated as shown in the following: Selected Injected Provider - Metamask environment 5. Now click on the 'Deploy' button. As each contract deployment requires some gas amount (which is a transactional amount), you will see a confirmation box for MetaMask. It will ask for your confirmation (as gas amount will be deducted from your selected test account) to continue with contract deployment or not. Confirm contract deployment 6. Upon confirmation of contract deployment, we will see deployment start and finish. In case of no errors, you will confirmation on Remix console as shown in the following screenshot: Contract deployment successful 7. Similarly following will be printed on the console screen (where our ganache network) is running Console contract deployment confirmation 8. Deployed contracts are shown under 'Deployed Contracts' on Deploy & Run Transactions as shown screen in the following screenshot: Deployed Contracts

In the Next Blog

In the next part of this series, we’ll dive into Solidity—the core language for writing Ethereum smart contracts. You’ll learn how to set up a local blockchain development environment and write your first basic Solidity contract. This contract will allow you to push data updates to the blockchain, ensuring resilience and protection against tampering or unauthorized changes.This is where we start turning ideas into decentralized code.

Looking for a reliable tech partner? FAMRO-LLC can help you!

Our development rockstars excel in creating robust and scalable solutions using Django, a powerful Python framework known for its rapid development capabilities and clean, pragmatic design. FAMRO’s team ensures that complex web applications are built quickly and with precision—enabling businesses to focus on growth while we handle the backend complexity.

But that’s not all. FAMRO-LLC also brings deep expertise in blockchain development and smart contract engineering. Whether you’re looking to integrate decentralized logic into your applications or automate business workflows using Ethereum and Solidity, our team can design, deploy, and secure smart contract solutions tailored to your needs.

On the deployment side, our Infrastructure team takes charge with Kubernetes, the leading platform for container orchestration. Their deep knowledge ensures applications are seamlessly deployed, scaled, and managed in cloud environments. By automating service discovery, load balancing, and resource scaling, we guarantee high performance and resilience.

This powerful combination of Django development, smart contract expertise, and cloud-native DevOps positions FAMRO-LLC as your go-to partner for delivering end-to-end, scalable, and future-ready technology solutions.

Please don't hesitate to Contact us for free initial consultation.

Our solutions for your business growth

Our services enable clients to grow their business by providing customized technical solutions that improve infrastructure, streamline software development, and enhance project management.

Our technical consultancy and project management services ensure successful project outcomes by reviewing project requirements, gathering business requirements, designing solutions, and managing project plans with resource augmentation for business analyst and project management roles.

Read More
2
Infrastructure / DevOps
3
Project Management
4
Technical Consulting