Skip to content

Commit

Permalink
chore(core): Implement Protobuf trait for tx actions (#1320)
Browse files Browse the repository at this point in the history
## Summary
Implemented the `Protobuf` trait for all TX `Action`s and variants.

## Background
`Action` and variants are refined types from generated Protobuf code,
but did not implement the `Protobuf` trait. This change is to
standardize the types `Error` and `Raw` across `Action`, as well as the
methods `to_raw()`, `into_raw()`, `try_from_raw()`, and
`try_from_raw_ref()`.

## Changes
- Implemented `Protobuf` trait, types, and necessary functions for
`Action` and all of its variants.
- Deleted redundant functions which took ownership, but kept those which
prioritized cost over their `ref` counterparts.

## Testing
Passing all tests.

## Related Issues
closes #1307

---------

Co-authored-by: Fraser Hutchison <[email protected]>
  • Loading branch information
ethanoroshiba and Fraser999 authored Aug 1, 2024
1 parent c765408 commit be139d5
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 107 deletions.
Loading

0 comments on commit be139d5

Please sign in to comment.