aboutsummaryrefslogtreecommitdiffstats
path: root/dist/ethereum.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/ethereum.js')
-rw-r--r--dist/ethereum.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/dist/ethereum.js b/dist/ethereum.js
index 26de2c02e..c1883d156 100644
--- a/dist/ethereum.js
+++ b/dist/ethereum.js
@@ -93,6 +93,12 @@ var setupInputTypes = function () {
}
var padding = calcPadding(type, expected);
+ if (padding > 32)
+ return false; // not allowed to be so big.
+ padding = 32; // override as per the new ABI.
+
+ if (prefix === "string")
+ return web3.fromAscii(value, padding).substr(2);
if (typeof value === "number")
value = value.toString(16);
else if (typeof value === "string")
@@ -111,6 +117,8 @@ var setupInputTypes = function () {
return false;
}
+ padding = 32; //override as per the new ABI.
+
return padLeft(formatter ? formatter(value) : value, padding * 2);
};
};
@@ -166,12 +174,16 @@ var setupOutputTypes = function () {
}
var padding = calcPadding(type, expected);
+ if (padding > 32)
+ return -1; // not allowed to be so big.
+ padding = 32; // override as per the new ABI.
return padding * 2;
};
};
var namedType = function (name, padding) {
return function (type) {
+ padding = 32; // override as per the new ABI.
return name === type ? padding * 2 : -1;
};
};