next part of abi.js parsers tests and fixes
This commit is contained in:
@ -110,7 +110,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 }
|
||||
];
|
||||
};
|
||||
@ -172,6 +172,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 },
|
||||
@ -179,7 +183,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 }
|
||||
];
|
||||
};
|
||||
|
Reference in New Issue
Block a user