Skip to content

Commit

Permalink
Merge branch 'develop' into exempt-system-tx-min-gas
Browse files Browse the repository at this point in the history
  • Loading branch information
brewmaster012 authored Jan 21, 2024
2 parents 233ced4 + d1abe7b commit 75276e0
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ jobs:
- name: Clean Up Workspace
if: always()
shell: bash
run: rm -rf *
run: sudo rm -rf * || echo "failed to cleanup workspace please investigate"
2 changes: 1 addition & 1 deletion .github/workflows/rc-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ jobs:
- name: Clean Up Workspace
if: always()
shell: bash
run: rm -rf *
run: sudo rm -rf * || echo "failed to clean workspace please investigate"
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
* [1588](https://github.com/zeta-chain/node/pull/1588) - fix chain params comparison logic
* [1650](https://github.com/zeta-chain/node/pull/1605) - exempt (discounted) *system txs* from min gas price check and gas fee deduction

### CI

* [1580](https://github.com/zeta-chain/node/pull/1580) - Fix release pipelines cleanup step.

### Chores

* [1585](https://github.com/zeta-chain/node/pull/1585) - Updated release instructions
Expand Down Expand Up @@ -77,6 +81,7 @@ Getting the correct TSS address for Bitcoin now requires proviidng the Bitcoin c
* [1546](https://github.com/zeta-chain/node/pull/1546) - fix reset of pending nonces on genesis import
* [1555](https://github.com/zeta-chain/node/pull/1555) - Reduce websocket message limit to 10MB
* [1567](https://github.com/zeta-chain/node/pull/1567) - add bitcoin chain id to fetch the tss address rpc endpoint
* [1589](https://github.com/zeta-chain/node/pull/1589) - add bitcoin chain id to `get tss address` and `get tss address historical` cli query

### Refactoring

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Query tss address by finalized zeta height (for historical tss addresses)

```
zetacored query observer get-historical-tss-address [finalizedZetaHeight] [flags]
zetacored query observer get-historical-tss-address [finalizedZetaHeight] [bitcoinChainId] [flags]
```

### Options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Query current tss address

```
zetacored query observer get-tss-address [flags]
zetacored query observer get-tss-address [bitcoinChainId]] [flags]
```

### Options
Expand Down
23 changes: 18 additions & 5 deletions x/observer/client/cli/query_get_tss_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,24 @@ import (

func CmdGetTssAddress() *cobra.Command {
cmd := &cobra.Command{
Use: "get-tss-address",
Use: "get-tss-address [bitcoinChainId]]",
Short: "Query current tss address",
Args: cobra.NoArgs,
Args: cobra.MaximumNArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {

clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
queryClient := types.NewQueryClient(clientCtx)

params := &types.QueryGetTssAddressRequest{}
if len(args) == 1 {
bitcoinChainID, err := strconv.ParseInt(args[0], 10, 64)
if err != nil {
return err
}
params.BitcoinChainId = bitcoinChainID
}

res, err := queryClient.GetTssAddress(cmd.Context(), params)
if err != nil {
Expand All @@ -40,9 +46,9 @@ func CmdGetTssAddress() *cobra.Command {

func CmdGetTssAddressByFinalizedZetaHeight() *cobra.Command {
cmd := &cobra.Command{
Use: "get-historical-tss-address [finalizedZetaHeight]",
Use: "get-historical-tss-address [finalizedZetaHeight] [bitcoinChainId]",
Short: "Query tss address by finalized zeta height (for historical tss addresses)",
Args: cobra.ExactArgs(1),
Args: cobra.MaximumNArgs(2),
RunE: func(cmd *cobra.Command, args []string) (err error) {

clientCtx, err := client.GetClientTxContext(cmd)
Expand All @@ -58,6 +64,13 @@ func CmdGetTssAddressByFinalizedZetaHeight() *cobra.Command {
params := &types.QueryGetTssAddressByFinalizedHeightRequest{
FinalizedZetaHeight: finalizedZetaHeight,
}
if len(args) == 2 {
bitcoinChainID, err := strconv.ParseInt(args[1], 10, 64)
if err != nil {
return err
}
params.BitcoinChainId = bitcoinChainID
}

res, err := queryClient.GetTssAddressByFinalizedHeight(cmd.Context(), params)
if err != nil {
Expand Down

0 comments on commit 75276e0

Please sign in to comment.