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
JavaScript
import { HardhatError } from "@nomicfoundation/hardhat-errors";
import { getIntTypeRange, parseIntType, } from "@nomicfoundation/hardhat-utils/abi";
const minValueAction = 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).min.toString());
};
export default minValueAction;
//# sourceMappingURL=min-value.js.map