Skip to content

Commit

Permalink
feat: Add IBC TransferV2
Browse files Browse the repository at this point in the history
  • Loading branch information
kulikthebird committed Jan 27, 2025
1 parent 0b82922 commit 0322ca5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 14 deletions.
Binary file modified internal/api/libwasmvm.x86_64.so
Binary file not shown.
24 changes: 12 additions & 12 deletions libwasmvm/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions libwasmvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ default = []
backtraces = []

[dependencies]
cosmwasm-std = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.2.0", features = [
cosmwasm-std = { git = "https://github.com/CosmWasm/cosmwasm", branch = "tkulik/feat/ibc_transfer_v2", features = [
"staking",
"stargate",
"iterator",
] }
cosmwasm-vm = { git = "https://github.com/CosmWasm/cosmwasm.git", rev = "v2.2.0", features = [
cosmwasm-vm = { git = "https://github.com/CosmWasm/cosmwasm", branch = "tkulik/feat/ibc_transfer_v2", features = [
"staking",
"stargate",
"iterator",
Expand Down
26 changes: 26 additions & 0 deletions types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ type BurnMsg struct {

type IBCMsg struct {
Transfer *TransferMsg `json:"transfer,omitempty"`
TransferV2 *TransferMsgV2 `json:"transfer_v2,omitempty"`
SendPacket *SendPacketMsg `json:"send_packet,omitempty"`
WriteAcknowledgement *WriteAcknowledgementMsg `json:"write_acknowledgement,omitempty"`
CloseChannel *CloseChannelMsg `json:"close_channel,omitempty"`
Expand Down Expand Up @@ -238,6 +239,31 @@ type TransferMsg struct {
Memo string `json:"memo,omitempty"`
}

type Token struct {
Base string `json:"base"`
Trace []Hop `json:"trace"`
Amount string `json:"amount"`
}

type Forwarding struct {
Hops []Hop `json:"hops"`
Memo string `json:"memo"`
}

type Hop struct {
PortID string `json:"port_id"`
ChannelID string `json:"channel_id"`
}

type TransferMsgV2 struct {
ChannelID string `json:"channel_id"`
ToAddress string `json:"to_address"`
Tokens []Token `json:"tokens"`
Timeout IBCTimeout `json:"timeout"`
Memo string `json:"memo,omitempty"`
Forwarding Forwarding `json:"forwarding"`
}

type SendPacketMsg struct {
ChannelID string `json:"channel_id"`
Data []byte `json:"data"`
Expand Down

0 comments on commit 0322ca5

Please # to comment.