README
solidity-graph
Detect all branches of bytecode of a smart contract
Install
npm i solidity-graph
Usage
const { SolGraph } = require('solidity-graph')
// code: <Buffer>
const solGraph = new SolGraph(code)
// get all branches
const branches = solGraph.branches()
// is 36,41 a branch
const isBranch = branches.isBranch({
fCodeIndex: 36,
tCodeIndex: 41,
})