Skip to content

Cosmos SDK IBC middleware to wrap and unwrap fungible packet memo fields in a namespaced wrapper

Notifications You must be signed in to change notification settings

dymensionxyz/fungible-packet-memo-namespace-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memo

The memo package provides middleware functionality for handling memos in fungible token packets in the Inter-Blockchain Communication (IBC) protocol. The package allows for the wrapping and unwrapping of memos within IBC packets using customizable transformation functions.

Usage

The package provides two main middleware structures: Wrapper and Unwrapper. These can be initialized using the NewMiddlewares or NewDefaultMiddlewares functions.

import (
    "github.com/your-repo/memo"
    "github.com/cosmos/cosmos-sdk/codec"
    "github.com/cosmos/ibc-go/v6/modules/core/05-port/types"
)

codec := codec.NewProtoCodec()
ics4Wrapper := // your ICS4Wrapper instance
ibcModule := // your IBCModule instance
namespace := "yourNamespace" # prefer short

middlewares := memo.NewDefaultMiddlewares(ics4Wrapper, ibcModule, codec, namespace)

About

Cosmos SDK IBC middleware to wrap and unwrap fungible packet memo fields in a namespaced wrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages