-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
ICS 04 Implementation #4548
Merged
Merged
ICS 04 Implementation #4548
Changes from all commits
Commits
Show all changes
471 commits
Select commit
Hold shift + click to select a range
17f18d7
merge from ics04 branch
mossid 8b876ba
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid e1abf49
merge from ics04 branch
mossid 918c49a
Merge branch 'joon/ics-03-implementation' into joon/ics-04-implementa…
mossid 71d2620
fix lint
mossid 073a67a
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid eb7f614
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid 447eb3b
Merge branch 'joon/ics-03-implementation' into joon/ics-04-implementa…
mossid df2b7fe
add port
mossid 51303fd
fix test
mossid c60fd53
add mocks
mossid ee9bad2
fix connid -> portid in handshake.go
mossid 649ea6e
add mock
mossid 5ea508b
add ibc module.go, finalize mock
mossid 418ec86
add keeper
mossid 0570f84
add StoreKey const
mossid 04543f8
Merge branch 'master' of github.com:cosmos/cosmos-sdk into joon/store…
mossid 59d2b3e
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid 6d1088f
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid 6299864
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid ed6a7db
Merge branch 'joon/ics-03-implementation' into joon/ics-04-implementa…
mossid fc35efc
Merge branch 'joon/ics-04-implementation' into joon/ibc-sdk-interface
mossid 075f7c9
fix test
mossid 49c3176
Merge branch 'master' of github.com:cosmos/cosmos-sdk into joon/ibc-s…
mossid 10d1c46
Apply suggestions from code review
mossid 09e6600
applying review in progress
mossid 6f5f633
Merge branch 'joon/store-mapping' of github.com:cosmos/cosmos-sdk int…
mossid 4116bb7
apply review - make querier interface
mossid bb006fd
Merge branch 'master' of github.com:cosmos/cosmos-sdk into joon/ibc-s…
mossid 08efad1
fix cli errors
mossid 8040c81
Merge branch 'master' of github.com:cosmos/cosmos-sdk into joon/store…
mossid 48bb32d
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid 9b63a6b
fix dependency
mossid a7df43c
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid acaaaf2
fix dependency
mossid c18ba68
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid ab71a6e
Merge branch 'joon/ics-03-implementation' into joon/ics-04-implementa…
mossid 4e53dcd
reflect method name change
mossid 70a1c97
Merge branch 'joon/ics-04-implementation' into joon/ibc-sdk-interface
mossid 828badd
revise querier interface to work both on cli & store
mossid f88d8d3
revise querier interface to work both on cli & store
mossid 1e64e92
revise querier interface to work both on cli & store
mossid b4d7491
reflect downstream change
mossid a59d1e7
Merge branch 'joon/store-mapping' into joon/ics-23-implementation
mossid bb09ad9
Merge branch 'joon/ics-23-implementation' into joon/ics-02-implementa…
mossid 3ba9f9c
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid de1a045
fix cli
mossid 2ef039a
Merge branch 'joon/ics-02-implementation' into joon/ics-03-implementa…
mossid a600589
reflect downstream changes
mossid 1fd3040
Merge branch 'joon/ics-03-implementation' into joon/ics-04-implementa…
mossid c90ed2d
reflect downstream changes
mossid ffed153
Merge branch 'joon/ics-04-implementation' into joon/ibc-sdk-interface
mossid cbfb043
fix from address in tx cli
mossid b15a44d
fix cli in progress(squash later)
mossid 8820838
fix cli
mossid a72f6c5
remove timeout, add channel cli
mossid 4b81cb5
fix golangci
mossid 3866942
fix cli
mossid 6e6c186
Clean up
tnachen 025caf1
fix mock cli in progress
mossid c289635
Merge branch 'joon/ibc-sdk-interface' of github.com:cosmos/cosmos-sdk…
mossid 1cea7e3
finalize cleanup, mock cli wip
mossid 45dcdb3
add cli for mocksend
mossid 56be11e
fix handler
mossid 9f63629
rm commented lines
mossid b4e71e1
address review in progress
mossid 3f509ee
address review, rm cleanup/closing
mossid 10bf523
rename mock packages
mossid fea2ba6
fix interface for gaia
mossid 6b966a3
rename Path -> Prefix
mossid 21bd8d0
Store accessor upstream changes (#5119)
fedekunze af2564b
Merge branch 'joon/store-mapping' of https://github.com/cosmos/cosmos…
fedekunze 303ebf3
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze 9b3b120
Merge branch 'master' into joon/store-mapping
fedekunze 18f8d70
Merge branch 'joon/store-mapping' of https://github.com/cosmos/cosmos…
fedekunze df5b21a
add comments, reformat merkle querier
mossid 7afe221
Merge branch 'joon/ics-23-implementation' of github.com:cosmos/cosmos…
mossid 1ac982c
rm merkle/utils
mossid fa04419
ICS 23 upstream changes (#5120)
fedekunze 0d5a317
downstream changes
fedekunze db8d382
update Value
fedekunze 02b31a5
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze 4d518f2
update test
fedekunze 8a3e5ea
fix
fedekunze 9975a1d
ICS 02 upstream changes (#5122)
fedekunze ffc6918
merge ICS 02
fedekunze 11bdbd7
ICS 03 upstream changes (#5123)
fedekunze 5db0863
merge ICS 02
fedekunze dbbe703
merge upstream changes
fedekunze 7428e5b
update test
fedekunze cc404a0
cleanup types and submodule
fedekunze d93a0ae
more cleanup and godocs
fedekunze 9b6afe9
remove counterPartyManager/State and cleanup
fedekunze c8a0ab4
implement SubmitMisbehaviour and refactor
fedekunze 4483182
errors
fedekunze 23fbb5d
events
fedekunze ebecbce
fix test
fedekunze 0e85ed0
refactors
fedekunze 03574cb
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze f16d6e9
WIP refactor ICS03
fedekunze a7d2d98
remove Mapping
fedekunze 1b7e466
remove store accessors
fedekunze c09a84c
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze 99c586b
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze 02bd6f7
proposed refactor
fedekunze 0e37d75
remove store accessors from ICS02
fedekunze 8dec96f
refactor queriers, handler and clean keeper
fedekunze 83f4c1b
logger and tx long description
fedekunze 178912f
ineffassign
fedekunze c4617e0
merge ICS02
fedekunze 9a225e9
Apply suggestions from code review
fedekunze fe7da5f
Apply suggestions from code review
fedekunze c8ff483
remove store accessors
fedekunze 8bcf17f
refactor handshake to update it to the latest ICS03 spec
fedekunze 3df5378
update handler and msgs
fedekunze 21f7d2c
add verification functions
fedekunze 4e9d2bb
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze 604afd5
update verification
fedekunze cf347bf
ICS02 module.go
fedekunze 5514e9e
top level x/ibc structure
fedekunze 39dd637
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze eefa08b
update connection queries
fedekunze 482f24d
update connection tx
fedekunze e4ffd8e
remove extra files
fedekunze f69ac00
Merge branch 'joon/ics-03-implementation' of https://github.com/cosmo…
fedekunze e334947
refactor: remove store accessors, update keeper and types to match sp…
fedekunze 0125276
update handshake and packet
fedekunze 038d7cf
implement packet timeouts
fedekunze 931ef76
implement send and receive packet
fedekunze de156d3
implement packet ACK
fedekunze 9cc1447
update handler
fedekunze bb4c551
add channel errors
fedekunze 4c50d4f
channel querier
fedekunze 0163482
update expected client keeper and export verification funcs
fedekunze 7c37222
ICS 05 Implementation
fedekunze a8244dc
release port and godocs
fedekunze a1c22e9
Merge branch 'master' into joon/ics-23-implementation
fedekunze a8ceb45
Update x/ibc/02-client/client/cli/query.go
fedekunze 956eb5c
Update x/ibc/02-client/types/tendermint/consensus_state.go
fedekunze 2cc23b2
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze 2e1e894
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze c573d57
address some of the review comments
fedekunze 6913146
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze f852b1b
resolve some TODOs and address comments from review
fedekunze 245901c
update connection versioning
fedekunze 7a82144
minor error updates
fedekunze 99829bb
Merge branch 'joon/ics-03-implementation' of https://github.com/cosmo…
fedekunze 105cd5a
Merge branch 'fedekunze/ics-05-implementation' of https://github.com/…
fedekunze 1b45a24
update ICS04 with downstream changes
fedekunze c079abb
Implement tx cli actions
jackzampolin 791b245
Merge branch 'joon/ics-04-implementation' of github.com:cosmos/cosmos…
jackzampolin 2b4cb05
add MsgSendPacket handler; msg validation, errors and events
fedekunze 012bf54
update errors and add port Keeper to ibc Keeper
fedekunze b2cd838
merge ICS05 - port PR
fedekunze 6af2ce7
minor UX improvements
fedekunze 8be3af7
rename pkg
fedekunze 53ab47d
fixes
fedekunze d3a533a
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze 0d56b51
implement query proofs
fedekunze 7ba777e
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze 499abb4
refactor ICS23
fedekunze a925d88
cleanup types
fedekunze a0cafbf
Merge branch 'joon/ics-03-implementation' of https://github.com/cosmo…
fedekunze b174427
Merge branch 'fedekunze/ics-05-implementation' of https://github.com/…
fedekunze c3b6b18
ICS 5 updates (#5222)
cwgoes 74d8a4b
rename pkg and fix import
fedekunze 53f5fad
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze c12c298
implement batch verification
fedekunze a34b741
gosimple suggestion
fedekunze bf4f096
Merge branch 'master' into joon/ics-23-implementation
fedekunze 386489b
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze 383ba49
merge ICS23
fedekunze 9b77275
various fixes; remove legacy tests; remove commitment path query
fedekunze 40fca1a
alias
fedekunze 1eaf55e
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze deceeb8
minor updates from ICS23
fedekunze 2a1a144
renaming
fedekunze 2aa4734
ICS02 changes
fedekunze 714e6e2
update verification and rename root funcs
fedekunze 93bb9d7
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze 3351c08
Merge branch 'joon/ics-03-implementation' of https://github.com/cosmo…
fedekunze 323bc8d
Merge branch 'fedekunze/ics-05-implementation' of https://github.com/…
fedekunze 4680ad3
merge downstream changes
fedekunze 4282729
rm legacy tests; add query proofs support
fedekunze 8fe17f6
remove capability key generation and authentication logic
fedekunze de13f5a
move querier to x/ibc
fedekunze aae117f
update query.go to use 'custom/...' query path
fedekunze f8fd580
add tests
AdityaSripal cbc1106
ICS 24 Implementation (#5229)
AdityaSripal f8d99ca
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze 23ae994
flatten ICS23 structure
fedekunze e1fa5f8
fix ApplyPrefix
fedekunze 7222642
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze 4f89602
updates from ICS23 and ICS24
fedekunze 22f874a
msg.ValidateBasic and ADR09 evidence interface
fedekunze 2edb03f
complete types testing
AdityaSripal 5783b03
merge
AdityaSripal 696db2e
delete empty test file
AdityaSripal 69db1f2
remove ibc errors from core error package
AdityaSripal c22faa1
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze 021544f
custom JSON marshaling; msg.ValidateBasic; renaming of variables
fedekunze 7809e4d
minor update
fedekunze 102ab3d
custom JSON marshaling
fedekunze 2f68c0c
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze b9654da
Merge branch 'joon/ics-03-implementation' of https://github.com/cosmo…
fedekunze c8289a8
use host validation for port ids
fedekunze 73be9cc
Merge branch 'fedekunze/ics-05-implementation' of https://github.com/…
fedekunze 7cab018
downstream changes; custom marshal JSON; msg validation, and update e…
fedekunze a81f236
update errors and aliases
fedekunze 33312c2
start batch-verify tests
AdityaSripal 8d95afa
update msg validation and CLI UX
fedekunze 49d08e3
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze 5239720
minor changes on commitment types
fedekunze 46f9cbd
fix channel and packet check (#5243)
chengwenxi e048a6c
R4R - Store consensus state correctly (#5242)
chengwenxi 093c004
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze 3965928
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze 0c187bf
update alias
fedekunze 29bc19e
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
fedekunze 24e6d29
update alias
fedekunze a06f30a
Merge branch 'joon/ics-03-implementation' of https://github.com/cosmo…
fedekunze bd21702
update alias and keeper.GetPort()
fedekunze ed07a05
downstream changes
fedekunze afc0583
authenticate port ID; remove send packet msg from CLI
fedekunze 335954c
comment out handlers
fedekunze d1f71dd
Merge branch 'master' into joon/ics-23-implementation
fedekunze 0a461b5
use testsuite
AdityaSripal dac68df
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
AdityaSripal 7f9c166
Integrate Evidence Implementation into ICS-02 (#5258)
AdityaSripal a74ebf3
Merge branch 'master' into joon/ics-23-implementation
fedekunze 6d580aa
finish tendermint tests
AdityaSripal 0dd779e
Merge branch 'joon/ics-02-implementation' of https://github.com/cosmo…
AdityaSripal e875ca7
complete merge
AdityaSripal cd0aa22
Add tests for msgs
AdityaSripal 0c8b759
upstream changes
fedekunze c6fa07b
fix
fedekunze 17abbda
Merge branch 'master' of https://github.com/cosmos/cosmos-sdk into jo…
fedekunze 820482f
upstream changes
fedekunze 962979d
ICS23 changes
fedekunze b5442d3
fix cons state
fedekunze 7c67236
context changes
fedekunze 4866753
Merge branch 'joon/ics-23-implementation' of https://github.com/cosmo…
fedekunze a696f05
upstream changes
fedekunze df6bd66
fix cli tx
fedekunze 024486c
upstream changes
fedekunze b039d37
Merge branch joon/ics-03-implementation' of https://github.com/cosmos…
fedekunze ab50629
upstream changes
fedekunze 6ec0148
downstream changes
fedekunze 6106861
upstream changes
fedekunze a9efd98
conflicts
fedekunze File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
package channel | ||
|
||
// nolint | ||
// autogenerated code using github.com/rigelrozanski/multitool | ||
// aliases generated for the following subdirectories: | ||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/04-channel/keeper | ||
// ALIASGEN: github.com/cosmos/cosmos-sdk/x/ibc/04-channel/types | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/x/ibc/04-channel/keeper" | ||
"github.com/cosmos/cosmos-sdk/x/ibc/04-channel/types" | ||
) | ||
|
||
const ( | ||
NONE = types.NONE | ||
UNORDERED = types.UNORDERED | ||
ORDERED = types.ORDERED | ||
OrderNone = types.OrderNone | ||
OrderUnordered = types.OrderUnordered | ||
OrderOrdered = types.OrderOrdered | ||
CLOSED = types.CLOSED | ||
INIT = types.INIT | ||
OPENTRY = types.OPENTRY | ||
OPEN = types.OPEN | ||
StateClosed = types.StateClosed | ||
StateInit = types.StateInit | ||
StateOpenTry = types.StateOpenTry | ||
StateOpen = types.StateOpen | ||
DefaultCodespace = types.DefaultCodespace | ||
CodeChannelExists = types.CodeChannelExists | ||
CodeChannelNotFound = types.CodeChannelNotFound | ||
CodeInvalidCounterpartyChannel = types.CodeInvalidCounterpartyChannel | ||
CodeChannelCapabilityNotFound = types.CodeChannelCapabilityNotFound | ||
CodeInvalidPacket = types.CodeInvalidPacket | ||
CodeSequenceNotFound = types.CodeSequenceNotFound | ||
CodePacketTimeout = types.CodePacketTimeout | ||
CodeInvalidChannel = types.CodeInvalidChannel | ||
CodeInvalidChannelState = types.CodeInvalidChannelState | ||
CodeInvalidChannelProof = types.CodeInvalidChannelProof | ||
AttributeKeySenderPort = types.AttributeKeySenderPort | ||
AttributeKeyReceiverPort = types.AttributeKeyReceiverPort | ||
AttributeKeyChannelID = types.AttributeKeyChannelID | ||
AttributeKeySequence = types.AttributeKeySequence | ||
SubModuleName = types.SubModuleName | ||
StoreKey = types.StoreKey | ||
RouterKey = types.RouterKey | ||
QuerierRoute = types.QuerierRoute | ||
QueryChannel = types.QueryChannel | ||
) | ||
|
||
var ( | ||
// functions aliases | ||
NewKeeper = keeper.NewKeeper | ||
QuerierChannel = keeper.QuerierChannel | ||
NewChannel = types.NewChannel | ||
NewCounterparty = types.NewCounterparty | ||
OrderFromString = types.OrderFromString | ||
StateFromString = types.StateFromString | ||
RegisterCodec = types.RegisterCodec | ||
ErrChannelExists = types.ErrChannelExists | ||
ErrChannelNotFound = types.ErrChannelNotFound | ||
ErrInvalidCounterpartyChannel = types.ErrInvalidCounterpartyChannel | ||
ErrChannelCapabilityNotFound = types.ErrChannelCapabilityNotFound | ||
ErrInvalidPacket = types.ErrInvalidPacket | ||
ErrSequenceNotFound = types.ErrSequenceNotFound | ||
ErrPacketTimeout = types.ErrPacketTimeout | ||
ErrInvalidChannel = types.ErrInvalidChannel | ||
ErrInvalidChannelState = types.ErrInvalidChannelState | ||
ErrInvalidChannelProof = types.ErrInvalidChannelProof | ||
ChannelPath = types.ChannelPath | ||
ChannelCapabilityPath = types.ChannelCapabilityPath | ||
NextSequenceSendPath = types.NextSequenceSendPath | ||
NextSequenceRecvPath = types.NextSequenceRecvPath | ||
PacketCommitmentPath = types.PacketCommitmentPath | ||
PacketAcknowledgementPath = types.PacketAcknowledgementPath | ||
KeyChannel = types.KeyChannel | ||
KeyChannelCapabilityPath = types.KeyChannelCapabilityPath | ||
KeyNextSequenceSend = types.KeyNextSequenceSend | ||
KeyNextSequenceRecv = types.KeyNextSequenceRecv | ||
KeyPacketCommitment = types.KeyPacketCommitment | ||
KeyPacketAcknowledgement = types.KeyPacketAcknowledgement | ||
NewMsgChannelOpenInit = types.NewMsgChannelOpenInit | ||
NewMsgChannelOpenTry = types.NewMsgChannelOpenTry | ||
NewMsgChannelOpenAck = types.NewMsgChannelOpenAck | ||
NewMsgChannelOpenConfirm = types.NewMsgChannelOpenConfirm | ||
NewMsgChannelCloseInit = types.NewMsgChannelCloseInit | ||
NewMsgChannelCloseConfirm = types.NewMsgChannelCloseConfirm | ||
NewPacket = types.NewPacket | ||
NewOpaquePacket = types.NewOpaquePacket | ||
NewChannelResponse = types.NewChannelResponse | ||
NewQueryChannelParams = types.NewQueryChannelParams | ||
|
||
// variable aliases | ||
SubModuleCdc = types.SubModuleCdc | ||
EventTypeChannelOpenInit = types.EventTypeChannelOpenInit | ||
EventTypeChannelOpenTry = types.EventTypeChannelOpenTry | ||
EventTypeChannelOpenAck = types.EventTypeChannelOpenAck | ||
EventTypeChannelOpenConfirm = types.EventTypeChannelOpenConfirm | ||
EventTypeChannelCloseInit = types.EventTypeChannelCloseInit | ||
EventTypeChannelCloseConfirm = types.EventTypeChannelCloseConfirm | ||
AttributeValueCategory = types.AttributeValueCategory | ||
) | ||
|
||
type ( | ||
Keeper = keeper.Keeper | ||
Channel = types.Channel | ||
Counterparty = types.Counterparty | ||
Order = types.Order | ||
State = types.State | ||
ClientKeeper = types.ClientKeeper | ||
ConnectionKeeper = types.ConnectionKeeper | ||
PortKeeper = types.PortKeeper | ||
MsgChannelOpenInit = types.MsgChannelOpenInit | ||
MsgChannelOpenTry = types.MsgChannelOpenTry | ||
MsgChannelOpenAck = types.MsgChannelOpenAck | ||
MsgChannelOpenConfirm = types.MsgChannelOpenConfirm | ||
MsgChannelCloseInit = types.MsgChannelCloseInit | ||
MsgChannelCloseConfirm = types.MsgChannelCloseConfirm | ||
Packet = types.Packet | ||
OpaquePacket = types.OpaquePacket | ||
ChannelResponse = types.ChannelResponse | ||
QueryChannelParams = types.QueryChannelParams | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package cli | ||
|
||
import ( | ||
"fmt" | ||
"strings" | ||
|
||
"github.com/spf13/cobra" | ||
|
||
cli "github.com/cosmos/cosmos-sdk/client" | ||
"github.com/cosmos/cosmos-sdk/client/context" | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
"github.com/cosmos/cosmos-sdk/version" | ||
"github.com/cosmos/cosmos-sdk/x/ibc/04-channel/client/utils" | ||
) | ||
|
||
// GetQueryCmd returns the query commands for IBC channels | ||
func GetQueryCmd(storeKey string, cdc *codec.Codec) *cobra.Command { | ||
ics04ChannelQueryCmd := &cobra.Command{ | ||
Use: "channel", | ||
Short: "IBC channel query subcommands", | ||
DisableFlagParsing: true, | ||
} | ||
|
||
ics04ChannelQueryCmd.AddCommand(cli.GetCommands( | ||
GetCmdQueryChannel(storeKey, cdc), | ||
)...) | ||
|
||
return ics04ChannelQueryCmd | ||
} | ||
|
||
// GetCmdQueryChannel defines the command to query a channel end | ||
func GetCmdQueryChannel(queryRoute string, cdc *codec.Codec) *cobra.Command { | ||
cmd := &cobra.Command{ | ||
Use: "end [port-id] [channel-id]", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need more explanatory text here. Make it explicit in terms of dest chain and src chain. |
||
Short: "Query a channel end", | ||
Long: strings.TrimSpace(fmt.Sprintf(`Query an IBC channel end | ||
|
||
Example: | ||
$ %s query ibc channel end [port-id] [channel-id] | ||
`, version.ClientName), | ||
), | ||
Args: cobra.ExactArgs(2), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
cliCtx := context.NewCLIContext().WithCodec(cdc) | ||
|
||
ch, err := utils.QueryChannel(cliCtx, args[0], args[1], queryRoute) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
return cliCtx.PrintOutput(ch) | ||
}, | ||
} | ||
return cmd | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add ability to query which
channels
exist on a given chain and/or connection.