Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 71752

questions regarding the testing during development of contracts and DApps

7 votes
3 answers
7k views

Modify block number when testing with Hardhat

I see that is it is possible to define the timestamp of the next block (see here) in this way: await network.provider.send("evm_setNextBlockTimestamp", [1625097600]); await network.provider.send("evm_ …
Alvin Sartor's user avatar
3 votes

Modify block number when testing with Hardhat

I ended up modifying the block.number by mining multiple blocks as it was suggested in the comment by Franco Victorio. This is the code: async function mineNBlocks(n) { for (let index = 0; index < n …
Alvin Sartor's user avatar
4 votes
1 answer
622 views

Hardhat chain fork on the test rather than config file

I saw that it is possible to test with Hardhat on a forked chain, via the config file. Is it possible to do it on the test file instead? In a beforeEach, maybe. I only want some of my tests to run on …
Alvin Sartor's user avatar