function solidityPackedKeccak256(types, values): string

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

Parameters

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

Returns

string

The hash of the packed values.

Example

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

Source

hash/solidity.ts:142