bolt icon indicating copy to clipboard operation
bolt copied to clipboard

[Bug] System execute function implementation doesn't reflect definition

Open notdanilo opened this issue 11 months ago • 0 comments

Describe the bug There are two things which can add confusion to the end-user:

  1. The function signature is changed to fn execute(...) -> Result<Vec<Vec<u8>>>.
  2. #[system_input] transform the structure into #[derive(Accounts)] changing the structure with Anchor specific account definitions

Expected behavior

  1. fn execute should keep its signature
  2. The structure should look like how it was defined

Proposed solution The internals should be moved to somewhere else. Maybe to another function calling fn execute. The accounts structure should be generated separately and the process would looks like this:

  1. Accounts into components
  2. Get the resulting components of execute(components)
  3. Update the accounts with its respective resulting components

notdanilo avatar Jan 14 '25 13:01 notdanilo