getType static method
Implementation
static SolidityType getType(String typeName) {
if (typeName.contains('[')) return ArrayType.getType(typeName);
if (typeName == boolTypeKey) return BoolType();
if (typeName.startsWith(intTypeKey)) return IntType(typeName);
if (typeName.startsWith(uintTypeKey)) return UintType(typeName);
if (typeName == addressTypeKey) return AddressType();
if (typeName == tokenIdTypeKey) return TokenIdType();
if (typeName == gidTypeKey) return GidType();
if (typeName == stringTypeKey) return StringType();
if (typeName == bytesTypeKey) return BytesType();
if (typeName == functionTypeKey) return FunctionType();
if (typeName.startsWith(bytesTypeKey)) return Bytes32Type(typeName);
throw Exception('Unknown type: $typeName');
}