0.2.8 • Published 6 months ago

@ensuro/utils v0.2.8

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
6 months ago

Utils

In this library we include several utility functions used for tests and other tasks like deployments.

Hardhat-Retry

We include hardhat-retry to enhance the stability of tests in the projects using Hardhat. It automatically retries due to network issues like:

  • Header not found. This occurs if the node fails to locate the requested data temporaly.
  • -32000: execution aborted (timeout = 10s). This occurs when a network request timeout or node delays.
  • Gas related errors. This occurs during retries so we set initialBaseFeePerGas to 0 so we mitigate it.

hardhat.config.js

To use hardhat-retry add the following to your Hardhat configuration file:

const hretry = require("@ensuro/utils/js/hardhat-retry");

hretry.installWrapper();

To enable hardhat-retry works correctly you must configure the hardhat network settings. Add this network config to hardha.config.js:

networks: {
    hardhat: {
      initialBaseFeePerGas: 0,
    },
  },

Verifiable binaries

The verifiableBinaries module enables the use of compiled contracts, fetched from NPM packages.

hardhat.config.js

const verifiableBinaries = require("@ensuro/utils/js/verifiableBinaries");

verifiableBinaries.wrapEthersFunctions();
verifiableBinaries.addTasks();
0.2.8

6 months ago

0.2.7

6 months ago

0.2.7-beta1

7 months ago

0.2.6

8 months ago

0.2.5

8 months ago

0.2.4

8 months ago

0.2.3

9 months ago

0.2.2

9 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.1

12 months ago

0.1.0

12 months ago