Skip to content

Commit

Permalink
Do not do padding in GMP handler
Browse files Browse the repository at this point in the history
  • Loading branch information
luckychess committed Dec 11, 2024
1 parent c1bddc6 commit edd30ab
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions x/gmp/module_ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,6 @@ func (im IBCModule) OnRecvPacket(
payloadData := msg.Payload
ctx.Logger().Debug(fmt.Sprintf("ABI-encoded data: %v", hex.EncodeToString(payloadData)))

// Add 4 bytes to the payload to match the length of the payload otherwise the unpack will fail
payloadData = append(make([]byte, 4), payloadData...)
args, err := abi.Arguments{{Type: payloadType}}.Unpack(payloadData)
if err != nil {
ctx.Logger().Debug(fmt.Sprintf("failed to unpack: %s", err.Error()))
Expand Down

0 comments on commit edd30ab

Please sign in to comment.