Do you know what this line does and how it works?:
ethers.provider.send("evm_setNextBlockTimestamp", [1637102259]);
I have not found good documentation about it on internet.
Thank you
Take care Pierre
The send
method sends a raw JSON RPC call, where the first parameter is the RPC method and the second parameter is an array of arguments specific to the method.
In your example it is calling a RPC method named evm_setNextBlockTimestamp
and the parameter is a single timestamp. I assume the node you are talking to here has that method implemented (it is not an official one), and that it would set block.timestamp
for the next block to 1637102259
.
You can read more about the send
method here.
You can read more on the official JSON RPC methods here.