next part of abi.js parsers tests and fixes

This commit is contained in:
Marek Kotewicz
2015-01-14 20:29:20 +01:00
parent b0a9bbf33a
commit 603c790213
5 changed files with 211 additions and 21 deletions

8
dist/ethereum.js vendored
View File

@@ -111,7 +111,7 @@ var setupInputTypes = function () {
{ type: prefixedType('string'), format: formatString },
{ type: prefixedType('real'), format: formatInt },
{ type: prefixedType('ureal'), format: formatInt },
{ type: namedType('address') },
{ type: namedType('address'), format: formatInt },
{ type: namedType('bool'), format: formatBool }
];
};
@@ -173,6 +173,10 @@ var setupOutputTypes = function () {
return web3.toAscii(value);
};
var formatAddress = function (value) {
return "0x" + value.slice(value.length - 40, value.length);
};
return [
{ type: prefixedType('uint'), format: formatInt },
{ type: prefixedType('int'), format: formatInt },
@@ -180,7 +184,7 @@ var setupOutputTypes = function () {
{ type: prefixedType('string'), format: formatString },
{ type: prefixedType('real'), format: formatInt },
{ type: prefixedType('ureal'), format: formatInt },
{ type: namedType('address') },
{ type: namedType('address'), format: formatAddress },
{ type: namedType('bool'), format: formatBool }
];
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long