Is it possible to pass some number of block number during test script in between Txs?
See original GitHub issueDuring testing my script, in between transaction calls I want to pass N
number of blocks on the ganache blockchain, if possible.
Populus had something as follows: chain.wait.for_block(100)
, but there is no chain
object exist on brownie; is there any alternative object for the chain
object?
print(web3.eth.blockNumber) # prints: 100
tx = token.setValue({'from': accounts[0]})
tx = token.setValue({'from': accounts[0]})
print(web3.eth.blockNumber) # prints: 100
tx = token.setValue({'from': accounts[0]})
print(web3.eth.blockNumber) # prints: 100
chain.wait.for_block(100) # I want to pass 100 blocks on the blockchain ...
print(web3.eth.blockNumber) # prints: 200
tx = token.setValue({'from': accounts[0]})
[Q] Does Brownie
provide this, if yes how?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Writing and Organizing Tests - Cypress Documentation
Passed. Note that a test can pass after several test retries. In that case the Command Log shows some failed attempts, but ultimately...
Read more >Guidelines for Specimen Collection and Submission
The laboratory provides educational resources (such as this guidance) to submitters with the aim of maximizing the number of testable specimens we receive....
Read more >Documentation - Narrowing - TypeScript
Within our if check, TypeScript sees typeof padding === "number" and understands that as a special form of code called a type guard....
Read more >How to Block Spam Calls - The New York Times
Spam and scam calls are a nuisance, but there are ways to reduce the amount ... If you have a phone number in...
Read more >Command-line Options | Go Ethereum
... show-deprecated-flags Show flags that have been deprecated snapshot A set of commands based on the snapshot version Print version numbers version-check ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Brownie loads
ganache-cli
itself when it loads. If you already have ganache running, it won’t recognize that.I need to document this behaviour and maybe make brownie check for a running copy of ganahe…
Yes, it’s possible using the
rpc
class: https://eth-brownie.readthedocs.io/en/latest/api.html#rpcIt’s available in the immediately when you load the console. From a script, either
from brownie import *
orfrom brownie.network import rpc
Sorry the documentation on this is a bit lacking, I’m in the process of updating it!