@blukat29/hardhat-utils
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

hardhat-utils

Hardhat utility tasks.

Installation

npm install @blukat29/hardhat-utils

Import the plugin in your hardhat.config.js:

require("@blukat29/hardhat-utils");

Or if you are using TypeScript, in your hardhat.config.ts:

import "@blukat29/hardhat-utils";

Required plugins

This plugin is dependent on other plugins. Make sure to require or import them in your hardhat.config.js.

Tasks

TBD

Configuration

TBD

Usage

# Print ABI
hh abi Counter
hh abi Counter --json

# Show addresses and balances of loaded accounts
hh accounts
hh accounts --from 2 --json

# Get address from deployments
hh addr          # List all addresses
hh addr Counter

# Call contract function
hh call Counter number              # load address from deployments
hh call Counter number --to 0xaddr  # call designated address

# Send transaction to contract
hh send Counter setNumber 123              # load address from deployments
hh send Counter setNumber 123 --to 0xaddr  # call designated address
hh send Counter setNumber 123 --from 0xaddr --unsigned  # print unsigned tx

# Flatten and print compilation info and sort out multiple licenses
hh smart-flatten Counter

# Work with keystore and mnemonic
hh mnemonic --index 2
hh keystore-decrypt k.json --password 1111
hh keystore-encrypt 0xprivatekey --password 1111 > k.json
hh keystore-kip3 v4.json v3.json
find ./keys/*.json -exec hh keystore-kip3 {} {}_v3.json \;  # batch convert
find ./keys/*.json -exec hh keystore-kip3 {} {} \;  # batch convert in-place

# Launch blockscout explorer for local network
# Requires docker-compose and docker
hh explorer
hh explorer --restart
hh explorer --stop

Package Sidebar

Install

npm i @blukat29/hardhat-utils

Weekly Downloads

0

Version

0.0.6

License

MIT

Unpacked Size

213 kB

Total Files

61

Last publish

Collaborators

  • blukat29