0.0.15 • Published 3 years ago

hardhat-forktools v0.0.15

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

hardhat-forktools

Overview

Adds some tools for use during testing in hardhat forks, like:

  • getWrappedTokenAddress(){
  • wrapNative
  • swapExactETHForTokens
  • addLiquidity
  • setBalance
  • setStorageAt
  • impersonate
  • advanceBlock
  • advanceBlocks
  • logEvents

Currently supports the following networks:

  • Ethereum mainnet
  • BSC
  • Polygon

How to install

Install with npm or yarn by doing yarn add hardhat-forktools

Then in hardhat.config.ts add

import "hardhat-forktools";

How to use

Forktools are injected in the HardhatRuntimeEnvironment, so you can just do hre.forktools.wrapNative(5000, mySigner) to convert native to wrapped.

Known issues

  • Only 3 networks are supported
  • ?
0.0.15

3 years ago

0.0.14

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.10

4 years ago

0.0.11

3 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago