Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove Sealed trait from Instruction supertraits #4703

Open
mversic opened this issue Jun 6, 2024 · 1 comment
Open

remove Sealed trait from Instruction supertraits #4703

mversic opened this issue Jun 6, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@mversic
Copy link
Contributor

mversic commented Jun 6, 2024

To use client.submit() for CustomInstructionExpr, it is necessary for CustomInstructionExpr to implement Instruction and Sealed traits. This will require some changes to iroha_data_model (at least make Sealed trait public). I am not sure if it is worth it.

Currently I added pub fn into_instruction(self) -> InstructionBox method to CustomInstructionExpr, so it is possible to write:

let isi = CustomInstructionExpr::If(...);
client.submit_blocking(isi.into_instruction())?;

Originally posted by @dima74 in #4645 (comment)

@mversic
Copy link
Contributor Author

mversic commented Jun 14, 2024

also update the test from #4645 to reflect the new change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant