-
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
feat: Query txs by signature and by address+seq #9750
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
dafbe1f
WIP for auth query
amaury1093 d801fbd
Make query by addr and seq work
amaury1093 3628100
Add tests for sigs
amaury1093 51f4cf2
Merge branch 'master' into am/9741-tx-query
amaury1093 ea3dc2e
Make query by sig work
amaury1093 96d357c
Fix lint
amaury1093 069e823
Improve err message
amaury1093 f319d4a
Move HasExtensionOptionsTx to authtx?
amaury1093 eb06533
Switch to bez's CLI UX
amaury1093 b7218b1
Fix cycle dep
amaury1093 56c331a
Cleanups
amaury1093 620b3ea
Update CHANGELOG.md
amaury1093 76f6fdd
Emit all nested sigs
amaury1093 acefab9
Merge branch 'am/9741-tx-query' of ssh://github.com/cosmos/cosmos-sdk…
amaury1093 209ffb3
Merge branch 'master' into am/9741-tx-query
amaury1093 f6e61e1
Index by addr++seq
amaury1093 ef80915
Merge branch 'master' into am/9741-tx-query
amaury1093 1d0c8c5
Use '/' delimiter
amaury1093 1eb8abd
Merge branch 'master' into am/9741-tx-query
alexanderbez fade9f7
Update x/auth/client/cli/query.go
amaury1093 10f846e
Update x/auth/client/cli/query.go
amaury1093 2e9a636
Update x/auth/client/cli/query.go
amaury1093 4e19f3d
Update x/auth/client/cli/query.go
amaury1093 91314fe
Address review comments
amaury1093 78b7526
Merge branch 'master' into am/9741-tx-query
amaury1093 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
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
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
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
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,32 @@ | ||
package cli | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestParseSigs(t *testing.T) { | ||
cases := []struct { | ||
name string | ||
args []string | ||
expErr bool | ||
expNumSigs int | ||
}{ | ||
{"no args", []string{}, true, 0}, | ||
{"empty args", []string{""}, true, 0}, | ||
{"too many args", []string{"foo", "bar"}, true, 0}, | ||
{"1 sig", []string{"foo"}, false, 1}, | ||
{"3 sigs", []string{"foo,bar,baz"}, false, 3}, | ||
} | ||
|
||
for _, tc := range cases { | ||
sigs, err := parseSigArgs(tc.args) | ||
if tc.expErr { | ||
require.Error(t, err) | ||
} else { | ||
require.NoError(t, err) | ||
require.Equal(t, tc.expNumSigs, len(sigs)) | ||
} | ||
} | ||
} |
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.
Why not adding it under other
AttributeKey*
?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.
These attributes are for
tx.*
, the attributes below are formessage.*