Skip to content

Commit

Permalink
feat: added -V --version option
Browse files Browse the repository at this point in the history
  • Loading branch information
naddison36 committed Aug 4, 2022
1 parent 8a5b90d commit 5df025c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ The three subcommands:
The Solidity code can be pulled from verified source code on Blockchain explorers like Etherscan or from local Solidity files.
Options:
-V, --version output the version number
-sf, --subfolders <value> number of subfolders that will be recursively searched for Solidity files. (default: all)
-f, --outputFormat <value> output file format. (choices: "svg", "png", "dot", "all", default: "svg")
-o, --outputFileName <value> output file name
Expand Down
2 changes: 2 additions & 0 deletions lib/parserEtherscan.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/sol2uml.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sol2uml",
"version": "2.1.2",
"version": "2.1.3",
"description": "Unified Modeling Language (UML) class diagram generator for Solidity contracts",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions src/ts/parserEtherscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { convertAST2UmlClasses } from './converterAST2Classes'
import { UmlClass } from './umlClass'
import { topologicalSortClasses } from './filterClasses'

const debug = require('debug')('sol2uml')

const networks = <const>[
'mainnet',
'ropsten',
Expand Down Expand Up @@ -165,6 +167,9 @@ export class EtherscanParser {
const description = `get verified source code for address ${contractAddress} from Etherscan API.`

try {
debug(
`About to get Solidity source code for ${contractAddress} from ${this.url}`
)
const response: any = await axios.get(this.url, {
params: {
module: 'contract',
Expand Down
1 change: 1 addition & 0 deletions src/ts/sol2uml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { convertStorages2Dot } from './converterStorage2Dot'
import { isAddress } from './utils/regEx'
import { writeOutputFiles, writeSolidity } from './writerFiles'
const program = new Command()
program.version(require('../package.json').version)

const debugControl = require('debug')
const debug = require('debug')('sol2uml')
Expand Down

0 comments on commit 5df025c

Please sign in to comment.