Closed luisgc93 closed 2 years ago
UPDATE - I've noticed when deploying with brownie run scripts/deploy.py --network mainnet-fork
, my Infura project requests go up
It looks like I'm deploying to an infura mainnet fork instead of the mainnet fork shown in the tutorial video 🤔
Make sure your project is taking the configuration, may be a typo on file name in brownie-config.yaml? also don't forget to add the network to your helpful scripts, or get_account wont return what you expect.
I attribute this to a faulty config on my side. Closing this issue.
I glad you solved your problem
hey @luisgc93 I have the exact brownie-config.yaml file as you. which one did you changed?
@cromewar Could you re-investigate this? The files that were posted are correct in regards to the video. It's something else entirely. Let's not fool people who try to learn the real cause to this.
I'm having the same issue, and a few others in https://github.com/smartcontractkit/full-blockchain-solidity-course-py/issues/683 https://github.com/smartcontractkit/full-blockchain-solidity-course-py/issues/729
@SpiritBob I'm on it, could you please share some info to help the research
please run:
brownie networks list true
and
brownie --version
Share here the results.
I havent figure this out yet, i only pass it. Still confuse untill today
On Thu, 10 Feb 2022 at 20.51 Vasiliy Gualoto @.***> wrote:
@SpiritBob https://github.com/SpiritBob I'm on it, could you please share some info to help the research
please run:
brownie networks list true
and
brownie --version
— Reply to this email directly, view it on GitHub https://github.com/smartcontractkit/full-blockchain-solidity-course-py/issues/290#issuecomment-1034945881, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFKJ6ACXWWVJPHSHJE3Z5L3U2O7HFANCNFSM5HCJJBWQ . You are receiving this because you commented.Message ID: <smartcontractkit/full-blockchain-solidity-course-py/issues/290/1034945881 @github.com>
I havent figure this out yet, i only pass it. Still confuse untill today … On Thu, 10 Feb 2022 at 20.51 Vasiliy Gualoto @.***> wrote: @SpiritBob https://github.com/SpiritBob I'm on it, could you please share some info to help the research please run: brownie networks list true and brownie --version — Reply to this email directly, view it on GitHub <#290 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFKJ6ACXWWVJPHSHJE3Z5L3U2O7HFANCNFSM5HCJJBWQ . You are receiving this because you commented.Message ID: <smartcontractkit/full-blockchain-solidity-course-py/issues/290/1034945881 @github.com>
Could you please run the commands above?
@cromewar Sorry for the late reply.
INFO: Could not find files for the given pattern(s).
Brownie v1.17.2 - Python development framework for Ethereum
The following networks are declared:
Ethereum
├─Mainnet (Infura)
│ ├─id: mainnet
│ ├─chainid: 1
│ ├─explorer: https://api.etherscan.io/api
│ ├─host: https://mainnet.infura.io/v3/$WEB3_INFURA_PROJECT_ID
│ ├─multicall2: 0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696
│ └─provider: infura
├─Ropsten (Infura)
│ ├─id: ropsten
│ ├─chainid: 3
│ ├─explorer: https://api-ropsten.etherscan.io/api
│ ├─host: https://ropsten.infura.io/v3/$WEB3_INFURA_PROJECT_ID
│ ├─multicall2: 0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696
│ └─provider: infura
├─Rinkeby (Infura)
│ ├─id: rinkeby
│ ├─chainid: 4
│ ├─explorer: https://api-rinkeby.etherscan.io/api
│ ├─host: https://rinkeby.infura.io/v3/$WEB3_INFURA_PROJECT_ID
│ ├─multicall2: 0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696
│ └─provider: infura
├─Goerli (Infura)
│ ├─id: goerli
│ ├─chainid: 5
│ ├─explorer: https://api-goerli.etherscan.io/api
│ ├─host: https://goerli.infura.io/v3/$WEB3_INFURA_PROJECT_ID
│ ├─multicall2: 0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696
│ └─provider: infura
├─Kovan (Infura)
│ ├─id: kovan
│ ├─chainid: 42
│ ├─explorer: https://api-kovan.etherscan.io/api
│ ├─host: https://kovan.infura.io/v3/$WEB3_INFURA_PROJECT_ID
│ ├─multicall2: 0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696
│ └─provider: infura
└─ganache-local
├─id: ganache-local
├─chainid: 1337
└─host: http://127.0.0.1:8545
Ethereum Classic
├─Mainnet
│ ├─id: etc
│ ├─chainid: 61
│ ├─explorer: https://blockscout.com/etc/mainnet/api
│ └─host: https://www.ethercluster.com/etc
└─Kotti
├─id: kotti
├─chainid: 6
├─explorer: https://blockscout.com/etc/kotti/api
└─host: https://www.ethercluster.com/kotti
Arbitrum
└─Mainnet
├─id: arbitrum-main
├─chainid: 42161
├─explorer: https://api.arbiscan.io/api
├─host: https://arb1.arbitrum.io/rpc
└─multicall2: 0x5B5CFE992AdAC0C9D48E05854B2d91C73a003858
Avalanche
├─Mainnet
│ ├─id: avax-main
│ ├─chainid: 43114
│ ├─explorer: https://api.snowtrace.io/api
│ └─host: https://api.avax.network/ext/bc/C/rpc
└─Testnet
├─id: avax-test
├─chainid: 43113
└─host: https://api.avax-test.network/ext/bc/C/rpc
Binance Smart Chain
├─Testnet
│ ├─id: bsc-test
│ ├─chainid: 97
│ ├─explorer: https://api-testnet.bscscan.com/api
│ └─host: https://data-seed-prebsc-1-s1.binance.org:8545
└─Mainnet
├─id: bsc-main
├─chainid: 56
├─explorer: https://api.bscscan.com/api
└─host: https://bsc-dataseed.binance.org
Fantom Opera
├─Testnet
│ ├─id: ftm-test
│ ├─chainid: 4002
│ ├─explorer: https://explorer.testnet.fantom.network
│ └─host: https://rpc.testnet.fantom.network
└─Mainnet
├─id: ftm-main
├─chainid: 250
├─explorer: https://api.ftmscan.com/api
└─host: https://rpc.ftm.tools
Harmony
└─Mainnet (Shard 0)
├─id: harmony-main
├─chainid: 1666600000
├─host: https://api.harmony.one
└─multicall2: 0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb
Optimistic Ethereum
├─Mainnet
│ ├─id: optimism-main
│ ├─chainid: 10
│ ├─explorer: https://api-optimistic.etherscan.io/api
│ ├─host: https://mainnet.optimism.io
│ └─multicall2: 0x2DC0E2aa608532Da689e89e237dF582B783E552C
└─Kovan
├─id: optimism-test
├─chainid: 69
├─explorer: https://api-kovan-optimistic.etherscan.io/api
├─host: https://kovan.optimism.io
└─multicall2: 0x2DC0E2aa608532Da689e89e237dF582B783E552C
Polygon
├─Mainnet (Infura)
│ ├─id: polygon-main
│ ├─chainid: 137
│ ├─explorer: https://api.polygonscan.com/api
│ ├─host: https://polygon-mainnet.infura.io/v3/$WEB3_INFURA_PROJECT_ID
│ └─multicall2: 0xc8E51042792d7405184DfCa245F2d27B94D013b6
└─Mumbai Testnet (Infura)
├─id: polygon-test
├─chainid: 80001
├─explorer: https://api-testnet.polygonscan.com/api
├─host: https://polygon-mumbai.infura.io/v3/$WEB3_INFURA_PROJECT_ID
└─multicall2: 0x6842E0412AC1c00464dc48961330156a07268d14
XDai
├─Mainnet
│ ├─id: xdai-main
│ ├─chainid: 100
│ ├─explorer: https://blockscout.com/xdai/mainnet/api
│ └─host: https://xdai.poanetwork.dev
└─Testnet
├─id: xdai-test
├─chainid: 77
├─explorer: https://blockscout.com/poa/sokol/api
└─host: https://sokol.poa.network
Development
├─Ganache-CLI
│ ├─id: development
│ ├─cmd: ganache-cli
│ └─host: http://127.0.0.1
│ ├─accounts: 10
│ ├─evm_version: istanbul
│ ├─gas_limit: 12000000
│ ├─mnemonic: brownie
│ └─port: 8545
├─Geth Dev
│ ├─id: geth-dev
│ ├─cmd: ethnode
│ └─host: http://127.0.0.1
│ └─port: 8545
├─Hardhat
│ ├─id: hardhat
│ ├─cmd: npx hardhat node
│ └─host: http://localhost
│ └─port: 8545
├─Hardhat (Mainnet Fork)
│ ├─id: hardhat-fork
│ ├─cmd: npx hardhat node
│ ├─host: http://localhost
│ └─timeout: 120
│ ├─fork: mainnet
│ └─port: 8545
├─Ganache-CLI (Mainnet Fork)
│ ├─id: mainnet-fork
│ ├─cmd: ganache-cli
│ ├─host: http://127.0.0.1
│ └─timeout: 120
│ ├─accounts: 10
│ ├─evm_version: istanbul
│ ├─fork: mainnet
│ ├─gas_limit: 12000000
│ ├─mnemonic: brownie
│ └─port: 8545
├─Ganache-CLI (BSC-Mainnet Fork)
│ ├─id: bsc-main-fork
│ ├─cmd: ganache-cli
│ ├─host: http://127.0.0.1
│ └─timeout: 120
│ ├─accounts: 10
│ ├─evm_version: istanbul
│ ├─fork: bsc-main
│ ├─gas_limit: 12000000
│ ├─mnemonic: brownie
│ └─port: 8545
├─Ganache-CLI (FTM-Mainnet Fork)
│ ├─id: ftm-main-fork
│ ├─cmd: ganache-cli
│ ├─host: http://127.0.0.1
│ └─timeout: 120
│ ├─accounts: 10
│ ├─evm_version: istanbul
│ ├─fork: ftm-main
│ ├─gas_limit: 12000000
│ ├─mnemonic: brownie
│ └─port: 8545
├─Ganache-CLI (Polygon-Mainnet Fork)
│ ├─id: polygon-main-fork
│ ├─cmd: ganache-cli
│ ├─host: http://127.0.0.1
│ └─timeout: 120
│ ├─accounts: 10
│ ├─evm_version: istanbul
│ ├─fork: polygon-main
│ ├─gas_limit: 20000000
│ ├─mnemonic: brownie
│ └─port: 8545
├─Ganache-CLI (XDai-Mainnet Fork)
│ ├─id: xdai-main-fork
│ ├─cmd: ganache-cli
│ ├─host: http://127.0.0.1
│ └─timeout: 120
│ ├─accounts: 10
│ ├─evm_version: istanbul
│ ├─fork: xdai-main
│ ├─gas_limit: 20000000
│ ├─mnemonic: brownie
│ └─port: 8545
└─Ganache-CLI (Avax-Mainnet Fork)
├─id: avax-main-fork
├─cmd: ganache-cli
├─host: http://127.0.0.1
└─timeout: 120
├─accounts: 10
├─evm_version: istanbul
├─fork: avax-main
├─gas_limit: 20000000
├─mnemonic: brownie
└─port: 8545
@PatrickAlphaC I've been doing research on this but with no luck, some people are reporting not getting the same error as you do on time stamp 5:57:26 as the test passes without problems. At first I tough this was related to the brownie configuration on their side, but I've found nothing relevant so far. Any clue on this?
Do you have money in mainnet of the wallet you're using?
@PatrickAlphaC I didn't have any money, and yet it passed. I believe brownie had some changes. We just need to understand what they are and explain them here, as to the reasoning why people don't get an error when previously they "should" have.
Hm.... it's likely using a fake account along with the mainnet fork instead of looking into your actual account.
@PatrickAlphaC so what does it mean Patric? are you saying brownie default looking for a fake account instead of my main acc? then how to make a brownie use the actual acc?
Is that what you want?
If you want that, you could do a my_account = accounts.add(<YOUR_KEY>)
and make transactions from there.
For some reason at minute 5:57:26 I don’t get an insufficient funds error when deploying FundMe.sol to mainnet-fork.
Instead the transaction is successful and the contract is deployed. Similarly, I don't get an index error when running accounts[0] in minute 5:59:00.
This is the full console output:
And this is my brownie-config.yaml file:
Additionally, these are my listed networks on brownie:
One thing I've noticed is that if I run:
And then I try this, I get an actual account object:
I was wondering whether brownie is now perhaps able to do these tutorial steps by itself when first deploying to a mainnet fork (create an account with funds) but it doesn't look like it judging from their releases page: https://github.com/eth-brownie/brownie/releases
Another theory is whether this is somehow handled by Infura, which I'm not still very familiar with.