code: function parseSignature (sig) {
    var tmp = /^(\w+)\((.*)\)$/.exec(sig)
  
    if (tmp.length !== 3) {
      throw new Error('Invalid method signature')
    }
  
    var args = /^(.+)\):\((.+)$/.exec(tmp[2])
  
    if (args !== null && args.length === 3) {
      return {
        method: tmp[1],
        args: args[1].split(','),
        retargs: args[2].split(',')
      }
    } else {
      var params = tmp[2].split(',')
      if (params.length === 1 && params[0] === '') {
        // Special-case (possibly naive) fixup for functions that take no arguments.
        // TODO: special cases are always bad, but this makes the function return
        // match what the calling functions expect
        params = []
      }
      return {
        method: tmp[1],
        args: params
      }
    }
  }
docs: someMethod(bytes,uint) someMethod(bytes,uint):(boolean)