0.0.15 • Published 2 years ago

hardhat-forktools v0.0.15

Weekly downloads
-
License
MIT
Repository
-
Last release
2 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

2 years ago

0.0.14

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago