Skip to content

[docs] Add in notice about requirement for serialization/deserialization for middleware #8094

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

Closed
womensrights opened this issue Mar 2, 2025 · 1 comment · Fixed by #8277
Labels
docs Improvements or additions to documentation

Comments

@womensrights
Copy link
Contributor

Within the using ibc-go --> middleware --> Create a custom IBC middleware section, add in a notice that middleware developers must use the same serialization and deserialization method as in ibc-go's codec: transfertypes.ModuleCdc.[Must]MarshalJSON

For middleware builders this means:

import transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
transfertypes.ModuleCdc.[Must]MarshalJSON
func MarshalAsIBCDoes(ack channeltypes.Acknowledgement) ([]byte, error) {
	return transfertypes.ModuleCdc.MarshalJSON(&ack)
}
@womensrights womensrights added the docs Improvements or additions to documentation label Mar 2, 2025
@github-project-automation github-project-automation bot moved this to Backlog in IBC Mar 2, 2025
@hungdinh82
Copy link
Contributor

can I work on this issue? @womensrights

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
Status: Done
2 participants