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

refactor: cli command to fetch inbound ballot from inbound hash and move to zetatools [WIP] #3368

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@

## unreleased

### Features

* [3368](https://github.com/zeta-chain/node/pull/3368) - cli command to fetch inbound ballot from inbound hash added to zetatools.

### Refactor

* [3332](https://github.com/zeta-chain/node/pull/3332) - implement orchestrator V2. Move BTC observer-signer to V2


## v25.0.0

### Features
Expand Down
210 changes: 0 additions & 210 deletions cmd/zetaclientd/inbound.go

This file was deleted.

11 changes: 0 additions & 11 deletions cmd/zetaclientd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ var (
Short: "Show relayer address",
RunE: RelayerShowAddress,
}

InboundCmd = &cobra.Command{Use: "inbound", Short: "Inbound transactions"}
InboundGetBallotCmd = &cobra.Command{
Use: "get-ballot [inboundHash] [chainID]",
Short: "Get the ballot status for the tx hash",
RunE: InboundGetBallot,
}
)

// globalOptions defines the global options for all commands.
Expand All @@ -89,7 +82,6 @@ func init() {
setupGlobalOptions()
setupInitializeConfigOptions()
setupRelayerOptions()
setupInboundOptions()

// Define commands
RootCmd.AddCommand(VersionCmd)
Expand All @@ -103,9 +95,6 @@ func init() {
RootCmd.AddCommand(RelayerCmd)
RelayerCmd.AddCommand(RelayerImportKeyCmd)
RelayerCmd.AddCommand(RelayerShowAddressCmd)

RootCmd.AddCommand(InboundCmd)
InboundCmd.AddCommand(InboundGetBallotCmd)
}

func main() {
Expand Down
30 changes: 30 additions & 0 deletions cmd/zetatool/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# ZetaTool

ZetaTool is a utility tool for the Zeta-Chain project. It provides a command to fetch the ballot/cctx identifier from the inbound hash

## Installation

To install ZetaTool, clone the repository and build the project:

```sh
git clone https://github.com/zeta-chain/node.git
cd node/cmd/zetatool
go build -o zetatool
```

Alternatively you can also use the target `make install-zetatool`

## Usage

### Fetching the Ballot Identifier

```shell
get-ballot [inboundHash] [chainID] --config <filename.json>
```

- `inboundHash`: The inbound hash of the transaction for which the ballot identifier is to be fetched
- `chainID`: The chain ID of the chain to which the transaction belongs
- `--config`: [Optional]The path to the configuration file. When not provided, the default configuration is used

The command returns a ballot identifier for the given inbound hash.

Loading
Loading