Questions tagged [brownie]
The brownie tag has no usage guidance.
234
questions
0
votes
1
answer
18
views
Brownie build/deployment/map.json lost
I deployed a project with brownie and I found out that the map.json file is unfortunately empty , I searched with google and chatgpt about how I can restore or recreate it and I came to the conclusion ...
0
votes
0
answers
13
views
VRFV2[chainlink] contract reverts on all transactions
I am attempting to utilize the VRFv2Consumer.sol file from chainlink. ALL of my transactions are reverting with the error: "Gas estimation failed: 'execution reverted'....If you wish to ...
0
votes
0
answers
42
views
Import "brownie" could not be resolved
I'm trying to work with eth-brownie. Currently, typing the command brownie --version successfully returns Brownie v1.19.3 - Python development framework for Ethereum, and brownie works as expected.
My ...
0
votes
0
answers
3
views
using brownie to deploy scripts fails
I have been trying to run a python "Hello" code using brownie run scripts/deploy.py
I am obtaining the following output:
Brownie v1.19.3 - Python development framework for Ethereum
File &...
-1
votes
0
answers
22
views
Solidity .s.sol and .t.sol extensions
I'm learning Solidity and have come across files with .s.sol and .t.sol extensions, usually in the context of tests. What do the path names mean? Are these files supposed to interface with testing ...
0
votes
0
answers
27
views
VirtualMachineError: revert when calling a stupidly simple Solidity function
I can't understand why I consistently get the same error when trying to get a value from a simple Solidity function using Python/Brownie, and a local instance of Ganache.
This is the first time I've ...
0
votes
1
answer
32
views
Getting an error when working with brownie
when I want to run the reputation .sol file and use brownie compile, I get the following error.
PS C:\Users\s\Documents\project\reputationproject> brownie compile
INFO: Could not find files for ...
0
votes
0
answers
16
views
why is chainlink release 1.4.0 is not retrievable anymore through brownie package manager?
brownie compile returns the following error due to this line in brownie-config.yaml:
dependencies:
- smartcontractkit/chainlink@1.4.0
the release tag clearly exists though: https://github.com/...
2
votes
1
answer
56
views
When Installing brownie on Mac I get this error
I tried to install brownie and I'm getting this error(I'm watching the code academy blockchain, solidity tutorial). I feel like after trying all possibilities I've reached dead end from my side. ...
0
votes
0
answers
11
views
return from none view function a transaction id rather than the result data
Using Brownie, Python in VSCode:
I am trying to combine getNumbers and findNumbers into findNumbers2.
But findNumbers2 returned a transaction id rather than the result data.
Any suggestions?
Solidity ...
-1
votes
1
answer
33
views
python exec() raises SyntaxError exception when passing an object inside the string argument
So I am currently trying to deploy my smart contract using a brownie script as shown in the code below:
from brownie import accounts, network
import sys
sys.path.append("../")
import ...
0
votes
1
answer
105
views
Interacting with already deployed contracts on brownie framework
Just thought I would put this here for anyone with a similar issue to me.
I had deployed a contract on the seplia testnet in brownie, but could not figure out how to interact with my already-deployed ...
0
votes
0
answers
96
views
How can I interact with a smart contract if the source code is not verified?
I am trying to call getPool from Kyberswap using brownie.
network.connect('polygon-getblock-main')
print("Loading Smart Contracts...")
kyberElasticFactoryContract = Contract....
0
votes
1
answer
71
views
How can i run scripts using brownie
I am trying to run my script using brownie but I am getting a constant error and I searched everywhere I didn't get the answer :
def main():
print("hello bruh")
I need to run my codes ...
0
votes
1
answer
48
views
ValueError: Unknown URI - must be a path to an IPC socket, a websocket beginning with 'ws' or a URL beginning with 'http'
I am using Brownie and added a Ganache local network using the following command:
brownie networks add Development ganache-local host=HTTP://127.0.0.1:7545 cmd=ganache-cli
After compiling, I try to ...
1
vote
1
answer
67
views
Transaction is getting reverted in the `refundToInsurer()` function call
The deployment of InsuranceProvider is working fine and the calling of newContract() with the required parameters is successfully creating/deploying the InsuranceConsumer contract. Even, the ...
1
vote
1
answer
261
views
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='codeload.github.com', port=443)
I tried to compile a brownie project with dependecies:
dependencies:
# the pattern is <organization/repo>@<version>
- smartcontractkit/chainlink-brownie-contracts@1.1.1
compiler:
...
3
votes
0
answers
74
views
Brownie error instead of exception when a transaction gets reverted on development
I am following a brownie tutorial which wrote the following test
def test_only_owner_can_withdraw():
fund_me = deploy()
bad_actor = accounts.add()
with pytest.raises(exceptions....
-1
votes
1
answer
52
views
Installing OpenZeppelin Dependencies in Brownie
In my brownie project, I want to install OpenZepplin dependencies. I have included the dependency in the config file, but Brownie is not automatically installing them. What am I doing wrong?
enter ...
0
votes
1
answer
29
views
Not seeing json file under contracts after compiling a contract on Brownie
Could someone please help on an issue, where I'm not getting a json file after I compile the contract in brownie..It just says
Brownie v1.19.2 - Python development framework for Ethereum
Project has ...
0
votes
0
answers
34
views
Pipx can not build packages when trying to install eth-brownie
I got a following error code while trying to install brownie through pipx (by typing "pipx install eth-brownie)
PS C:\Users\J.M\demos\brownie_simple_storage> pipx install eth-brownie
Fatal ...
1
vote
1
answer
123
views
ParserError: Source "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol" not found: File outside of allowed directories
I'm trying to compile a "FundMe.sol" contract: the issue is that when I try to compile it I keep getting the following Compiler Error:
Brownie v1.19.2 - Python development framework for ...
1
vote
1
answer
151
views
pytest: TypeError: int() can't convert non-string with explicit base
def _get_trace(self) -> None:
"""Retrieves the stack trace via debug_traceTransaction and finds the
return value, revert message and event logs in the trace.
""&...
0
votes
0
answers
48
views
Getting an RPC Request Error with Brownie Using Ganache
Getting an RPC Request Error: Web3 is not connected. when I run brownie test after compiling the token mix. It appears to be related to ganache.py because of the following error message: ../../../....
0
votes
1
answer
122
views
I can't install eth-brownie on windows
I also installed microsoft c++ 14.... but i really don't know how to get around this
Here is the error:
Fatal error from pip prevented installation. Full pip output in file:
C:\Users\aiatu\.local\...
0
votes
0
answers
82
views
Brownie cannot interact with Contracts Outside
I am trying to call the USDT contract on the Polygon Mumbai testnet. The following is my python code to be executed:
from brownie import accounts, network, Contract
from web3 import Web3
...
2
votes
1
answer
112
views
RPCRequestError while depositing WETH on aave v2 lending pool
while I am trying to use deposit() function from Aave v2 lending pool on goerli testnet, to deposit WETH token to the lending pool, the transaction is getting reverted and the error is following:
...
0
votes
1
answer
35
views
Why Brownie Test Class has no access to imported variables?
I'm writting a Brownie test like below:
from brownie import accounts
class Test1:
my_account = accounts\[0\]
def test_fn:
...
The test result says "my_account = accounts[0], ...
0
votes
1
answer
232
views
ETH Brownie Module Not Found Errror
So I had gotten this error 2 days ago when I started to install brownie and use it for developing using vyper, So I factory reset my whole laptop only to get the same error...
I followed the ...
1
vote
0
answers
43
views
How can I see contracts and events in the ganache UI when deploying vyper contracts locally with brownie?
Im trying to run: brownie run scripts/deploy_script.py --network development
I have these 2 config files:
# truffle-config.js
module.exports = {
networks: {
development: {
host: &...
0
votes
1
answer
228
views
I'm trying to deploy a smart contract on Goerli, but receiving an ImportError
I'm deploying a contract on Goerli using Brownie, following all the steps of the guide correctly, I've compiled contract 'FundMe' successfully but it returns an error - ImportError: cannot import name ...
-3
votes
1
answer
64
views
Everytime I am running Brownie run scripts/deploy.py, its showing the problem below, I need to understand what might be the problem with my install?
When I deploy this code, this is what happens?
brownie run scripts/deploy.py
Brownie v1.19.2 - Python development framework for Ethereum
BrownieSimpleStorageProject is the active project.
Launching '...
0
votes
1
answer
125
views
ValueError: Unable to expand environment variable in host setting: 'https://goerli.infura.io/v3/$WEB3_INFURA_PROJECT_ID'
I wanted to deploy my Smart Contract on testnet but I got an error,
below is the code
from brownie import accounts, config,SimpleStorage
def deploy_simple_storage():
account=accounts.load("...
0
votes
0
answers
119
views
I am stuck with an attribute error in Brownie Python
I wrote a simple code in brownie python but getting an Attribute error
from brownie import accounts
def deploy_simple_storage():
account=accounts[0]
print(account)
pass
def main():
...
0
votes
0
answers
112
views
Error solc not installed and cannot connect to github
I am trying to compile Solidity Code using brownie in VSCode. I installed the Solidity compiler through the extensions in VSCode. Whenever I do brownie compile I see below error:
ConnectionError: Solc ...
0
votes
1
answer
132
views
Brownie deploy --- ValueError: Expecting value: line 1 column 1 (char 0)
I am by far an expert, but more like a hobby. Having issues with a deploy script in Brownie. When running the script, I get a simple ValueError: Expecting value: line 1 column 1 (char 0). Was ...
0
votes
0
answers
50
views
ValueError: Unable to expand environment variable in host setting
I met this problem when try to deploy in Lesson 5 brownie Simple Storage
ValueError: Unable to expand environment variable in host setting: 'https://rinkeby.infura.io/v3/$WEB3_INFURA_PROJECT_ID'
I ...
0
votes
1
answer
235
views
Can't withdraw from smart contract
I'm trying to withdraw from this contract after funding it.
After funding it, i checked the balance on goerli etherscan and there was goerliETH in it that i sent but i noticed that once i called ...
0
votes
0
answers
33
views
Constructor Sequence Error. Deploying 2 Smart Contracts
I am trying to deploy two contracts side by side a FundMe.sol and Payments.sol. I have typed my code into VS Studio code so I can see the results on the Goerli testnet.
I am getting ValueError: ...
2
votes
1
answer
435
views
Goerli ValueError: Gas estimation failed: 'execution reverted'
I'm trying to deploy an NFT about Harry Potter following this tutorial: https://www.youtube.com/watch?v=p36tXHX1JD8&list=PLzmffB-8Vx5Twi0x5cRRdzyixrkJtaftJ&index=9&t=3s.
But when I run ...
1
vote
1
answer
135
views
Adding subscription address to chainlink vrf v2 inside of the contract
So I'm writing this lottery smart contract which is pretty straight forward, and since I want to test this on the goerli test net, I want to be able to add the contract as a subscriber to my VRF every ...
0
votes
0
answers
93
views
Forking a Mainnet in Brownie is showing `Unable to launch local RPC client` error
while running the command brownie console --network mainnet-fork I am getting the following error:
RPCProcessError: Unable to launch local RPC client.
Command: ganache-cli
URI: http://127.0.0.1:8545
...
1
vote
1
answer
139
views
Brownie Eth - Changing networks does not change the network.chain.id
I am trying to programatically deploy a Smart Contract via Brownie to multiple test networks.
The following code works, however when I switch networks the network.chain.id renames the same as the ...
0
votes
0
answers
70
views
My transaction keeps reverting even though i have funded it with more than enough eth. I am running it on a persistent ganache network with brownie
My enter lottery function which charges 5 dollars won't transact successfully when I deploy it with brownie. It works fine on remix, but when i try making a script file to run it it keeps sending the ...
0
votes
0
answers
94
views
ERC20 transferFrom() test in showing an error in Brownie
I created a simple ERC20 token, and wrote a brownie test for the token. Inside the brownie test I am trying to transfer token from one account to another using transferFrom. I have also given it the ...
0
votes
1
answer
282
views
ValueError: Gas estimation failed
I am following this course on youtube and on lesson 10 (Defi and Aave), i am getting this error when trying to borrow;
ValueError: Gas estimation failed: 'The execution failed due to an exception.'. ...
2
votes
0
answers
79
views
GCP VM startup script cannot install brownie
I am trying to install brownie on a GCP VM instance running ubuntu 18.04 LTS minimal.
My startup script is the following:
apt-get update -y &&
apt-get upgrade -y &&
apt-get install ...
0
votes
1
answer
253
views
How do I access the public variables of a contract that is initialized in another contract in brownie test
Basically I have two contracts and one test file. Contract A is initialized in Contract B. Now I want to access the public variable of Contract A through the deployed Contract B in Brownie. The ...
0
votes
0
answers
24
views
"Non-hexidecimal digit found" when deploying on brownie
When I deploy my smart contract onto Rinkeby network using Infura and making my private key an environmental variable. I keep getting "Non Hexadecimal Digit Found" error. I have tried adding
...
0
votes
0
answers
74
views
Failed Unit Test on smartcontract_lotter from Patrick C. Brownie Course
I'm going through the FreeCodeCamp/Chainlink course on Brownie/Solidity from Patrick Collins and can't debug a failed assertion in my test_can_pick_winner_correctly unit test. I've had no issues with ...