encodeAbiParameters
encodeAbiParameters<
params
>(params
,values
):EncodeAbiParametersReturnType
Type Parameters
• params extends readonly unknown
[] | readonly AbiParameter
[]
a set of ABI Parameters (params), that can be in the shape of the inputs or outputs attribute of an ABI Item.
Parameters
• params: params
• values: params
extends readonly AbiParameter
[] ? { [key in string | number | symbol]: { [key in string | number | symbol]: AbiParameterToPrimitiveType<params<params>[key<key>], AbiParameterKind> }[key] } : never
a set of values (values) that correspond to the given params.
Returns
EncodeAbiParametersReturnType
Description
Encodes a list of primitive values into an ABI-encoded hex value.
-
Docs: https://viem.sh/docs/abi/encodeAbiParameters#encodeabiparameters
Generates ABI encoded data using the ABI specification, given a set of ABI parameters (inputs/outputs) and their corresponding values.
Examples
You can also pass in Human Readable parameters with the parseAbiParameters utility.
Defined in
node_modules/.pnpm/viem@2.21.1_bufferutil@4.0.8_typescript@5.6.2_utf-8-validate@6.0.4_zod@3.23.8/node_modules/viem/_types/utils/abi/encodeAbiParameters.d.ts:49