Consensys/surya

Cannot handle payable address

cleanunicorn opened this issue · 0 comments

Running mdreport on a contract with a payable address crashes.

$ surya mdreport s.md a.sol

/home/daniel/.npm-global/lib/node_modules/surya/node_modules/yargs/yargs.js:1133
      else throw err
           ^
Error
    at new ParserError (/home/daniel/.npm-global/lib/node_modules/surya/node_modules/solidity-parser-antlr/dist/index.js:25:16)
    at Object.parse (/home/daniel/.npm-global/lib/node_modules/surya/node_modules/solidity-parser-antlr/dist/index.js:71:11)
    at mdreport (/home/daniel/.npm-global/lib/node_modules/surya/lib/mdreport.js:33:24)
    at Object.require.usage.command.command.command.command.command.command.command [as handler] (/home/daniel/.npm-global/lib/node_modules/surya/bin/surya:85:5)
    at Object.runCommand (/home/daniel/.npm-global/lib/node_modules/surya/node_modules/yargs/lib/command.js:235:44)
    at Object.parseArgs [as _parseArgs] (/home/daniel/.npm-global/lib/node_modules/surya/node_modules/yargs/yargs.js:1046:30)
    at Object.get [as argv] (/home/daniel/.npm-global/lib/node_modules/surya/node_modules/yargs/yargs.js:989:21)
    at Object.<anonymous> (/home/daniel/.npm-global/lib/node_modules/surya/bin/surya:91:3)
    at Module._compile (internal/modules/cjs/loader.js:734:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)

Contract

pragma solidity ^0.5.0;

contract C {
    function a(address payable _addr) external {}
}