Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_code_hash must collect immutables #6717

Open
athei opened this issue Dec 1, 2024 · 0 comments
Open

set_code_hash must collect immutables #6717

athei opened this issue Dec 1, 2024 · 0 comments

Comments

@athei
Copy link
Member

athei commented Dec 1, 2024

With the introduction of immutable variables we can no longer just change the code hash of an existing contract. The reason is that immutable variables are associated with the contract and not with a code hash.

Currently, this is why set_code_hash is disabled. In order to fix this we need to run the constructor of the new code hash and overwrite the immutables of the calling current contract. Then we can enable the function again.

Not needed for the minimal launch because this function doesn't exist in Solidity and hence can only be made available via pre-compiles anyways.

@athei athei transferred this issue from paritytech/contract-issues Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Precompile Launch
Development

No branches or pull requests

1 participant