bolt
bolt copied to clipboard
[Bug] System execute function implementation doesn't reflect definition
Describe the bug There are two things which can add confusion to the end-user:
- The function signature is changed to
fn execute(...) -> Result<Vec<Vec<u8>>>. #[system_input]transform the structure into#[derive(Accounts)]changing the structure with Anchor specific account definitions
Expected behavior
fn executeshould keep its signature- 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:
- Accounts into components
- Get the resulting components of
execute(components) - Update the accounts with its respective resulting components