Python, with its reliable and easy-to-navigate syntax, was the obvious replacement choice for most developers, and the name “Brownie” became delectable in more ways than one.
Before learning how to deploy a smart contract, here’s a small introduction to Brownie.
An Introduction to Brownie
In simple terms, Brownie is the Python framework for deploying, testing, and interacting with Ethereum smart contracts.
Some of the major advantages of Brownie are
- Brownie stands apart from other frameworks as it offers a built-in area where project interactions occur.
- Brownie fully supports the popular smart contract programming languages – Vyper and Solidity.
- Brownie has the unique ability to notify the user when a test fails while running.
- As Brownie is based on Python, all the benefits of Python are carried forward to Brownie.
- It is significantly easier to deploy local blockchains on Brownie.
Now that you have a grasp of Brownie, let us see what else you will learn in this guide.
- How to use Solidity to build a basic Ethereum wallet.
- How to deploy a wallet to Zeeve using Brownie.
- How to send & receive Ether.
- How to deploy a smart contract.
Prerequisites to understanding the guide:
- Fundamentals knowledge of Python and Solidity.
- Building two Metamask accounts on Rinkeby testnet.
- Ensuring the latest versions of Brownie and Solidity are installed.
The first step is installing browning with “pip” or “pipx” so go to your terminal/cmd and type the following:
pip install eth-brownie
Step two is creating a new directory and switching “cd” to this directory. The codes for this is:
mkdir project cd project
Step three is running the command to start a new Brownie project and this will create boilerplate content that will help you carry on the subsequent steps with Brownie:
Creating Ethereum Wallet with Solidity
The next step is to create an Ethereum wallet to transact Eth via Solidity, where the addresses of users will be mapped and stored.
For this, you need to create a function that has the ability to receive payments, map