All Projects → eth-brownie → Brownie

eth-brownie / Brownie

Licence: mit
A Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.

Programming Languages

python
139335 projects - #7 most used programming language
solidity
1140 projects

Labels

Projects that are alternatives of or similar to Brownie

Augur Ui
Augur UI
Stars: ✭ 412 (-13.81%)
Mutual labels:  ethereum
Defi Sdk
DeFi SDK Makes Money Lego Work
Stars: ✭ 440 (-7.95%)
Mutual labels:  ethereum
Awesome Ethereum
⚡️ Awesome Ethereum Resources
Stars: ✭ 459 (-3.97%)
Mutual labels:  ethereum
Eth Crypto
Cryptographic javascript-functions for ethereum and tutorials to use them with web3js and solidity
Stars: ✭ 420 (-12.13%)
Mutual labels:  ethereum
Go Ethereum
Go language implementation of the original/classic design of the Ethereum protocol
Stars: ✭ 437 (-8.58%)
Mutual labels:  ethereum
Presto Ethereum
Presto Ethereum Connector -- SQL on Ethereum
Stars: ✭ 450 (-5.86%)
Mutual labels:  ethereum
Swarm
swarm docs
Stars: ✭ 403 (-15.69%)
Mutual labels:  ethereum
Aragonos
(Aragon 1) Reference implementation for aragonOS: a Solidity framework for building complex dApps and protocols
Stars: ✭ 478 (+0%)
Mutual labels:  ethereum
Eattheblocks
Source code for Eat The Blocks, a screencast for Ethereum Dapp Developers
Stars: ✭ 431 (-9.83%)
Mutual labels:  ethereum
Sharding
Sharding manager contract, and related software and tests
Stars: ✭ 461 (-3.56%)
Mutual labels:  ethereum
Blockchainstore
💰 Retail Store that runs on Ethereum
Stars: ✭ 425 (-11.09%)
Mutual labels:  ethereum
Walleth
free (libre) native Android Ethereum wallet
Stars: ✭ 432 (-9.62%)
Mutual labels:  ethereum
Rocketpool
A next generation decentralised Ethereum proof of stake network and pool, currently in beta and built to be compatible with Ethereum 2.0 and the Beacon Chain.
Stars: ✭ 450 (-5.86%)
Mutual labels:  ethereum
Synthetix
Synthetix Solidity smart contracts
Stars: ✭ 412 (-13.81%)
Mutual labels:  ethereum
Web3swift
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions on Ethereum network.
Stars: ✭ 462 (-3.35%)
Mutual labels:  ethereum
Quorum
A permissioned implementation of Ethereum supporting data privacy
Stars: ✭ 4,054 (+748.12%)
Mutual labels:  ethereum
Burner Wallet
🔥👛Burner Wallet to move crypto quickly in a web browser. Sweep to cold storage when you get home. 🏠👨🏻‍🚒
Stars: ✭ 448 (-6.28%)
Mutual labels:  ethereum
Baseline
The Baseline Protocol is an open source initiative that combines advances in cryptography, messaging, and blockchain to execute secure and private business processes at low cost via the public Ethereum Mainnet. The protocol will enable confidential and complex collaboration between enterprises without leaving any sensitive data on-chain
Stars: ✭ 479 (+0.21%)
Mutual labels:  ethereum
Simcoin
Blockchain simulation framework with Docker and Python.
Stars: ✭ 470 (-1.67%)
Mutual labels:  ethereum
Scatterdesktop
Connect to applications on EOS, Ethereum, and Tron. Exchange tokens with ease. Manage your assets safely. All in a simple to use interface.
Stars: ✭ 459 (-3.97%)
Mutual labels:  ethereum

Brownie

Pypi Status Build Status Docs Status Coverage Status

Brownie is a Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.

Features

  • Full support for Solidity (>=0.4.22) and Vyper (>=0.1.0-beta.16)
  • Contract testing via pytest, including trace-based coverage evaluation
  • Property-based and stateful testing via hypothesis
  • Powerful debugging tools, including python-style tracebacks and custom error strings
  • Built-in console for quick project interaction
  • Support for ethPM packages

Dependencies

Installation

via pipx

The recommended way to install Brownie is via pipx. pipx installs Brownie into a virtual environment and makes it available directly from the commandline. Once installed, you will never have to activate a virtual environment prior to using Brownie.

To install pipx:

python3 -m pip install --user pipx
python3 -m pipx ensurepath

To install Brownie using pipx:

pipx install eth-brownie

To upgrade to the latest version:

pipx upgrade eth-brownie

To use lastest master or another branch as version:

pipx install git+https://github.com/eth-brownie/[email protected]

via pip

You can install the latest release via pip:

pip install eth-brownie

via setuptools

You can clone the repository and use setuptools for the most up-to-date version:

git clone https://github.com/eth-brownie/brownie.git
cd brownie
python3 setup.py install

as a library

If you want to install brownie inside your own project (rather than as a standalone cli tool):

export BROWNIE_LIB=1
pip install eth-brownie

This loosens the pins on all dependencies. You'll want to make sure you have your own requirements.txt to make sure upgrades upstream don't surprise anyone.

for development

There are extra tools that are helpful when developing:

git clone https://github.com/eth-brownie/brownie.git
cd brownie
python3 -m venv venv
./venv/bin/pip install wheel
./venv/bin/pip install -e . -r requirements-dev.txt

Upgrading the pinned versions of dependencies is easy:

./venv/bin/pip-compile --upgrade
./venv/bin/pip-compile --upgrade requirements-dev.in
./venv/bin/pip-compile --upgrade requirements-windows.in

Even small upgrades of patch versions have broken things in the past, so be sure to run all tests after upgrading things!

Quick Usage

To initialize a new Brownie project, start by creating a new folder. From within that folder, type:

brownie init

Next, type brownie --help for basic usage information.

Documentation and Support

Brownie documentation is hosted at Read the Docs.

If you have any questions about how to use Brownie, feel free to ask on Ethereum StackExchange or join us on Gitter.

Testing

To run the tests, first install the developer dependencies:

pip install -e . -r requirements-dev.txt

Then use tox to run the complete suite against the full set of build targets, or pytest to run tests against a specific version of Python. If you are using pytest you must include the -p no:pytest-brownie flag to prevent it from loading the Brownie plugin.

Using Docker

You can use a sandbox container provided in the docker-compose.yml file for testing inside a Docker environment.

This container provides everything you need to test using a Python 3.6 interpreter.

Start the test environment:

docker-compose up -d

To open a session to the container:

docker-compose exec sandbox bash

To run arbitrary commands, use the bash -c prefix.

docker-compose exec sandbox bash -c ''

For example, to run the tests in brownie/tests/test_format_input.py:

docker-compose exec sandbox bash -c 'python -m pytest tests/convert/test_format_input.py'

Attaching to dockerized RPC clients

You can also attach to a RPC client already running inside a docker container.

For example for running ganache-cli you could just startup the official ganache-cli docker image:

docker run -p 8545:8545 trufflesuite/ganache-cli

Then in another terminal on your host you could connect to it:

brownie console

If you have your RPC client bound to a specific hostname e.g. ganache you could create a separate brownie network for it:

brownie networks add Development dev cmd=ganache-cli host=http://ganache:8545

Then connect to it with:

brownie console --network dev

Contributing

Help is always appreciated! Feel free to open an issue if you find a problem, or a pull request if you've solved an issue.

Please check out our Contribution Guide prior to opening a pull request, and join the Brownie Gitter channel if you have any questions.

License

This project is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].