labelhash static method

String labelhash(
  1. dynamic unnormalisedLabelOrLabelhash
)

Implementation

static String labelhash(unnormalisedLabelOrLabelhash) {
  return isEncodedLabelhash(unnormalisedLabelOrLabelhash)
      ? '0x' + decodeLabelhash(unnormalisedLabelOrLabelhash)
      : '0x' + sha3(normalize(unnormalisedLabelOrLabelhash));
}