UNPKG

hardhat

Version:

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

16 lines • 722 B
import { HardhatError } from "@nomicfoundation/hardhat-errors"; import { getAbiEventTopic, parseAbiEventSignature, } from "@nomicfoundation/hardhat-utils/abi"; import { parseSignatureArgument } from "./arguments.js"; const sigEventAction = async ({ signature }) => { const parsed = parseSignatureArgument(parseAbiEventSignature, signature, "signature"); if (parsed.anonymous) { throw new HardhatError(HardhatError.ERRORS.CORE.ARGUMENTS.INVALID_VALUE, { value: signature, name: "signature", reason: "anonymous events have no topic", }); } console.log(await getAbiEventTopic(parsed)); }; export default sigEventAction; //# sourceMappingURL=sig-event.js.map