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 · 2 comments · May be fixed by #6985
Open

set_code_hash must collect immutables #6717

athei opened this issue Dec 1, 2024 · 2 comments · May be fixed by #6985
Assignees

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
@Zebedeusz
Copy link
Contributor

@athei I'm up for helping with this issue or any of the smart contract's ones. Is this one a good fit?

@athei
Copy link
Member Author

athei commented Dec 11, 2024

Yes. Please let me know if you need more guidance and feel free to assign yourself when you are about to start.

@Zebedeusz Zebedeusz self-assigned this Dec 11, 2024
@athei athei linked a pull request Jan 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Polkadot APIs
Development

Successfully merging a pull request may close this issue.

2 participants