Skip to main content

ContractEncoder.encode() method

Encodes the given contract function with argument

Signature:

encode(fn: keyof TContract["functions"], args: Parameters<TContract["functions"][typeof fn]>): string;

Parameters

ParameterTypeDescription
fnkeyof TContract["functions"]
argsParameters<TContract["functions"][typeof fn]>

Returns:

string

the encoded data