getCode method

Future<Uint8List> getCode(
  1. EvmAddr address, {
  2. String block = 'latest',
})

Implementation

Future<Uint8List> getCode(EvmAddr address, {String block = 'latest'}) async {
  final result =
      await _rpc('eth_getCode', [address.toString(), block]) as String;
  if (result == '0x') return Uint8List(0);
  return hexDecode(result);
}