npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@toolscip/clisc

v1.4.0

Published

Command Line Interface for Smart Contracts interaction

Downloads

12

Readme

clisc

Command Line Interface for Smart Contracts interaction

oclif Version Downloads/week License

Usage

$ npm install -g @toolscip/clisc
$ clisc COMMAND
running command...
$ clisc (-v|--version|version)
@toolscip/clisc/1.4.0 linux-x64 node-v10.19.0
$ clisc --help [COMMAND]
USAGE
  $ clisc COMMAND
...

Commands

clisc help [COMMAND]

display help for clisc

USAGE
  $ clisc help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

clisc init

initialize the 'clisc' configuration files, this command MUST be executed in the directory where the user wants to store the project.

USAGE
  $ clisc init

OPTIONS
  -h, --help       show init command help
  -p, --path=path  provide a path where the config files are located, if not set, the current directory is used
  -s, --server     initialize a simple server for receiving asynchronous responses
  -y, --yes        skip questions, set all values with default ones.

EXAMPLES
  # Initialize the 'clisc' configuration files for the current project
  $ clisc init
  # Initialize the 'clisc' configuration files for the current project skipping all questions
  $ clisc init --yes
  # Initialize the 'clisc' configuration files for the current project with a simple express.js server for the 
  asynchronous responses
  $ clisc init --server

See code: dist/commands/init.ts

clisc invoke CONTRACT

invoke a target smart contract's function/method starting from a smart contract's descriptor.

USAGE
  $ clisc invoke CONTRACT

ARGUMENTS
  CONTRACT  name of the contract to interact with

OPTIONS
  -F, --file=file            path to a JSON file that contains all required parameter for the specific request
  -I, --id=id                jsonrpc request identifier
  -a, --auth=auth            authorization token
  -d, --doc=doc              degree of confidence's value
  -h, --help                 show invoke command help
  -i, --corrId=corrId        (required) client-provided correlation identifier
  -l, --logger               whether enable or not the file logger
  -m, --method=method        (required) name of the request's target function/method

  -p, --path=path            provide a path where the config files are located, if not set, the current directory is
                             used

  -s, --signature=signature  [default: sha256] cryptographic hash function's name that has to be used to sign the
                             request

  -t, --timeout=timeout      timeout that the gateway have to wait before block the operation

  -u, --callback=callback    callback URL to which the gateway will send all asynchronous responses

  -v, --value=value          target function or event parameter's value, if more than one value is required you can set
                             this flag multiple times (the order is important!)

EXAMPLES
  # Invoke a method named 'balanceOf' of a contract named 'Token'
  $ clisc invoke Token -I abcdef --method=balanceOf --value=0x23ab34bd..

See code: dist/commands/invoke.ts

clisc query CONTRACT

query past event occurences or function invocations of a target smart contract

USAGE
  $ clisc query CONTRACT

ARGUMENTS
  CONTRACT  name of the contract to interact with

OPTIONS
  -F, --file=file            path to a JSON file that contains all required parameter for the specific request
  -I, --id=id                jsonrpc request identifier
  -a, --auth=auth            authorization token
  -d, --endTime=endTime      end time from which stop considering event occurrences or function invocations
  -e, --event=event          (required) name of the request's target event
  -f, --filter=filter        C-style boolean expression over function/event parameters
  -h, --help                 show query command help
  -l, --logger               whether enable or not the file logger
  -m, --method=method        (required) name of the request's target function/method

  -p, --path=path            provide a path where the config files are located, if not set, the current directory is
                             used

  -s, --startTime=startTime  start time from which start considering event occurrences or function invocations

  -v, --value=value          target function or event parameter's value, if more than one value is required you can set
                             this flag multiple times (the order is important!)

EXAMPLES
  # Query past invocations of 'Token' contract's 'balanceOf' method
  $ clisc query Token -I abcdefg --method=balanceOf --value=0x23f3ab3
  # Query past occurrences of 'Token' contract's 'Approval' event
  $ clisc query Token -I abcdefg --event=Approval

See code: dist/commands/query.ts

clisc scdl:add CONTRACT

add a new SCDL descriptor in the local directory.

USAGE
  $ clisc scdl:add CONTRACT

ARGUMENTS
  CONTRACT  path to a local SCDL file or a unique identifier inside the online registry

OPTIONS
  -h, --help       show scdl:add command help
  -l, --local      add a new descriptor from a local file path
  -p, --path=path  provide a path where the config files are located, if not set, the current directory is used
  -r, --remote     add a new descriptor from a remote online registry

ALIASES
  $ clisc scdl:add
  $ clisc scdl:load

EXAMPLES
  # add a new descriptor from a local file
  $ clisc scdl:add MyToken.json --local
  # download a descriptor from an online registry
  $ clisc scdl:add 5dfcdad2fd321d00179ede01 --remote

See code: dist/commands/scdl/add.ts

clisc scdl:delete CONTRACT

delete a specific descriptor from the local directory

USAGE
  $ clisc scdl:delete CONTRACT

ARGUMENTS
  CONTRACT  name of the contract's descriptor to delete

OPTIONS
  -h, --help       show scdl:list command help
  -p, --path=path  provide a path where the config files are located, if not set, the current directory is used

ALIASES
  $ clisc scdl:delete
  $ clisc scdl:remove
  $ clisc scdl:del
  $ clisc scdl:rm

EXAMPLES
  # delete a descriptor file named 'ZilliqaToken.json'
  $ clisc scdl:delete ZilliqaToken.json

See code: dist/commands/scdl/delete.ts

clisc scdl:list [KEYWORD]

list saved SCDL smart contract's descriptors

USAGE
  $ clisc scdl:list [KEYWORD]

ARGUMENTS
  KEYWORD  keyword search

OPTIONS
  -e, --extended   display all saved descriptors
  -h, --help       show scdl:list command help
  -m, --max=max    maximum number of descriptors to display
  -p, --path=path  provide a path where the config files are located, if not set, the current directory is used

ALIASES
  $ clisc scdl:list
  $ clisc scdl:ls
  $ clisc scdl:index
  $ clisc scdl:get

EXAMPLES
  # list a default number of saved descriptors
  $ clisc scdl:list
  # list all saved descriptors
  $ clisc scdl:list --extended
  # list a maximum of 5 descriptors
  $ clisc scdl:list --max 5
  # list all descriptors that match the provided keyword
  $ clisc scdl:list Token

See code: dist/commands/scdl/list.ts

clisc subscribe CONTRACT

monitor a target smart contract's function invocations or event occurrences starting from a smart contract's descriptor.

USAGE
  $ clisc subscribe CONTRACT

ARGUMENTS
  CONTRACT  name of the contract to interact with

OPTIONS
  -F, --file=file          path to a JSON file that contains all required parameter for the specific request
  -I, --id=id              jsonrpc request identifier
  -a, --auth=auth          authorization token
  -d, --doc=doc            degree of confidence's value
  -e, --event=event        (required) name of the request's target event
  -f, --filter=filter      C-style boolean expression over function/event parameters
  -h, --help               show subscribe command help
  -i, --corrId=corrId      (required) client-provided correlation identifier
  -m, --method=method      (required) name of the request's target function/method
  -p, --path=path          provide a path where the config files are located, if not set, the current directory is used
  -u, --callback=callback  callback URL to which the gateway will send all asynchronous responses

  -v, --value=value        target function or event parameter's value, if more than one value is required you can set
                           this flag multiple times (the order is important!)

EXAMPLES
  # Subscribe to 'Token' contract's 'balanceOf' method
  $ clisc subscribe Token -I abcdefg --method=balanceOf --value=0x23f3ab3 --callback=http://mydomain.org
  # Subscribe to 'Token' contract's 'Approval' event
  $ clisc subscribe Token -I abcdefg --event=Approval --callback=http://mydomain.org

See code: dist/commands/subscribe.ts

clisc unsubscribe CONTRACT

stop live monitoring of a smart contract's function or event by unsubscribing a previous subscription.

USAGE
  $ clisc unsubscribe CONTRACT

ARGUMENTS
  CONTRACT  name of the contract to interact with

OPTIONS
  -F, --file=file      path to a JSON file that contains all required parameter for the specific request
  -I, --id=id          jsonrpc request identifier
  -a, --auth=auth      authorization token
  -e, --event=event    (required) name of the request's target event
  -h, --help           show unsubscribe command help
  -i, --corrId=corrId  (required) client-provided correlation identifier
  -m, --method=method  (required) name of the request's target function/method
  -p, --path=path      provide a path where the config files are located, if not set, the current directory is used

  -v, --val=val        target function or event parameter's value, if more than one value is required you can set this
                       flag multiple times (the order is important!)

EXAMPLES
  # Unsubscribe a previous subscription to a 'Token' contract's 'balanceOf' method
  $ clisc unsubscribe Token -I abcdefg --method=balanceOf
  # Unsubscribe a previous subscription to a 'Token' contract's 'Approval' event
  $ clisc unsubscribe Token -I abcdefg --event=Approval

See code: dist/commands/unsubscribe.ts