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

Add stake and unstake commands to Shardeum CLI #1

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/validate-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

name: Validate CLI Build

on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Link package
run: sudo npm link

- name: Validate CLI help command
run: |
# Verify both ways of running the CLI work
shardeum-cli --help
npm start -- --help

- name: Test set rpc
run: |
shardeum-cli config:set-rpc https://sphinx.shardeum.org
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# shardeum-cli

A command line utility to query Shardeum's functions and send transactions
## Installation

```bash
# Build from source
npm run build
npm start
# run with
npm start <command>

# Or install globally
npm run build
npm link
# run with
shardeum-cli <command>
```
```
Usage: index [options] [command]

Expand All @@ -28,6 +42,8 @@ Commands:
eth:protocolVersion Get Ethereum protocol version
eth:sendTransaction [options] Send a transaction
test:network [options] Run network test
shm:stake [options] Stake SHM tokens
shm:unstake [options] Unstake SHM tokens
help [command] display help for command

```
264 changes: 248 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading