Skip to content

Compiler should export constructor code #8803

Closed as not planned
Closed as not planned
@rmeissner

Description

@rmeissner

Result from the open discussion about upgradable contracts at the Solidity Summit

See https://hackmd.io/zjYDbVL5TEqgpOgMXXNT1g?both

As proxies cannot make use of the constructor code if the "master copy" it is very common to use some initializer code. This can cause issues and often requires overhead (e.g. adding a init function to the master copy)

Currently it's not possible to grab the constructor bytecode from the deployBytecode since the constructor argument positions are hardcoded, so a different-length runtime code would yield differ.

Therefore it would be very valuable to expose the constructor in a way that it can be reused.

Metadata

Metadata

Assignees

No one assigned

    Labels

    closed due inactivityThe issue/PR was automatically closed due to inactivity.staleThe issue/PR was marked as stale because it has been open for too long.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions