remix-lib/src/execution/txFormat.js
function (funABI, values, contractbyteCode) {
    var encoded
    var encodedHex
    try {
      encoded = helper.encodeParams(funABI, values)
      encodedHex = encoded.toString('hex')
    } catch (e) {
      return { error: 'cannot encode arguments' }
    }
    if (contractbyteCode) {
      return { data: '0x' + contractbyteCode + encodedHex.replace('0x', '') }
    } else {
      return { data: helper.encodeFunctionId(funABI) + encodedHex.replace('0x', '') }
    }
  }
function (funABI, values, contractbyteCode) {
    var encoded
    var encodedHex
    try {
      encoded = helper.encodeParams(funABI, values)
      encodedHex = encoded.toString('hex')
    } catch (e) {
      return { error: 'cannot encode arguments' }
    }
    if (contractbyteCode) {
      return { data: '0x' + contractbyteCode + encodedHex.replace('0x', '') }
    } else {
      return { data: helper.encodeFunctionId(funABI) + encodedHex.replace('0x', '') }
    }
  }
function ( funABI , values , contractbyteCode ) { var encoded var encodedHex try { encoded = helper . encodeParams ( funABI , values ) encodedHex = encoded . toString ( 'hex' ) } catch ( e ) { return { error : 'cannot encode arguments' } } if ( contractbyteCode ) { return { data : '0x' + contractbyteCode + encodedHex . replace ( '0x' , '' ) } } else { return { data : helper . encodeFunctionId ( funABI ) + encodedHex . replace ( '0x' , '' ) } } }
build the transaction data

@param {Object} function abi
@param {Object} values to encode
@param {String} contractbyteCode
build the transaction data