This commit is contained in:
Marek Kotewicz 2015-02-27 09:19:35 +01:00
parent fd85749764
commit 8cf8b9e9d3
3 changed files with 24 additions and 23 deletions

13
dist/ethereum.js vendored
View File

@ -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