functionFromSelector method
Retrieves a function fragment from the contract ABI based from selector.
Implementation
AbiFunctionFragment functionFromSelector(String selectorHex) {
final selector = BytesUtils.fromHexString(selectorHex)
.sublist(0, ABIConst.selectorLength);
return functions
.singleWhere((element) => bytesEqual(selector, element.selector));
}