Create Basic ERC20 token with Solidity, Brownie and Python

Overview

Create Basic ERC20 token with Solidity, Brownie and Python

Demo

Check out Cornell Token on Rinnkeby network with Etherscan.

demo

Installation

  1. Install brownie with pipx

    $ python3 -m pip install --user pipx
    $ python3 -m pipx ensurepath
    $ pipx install eth-brownie
    
    # test installation
    $ brownie 
  2. Install ganache-cli with npm

    npm install -g ganache-cli

Create the Project

  1. Initialize the project

    $ mkdir cornell_token ; cd cornell_token
    $ brownie init
  2. Create token contract in ./contracts/CornellToken.sol

    • inherit ERC20 implementation from OpenZeppelin to avoid re-inventing the wheel.
  3. Add ./brownie-config.yaml

    1. create mapping @openzeppelin to the github repo
    2. add other config:
      • dotenv
      • private key of local dev
  4. Add .env for the environment variables

    • dotenv -> for private key stuff, as a safer way
  5. Change the name of the Token (e.g. CornellToken)

  6. Creat deploy script deploy_cornell_token.py

    • define initial supply, token name, token sybol
  7. Creat deploy script helper.py

    • get account function

Deploy to local blockchain development environment

$ brownie run scripts/deploy_cornell_token.sol

Deploy to live network

  1. in brownie-config.yaml, add:

    networks:
    rinkeby: active
  2. in .env, add:

    export WEB3_INFURA_PROJECT_ID=<YOUR INFURA PROJECT ID>
    export PRIVATE_KEY=<YOUR PRIVATE KEY>

    To have infura project id, you need to create an infura account and a new project. The id is the endpoint to the live network.

    To access your private key, you can check out the metamask -> account details

  3. run the same script with an extra --network option

    $ brownie run scripts/deploy_cornell_token.sol --network rinkeby

    then wait for a moment to see the address being active on the live network.

  4. add this token to metamask

    • Metamask -> assets -> import tokens
    • grab the token contract address and add it into metamask.
Owner
Ethan Huang
Ethan Huang
A google search telegram bot.

Google-Search-Bot A google search telegram bot. Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.c

Fayas Noushad 37 Nov 24, 2022
A file-based quote bot written in Python

Let's Write a Python Quote Bot! This repository will get you started with building a quote bot in Python. It's meant to be used along with the Learnin

1 Oct 28, 2021
Efetuar teste de automação usando linguagem gherkin

🚀 Teste-de-Automação - QA---CI-T 🚀 Descrição • Primeira Parte • Segunda Parte • Terceira Parte Contributors Descrição Efetuamos testes de automação

Eliel martins 6 Dec 07, 2021
Simple Python Auto Follow Bot

Instagram-Auto-Follow-Bot Description Một IG BOT đơn giản. Tự động follow những người mà bạn muốn cướp follow. Tự động unfollow. Tự động đăng nhập vào

CodingLinhTinh 3 Aug 27, 2022
Asynchronous Python Wrapper for the GoFile API

Asynchronous Python Wrapper for the GoFile API

Gautam Kumar 22 Aug 04, 2022
Pogodasbot - Telegram bot sending channel weather info

Pogodasbot - Telegram bot sending channel weather info

Qayrat Sultan 1 Dec 15, 2022
Unarchive Bot for Telegram

Telegram UnArchiver Bot UnArchiveBot: 🇬🇧 Bot that allows you to extract supported archive formats in telegram. 🇹🇷 Desteklenen arşiv biçimleri tele

Hüzünlü Artemis [HuzunluArtemis] 25 May 07, 2022
A auto clock-in script based on python3 for BJUTer.

Introduction A auto clock-in script based on python3 for BJUTer. It could clock in at 9:00 a.m everyday. The script is inspired by tsosunchia What can

X 7 Nov 15, 2022
A powerfull Zee5 Downloader Bot With Permeneant Thumbnail Support 💯 With Love From NexonHex

Zᴇᴇ5 DL A ᴘᴏᴡᴇʀғᴜʟʟ Zᴇᴇ5 Dᴏᴡɴʟᴏᴀᴅᴇʀ Bᴏᴛ Wɪᴛʜ Pᴇʀᴍᴇɴᴇᴀɴᴛ Tʜᴜᴍʙɴᴀɪʟ Sᴜᴘᴘᴏʀᴛ 💯 Wɪᴛʜ Lᴏᴠᴇ Fʀᴏᴍ NᴇxᴏɴHᴇx Wʜᴀᴛ Cᴀɴ I Dᴏ ? • ɪ ᴄᴀɴ Uᴘʟᴏᴀᴅ ᴀs ғɪʟᴇ/ᴠɪᴅᴇᴏ ғʀᴏᴍ

Psycharmers 4 Jan 19, 2022
Experiment to find the best time to look for an appointment at the Berlin Bürgeramt

Bürgeramt appointment experiment Checks Berlin.de for free Anmeldung appointments every X minutes, then analyses the results. How to use Run get-page.

Nicolas Bouliane 42 Jan 02, 2023
Simple Telegram Bot to Download and Upload Files From Mega.nz

Mega.nz-Bot Simple Telegram Bot to Download Files From Mega.nz and Upload It to Telegram Features All Mega.nz File Links supported No login required A

I'm Not A Bot #Left_TG 245 Jan 01, 2023
Semplice pagina di informazione per sapere se e quando è uscito Joypad, il podcast a tema videoludico di Matteo Bordone (Corri!), Francesco Fossetti (Salta!) e Alessandro Zampini (Spara! per finta).

È uscito Joypad? Semplice pagina di informazione per sapere se e quando è uscito Joypad, il podcast a tema videoludico di Matteo Bordone (Corri!), Fra

Paolo Donadeo 32 Jan 02, 2023
The Most advanced and User-Friendly Google Collab NoteBook to download Torrent directly to Google Drive with File or Magnet Link support and with added protection of Timeout Preventer.

Torrent To Google Drive (UI Added! 😊 ) A Simple and User-Friendly Google Collab Notebook with UI to download Torrent to Google Drive using (.Torrent)

Dr.Caduceus 33 Aug 16, 2022
arweave-nft-uploader is a Python tool to improve the experience of uploading NFTs to the Arweave storage for use with the Metaplex Candy Machine.

arweave-nft-uploader arweave-nft-uploader is a Python tool to improve the experience of uploading NFTs to the Arweave storage for use with the Metaple

0xEnrico 84 Dec 26, 2022
A very simple Salesforce.com REST API client for Python

Simple Salesforce Simple Salesforce is a basic Salesforce.com REST API client built for Python 3.5, 3.6, 3.7 and 3.8. The goal is to provide a very lo

simple salesforce 1.4k Dec 29, 2022
DiscWrappy - A Python wrapper for the Discord bot API

DiscWrappy - A Python wrapper for the Discord bot API

Jeff Morris 4 Apr 25, 2022
Web app for spotify playlist management with last.fm integration

Music Tools Set of utility tools for Spotify and Last.fm. Built on my other libraries for Spotify (spotframework), Last.fm (fmframework) and interfaci

andy 3 Dec 14, 2022
A multi-platform HTTP(S) Reverse Shell Server and Client in Python 3

Phantom - A multi-platform HTTP(S) Reverse Shell Server and Client Phantom is a multi-platform HTTP(S) Reverse Shell server and client in Python 3. Bi

85 Nov 18, 2022
A Telegram robot can clone medias from any chat to your own chat.

Clonebot A Telegram robot can clone medias from any chat to your own chat. Read the documentation to know how to use the bot Deploy Developer Document

Renjith Mangal 224 Dec 30, 2022
A small bot to interact with the reddit API. Get top viewers and update the sidebar widget.

LiveStream_Reddit_Bot Get top twitch and facebook stream viewers for a game and update the sidebar widget and old reddit sidebar to show your communit

Tristan Wise 1 Nov 21, 2021