decode method
Decodes a BaseHexAddress from the given ABI-encoded bytes.
Supports both Ethereum and Tron address formats based on the tronTypes
flag.
Implementation
@override
DecoderResult<BaseHexAddress> decode(AbiParameter params, List<int> bytes) {
final addrBytes = bytes.sublist(
ABIConst.uintBytesLength - addrLength, ABIConst.uintBytesLength);
return DecoderResult(
result: params.tronTypes
? TronAddress.fromEthAddress(addrBytes)
: ETHAddress.fromBytes(addrBytes),
consumed: ABIConst.uintBytesLength);
}