elementaryName static method

String elementaryName(
  1. String name
)

Implementation

static String elementaryName(String name) {
  if (name.startsWith('int[')) {
    return 'int256' + name.substring(3);
  } else if (name == 'int') {
    return 'int256';
  } else if (name.startsWith('uint[')) {
    return 'uint256' + name.substring(4);
  } else if (name == 'uint') {
    return 'uint256';
  } else if (name.startsWith('fixed[')) {
    return 'fixed128x128' + name.substring(5);
  } else if (name == 'fixed') {
    return 'fixed128x128';
  } else if (name.startsWith('ufixed[')) {
    return 'ufixed128x128' + name.substring(6);
  } else if (name == 'ufixed') {
    return 'ufixed128x128';
  }
  return name;
}