Skip to content

Commit

Permalink
Revert "feat(hub-genesis): Relayer triggered genesis transfer" (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
danwt authored Dec 10, 2024
1 parent e08da91 commit ba687a6
Show file tree
Hide file tree
Showing 20 changed files with 19 additions and 1,688 deletions.
18 changes: 0 additions & 18 deletions .github/copilot-instructions.md

This file was deleted.

42 changes: 0 additions & 42 deletions cmd/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ Most of these commands take a [path] argument. Make sure:
upgradeClientsCmd(a),
createConnectionCmd(a),
createChannelCmd(a),
sendGenesisTransfer(a),
closeChannelCmd(a),
lineBreakCommand(),
registerCounterpartyCmd(a),
Expand Down Expand Up @@ -597,47 +596,6 @@ $ %s tx chan demo-path --timeout 5s --max-retries 10`,
return cmd
}

func sendGenesisTransfer(a *appState) *cobra.Command {
cmd := &cobra.Command{
Use: "rollapp-send-genesis-transfer <path>",
Aliases: []string{},
Short: "Send a genesis transfer from the rollapp to the hub.",
Long: "Send a genesis transfer from the rollapp to the hub - intended for recovery/retry. Relayer will try automatically the first time during channel creation.",
Args: withUsage(cobra.ExactArgs(1)),
RunE: func(cmd *cobra.Command, args []string) error {
pathName := args[0]

c, src, dst, err := a.config.ChainsFromPath(pathName)
if err != nil {
return err
}

// ensure that keys exist
if exists := c[src].ChainProvider.KeyExists(c[src].ChainProvider.Key()); !exists {
return fmt.Errorf("key %s not found on src chain %s", c[src].ChainProvider.Key(), c[src].ChainID())
}

if exists := c[dst].ChainProvider.KeyExists(c[dst].ChainProvider.Key()); !exists {
return fmt.Errorf("key %s not found on dst chain %s", c[dst].ChainProvider.Key(), c[dst].ChainID())
}

// create channel if it isn't already created
return processor.SendGenesisTransfer(
cmd.Context(),
c[src].ChainProvider, // must be hub
c[dst].ChainProvider, // must be rollapp
)
},
}

cmd = timeoutFlag(a.viper, cmd)
cmd = retryFlag(a.viper, cmd)
cmd = overrideFlag(a.viper, cmd)
cmd = channelParameterFlags(a.viper, cmd)
cmd = memoFlag(a.viper, cmd)
return cmd
}

func isRollapp(src, dst *relayer.Chain) bool {
srcP, ok := src.ChainProvider.ProviderConfig().(cosmos.CosmosProviderConfig)
if !ok {
Expand Down
28 changes: 0 additions & 28 deletions proto/dymensionxyz/dymension/lightclient/query.proto

This file was deleted.

24 changes: 0 additions & 24 deletions proto/rollapp/hub_genesis/tx.proto

This file was deleted.

5 changes: 0 additions & 5 deletions relayer/chains/cosmos/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (

dymtypes "github.com/cosmos/relayer/v2/relayer/chains/cosmos/dym/lightclient/types"
cosmosmodule "github.com/cosmos/relayer/v2/relayer/chains/cosmos/module"
rdktypes "github.com/cosmos/relayer/v2/relayer/chains/cosmos/rollapp/rdk/hub-genesis/types"
"github.com/cosmos/relayer/v2/relayer/chains/cosmos/stride"
ethermintcodecs "github.com/cosmos/relayer/v2/relayer/codecs/ethermint"
injectivecodecs "github.com/cosmos/relayer/v2/relayer/codecs/injective"
Expand Down Expand Up @@ -92,12 +91,8 @@ func MakeCodec(moduleBasics []module.AppModuleBasic, extraCodecs []string, accBe
}
{
// DYMENSION
// hub
dymtypes.RegisterInterfaces(encodingConfig.InterfaceRegistry)
encodingConfig.Amino.RegisterConcrete(&dymtypes.MsgSetCanonicalClient{}, "/lightclient.SetCanonicalClient", nil)
// rollapp TODO: finish
rdktypes.RegisterInterfaces(encodingConfig.InterfaceRegistry)
// encodingConfig.Amino.RegisterConcrete(&rdktypes.MsgSendTransfer{}, "/lightclient.SetCanonicalClient", nil)
}

return encodingConfig
Expand Down
Loading

0 comments on commit ba687a6

Please sign in to comment.