Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

PatrickAlphaC/brownie_simple_storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Update: Head to Cyfrin Updraft

ℹ️ Important: This repo is no longer maintained; we invite all people learning Solidity to head to Cyfrin Updraft! The 100% free #1 smart contract education platform on earth. Developed with love by Patrick & Cyfrin <3

  1. Install Brownie
python3 -m pip install --user pipx
python3 -m pipx ensurepath
# restart your terminal
pipx install eth-brownie

Or, if that doesn't work, via pip

pip install eth-brownie
  1. Clone this
git clone https://github.com/PatrickAlphaC/brownie_simple_storage
cd brownie_simple_storage
  1. Add your metamask to the brownie accounts at the 0 index
brownie accounts new 0

You'll be prompted to add your private key: 0xa5555555555555a09215803a6b540f1e054797eeda2eec6d49076760d48e7589 And a password, and you can see your new added account with brownie accounts list

Or, export your PRIVATE_KEY as an environment variable, and uncomment the line:

# account = accounts.add(config["wallets"]["from_key"])

and comment the line:

account = accounts[0]
  1. Testing
brownie test
  1. Running scripts
brownie run scripts/deploy.py
  1. Deploy to a testnet

Add your WEB3_INFURA_PROJECT_ID from Infura to your .env and run

source .env

To set your environment variable. You can check you've done it correctly with:

echo $WEB3_INFURA_PROJECT_ID

Change the deploy_simple_storage function in deploy.py to look like:

account = accounts.add(config["wallets"]["from_key"])
# account = accounts.load("id")
# account = accounts[0]

Then run:

brownie run scripts/deploy.py --network sepolia

Make sure you have some testnet ETH. You can find faucets in the Chainlink Documenatation

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published