Skip to content

Conversation

@robertohuertasm
Copy link
Contributor

@robertohuertasm robertohuertasm commented Oct 20, 2024

Adds a processing instructions example using the Steel framework containing both Bankrun tests and Rust tests.

Updated to steel 2.1

@heyAyushh heyAyushh added contribute:steel Adds program example using steel framework. processing-instructions basics/processing-instructions labels Nov 5, 2024

#[repr(C)]
#[derive(Clone, Copy, Debug, Pod, Zeroable, PartialEq)]
pub struct GoToTheParkData {
Copy link
Member

Choose a reason for hiding this comment

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

add to this to instruction.rs file, use !instruction() macro

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done! Thanks for the suggestion.

) -> ProgramResult {
msg!("Processing instruction");

let instruction = GoToTheParkData::try_from_bytes(instruction_data)?;
Copy link
Member

Choose a reason for hiding this comment

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

use parse_instruction(), create instruction in a different file and import it here using mod.
ex. go_to_park.rs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@robertohuertasm
Copy link
Contributor Author

@heyAyushh I've modified the PR according to your suggestions but now the workflows won't run. For some reason GitHub is now asking for your approval to run the workflows.

@heyAyushh heyAyushh merged commit da2163d into solana-developers:main Jan 2, 2025
@robertohuertasm robertohuertasm deleted the roberto.huertas/feat/processing-instructions-steel branch January 2, 2025 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribute:steel Adds program example using steel framework. processing-instructions basics/processing-instructions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants