bolt icon indicating copy to clipboard operation
bolt copied to clipboard

:sparkles: Giving component ownership to world

Open notdanilo opened this issue 3 months ago • 1 comments

⚠️ NOTE: Use notes like this to emphasize something important about the PR.

This could include other PRs this PR is built on top of; API breaking changes; reasons for why the PR is on hold; or anything else you would like to draw attention to.

Status Type ⚠️ Core Change Issue
Hold Feature No None

Problem

This PR attempts to change components ownership to the World program, so we don't need to CPI to the world program to change ownernship to the system being executed in the apply instruction.

Solution

  • Initialize & change the ownership of the component
  • Directly change ownership of the component in the apply instruction

IMPORTANT NOTE

This implementation is not working for an unknown cause. The components program account data is being zeroed out as shown in the test.

Run bolt test to check it.

notdanilo avatar Aug 28 '25 14:08 notdanilo

This implementation will not work. It seems that the account ownership change only occur by the end of an invocation (CPI included). Which means that the assignment of the new owner in the world program is not visible to the CPI.

This PR should be closed.

cc @GabrielePicco

notdanilo avatar Sep 11 '25 16:09 notdanilo