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

Extract common logic between blocks and search transactions #53

Open
piotr-iohk opened this issue Oct 11, 2024 · 0 comments
Open

Extract common logic between blocks and search transactions #53

piotr-iohk opened this issue Oct 11, 2024 · 0 comments

Comments

@piotr-iohk
Copy link
Collaborator

There is a common logic especially with regards to how transaction operations are generated from "database" types like InternalCommand, UserCommand or ZkAppCommand. The block database types (like InternalCommandMetadata) are slightly different than search types (InternallCommand) and they also ultimately transform to slightly different response types, however the logic for generating operations is the same or very similar.

I believe that the way to approach it could be to create a common trait for each type e.g. InternalCommandOperations (including fn generate_operations()) and implement it for each respective type.

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

No branches or pull requests

1 participant