Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
GNaD13 committed Feb 29, 2024
1 parent 4581639 commit 8ba3ac1
Showing 1 changed file with 0 additions and 84 deletions.
84 changes: 0 additions & 84 deletions tests/ibc_pfm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,79 +287,6 @@ func TestIBCTransferMultiHop(t *testing.T) {
require.NoError(t, err)
require.Equal(t, walletAmount, osmosisOrigBal)

// t.Run("multihop osmosis->dym->rollapp", func(t *testing.T) {
// firstHopDenom := transfertypes.GetPrefixedDenom(channDymOsmos.PortID, channDymOsmos.ChannelID, osmosis.Config().Denom)
// secondHopDenom := transfertypes.GetPrefixedDenom(channsRollAppDym.PortID, channsRollAppDym.ChannelID, firstHopDenom)

// firstHopDenomTrace := transfertypes.ParseDenomTrace(firstHopDenom)
// secondHopDenomTrace := transfertypes.ParseDenomTrace(secondHopDenom)

// firstHopIBCDenom := firstHopDenomTrace.IBCDenom()
// secondHopIBCDenom := secondHopDenomTrace.IBCDenom()

// fmt.Println(firstHopDenom)
// fmt.Println(firstHopDenomTrace)
// fmt.Println(firstHopIBCDenom)

// fmt.Println(secondHopDenom)
// fmt.Println(secondHopDenomTrace)
// fmt.Println(secondHopIBCDenom)

// zeroBal := math.ZeroInt()
// transferAmount := math.NewInt(100_000)

// // Send packet from rollapp1 -> dym -> osmosis
// transfer := ibc.WalletData{
// Address: osmosisUserAddr,
// Denom: osmosis.Config().Denom,
// Amount: transferAmount,
// }

// firstHopMetadata := &PacketMetadata{
// Forward: &ForwardMetadata{
// Receiver: rollappUserAddr,
// Channel: channDymRollApp.ChannelID,
// Port: channDymRollApp.PortID,
// Timeout: 5 * time.Minute,
// },
// }

// memo, err := json.Marshal(firstHopMetadata)
// require.NoError(t, err)

// transferTx, err := osmosis.SendIBCTransfer(ctx, channOsmosDym.ChannelID, osmosisUser.KeyName(), transfer, ibc.TransferOptions{Memo: string(memo)})
// require.NoError(t, err)
// err = transferTx.Validate()
// require.NoError(t, err)

// err = testutil.WaitForBlocks(ctx, 50, osmosis)
// require.NoError(t, err)

// osmosisBalance, err := osmosis.GetBalance(ctx, osmosisUserAddr, osmosis.Config().Denom)
// require.NoError(t, err)

// dymBalance, err := dymension.GetBalance(ctx, dymensionUserAddr, firstHopIBCDenom)
// require.NoError(t, err)

// rollAppBalance, err := rollapp1.GetBalance(ctx, rollappUserAddr, secondHopIBCDenom)
// require.NoError(t, err)

// dymAllBalance, err := dymension.AllBalances(ctx, dymensionUserAddr)
// require.NoError(t, err)
// osmoAllBalance, err := osmosis.AllBalances(ctx, osmosisUserAddr)
// require.NoError(t, err)
// rollappAllBalance, err := rollapp1.AllBalances(ctx, rollappUserAddr)
// require.NoError(t, err)

// fmt.Println("dym: ", dymAllBalance)
// fmt.Println("osmo: ", osmoAllBalance)
// fmt.Println("rollapp: ", rollappAllBalance)

// require.True(t, rollAppBalance.Equal(transferAmount))
// require.True(t, dymBalance.Equal(zeroBal))
// require.True(t, osmosisBalance.Equal(walletAmount.Sub(transferAmount)))
// })

t.Run("multihop rollapp->dym->osmosis", func(t *testing.T) {
firstHopDenom := transfertypes.GetPrefixedDenom(channDymRollApp.PortID, channDymRollApp.ChannelID, rollapp1.Config().Denom)
secondHopDenom := transfertypes.GetPrefixedDenom(channOsmosDym.PortID, channOsmosDym.ChannelID, firstHopDenom)
Expand Down Expand Up @@ -417,17 +344,6 @@ func TestIBCTransferMultiHop(t *testing.T) {
osmosisBalance, err := osmosis.GetBalance(ctx, osmosisUserAddr, secondHopIBCDenom)
require.NoError(t, err)

dymAllBalance, err := dymension.AllBalances(ctx, dymensionUserAddr)
require.NoError(t, err)
osmoAllBalance, err := osmosis.AllBalances(ctx, osmosisUserAddr)
require.NoError(t, err)
rollappAllBalance, err := rollapp1.AllBalances(ctx, rollappUserAddr)
require.NoError(t, err)

fmt.Println("dym: ", dymAllBalance)
fmt.Println("osmo: ", osmoAllBalance)
fmt.Println("rollapp: ", rollappAllBalance)

require.True(t, rollAppBalance.Equal(walletAmount.Sub(transferAmount)))
require.True(t, dymBalance.Equal(zeroBal))
require.True(t, osmosisBalance.Equal(transferAmount))
Expand Down

0 comments on commit 8ba3ac1

Please sign in to comment.