GithubHelp home page GithubHelp logo

brownie_simple_storage's Introduction

  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 run 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 rinkeby

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.