Skip to content

Not upgrading if bytecode and creation code have not changed #2

@KholdStare

Description

@KholdStare

Hey!

I was wondering if there is a way to prevent re-deployment of code that basically has not changed (e.g. reformatting, adding comments, or changing function order). Currently those can cause false-positive storage incompatibilities with isUpgradeSafe. However, implementation address is the thing that is actually checked for a difference to know whether something is changed or not. There is no control over this, and a contract will get redeployed in this case.

Is there a way to see if implementation bytecode is identical (even if solidity code has slight cosmetic changes), and opt out of upgrading a contract in that case? I think solidity outputs different bytecode if the source changes (a section towards the end of the bytecode), I'm assuming for verification purposes. Any way to check only the implementation bytecode and no anything that depends on the source?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions