UNPKG

hardhat

Version:

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

15 lines • 630 B
import { HardhatError } from "@nomicfoundation/hardhat-errors"; import { getIntTypeRange, parseIntType, } from "@nomicfoundation/hardhat-utils/abi"; const maxValueAction = async ({ type }) => { const intType = parseIntType(type); if (intType === undefined) { throw new HardhatError(HardhatError.ERRORS.CORE.ARGUMENTS.INVALID_VALUE, { value: type, name: "type", reason: "it must be a Solidity integer type, like uint256 or int128", }); } console.log(getIntTypeRange(intType).max.toString()); }; export default maxValueAction; //# sourceMappingURL=max-value.js.map