Merge branch 'develop'

This commit is contained in:
debris 2015-08-07 11:55:40 +02:00
commit b965bd8506
7 changed files with 29 additions and 137 deletions

15
dist/web3-light.js vendored
View File

@ -780,16 +780,17 @@ SolidityCoder.prototype.encodeWithOffset = function (type, solidityType, encoded
var nestedStaticPartLength = solidityType.staticPartLength(nestedName); var nestedStaticPartLength = solidityType.staticPartLength(nestedName);
var result = ""; var result = "";
(function () {
var previousLength = 0; // in int if (solidityType.isDynamicArray(nestedName)) {
if (solidityType.isDynamicArray(nestedName)) { (function () {
var previousLength = 0; // in int
for (var i = 0; i < encoded.length; i++) { for (var i = 0; i < encoded.length; i++) {
// calculate length of previous item // calculate length of previous item
previousLength += +(encoded[i - 1] || [])[0] || 0; previousLength += +(encoded[i - 1] || [])[0] || 0;
result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode(); result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode();
} }
} })();
})(); }
(function () { (function () {
for (var i = 0; i < encoded.length; i++) { for (var i = 0; i < encoded.length; i++) {
@ -1966,7 +1967,7 @@ var toAscii = function(hex) {
str += String.fromCharCode(code); str += String.fromCharCode(code);
} }
return decodeURIComponent(escape(str)); return decodeURIComponent(escape(str)); // jshint ignore:line
}; };
/** /**
@ -1977,7 +1978,7 @@ var toAscii = function(hex) {
* @returns {String} hex representation of input string * @returns {String} hex representation of input string
*/ */
var toHexNative = function(str) { var toHexNative = function(str) {
str = unescape(encodeURIComponent(str)); str = unescape(encodeURIComponent(str)); // jshint ignore:line
var hex = ""; var hex = "";
for(var i = 0; i < str.length; i++) { for(var i = 0; i < str.length; i++) {
var n = str.charCodeAt(i).toString(16); var n = str.charCodeAt(i).toString(16);

File diff suppressed because one or more lines are too long

15
dist/web3.js vendored
View File

@ -780,16 +780,17 @@ SolidityCoder.prototype.encodeWithOffset = function (type, solidityType, encoded
var nestedStaticPartLength = solidityType.staticPartLength(nestedName); var nestedStaticPartLength = solidityType.staticPartLength(nestedName);
var result = ""; var result = "";
(function () {
var previousLength = 0; // in int if (solidityType.isDynamicArray(nestedName)) {
if (solidityType.isDynamicArray(nestedName)) { (function () {
var previousLength = 0; // in int
for (var i = 0; i < encoded.length; i++) { for (var i = 0; i < encoded.length; i++) {
// calculate length of previous item // calculate length of previous item
previousLength += +(encoded[i - 1] || [])[0] || 0; previousLength += +(encoded[i - 1] || [])[0] || 0;
result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode(); result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode();
} }
} })();
})(); }
(function () { (function () {
for (var i = 0; i < encoded.length; i++) { for (var i = 0; i < encoded.length; i++) {
@ -1966,7 +1967,7 @@ var toAscii = function(hex) {
str += String.fromCharCode(code); str += String.fromCharCode(code);
} }
return decodeURIComponent(escape(str)); return decodeURIComponent(escape(str)); // jshint ignore:line
}; };
/** /**
@ -1977,7 +1978,7 @@ var toAscii = function(hex) {
* @returns {String} hex representation of input string * @returns {String} hex representation of input string
*/ */
var toHexNative = function(str) { var toHexNative = function(str) {
str = unescape(encodeURIComponent(str)); str = unescape(encodeURIComponent(str)); // jshint ignore:line
var hex = ""; var hex = "";
for(var i = 0; i < str.length; i++) { for(var i = 0; i < str.length; i++) {
var n = str.charCodeAt(i).toString(16); var n = str.charCodeAt(i).toString(16);

111
dist/web3.js.map vendored

File diff suppressed because one or more lines are too long

2
dist/web3.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -163,16 +163,17 @@ SolidityCoder.prototype.encodeWithOffset = function (type, solidityType, encoded
var nestedStaticPartLength = solidityType.staticPartLength(nestedName); var nestedStaticPartLength = solidityType.staticPartLength(nestedName);
var result = ""; var result = "";
(function () {
var previousLength = 0; // in int if (solidityType.isDynamicArray(nestedName)) {
if (solidityType.isDynamicArray(nestedName)) { (function () {
var previousLength = 0; // in int
for (var i = 0; i < encoded.length; i++) { for (var i = 0; i < encoded.length; i++) {
// calculate length of previous item // calculate length of previous item
previousLength += +(encoded[i - 1] || [])[0] || 0; previousLength += +(encoded[i - 1] || [])[0] || 0;
result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode(); result += f.formatInputInt(offset + i * nestedStaticPartLength + previousLength * 32).encode();
} }
} })();
})(); }
(function () { (function () {
for (var i = 0; i < encoded.length; i++) { for (var i = 0; i < encoded.length; i++) {

View File

@ -109,7 +109,7 @@ var toAscii = function(hex) {
str += String.fromCharCode(code); str += String.fromCharCode(code);
} }
return decodeURIComponent(escape(str)); return decodeURIComponent(escape(str)); // jshint ignore:line
}; };
/** /**
@ -120,7 +120,7 @@ var toAscii = function(hex) {
* @returns {String} hex representation of input string * @returns {String} hex representation of input string
*/ */
var toHexNative = function(str) { var toHexNative = function(str) {
str = unescape(encodeURIComponent(str)); str = unescape(encodeURIComponent(str)); // jshint ignore:line
var hex = ""; var hex = "";
for(var i = 0; i < str.length; i++) { for(var i = 0; i < str.length; i++) {
var n = str.charCodeAt(i).toString(16); var n = str.charCodeAt(i).toString(16);