es/contract/aci.js
function readType (type, returnType = false) {
  const [t] = Array.isArray(type) ? type : [type]
  // Base types
  if (typeof t === 'string') return { t }

  // Map, Tuple, List
  if (typeof t === 'object') {
    const [[baseType, generic]] = Object.entries(t)
    return { t: baseType, generic }
  }
}
function readType (type, returnType = false) {
  const [t] = Array.isArray(type) ? type : [type]
  // Base types
  if (typeof t === 'string') return { t }

  // Map, Tuple, List
  if (typeof t === 'object') {
    const [[baseType, generic]] = Object.entries(t)
    return { t: baseType, generic }
  }
}
function readType ( type , returnType = false ) { const [ t ] = Array . isArray ( type ) ? type : [ type ] // Base types if ( typeof t === 'string' ) return { t } // Map, Tuple, List if ( typeof t === 'object' ) { const [ [ baseType , generic ] ] = Object . entries ( t ) return { t : baseType , generic } } }
Parse sophia type
@param type
@param returnType
@return {*}
Parse sophia type