medusa icon indicating copy to clipboard operation
medusa copied to clipboard

Support duplicate contract names

Open Xenomega opened this issue 3 years ago • 2 comments

Right now contract names are expected to be unique by the fuzzing package (but is supported by compilation). Instead we should come up with some contract ID or something similar to differentiate contracts. It has to factor in source file path. It needs to be human readable and intuitive (or we need an alternate approach), as the config file will have users specifying contract names for deployment order (per #11)

This is very low priority for now and not being considered yet.

Xenomega avatar Nov 03 '22 19:11 Xenomega

We will leave this issue open, but this is not a priority for now. We do differentiate contracts with the same name now, but maybe not everywhere. Removed the "good first issue" label as this may be non-trivial for things: e.g. constructor args provided in the config can reference a contract name, but this definitely isn't differentiated for duplicates.

Resolving this issue should also incorporate having a good way to display the names of duplicate contracts without being too bloated (appending the whole source path, or reformatting our output messages so if we do that, it doesn't look silly).

Xenomega avatar Jan 12 '23 16:01 Xenomega

We also need to support it for predeploys https://github.com/crytic/medusa/pull/353

0xalpharush avatar Aug 27 '24 19:08 0xalpharush