This is an ERC20 token created with solidity and brownie environment.
Please install or have installed the below program:
- Install Brownie, if you haven't already. Here is a simple way to install brownie.
pip install eth-brownie
Or, if that doesn't work, via pipx
pip install --user pipx
pipx ensurepath
# restart your terminal
pipx install eth-brownie
- Clone this repo
# open your terminal
git clone https://github.com/codebestia/BestiaToken.git
cd BestiaToken
npm install -g ganache-cli
If you want to be able to deploy to testnets, do the following.
- Set your environment variables
Set your WEB3_INFURA_PROJECT_ID
, and PRIVATE_KEY
environment variables.
You can get a WEB3_INFURA_PROJECT_ID
by getting a free trial of Infura. At the moment, it does need to be infura with brownie. You can find your PRIVATE_KEY
from your ethereum wallet like metamask.
You'll also want an Etherscan API Key to verify your smart contracts.
Create a .env file in the contract directory and add your environment variables to the .env
file:
export WEB3_INFURA_PROJECT_ID=<PROJECT_ID>
export PRIVATE_KEY=<PRIVATE_KEY>
export ETHERSCAN_TOKEN=<YOUR_TOKEN>
DO NOT SEND YOUR KEYS TO GITHUB If you do that, people can steal all your funds. Ideally use an account with no real money in it.
Then, make sure your brownie-config.yaml
has:
dotenv: .env
- Compile the Erc20 token contract
brownie compile
- Deploy the token contract For Ganache local chain
brownie run scripts/deploy.py
For testnet deployment
brownie run scripts/deploy.py --network sepolia
View and Interact with the token contract
You can even add it to your local wallet