function encodeBytes32(text): string

Encodes a string as a Bytes32 string. This is used to encode ABI data.

Parameters

ParameterTypeDescription
textstringThe string to encode.

Returns

string

The Bytes32-encoded string.

Throws

If the string is too long to fit in a Bytes32 format.

Source

encoding/bytes32.ts:20