Questions tagged [brownie]

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

Filter by
Sorted by
Tagged with
2
votes
3answers
871 views

Brownie cannot locate deploy.py script

I have python installed on my system (Windows) with Anaconda from a prior course I had taken which may be the root cause of the issue. I'm at the stage where I need to run a deploy.py script to deploy ...
4
votes
3answers
2k views

eth-brownie: Unable to expand environment variable in host setting

When running a script: brownie run scripts/deploy.py --network kovan I receive this error: raise ValueError(f"Unable to expand environment variable in host setting: ‘{uri}’”) ValueError: Unable ...
6
votes
1answer
2k views

How to deploy Ethereum Smart Contract through Brownie to the Private Network

I have a geth node that is connected to a private network on my computer that uses port: 8545. Hence, I have a smart contract that is tested using Brownie on the ganache-cli network. Brownie is a ...
1
vote
1answer
171 views

Getting `No Python at ...` error trying to install Brownie with pipx on Windows

When I try and pipx install eth-brownie I get the following error: PS C:\Users\karee\web3_py_simple_storage> pipx install eth-brownie No Python at 'C:\Users\karee\AppData\Local\Programs\Python\...
7
votes
2answers
3k views

Which Ethereum framework to choose Truffle vs Brownie?

I know that the most used framework for smart contract that is used for testing, deployment etc is Truffle. But, since I am not very good at javascript (i am mainly coding in python)- I saw there is ...
4
votes
2answers
850 views

How to get the return value of a transaction instead of the transaction receipt in brownie

I have a function in my smart contract called getRandomNumer, and it returns a bytes32. However, in brownie, when I make a transaction it returns the transaction receipt. How do I get the return value?...
1
vote
2answers
505 views

How to compile Smart Contracts using Brownie on RASPBERRY PI 4B?

I have set up Raspberry Pi with npm, nodejs, ganache-cli, eth-brownie (by downloading straight from github), and VS code. I was able to do brownie command - it worked. I was able to do brownie init - ...
3
votes
6answers
1k views

LINK1120 error when attempting to install Brownie with 'pipx install eth-brownie'

I'm having some issues with my installation process for Brownie and wanted to reach out for some help. After getting pipx installed, my attempt to use 'pipx install eth-brownie' in the terminal of VSS ...
3
votes
1answer
697 views

Brownie cannot install solc on OSX

Follow the procedures on this page brownie : create new project and compile with brownie. Encounter the following error, please comment how to fix it. Configuration and environment. Python 3.7.7 ...
3
votes
1answer
132 views

What is the purpose of a `// dev:` comment after a revert or require statement?

What does it mean when a Solidity contract includes a comment starting with // dev: after a revert or require statement? For example: contract Example { function greet(){ revert(); // ...
2
votes
3answers
1k views

Brownie: PRIVATE_KEY issue: ValueError: The private key must be exactly 32 bytes long, instead of 0 bytes

I am trying to run a script in brownie, but I'm running into this error: ValueError: The private key must be exactly 32 bytes long, instead of 0 bytes. Terminating local RPC client... I'm using a ....
2
votes
2answers
501 views

File outside of allowed directories on brownie compile command

trying to import to files from openzeppelin and chainlink in my contract file like so: import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@chainlink/contracts/src/v0.6/...
1
vote
1answer
271 views

Brownie / Rinkeby ValueError: Gas estimation failed: "you must set the gas limit manually"

from brownie import AdvancedCollectible, accounts, config, network from scripts.helpful_scripts import get_breed import time static_seed = 123 def main(): dev = accounts.add(config["wallets&...
1
vote
2answers
416 views

Brownie - Constructor Sequence has incorrect length, expected 1 but got 0

I am trying to deploy a contract on Rinkeby by running brownie run scripts/deploy.py --network rinkeby but I get following error: Constructor Sequence has incorrect length, expected 1 but got 0 I ...
1
vote
1answer
251 views

ParserError: while parsing a block mapping

This is the code in my brownie.config.yaml file: # exclude SafeMath when calculating test coverage # https://eth-brownie.readthedocs.io/en/v1.10.3/config.html#exclude_paths reports: ...
1
vote
1answer
944 views

ModuleNotFoundError: No module named 'brownie._cli'

After installing python3, ganache-cli, upgrading pip to pipx and installing eth-brownie.. I am receiving errors when trying to use "brownie". I followed all of the steps in their docs ...