From 0b57ebc8df306710889b39056b86665e9ac5267e Mon Sep 17 00:00:00 2001 From: cgewecke Date: Fri, 21 Apr 2017 09:03:54 -0700 Subject: [PATCH] Accomodate LibraryStatements in instrumentSolidity.js --- instrumentSolidity.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instrumentSolidity.js b/instrumentSolidity.js index f8cdd6f..05de292 100644 --- a/instrumentSolidity.js +++ b/instrumentSolidity.js @@ -41,7 +41,8 @@ module.exports = function instrumentSolidity(contractSource, fileName) { ast = SolidityParser.parse(contract.preprocessed); - const contractStatement = ast.body.filter(node => node.type === 'ContractStatement'); + const contractStatement = ast.body.filter(node => (node.type === 'ContractStatement' || + node.type === 'LibraryStatement')); contract.contractName = contractStatement[0].name; parse[ast.type](contract, ast);