hyperledger / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
434 stars 277 forks source link

Implement `Instruction` for `*Box` wrappers #4704

Open nxsaken opened 3 months ago

nxsaken commented 3 months ago

Currently, only InstructionBox implements Instruction out of all ISI wrappers. I expected RegisterBox, MintBox and the rest of the wrappers to be usable with iroha.submit_*() directly, but they are not. I think it would be more ergonomic if they were.

mversic commented 3 months ago

related to #4703

nxsaken commented 3 months ago

Additionally, change instances of impl IntoIterator<Item = impl Instruction> function parameters to impl IntoIterator<Item = I>, I: Instruction, which is more flexible due to the turbofish syntax being available. This would allow wrapping multiple instructions into *Boxes without binding them to a separate variable.