Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename ibc-account -> interchain-accounts #280

Merged
merged 2 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

# CODEOWNERS for interchain-accounts module

*/modules/apps/ibc-account @seantking @colin-axner @AdityaSripal
*/modules/apps/27-interchain-accounts @seantking @colin-axner @AdityaSripal
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/spf13/cobra"

"github.com/cosmos/ibc-go/modules/apps/ibc-account/types"
"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/types"
)

func GetQueryCmd() *cobra.Command {
cmd := &cobra.Command{
Use: types.ModuleName,
Short: "Querying commands for the ibc account module",
Use: "interchain-accounts",
Short: "Querying commands for the interchain accounts module",
DisableFlagParsing: true,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/ibc-go/modules/apps/ibc-account/keeper"
"github.com/cosmos/ibc-go/modules/apps/ibc-account/types"
"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/keeper"
"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/types"
)

func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, state types.GenesisState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
channeltypes "github.com/cosmos/ibc-go/modules/core/04-channel/types"
host "github.com/cosmos/ibc-go/modules/core/24-host"
"github.com/cosmos/ibc-go/modules/apps/ibc-account/types"
"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/types"
"github.com/tendermint/tendermint/crypto/tmhash"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/cosmos/ibc-go/modules/apps/ibc-account/types"
"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/types"
)

var _ types.QueryServer = Keeper{}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
host "github.com/cosmos/ibc-go/modules/core/24-host"
"github.com/tendermint/tendermint/libs/log"

"github.com/cosmos/ibc-go/modules/apps/ibc-account/types"
"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/types"
)

// Keeper defines the IBC transfer keeper
Expand All @@ -34,7 +34,7 @@ type Keeper struct {
memKey sdk.StoreKey
}

// NewKeeper creates a new IBC account Keeper instance
// NewKeeper creates a new interchain account Keeper instance
func NewKeeper(
memKey sdk.StoreKey,
cdc codec.BinaryCodec, key sdk.StoreKey,
Expand Down Expand Up @@ -112,7 +112,7 @@ func (k Keeper) BindPort(ctx sdk.Context, portID string) error {
return k.ClaimCapability(ctx, cap, host.PortPath(portID))
}

// GetPort returns the portID for the ibc account module. Used in ExportGenesis
// GetPort returns the portID for the interchain accounts module. Used in ExportGenesis
func (k Keeper) GetPort(ctx sdk.Context) string {
store := ctx.KVStore(k.storeKey)
return string(store.Get([]byte(types.PortKey)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
clienttypes "github.com/cosmos/ibc-go/modules/core/02-client/types"
channeltypes "github.com/cosmos/ibc-go/modules/core/04-channel/types"
host "github.com/cosmos/ibc-go/modules/core/24-host"
"github.com/cosmos/ibc-go/modules/apps/ibc-account/types"
"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/types"
"github.com/tendermint/tendermint/crypto/tmhash"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"github.com/grpc-ecosystem/grpc-gateway/runtime"
abci "github.com/tendermint/tendermint/abci/types"

"github.com/cosmos/ibc-go/modules/apps/ibc-account/client/cli"
"github.com/cosmos/ibc-go/modules/apps/ibc-account/keeper"
"github.com/cosmos/ibc-go/modules/apps/ibc-account/types"
"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/client/cli"
"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/keeper"
"github.com/cosmos/ibc-go/modules/apps/27-interchain-accounts/types"
channeltypes "github.com/cosmos/ibc-go/modules/core/04-channel/types"
porttypes "github.com/cosmos/ibc-go/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/modules/core/exported"
Expand Down Expand Up @@ -68,7 +68,7 @@ func (AppModuleBasic) RegisterInterfaces(registry codectypes.InterfaceRegistry)
types.RegisterInterfaces(registry)
}

// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the ibc-account module.
// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the interchain accounts module.
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
}

Expand Down
21 changes: 21 additions & 0 deletions modules/apps/27-interchain-accounts/spec/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
order: 0
title: "Overview"
parent:
title: "Interchain Accounts"
-->

# Interchain Account

## Abstract

This document specifies the ICS 27 Interchain Account module for the Cosmos SDK.

The Interchain Accounts module manages the creation of Interchain Accounts. This module is built based on the [ICS27 specification](https://github.com/cosmos/ibc/tree/master/spec/app/ics-027-interchain-accounts). Interchain Accounts allow a remote, IBC-connected **controller blockchain** to request an arbitrary transaction to be executed on the **host blockchain**(the chain which hosts the IBC account) via the interchain account. It should be noted that an interchain account has similar properties to a user account, and are bound to the same restrictions (unbonding periods, redelegation rules, etc).

The current implementation allows the same interchain account module on the destination chain to run any of the domiciling blockchain's native transactions that a user account is able to request(i.e. same module can handle 'send', 'stake', 'vote', etc), but the controlling chain/source chain must implement its own logic for controlling the interchain account.

## Contents
1. **[Types](03_types.md)**
2. **[Keeper](04_keeper.md)**
3. **[Packets](05_packets.md)**
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ func NewIBCAccount(ba *authtypes.BaseAccount, accountOwner string) *IBCAccount {

// SetPubKey - Implements AccountI
func (IBCAccount) SetPubKey(pubKey crypto.PubKey) error {
return fmt.Errorf("not supported for ibc accounts")
return fmt.Errorf("not supported for interchain accounts")
}

// SetSequence - Implements AccountI
func (IBCAccount) SetSequence(seq uint64) error {
return fmt.Errorf("not supported for ibc accounts")
return fmt.Errorf("not supported for interchain accounts")
}

func (ia IBCAccount) Validate() error {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// provided LegacyAmino codec. These types are used for Amino JSON serialization
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
cdc.RegisterInterface((*IBCAccountI)(nil), nil)
cdc.RegisterConcrete(&IBCAccount{}, "ibc-account/IBCAccount", nil)
cdc.RegisterConcrete(&IBCAccount{}, "27-interchain-accounts/IBCAccount", nil)
}

// RegisterInterface associates protoName with AccountI interface
Expand Down
21 changes: 0 additions & 21 deletions modules/apps/ibc-account/spec/README.md

This file was deleted.