code: function (params, funAbi, callback) {
      var data = ''
      var dataHex = ''
      var funArgs
      if (params.indexOf('raw:0x') === 0) {
        // in that case we consider that the input is already encoded and *does not* contain the method signature
        dataHex = params.replace('raw:0x', '')
        data = Buffer.from(dataHex, 'hex')
      } else {
        try {
          params = params.replace(/(^|,\s+|,)(\d+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted number by quoted number
          params = params.replace(/(^|,\s+|,)(0[xX][0-9a-fA-F]+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted hex string by quoted hex string
          funArgs = JSON.parse('[' + params + ']')
        } catch (e) {
          callback('Error encoding arguments: ' + e)
          return
        }
        if (funArgs.length > 0) {
          try {
            data = helper.encodeParams(funAbi, funArgs)
            dataHex = data.toString('hex')
          } catch (e) {
            callback('Error encoding arguments: ' + e)
            return
          }
        }
        if (data.slice(0, 9) === 'undefined') {
          dataHex = data.slice(9)
        }
        if (data.slice(0, 2) === '0x') {
          dataHex = data.slice(2)
        }
      }
      callback(null, { data: data, dataHex: dataHex, funArgs: funArgs })
    }
docs: encode function / constructor parameters
  
  @param {Object} params    - input paramater of the function to call
  @param {Object} funAbi    - abi definition of the function to call. null if building data for the ctor.
  @param {Function} callback    - callback