New answers tagged brownie
0
votes
Error: Transaction's maxFeePerGas (0) is less than the block's baseFeePerGas (527514873)
Extending on GitHub20292's answer. You need to add maxFeePerGas (JS) or max_fee_per_gas (Python) whenever you're sending or signing a transaction.
Example (for Web.js)
const block = await web3.eth....
0
votes
Add a 'from' account to hardhat transaction calls
Identical issue is resolved in this answer here on official etherjs github repo.
0
votes
Brownie : Contract Functionality not available in local environment
I added ".from_explorer(address)" to MintableForkToken and Contract objects, this solved the issue. Please see below:
dai = MintableForkToken.from_explorer(dai_addr) #See here
dai....
0
votes
ValueError: Dotenv specified in config but not found at path
.env file should be at root of your project. i.e. Here your root directory is \Users\aixax\Desktop\nft-from-scratch\.
So your .env file should be at C:\Users\aixax\Desktop\nft-from-scratch\.env
0
votes
Brownie unable to compile contracts on Apple M1 Mac
I had a similar issue and ended up digging pretty deep into brownie to understand what's occurring.
Ultimately, brownie calls out to pysolcx to interact with the solidity compiler. pysolcx looks ...
1
vote
Brownie Error cannot find contract/file
I believe in your smart contract you need to have the standard import pathing:
ie:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol&...
0
votes
Accepted
How to fix "Cannot import Lottery from brownie"?
You have written contract name lottry in small case.
Changes are to be done :
from brownie import Lottery, accounts, config, network
to
from brownie import lottery , accounts, config, network
0
votes
eth-brownie: Unable to expand environment variable in host setting
if you are sure you set the .env correctly you can try sourcing your .env file in the terminal:
source .env
and then try running your script again.
0
votes
Accepted
Getting the address of a contract before its deployed with brownie
Found it!
If you want to get the next next contract address then keep on adding 1 to the nonce.
from brownie import Test, accounts
from web3 import Web3
import rlp
def main():
deployer = accounts[...
1
vote
Accepted
Brownie Gas estimation failed: 'execution reverted'
For rinkeby network these are the address for the following parameters.
vrf_coordinator: "0xb3dCcb4Cf7a26f6cf6B120Cf5A73875B7BBc655B"
link_token: "...
1
vote
brownie cant verify my contract on etherscan
I had this problem for days and finally here's what worked for me:
I changed my global compiler version to the version of solidity I declared for my contract: 0.6.6 (from top left...code > ...
1
vote
I am creating random accounts on brownie using accounts.add, are the account address "mine" even in the polygon-testnet?
i am not so clear on the " are the account address mine" part, but if you are using
accounts.add()
then, according to the docs, you are creating local accounts, meaning that they are stored ...
0
votes
Brownie contract Interface not working on mainnet-fork
The Weth address in get_weth.py should be different from the address cited in your error. Specifically the lines in 'get_weth.py' in question are;
weth_address = '...
Top 50 recent answers are included
Related Tags
brownie × 356solidity × 139
python × 97
web3.py × 39
chainlink × 27
ganache × 23
contract-deployment × 15
nft × 15
ganache-cli × 14
blockchain × 13
openzeppelin × 13
uniswap × 12
erc-721 × 12
error × 11
smart-contract-wallets × 9
import × 9
contract-development × 8
ether × 8
etherscan × 8
rinkeby × 8
solidity-0.8.x × 8
visual-studio-code × 8
infura × 7
testing × 7
openzeppelin-contracts × 7