encode method
Encodes the function with the provided parameters.
Implementation
List<int> encode(List params, [bool withSelector = true]) {
final abi =
AbiParameter(name: "", type: "tuple", components: List.from(inputs))
.abiEncode(params);
if (!withSelector) {
return abi.encoded;
}
return [...selector, ...abi.encoded];
}