function solidityPacked(types, values): string

Computes the Non-Standard Packed Mode representation of values respectively to their types.

Parameters

ParameterTypeDescription
typesreadonly string[]The types of the values.
valuesreadonly any[]The values to pack.

Returns

string

The packed values.

Example

addr = '0x8ba1f109551bd432803012645ac136ddd64dba72';
solidityPacked(['address', 'uint'], [addr, 45]);

Source

hash/solidity.ts:110