Storage for contracts with the same name
See original GitHub issueRunning sol2uml storage -c *same name* on folder with files, containing contracts with the same name, will return storage diagram for contract with the smallest filename in sort order.
Example:
main.sol:
pragma solidity ^0.8.7;
import {A as A1} from "./Lib1.sol";
import {A as A2} from "./Lib2.sol";
contract A is A1, Math2 {
uint32 C1 = 0;
}
Lib1.sol:
pragma solidity ^0.8.7;
contract A {
uint32 C2 = 0;
}
Lib2.sol:
pragma solidity ^0.8.7;
contract A {
uint32 C3 = 0;
}
In this example storage will be generated for A from Lib1.sol. But if you rename main.sol in amain.sol result will be for A from amain.sol.
Maybe it can be fixed by choosing both filename and contract name?
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
What is a Contract Repository? - ContractSafe
A contract repository is a place where contracts are stored. · The names "contract repository" and "document repository" are used interchangeably - they...
Read more >Retrieve Storage Variable Name given Storage Location and ...
To summarize: I'm looking for a solution that retrieves the storage variable name provided I have the storage locations and the contract ......
Read more >Contracts — Solidity 0.8.17 documentation
Function Overloading. A contract can have multiple functions of the same name but with different parameter types. This process is called “overloading” and...
Read more >What Happens to a Contract When a Business Changes?
An explanation of what happens to a contract when a business has major changes, like a name change, sale, or bankruptcy.
Read more >Collisions of Solidity Storage Layouts - MixBytes
Ethereum smart contract storage is a mapping uint256 to uint256. ... into the slot that, in turn, explains the absence of paused and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hmm, I’ll need to look into this one. Thanks for reporting.
Thanks for raising this issue. I’ve added a
-cf, --contractFile <filename>option for storage diagrams in v2.1.5.The
contractFilecan just be a filename likemain.sol. Or it can be a relative filename from the working folder. egsrc/contracts/main.sol.