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
0 votes
3 answers
703 views

AttributeError: Module 'Users' Has No Method 'Main'

In Brownie I'm running a script which sends me this error "AttributeError: Module 'Users' Has No Method 'Main'. Do you have any suggestions on how I can fix this? import os from brownie import ...
Brian Lee Victory's user avatar
1 vote
0 answers
37 views

Unable to Compile Contract in Brownie

When I "Brownie compile" I don't receive a .json file under build>contracts If anyone can please help me I'll gladly send you a tip for your time.
Brian Lee Victory's user avatar
3 votes
2 answers
467 views

How to run Chainlink Project using eth-brownie python

I had installed eth-brownie using command pip install eth-brownie after Brownie installed.I had bake existing Brownie project into a new directory. mkdir MyChainlinkProject cd MyChainlinkProject/ ...
Hassan ALi's user avatar
1 vote
4 answers
1k views

Unable to Compile Contract in Brownie (not receiving a .json file in "build" folder )

I'm currently running Brownie in Studio Visual Code. My problem is that when I write a smart contract and try to compile it using command "Brownie Compile" I don't' receive a .json file in ...
Brian Lee Victory's user avatar
0 votes
1 answer
237 views

How to use smtp protocol in solidity smart contract via chainlink Oracle

i had developed a external adapter that make a http get request to cryptocompare api and get latest eth-usd price for me. from bridge import Bridge class Adapter: base_url = 'https://min-api....
Hassan ALi's user avatar
0 votes
0 answers
86 views

Event data has insufficient length | What does this mean?

I've seen this warning from time to time when working with Brownie Event data has insufficient length This is after I made a call to a Chainlink node, calling a function like: function requestUsers()...
Patrick Collins's user avatar
1 vote
1 answer
1k views

How can I get the deployed contract's address from a ContractContainer object in Brownie?

I want to chain contract deployment, where the second contract gets as a parameter the address of the first using Brownie: from brownie import ContractA, ContractB , accounts def main(): acct = ...
Maxen_ce's user avatar
0 votes
3 answers
4k views

Verifying token contract on Rinkeby etherscan

I am testing my new token contract on Rinkeby. The contract was compiled and deployed using Brownie. I am deploying the token to Rinkeby and it is compiled and deployed correctly. However, when I try ...
Zaid Amir's user avatar
  • 302
0 votes
2 answers
306 views

Deploy contract to Kovan with brownie and infura

I'm trying to simply deploy a smart contract in Kovan network, i've used the export of the ID using export WEB3_INFURA_PROJECT_ID=xxxx but i'm getting this error ValueError: The method ...
reiven's user avatar
  • 29
1 vote
0 answers
549 views

Step by step smartcontract debugging with truffle or brownie

I am writing smart-contracts with Vyper/Brownie or Solidity/Truffle. In order to debug and test my smartcontracts, i want to execute them step by step. Is there a way to do that exactly like we debug ...
Bob5421's user avatar
  • 1,463
0 votes
1 answer
581 views

I want to understand something with BigNumber assertions

I have create a truffle project with a smartcontract and a test file. Here is an extract of the test file: expect(ret).to.be.bignumber.equal(new BN('42')); ret is a value returned by a smartcontract'...
Bob5421's user avatar
  • 1,463
1 vote
1 answer
333 views

Brownie package manager: pm or ethpm

I have read several documentations about brownie. I have find 2 ways to install a package like openzeppelin-contracts: $ brownie pm install OpenZeppelin/[email protected] and $ brownie ...
Bob5421's user avatar
  • 1,463
1 vote
1 answer
1k views

Limit gas in brownie automated tests

I have create a brownie project with automated tests according to this documentation: https://vyper.readthedocs.io/en/stable/testing-contracts-brownie.html#writing-a-basic-test Here is an example: def ...
Bob5421's user avatar
  • 1,463
2 votes
0 answers
1k views

brownie steps to compile, deploy and interact on ropsten

I have created a smart contract and deployed it on ropsten with brownie framework. Here are the steps I've done: Run the command: $ brownie init projet1 I have created my contract in contracts/...
Bob5421's user avatar
  • 1,463
6 votes
2 answers
4k 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?...
Patrick Collins's user avatar
3 votes
1 answer
804 views

Deploy to testnet with brownie

I'm looking to deploy some code to the kovan testnet with Brownie. However I keep getting an error accessing accounts. Here is the command I'm running: brownie run scripts/deploy_price_consumer_v3.py -...
Patrick Collins's user avatar
2 votes
1 answer
712 views

Setup brownie to run certain test in a specific network

I am using brownie to run tests and right now my project is using two networks, development and mainnet-fork. I have a test which only runs in mainnet-fork and I am trying to figure out a way to tell ...
Macarse's user avatar
  • 106
9 votes
2 answers
6k 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 ...
Dennis's user avatar
  • 91
0 votes
2 answers
1k views

Brownie some contracts cannot be tested on mainnet fork

I am testing on mainnet-fork and it always fails when particular contracts like (Uniswap) are called more than once. Is there any fix for this or is this problem outside the scope of brownie? Thanks ...
taznak's user avatar
  • 1
3 votes
1 answer
160 views

How do I automatically verify my contracts on etherscan using brownie?

I discovered truffle has truffle-plugin-verify that help you verify your contracts on etherscan. I wonder if similar functionality can be done with brownie ?
H4F's user avatar
  • 31
1 vote
0 answers
27 views

How can I automize process of deploying my contract?

I am using following appoach How to deploy Ethereum Smart Contract through Brownie to the Private Network. I want to automate this process in order to capture the transaction hash and deployed ...
alper's user avatar
  • 8,368
3 votes
1 answer
257 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(); // ...
iamdefinitelyahuman's user avatar
6 votes
1 answer
2k views

How to catch a `revert()` error using Brownie?

I am using Brownie to develop my smart contracts, which helps me to intract with the smart contracts, please see doc. When my call Example.greet() is there any way to return the error message and act ...
alper's user avatar
  • 8,368
3 votes
1 answer
1k 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 ...
madeinQuant's user avatar
4 votes
1 answer
142 views

Brownie: Hypothesis given() is not resetting chain for each function call

I have the following test code snippet in my brownie project: from hypothesis import settings, given, strategies as st from brownie import * import brownie st_buy_amount_eth = st.integers(min_value=...
Newti's user avatar
  • 365
6 votes
1 answer
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 ...
alper's user avatar
  • 8,368

1
4 5 6 7
8