UNPKG

hardhat

Version:

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

18 lines • 1.01 kB
import type { AbiParameter } from "@nomicfoundation/hardhat-utils/abi"; import type { PrefixedHexString } from "@nomicfoundation/hardhat-utils/hex"; /** * ABI-encodes command line values for a list of parameters. * * Arrays and tuples are written as JSON, with addresses, hex and strings * quoted, like `[1,"0x..."]`. Every other value is taken as written and * validated by the encoder, so integers can be decimal or hex, and booleans * are `true` or `false`. * * @param parameters The parameters to encode the values as. * @param values The values, in the order of the parameters. * @param name The name of the task argument the values come from, for errors. * @returns The encoded values as a prefixed hex string, or "0x" if there are none. * @throws HardhatError If a value is missing, malformed or out of range. */ export declare function encodeArguments(parameters: readonly AbiParameter[], values: string[], name: string): Promise<PrefixedHexString>; //# sourceMappingURL=encode.d.ts.map