Closed aspiers closed 10 months ago
Because the --data
option is being used, it needs to connect to the chain to get the storage values. By default, it tried to connect to http://localhost:8545. The -u, --url <URL>
option can be used to specify the node URL. Alternatively, the URL can be set in the NODE_URL
environment variable.
Ahh thanks, that explains it! So this is another case of ethers.js not giving easy to understand errors. Can sol2uml catch this error and make it more helpful? Although I seem to remember that given the async nature of the error, it may not be possible.
Good point in catching this error. The next release will fail with
Error: Failed to connect to blockchain node with url http://localhost:8545.
This is the default url. Use the `-u, --url` option or `NODE_URL` environment variable to set the url of your blockchain node.
at Command.<anonymous> (/Users/nicholasaddison/Documents/workspaces/sol2uml/src/ts/sol2uml.ts:392:31)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Command.parseAsync (/Users/nicholasaddison/Documents/workspaces/sol2uml/node_modules/commander/lib/command.js:935:5)
at async main (/Users/nicholasaddison/Documents/workspaces/sol2uml/src/ts/sol2uml.ts:612:5)
Great, that's much much better!
This has been released in v2.5.16
For example: