encodeAbiParameters
encodeAbiParameters<
TParams
>(params
,values
):EncodeAbiParametersReturnType
Type parameters
• TParams extends readonly unknown
[] | readonly AbiParameter
[]
Parameters
• params: TParams
a set of ABI Parameters (params), that can be in the shape of the inputs or outputs attribute of an ABI Item.
• values: TParams
extends readonly AbiParameter
[] ? { [K in string | number | symbol]: { [K in string | number | symbol]: AbiParameterToPrimitiveType<TParams<TParams>[K<K>], AbiParameterKind> }[K] } : 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.
Source
node_modules/.pnpm/viem@2.13.6_bufferutil@4.0.8_typescript@5.4.5_utf-8-validate@6.0.4_zod@3.23.8/node_modules/viem/_types/utils/abi/encodeAbiParameters.d.ts:49