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

feat(core, apps): 'PacketDataUnmarshaler' interface added and implemented #4188

Merged
merged 14 commits into from
Jul 31, 2023

Conversation

srdtrk
Copy link
Member

@srdtrk srdtrk commented Jul 27, 2023

Description

This PR reduces the diff when reviewing the adr8 PR #3939.

PacketDataUnmarshaler is an optional interface which allows a middleware to request the packet data to be unmarshaled by the base application.

closes: #XXXX

Commit Message / Changelog Entry

feat(core, apps): 'PacketDataUnmarshaler' interface added and implemented

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

testing/mock/mock.go Outdated Show resolved Hide resolved
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Nice one! Only request would be to use the mock application error once #4189 is merged

@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2023

Codecov Report

Merging #4188 (4144525) into main (38d3122) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4188      +/-   ##
==========================================
+ Coverage   79.47%   79.50%   +0.02%     
==========================================
  Files         188      188              
  Lines       12973    12991      +18     
==========================================
+ Hits        10310    10328      +18     
  Misses       2234     2234              
  Partials      429      429              
Files Changed Coverage Δ
...7-interchain-accounts/controller/ibc_middleware.go 72.72% <100.00%> (+1.75%) ⬆️
modules/apps/29-fee/ibc_middleware.go 94.73% <100.00%> (+0.17%) ⬆️
modules/apps/transfer/ibc_module.go 66.07% <100.00%> (+1.25%) ⬆️

@srdtrk srdtrk changed the title feat(core): 'PacketDataUnmarshaler' interface added to core and implemented in apps feat(core, apps): 'PacketDataUnmarshaler' interface added and implemented Jul 28, 2023
modules/apps/29-fee/ibc_middleware_test.go Outdated Show resolved Hide resolved
modules/apps/transfer/ibc_module_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@colin-axner colin-axner left a comment

Choose a reason for hiding this comment

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

Followup ACK

@srdtrk srdtrk merged commit 2ac5506 into main Jul 31, 2023
@srdtrk srdtrk deleted the serdar/packetdataunmarshaler branch July 31, 2023 14:54
mergify bot pushed a commit that referenced this pull request Jul 31, 2023
…nted (#4188)

* feat(core/port): added PacketDataUnmarshaler interface

* feat(transfer): implemented PacketDataUnmarshaler interface in transfer

* feat(ica/controller): implemented PacketDataUnmarshaler interface

* feat(fee): implemented PacketDataUnmarshaler interface

* feat(mock): implemented PacketDataUnmarshaler interface

* imp(transfer_test): removed explicit use of callbacks in tests

* style(transfer_test): ran golangci-lint

* imp(testing/mock): removed ErrorMock for the upstreamed error

* style(fee_test): improved test readability

* imp(transfer_test): improved test styling and added new test case

(cherry picked from commit 2ac5506)

# Conflicts:
#	modules/apps/27-interchain-accounts/controller/ibc_middleware.go
#	modules/apps/29-fee/ibc_middleware.go
#	modules/apps/29-fee/ibc_middleware_test.go
#	modules/apps/29-fee/types/errors.go
#	modules/apps/transfer/ibc_module_test.go
#	testing/mock/ibc_module.go
srdtrk added a commit that referenced this pull request Aug 1, 2023
…nted (backport #4188) (#4211)

* feat(core, apps): 'PacketDataUnmarshaler' interface added and implemented (#4188)

* feat(core/port): added PacketDataUnmarshaler interface

* feat(transfer): implemented PacketDataUnmarshaler interface in transfer

* feat(ica/controller): implemented PacketDataUnmarshaler interface

* feat(fee): implemented PacketDataUnmarshaler interface

* feat(mock): implemented PacketDataUnmarshaler interface

* imp(transfer_test): removed explicit use of callbacks in tests

* style(transfer_test): ran golangci-lint

* imp(testing/mock): removed ErrorMock for the upstreamed error

* style(fee_test): improved test readability

* imp(transfer_test): improved test styling and added new test case

(cherry picked from commit 2ac5506)

# Conflicts:
#	modules/apps/27-interchain-accounts/controller/ibc_middleware.go
#	modules/apps/29-fee/ibc_middleware.go
#	modules/apps/29-fee/ibc_middleware_test.go
#	modules/apps/29-fee/types/errors.go
#	modules/apps/transfer/ibc_module_test.go
#	testing/mock/ibc_module.go

* fix: fixed backport conflicts

---------

Co-authored-by: srdtrk <[email protected]>
Co-authored-by: srdtrk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants