Provide command line utilities
Author: kanejCreated Sep 14, 2026Updated Sep 17, 2026
Labelstype:epic
Hardhat should provide useful command line utilities for tasks like computing a hash or fetching a transaction.
Abi
- abi sig
- abi sig-event
-
abi encode-argsandabi encode-type -
abi encode-event -
abi encode-calldata -
abi decode-argsandabi decode-type -
abi decode-calldata -
abi decode-event -
abi decode-error -
abi decode-value string <arg> -
abi encode-type int256 <value> -
abi encode-type uint256 <value>
Contract
-
contract compute -
contract compute-create2
Constant
-
constant zero-address - https://github.com/NomicFoundation/hardhat/pull/8567
- https://github.com/NomicFoundation/hardhat/pull/8571
Conversion
- https://github.com/NomicFoundation/hardhat/pull/8566
-
convert to-hex -
convert from-hex -
convert to-wei -
convert from-wei -
convert from-eth -
convert format-units -
convert parse-units -
convert to-utf8 -
convert from-utf8 -
convert to-rlp -
convert from-rlp -
convert pad --right -
convert format-bytes32-string -
convert parse-bytes32-string -
convert parse-bytes32-address -
convert concat-hex -
convert pad -
convert shl -
convert shr
ERC20
- erc20 balance
- erc20 allowance
- erc20 name
- erc20 symbol
- erc20 decimals
- erc20 total-supply
fetch
- fetch base-fee
- fetch chain
- fetch chain-id
- fetch client
- fetch gas-price
- fetch logs
- fetch block
- fetch block-number
- fetch timestamp
- fetch balance
- fetch nonce
- fetch tx
- fetch receipt
- fetch code
- fetch codehash
- fetch codesize
- fetch storage
- fetch storage-root
- fetch proof
hash
- hash keccak
- hash message
tx
- tx call
- tx estimate
- tx publish
- tx decode
Source: NomicFoundation/hardhat