Releases: naddison36/sol2uml
v2.5.26
What's New
Enhancement
- Added function names as labels on dependency arrows to contracts and interfaces called via storage variables
Bug Fixes
- Added more tests for associations
Dependency Updates
- Fixed critical security vulnerability in
basic-ftpvianpm audit fix - Updated
puppeteerto 24.37.5 - Updated
axiosto 1.13.6 - Updated
typescript-eslintto 8.56.1
Release v2.5.25
New Features
-
Function names on dependency: Class diagrams now show which functions are called on dependency between contracts, libraries, and interfaces. For example, if a contract calls
Library.convert(), the function nameconvertappears on the dependency line. This works for both explicit calls (Library.functionName()) andusing...forlibrary calls.
Use-hd, --hideDepFunctionsto disable this. -
Hide types option (
-hy, --hideTypes): Hide types of variables, function arguments and return types in class diagrams. This applies to contract variables, struct fields, enum values, constants, function parameters and return types.
Improvements
- Added retry logic with exponential backoff (2s, 4s, 6s) in
getSourceCode()when Etherscan returns a rate limit error.
CI
- Serialized GitHub Actions workflows so Unit Tests run on push, Platform tests run after Unit Tests complete, and Installation tests run after Platform tests complete.
- Fixed flatten test in installation tests to use Base network.
Examples
Hide variables, functions, file names. Squash inheritance. Limit depth to 1
sol2uml 0xC0297a0E39031F09406F0987C9D9D41c5dfbc3df -v -hv -hf -hs -hn -d 1 -s
Hide variables, functions, enums, structs, constants and file names. Limit depth to 1
sol2uml 0x5F81a5a22375ebCC2075b162D23a5b16a1e7A92d -v --network base -hv -hf -he -hs -hc -hn -d 1
Same as before, but squash inheritance
sol2uml 0x5F81a5a22375ebCC2075b162D23a5b16a1e7A92d -v --network base -hv -hf -he -hs -hc -hn -d 1 -s
Release v2.5.24
Bug Fixes
- Fix stack overflow (
RangeError: Maximum call stack size exceeded) infindAssociatedClasswhen running over large codebases with many contracts. Replaced recursive import chain traversal with iterative BFS and added visited tracking for diamond inheritance.
Dependency Upgrades
- Upgraded to ethers.js v6
- Upgraded
convert-svg-to-pngto address High severity security issues (addedpuppeteeras a dependency for bundled Chromium) - Upgraded Jest to address High severity security issue
- Fixed npm audit issues
- Upgraded Prettier
- Upgraded TypeScript
Other
- Added ESLint configuration
- Added CLAUDE.md for AI-assisted development
Release v2.5.23
- Fixed
diffcommand when repo uses pnpm which uses symlinks - Improve error message when Etherscan API key is not set
- Updated README
- Added linter
Full Changelog: v2.5.22...v2.5.23
Release v2.5.22
- Upgraded to use Etherscan V2 API
- As the Etherscan V2 API is being used, the same API key can be used for any chain supported by Etherscan.
- The
-n, --network <network>option can now take a chain id if the network name is not in the supported list of ethereum, sepolia, holesky, hoodi, arbitrum, optimism, polygon, avalanche, base, bsc, crono, fantom, sonic, gnosis, moonbeam, celo, scroll, linea, blast, berachain or zksync - Removed the recursive inheritance and import of import as it was crashing on larger contracts
- Upgraded the dependencies
Examples
export SCAN_API_KEY=<your-etherscan-key>
## A contract on the Hoodi network
sol2uml 0x610866c6089768dA95524bcc4cE7dB61eDa3931c -v --network hoodi
## ApeChain using chain id
sol2uml 0xd22ba2ff50d5c086d4bc34e9612b92fcbf8c1152 -v --network 33139
# Storage of a proxied multisig Safe on ApeChain
sol2uml storage --network 33139 0xfb1bffC9d739B8D520DaF37dF666da4C687191EA --data --storage 0xcf8DEBAFA34E0Ab7d1F3452FF3024454F8Fea32b -v
## Compare Uniswap SwapRouter02 between Ethereum and Celo
sol2uml diff 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45 0x5615CDAb10dc425a742d643d949a7F474C01abc4 --network ethereum --bNetwork celov2.5.21
- Added support for Sonic network
- Switched goerli for holesky
Release v2.5.20
Fixes
- incorrect linking to structs and enums on associated contracts or interfaces. This caused incorrect sizing of structs and enums in storage diagrams. eg
ImportedTypesInContract.ImportedContractLevelStruct importedTypesInContract; - link to structs or enums on inherited contracts or interfaces. This includes structs and enums on contracts or interfaces multiple levels above in the inheritance structure.
Release v2.5.19
Fixed
- Storage diagrams of contracts that have chained imports. That is, import a contract from a file that then imports the contract from another file.
To test, run the following from the ./tests folder
sol2uml storage -v -c Concrete ../src/contracts/chainedImports
Release v2.5.18
Fixes:
- storage diagrams when a struct or enum was used in an imported contract or library. #175
- class diagrams now linking to the correct struct or enum when the same name is used in different contracts or libraries
Release v2.5.17
- Added support for Scroll L2 network using Scrollscan
- Fixed undefined files when comparing contracts on Etherscan
- Updated dependencies