Skip to content

a nice simple template for developing with brownie without all the insanity

License

Notifications You must be signed in to change notification settings

officialnico/brownie-template-lite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

brownie-template-lite

A simpler way of coding solidity.

Use this for fast prototyping and a clean project

Installation

Ensure pre-requisites:

  • Linux/MacOS
  • Python 3.8.5+
  • solc 0.8.0+ [Instructions]
  • ganache. To install: npm install ganache-cli --global

Recommended Setup:

  • Fish Shell
  • VirtualFish (venv manager)
  • StarShip Cross Shell Prompt

Now, open a new terminal and:

#clone repo
git clone https://github.com/officialnico/brownie-template-lite.git
cd brownie-template-lite

#create a virtual environment
python -m venv venv

#activate env
source venv/bin/activate

#install dependencies
pip install -r requirements.txt

#install openzeppelin library, to import from .sol (ignore FileExistsErrors)
brownie pm install OpenZeppelin/[email protected]

Running Tests

In terminal:

#run one test
brownie test tests/test_Simpletoken.py::test_transfer

#run tests for one module
brownie test tests/test_Simpletoken.py

#run all tests
pytest

Brownie Console

From terminal:

brownie console

In brownie console:

>>> t = Simpletoken.deploy("TEST", "Test Token", 18, 100, {'from': accounts[0]})
Transaction sent: 0x3f113379b70d00041068b27733c37c2977354d8c70cb0b30b0af3087fca9c2b8
  Gas price: 0.0 gwei   Gas limit: 6721975   Nonce: 0
  Simpletoken.constructor confirmed   Block: 1   Gas used: 551616 (8.21%)
  Simpletoken deployed at: 0x3194cBDC3dbcd3E11a07892e7bA5c3394048Cc87

>>> t.symbol()
'TEST'

inspired and derived from vw-cli by trentmc & Ocean Protocol

About

a nice simple template for developing with brownie without all the insanity

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published