Skip to content

Commit

Permalink
Problem: autocli use wrong clientCtx
Browse files Browse the repository at this point in the history
Solution:
- update dependency to include the fix, see cosmos/cosmos-sdk#19060

changelog

fix test
  • Loading branch information
yihuang committed Apr 12, 2024
1 parent 07565aa commit 8d79c35
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (rpc) [#434](https://github.com/crypto-org-chain/ethermint/pull/434) No need gasPrice when patch gasUsed for `eth_getTransactionReceipt`.
* (rpc) [#439](https://github.com/crypto-org-chain/ethermint/pull/439), [#441](https://github.com/crypto-org-chain/ethermint/pull/441) Align trace response for failed tx with go-ethereum.
* (evm) [#463](https://github.com/crypto-org-chain/ethermint/pull/463) Avoid broken bank total supply when creates a validator.
* (cli) [#464](https://github.com/crypto-org-chain/ethermint/pull/464) Update client/v2 to include bug fixes.

### Improvements

Expand Down
8 changes: 3 additions & 5 deletions cmd/ethermintd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,20 +196,20 @@ func queryCommand() *cobra.Command {
Use: "query",
Aliases: []string{"q"},
Short: "Querying subcommands",
DisableFlagParsing: true,
DisableFlagParsing: false,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}

cmd.AddCommand(
rpc.ValidatorCommand(),
sdkserver.QueryBlockCmd(),
sdkserver.QueryBlocksCmd(),
sdkserver.QueryBlockResultsCmd(),
authcmd.QueryTxsByEventsCmd(),
authcmd.QueryTxCmd(),
rpc.QueryEventForTxCmd(),
)
cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID")

return cmd
}
Expand All @@ -218,7 +218,7 @@ func txCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "tx",
Short: "Transactions subcommands",
DisableFlagParsing: true,
DisableFlagParsing: false,
SuggestionsMinimumDistance: 2,
RunE: client.ValidateCmd,
}
Expand All @@ -235,8 +235,6 @@ func txCommand() *cobra.Command {
authcmd.GetSimulateCmd(),
)

cmd.PersistentFlags().String(flags.FlagChainID, "", "The network chain ID")

return cmd
}

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ require (

replace (
// release/v0.50.x
cosmossdk.io/client/v2 => github.com/crypto-org-chain/cosmos-sdk/client/v2 v2.0.0-20240410035034-e8854d5aada6
cosmossdk.io/store => github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240410035034-e8854d5aada6
cosmossdk.io/x/tx => github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240410035034-e8854d5aada6
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.0.0-20240410035034-e8854d5aada6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1V
cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M=
cosmossdk.io/api v0.7.3 h1:V815i8YOwOAQa1rLCsSMjVG5Gnzs02JLq+l7ks8s1jk=
cosmossdk.io/api v0.7.3/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38=
cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q=
cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU=
cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s=
cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0=
cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo=
Expand Down Expand Up @@ -415,6 +413,8 @@ github.com/crypto-org-chain/btree v0.0.0-20240406140148-2687063b042c h1:MOgfS4+F
github.com/crypto-org-chain/btree v0.0.0-20240406140148-2687063b042c/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY=
github.com/crypto-org-chain/cosmos-sdk v0.0.0-20240410035034-e8854d5aada6 h1:hkCJuCgoDFQEtq5zc8SmfTbIBVRdHk0QPagykrmwXlY=
github.com/crypto-org-chain/cosmos-sdk v0.0.0-20240410035034-e8854d5aada6/go.mod h1:nRk8EA8/fEG4zSme2i/Rq5z3k7TrlsHkOYhrY79hhD8=
github.com/crypto-org-chain/cosmos-sdk/client/v2 v2.0.0-20240410035034-e8854d5aada6 h1:5y6aqDzUWNTv/8FgIAx+M3TPAgpUIE2vMRr9hSNsVsE=
github.com/crypto-org-chain/cosmos-sdk/client/v2 v2.0.0-20240410035034-e8854d5aada6/go.mod h1:GjpaaxatOEnkSlNKjYxSbzVVtHHAG0tWm26AoPA1g9Q=
github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240410035034-e8854d5aada6 h1:x7yeS5Kfvt6W2Q8RQjsraazqovYXJyCA+/V+cJMWtlY=
github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240410035034-e8854d5aada6/go.mod h1:lfuLI1f4o+0SGtlHQS4x5qsjRcZZfYqG8bp3k8hM0M8=
github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240410035034-e8854d5aada6 h1:oQVP5BWGHvbuY37s+SUKNFu74y2oFpp6lWgBbVkm7oU=
Expand Down
5 changes: 3 additions & 2 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ schema = 3
version = "v0.7.3"
hash = "sha256-G72m5tUKLrpl89YKM/S7J/e8rYkqctuDOqHbqxyzTBI="
[mod."cosmossdk.io/client/v2"]
version = "v2.0.0-beta.1"
hash = "sha256-5o3FSZ9xcYG4KLTOMbVFfPhV4CtlUn4LxjEm3/t1nOU="
version = "v2.0.0-20240410035034-e8854d5aada6"
hash = "sha256-PqDZ72kHFknqUO6MKF5cRudMFIH1syCRI+7gpCMuYkI="
replaced = "github.com/crypto-org-chain/cosmos-sdk/client/v2"
[mod."cosmossdk.io/collections"]
version = "v0.4.0"
hash = "sha256-minFyzgO/D+Oda4E3B1qvOAN5qd65SjS6nmjca4cp/8="
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/test_fee_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def update_feemarket_param(node, tmp_path, new_multiplier=2, new_denominator=200
proposal.write_text(json.dumps(proposal_src))
rsp = cli.submit_gov_proposal(proposal, from_="community")
assert rsp["code"] == 0, rsp["raw_log"]
approve_proposal(node, rsp, status=3)
approve_proposal(node, rsp)
print("check params have been updated now")
p = cli.get_params("feemarket")["params"]
assert p["base_fee"] == new_base_fee
Expand Down
4 changes: 2 additions & 2 deletions tests/integration_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def find_log_event_attrs(events, ev_type, cond=None):
return None


def approve_proposal(n, rsp, status="PROPOSAL_STATUS_PASSED"):
def approve_proposal(n, rsp):
cli = n.cosmos_cli()
rsp = cli.event_query_tx_for(rsp["txhash"])
# get proposal_id
Expand All @@ -351,4 +351,4 @@ def cb(attrs):
proposal = cli.query_proposal(proposal_id)
wait_for_block_time(cli, isoparse(proposal["voting_end_time"]))
proposal = cli.query_proposal(proposal_id)
assert proposal["status"] == status, proposal
assert proposal["status"] == "PROPOSAL_STATUS_PASSED", proposal

0 comments on commit 8d79c35

Please sign in to comment.