TronAddress.fromEthAddress constructor

TronAddress.fromEthAddress(
  1. List<int> addrBytes
)

Factory method to create a TronAddress from an Ethereum address represented as bytes

Implementation

factory TronAddress.fromEthAddress(List<int> addrBytes) {
  final addr =
      TrxAddressUtils.fromHexBytes([...TrxAddressUtils.prefix, ...addrBytes]);
  return TronAddress._(addr, BytesUtils.toHexString(addrBytes));
}