validateAddress static method

void validateAddress(
  1. String address
)

Indexer only accepts address in the long format, i.e a 66 chars long -> 0x<64 chars>

Implementation

static void validateAddress(String address) {
  if (address.length < 66) {
    throw ArgumentError("Address needs to be 66 chars long.");
  }
}