Skip to content

Commit

Permalink
allow empty outputs lists
Browse files Browse the repository at this point in the history
  • Loading branch information
CruzMolina authored and gnidan committed Dec 8, 2018
1 parent d488b56 commit 46df6a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/web3-eth-abi/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ ABICoder.prototype.decodeParameter = function (type, bytes) {
* @return {Array} array of plain params
*/
ABICoder.prototype.decodeParameters = function (outputs, bytes) {
if (!bytes || bytes === '0x' || bytes === '0X') {
if (outputs.length > 0 && (!bytes || bytes === '0x' || bytes === '0X')) {
throw new Error('Returned values aren\'t valid, did it run Out of Gas?');
}

Expand Down

0 comments on commit 46df6a3

Please sign in to comment.