UNPKG

hardhat

Version:

Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.

14 lines • 514 B
import { HardhatError } from "@nomicfoundation/hardhat-errors"; import { numberToHexString } from "@nomicfoundation/hardhat-utils/hex"; const toHexAction = async ({ value, }) => { if (value < 0n) { throw new HardhatError(HardhatError.ERRORS.CORE.ARGUMENTS.INVALID_VALUE, { value, name: "value", reason: "it must be a non-negative integer", }); } console.log(numberToHexString(value)); }; export default toHexAction; //# sourceMappingURL=to-hex.js.map