Skip to content

Commit

Permalink
Fix conversion of type shorthands (int, uint, fixed, ufixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Jul 20, 2016
1 parent 0b98793 commit ab07ecf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ var ABI = function () {
// FIXME: optimise or make this nicer?
function elementaryName (name) {
if (name.startsWith('int[')) {
return 'int256' + name.slice(4)
return 'int256' + name.slice(3)
} else if (name === 'int') {
return 'int256'
} else if (name.startsWith('uint[')) {
return 'uint256' + name.slice(4)
} else if (name === 'uint') {
return 'uint256'
} else if (name.startsWith('fixed[')) {
return 'fixed128x128' + name.slice(4)
return 'fixed128x128' + name.slice(5)
} else if (name === 'fixed') {
return 'fixed128x128'
} else if (name.startsWith('ufixed[')) {
return 'ufixed128x128' + name.slice(4)
return 'ufixed128x128' + name.slice(6)
} else if (name === 'ufixed') {
return 'ufixed128x128'
}
Expand Down

0 comments on commit ab07ecf

Please sign in to comment.