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
0answers
20 views

How do I deploy a BEP20 token on Brownie Eth? [closed]

I've created my BEP 20 token and I want to deploy it. I understand that you can deploy it using remix.ethereum.org but I want to use brownie eth to deploy it? I can't find any docs or tutorials to ...
0
votes
0answers
18 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 ...
1
vote
0answers
12 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.
0
votes
0answers
11 views

Problem with deploying a collectible with brownie

I tried to deploy a collectible with brownie. When I typed "brownie run scripts/simple_collectible/deploy_simple.py" the terminal simply told me, that there was a file missing. Here is a ...
1
vote
0answers
12 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/ ...
1
vote
0answers
11 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 ...
0
votes
1answer
11 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....
0
votes
0answers
9 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()...
0
votes
0answers
8 views

How do 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. I'm using Brownie : from brownie import ContractA, ContractB , accounts def main(): ...
0
votes
0answers
23 views

Better way to send transaction/call function with web3.py?

If I'm using a 3rd party provider for my web3.py connection, I have to do a few things to call a function. I need to get the nonce: nonce = w3.eth.getTransactionCount(address) I need to build the ...
0
votes
2answers
75 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 ...
0
votes
2answers
40 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 ...
0
votes
0answers
36 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 ...
0
votes
1answer
22 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'...
0
votes
1answer
20 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/openzeppelin-contracts@3.0.0 and $ brownie ...
0
votes
0answers
8 views

Automated tests with brownie - how to handle “base fee exceeds gas limit”

I have wrote this very basic test scenario with brownie: import pytest def test_set_get_18(tcontrat1,accounts): tcontrat1.set(18, {'from': accounts[0],'gas_limit':100}) assert tcontrat1.get() ...
0
votes
1answer
38 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 ...
2
votes
0answers
123 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/...
1
vote
1answer
42 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?...
2
votes
1answer
84 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 -...
1
vote
1answer
74 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 ...
1
vote
0answers
169 views

Which ethereum framework to choose Traffle vs Brownie?

I know that the most used frmaework for smart contract testing deployment etc is Traffle. But, since I am not very good at javascript (i am mainly coding in python)- I saw there is an option to use ...
0
votes
2answers
205 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 ...
2
votes
0answers
59 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 ?
1
vote
0answers
21 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 ...
2
votes
1answer
34 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(); // ...
5
votes
1answer
126 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 ...
3
votes
1answer
192 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
46 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=...
5
votes
1answer
512 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 ...