Skip to content

Conversation

@guibescos
Copy link
Contributor

@guibescos guibescos commented Aug 22, 2022

First step to delete the instruction enum from oracle.h

  • load and load_mut now fail with custom errors.
  • Rust enum for the dispatcher with a way to cast from the command header to the rust enum.

Copy link
Contributor

@jayantk jayantk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally fine. couple minor comments

OracleCommand::ResizePriceAccount => {
resize_price_account(program_id, accounts, instruction_data)
}
command_t_e_cmd_add_price => add_price(program_id, accounts, instruction_data),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you delete the enum in oracle.h so no one can depend on it in the C?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things still depend, just wanted to stage it incrementally

@guibescos guibescos merged commit 50a0e81 into main Aug 22, 2022
@guibescos guibescos deleted the rust-instructions branch August 22, 2022 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants