forked from DecentralizedClimateFoundation/DCIPs
13 lines
311 B
TypeScript
13 lines
311 B
TypeScript
|
import { ethers } from 'hardhat'
|
||
|
|
||
|
async function mineNBlocks(n: number) {
|
||
|
for (let index = 0; index < n; index++) {
|
||
|
await ethers.provider.send('evm_mine', [])
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export async function increaseTime(seconds: number) {
|
||
|
await ethers.provider.send('evm_increaseTime', [seconds])
|
||
|
await mineNBlocks(1)
|
||
|
}
|