Skip to content

Commit

Permalink
chore: added gnosis chain
Browse files Browse the repository at this point in the history
  • Loading branch information
naddison36 committed Nov 6, 2022
1 parent 53f2f62 commit 84c2952
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Options:
-f, --outputFormat <value> output file format. (choices: "svg", "png", "dot", "all", default: "svg")
-o, --outputFileName <value> output file name
-i, --ignoreFilesOrFolders <filesOrFolders> comma separated list of files or folders to ignore
-n, --network <network> Ethereum network (choices: "mainnet", "ropsten", "kovan", "rinkeby", "goerli", "sepolia", "polygon", "testnet.polygon", "arbitrum", "testnet.arbitrum", "avalanche", "testnet.avalanche", "bsc", "testnet.bsc", "crono", "fantom", "testnet.fantom", "moonbeam", "optimistic", "kovan-optimistic", default: "mainnet", env: ETH_NETWORK)
-n, --network <network> Ethereum network (choices: "mainnet", "ropsten", "kovan", "rinkeby", "goerli", "sepolia", "polygon", "testnet.polygon", "arbitrum", "testnet.arbitrum", "avalanche", "testnet.avalanche", "bsc", "testnet.bsc", "crono", "fantom", "testnet.fantom", "moonbeam", "optimistic", "kovan-optimistic", "gnosisscan", default: "mainnet", env: ETH_NETWORK)
-k, --apiKey <key> Blockchain explorer API key. eg Etherscan, Arbiscan, BscScan, CronoScan, FTMScan, PolygonScan or SnowTrace API key (env: SCAN_API_KEY)
-v, --verbose run with debugging statements (default: false)
-h, --help display help for command
Expand Down
2 changes: 1 addition & 1 deletion lib/parserEtherscan.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ASTNode } from '@solidity-parser/parser/dist/src/ast-types';
import { UmlClass } from './umlClass';
export declare const networks: readonly ["mainnet", "ropsten", "kovan", "rinkeby", "goerli", "sepolia", "polygon", "testnet.polygon", "arbitrum", "testnet.arbitrum", "avalanche", "testnet.avalanche", "bsc", "testnet.bsc", "crono", "fantom", "testnet.fantom", "moonbeam", "optimistic", "kovan-optimistic"];
export declare const networks: readonly ["mainnet", "ropsten", "kovan", "rinkeby", "goerli", "sepolia", "polygon", "testnet.polygon", "arbitrum", "testnet.arbitrum", "avalanche", "testnet.avalanche", "bsc", "testnet.bsc", "crono", "fantom", "testnet.fantom", "moonbeam", "optimistic", "kovan-optimistic", "gnosisscan"];
declare type Network = typeof networks[number];
export declare class EtherscanParser {
protected apikey: string;
Expand Down
5 changes: 5 additions & 0 deletions lib/parserEtherscan.js

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

2 changes: 1 addition & 1 deletion lib/sol2uml.js

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

4 changes: 4 additions & 0 deletions src/ts/parserEtherscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const networks = <const>[
'moonbeam',
'optimistic',
'kovan-optimistic',
'gnosisscan',
]
type Network = typeof networks[number]

Expand Down Expand Up @@ -86,6 +87,9 @@ export class EtherscanParser {
} else if (network === 'moonbeam') {
this.url = 'https://api-moonbeam.moonscan.io/api'
this.apikey = '5EUFXW6TDC16VERF3D9SCWRRU6AEMTBHNJ'
} else if (network === 'gnosisscan') {
this.url = 'https://api.gnosisscan.io/api'
this.apikey = '2RWGXIWK538EJ8XSP9DE2JUINSCG7UCSJB'
} else {
this.url = `https://api-${network}.etherscan.io/api`
}
Expand Down
2 changes: 1 addition & 1 deletion src/ts/sol2uml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ The Solidity code can be pulled from verified source code on Blockchain explorer
.addOption(
new Option(
'-k, --apiKey <key>',
'Blockchain explorer API key. eg Etherscan, Arbiscan, BscScan, CronoScan, FTMScan, PolygonScan or SnowTrace API key'
'Blockchain explorer API key. eg Etherscan, Arbiscan, Optimism, BscScan, CronoScan, FTMScan, PolygonScan or SnowTrace API key'
).env('SCAN_API_KEY')
)
.option('-v, --verbose', 'run with debugging statements', false)
Expand Down

0 comments on commit 84c2952

Please sign in to comment.