Producing Blocks
You can force-produce blocks using the produceBlocks
helper to achieve an arbitrary block height. This is especially useful when you want to do some testing regarding transaction maturity.
Producing Blocks With Custom Timestamps
You can also produce blocks with a custom block time using the produceBlocks
helper by specifying the second optional parameter.
ts
const lastBlockTimestamp = DateTime.fromTai64(latestBlock.time).toUnixMilliseconds();
const latestBlockNumber = await provider.produceBlocks(3, lastBlockTimestamp + 1000);