mirror of https://github.com/status-im/web3.js.git
gulp
This commit is contained in:
parent
fd85749764
commit
8cf8b9e9d3
|
@ -53,6 +53,8 @@ var inputTypes = types.inputTypes();
|
|||
/// @returns bytes representation of input params
|
||||
var formatInput = function (inputs, params) {
|
||||
var bytes = "";
|
||||
var toAppendConstant = "";
|
||||
var toAppendArrayContent = "";
|
||||
|
||||
/// first we iterate in search for dynamic
|
||||
inputs.forEach(function (input, index) {
|
||||
|
@ -69,17 +71,17 @@ var formatInput = function (inputs, params) {
|
|||
}
|
||||
|
||||
var formatter = inputTypes[j - 1].format;
|
||||
var toAppend = "";
|
||||
|
||||
if (arrayType(inputs[i].type))
|
||||
toAppend = params[i].reduce(function (acc, curr) {
|
||||
toAppendArrayContent += params[i].reduce(function (acc, curr) {
|
||||
return acc + formatter(curr);
|
||||
}, "");
|
||||
else
|
||||
toAppend = formatter(params[i]);
|
||||
|
||||
bytes += toAppend;
|
||||
toAppendConstant += formatter(params[i]);
|
||||
});
|
||||
|
||||
bytes += toAppendConstant + toAppendArrayContent;
|
||||
|
||||
return bytes;
|
||||
};
|
||||
|
||||
|
@ -209,7 +211,6 @@ module.exports = {
|
|||
eventSignatureFromAscii: eventSignatureFromAscii
|
||||
};
|
||||
|
||||
|
||||
},{"./const":2,"./formatters":8,"./types":14,"./utils":15,"./web3":17}],2:[function(require,module,exports){
|
||||
/*
|
||||
This file is part of ethereum.js.
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue