Skip to content

Alive24/ccc-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ccc-deploy

A CLI tool for deploying and managing scripts (smart contracts) and relevant operations on the Nervos CKB network based on CCC - CKBers' Codebase and with latest SSRI support.

Quick Start

Begin with installing ccc-deploy globally:

npm install -g ccc-deploy

Try it out and read help anywhere by providing --help flag.

Currently ccc-deploy supports the following features and here's how to use them:

1. Deploy a Pausable UDT script interactively through SSRI.

git clone https://github.com/ckb-devrel/pausable-udt
  • At the root of the pausable-udt repository, run:
ccc-deploy deploy pausable_udt_script --forceNew --privateKey 0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
  • Follow the prompts to finish the deployment.

NOTE: Currently this only supports deploying to testnet. Please refrain from deploying to mainnet before a stable release.

2. Deploy a Generic Contract

Deploy any compiled RISC-V contract binary to CKB blockchain with optional Type ID support for upgradeable contracts.

# Deploy with auto-generated tag and Type ID
ccc-deploy deploy generic-contract ./build/release/my-contract

# Deploy with specific tag for version tracking
ccc-deploy deploy generic-contract ./build/release/my-contract --tag=v1.0.0

# Upgrade existing contract to new version
ccc-deploy deploy generic-contract ./build/release/my-contract-v2 --upgradeFrom=v1.0.0 --tag=v2.0.0

For detailed documentation, run ccc-deploy deploy generic-contract --help

About ccc-deploy

oclif Downloads/week

Additional Info

  1. Only stable release version of ccc-deploy will be published under @ckb-devrel/ccc-deploy(!! NAME NOT DECIDED YET !!). All other versions (including alpha/beta/rc versions) will be published under @alive24/ccc-deploy and the experience is not guaranteed.


The following docs are automatically generated by oclif for the purpose of enumeration. For better experience, please use --help flag to get more information interactively.

Usage

$ npm install -g ccc-deploy
$ ccc-deploy COMMAND
running command...
$ ccc-deploy (--version)
ccc-deploy/0.0.1-0 darwin-arm64 node-v24.3.0
$ ccc-deploy --help [COMMAND]
USAGE
  $ ccc-deploy COMMAND
...

Commands

ccc-deploy deploy generic_contract CONTRACTPATH

Deploy a generic contract to CKB blockchain. Supports any compiled RISC-V contract binary with optional Type ID for upgrades.

USAGE
  $ ccc-deploy deploy generic_contract CONTRACTPATH [--privateKey <value>] [--network testnet|mainnet|devnet] [--typeId]
    [--type <value>] [--lock <value>] [--tag <value>] [--upgradeFrom <value>] [--upgrade]

ARGUMENTS
  CONTRACTPATH  Path to the compiled contract binary

FLAGS
  --lock=<value>         Lock script for the deployed cell (as JSON). Defaults to deployer's lock
  --network=<option>     [default: testnet] Network to deploy to
                         <options: testnet|mainnet|devnet>
  --privateKey=<value>   Private key to sign the deployment transaction. Will use WALLET_PRIVATE_KEY from .env by
                         default.
  --tag=<value>          Deployment tag for tracking and upgrades. Auto-generated if not provided
  --type=<value>         Type script for the deployed cell (as JSON). Overrides --typeId flag
  --typeId               Deploy with Type ID (allows contract upgrades)
  --upgrade              Interactive upgrade mode - select from existing deployments
  --upgradeFrom=<value>  Tag of existing deployment to upgrade from. Requires Type ID

DESCRIPTION
  Deploy a generic contract to CKB blockchain. Supports any compiled RISC-V contract binary with optional Type ID for
  upgrades.

EXAMPLES
  # Deploy a contract with Type ID (upgradeable)

  $ ccc-deploy deploy generic-contract ./build/release/my-contract



  # Deploy without Type ID (non-upgradeable)

  $ ccc-deploy deploy generic-contract ./build/release/my-contract --no-typeId



  # Deploy with specific tag for version tracking

  $ ccc-deploy deploy generic-contract ./build/release/my-contract --tag=v1.0.0



  # Upgrade existing contract from v1.0.0 to v2.0.0

  $ ccc-deploy deploy generic-contract ./build/release/my-contract-v2 --upgradeFrom=v1.0.0 --tag=v2.0.0



  # Interactive upgrade mode - select from existing deployments

  $ ccc-deploy deploy generic-contract ./build/release/my-contract-v2 --upgrade



  # Deploy to mainnet with specific private key

  $ ccc-deploy deploy generic-contract ./build/release/my-contract --network=mainnet --privateKey=0x...



See code: src/commands/deploy/generic_contract.ts

ccc-deploy deploy pausable_udt_script [CONFIGFILE]

Deploy a pausable UDT script interactively. Should be run at a cloned repository of pausable-udt

USAGE
  $ ccc-deploy deploy pausable_udt_script [CONFIGFILE] [--privateKey <value>] [--network testnet|mainnet] [--forceNew]

ARGUMENTS
  CONFIGFILE  path to TOML file. Default to ./config.toml

FLAGS
  --forceNew            Force new deployment even if config.toml already exists.
  --network=<option>    [default: testnet] Network to deploy to. Default to testnet.
                        <options: testnet|mainnet>
  --privateKey=<value>  Use specific private key to sign. Will use MAIN_WALLET_PRIVATE_KEY from .env by default.

DESCRIPTION
  Deploy a pausable UDT script interactively. Should be run at a cloned repository of
  [pausable-udt](https://github.com/ckb-devrel/pausable-udt)

See code: src/commands/deploy/pausable_udt_script.ts

ccc-deploy help [COMMAND]

Display help for ccc-deploy.

USAGE
  $ ccc-deploy help [COMMAND...] [-n]

ARGUMENTS
  COMMAND...  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for ccc-deploy.

See code: @oclif/plugin-help

ccc-deploy plugins

List installed plugins.

USAGE
  $ ccc-deploy plugins [--json] [--core]

FLAGS
  --core  Show core plugins.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  List installed plugins.

EXAMPLES
  $ ccc-deploy plugins

See code: @oclif/plugin-plugins

ccc-deploy plugins add PLUGIN

Installs a plugin into ccc-deploy.

USAGE
  $ ccc-deploy plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]

ARGUMENTS
  PLUGIN...  Plugin to install.

FLAGS
  -f, --force    Force npm to fetch remote resources even if a local copy exists on disk.
  -h, --help     Show CLI help.
  -s, --silent   Silences npm output.
  -v, --verbose  Show verbose npm output.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Installs a plugin into ccc-deploy.

  Uses npm to install plugins.

  Installation of a user-installed plugin will override a core plugin.

  Use the CCC_DEPLOY_NPM_LOG_LEVEL environment variable to set the npm loglevel.
  Use the CCC_DEPLOY_NPM_REGISTRY environment variable to set the npm registry.

ALIASES
  $ ccc-deploy plugins add

EXAMPLES
  Install a plugin from npm registry.

    $ ccc-deploy plugins add myplugin

  Install a plugin from a github url.

    $ ccc-deploy plugins add https://github.com/someuser/someplugin

  Install a plugin from a github slug.

    $ ccc-deploy plugins add someuser/someplugin

ccc-deploy plugins:inspect PLUGIN...

Displays installation properties of a plugin.

USAGE
  $ ccc-deploy plugins inspect PLUGIN...

ARGUMENTS
  PLUGIN...  [default: .] Plugin to inspect.

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Displays installation properties of a plugin.

EXAMPLES
  $ ccc-deploy plugins inspect myplugin

See code: @oclif/plugin-plugins

ccc-deploy plugins install PLUGIN

Installs a plugin into ccc-deploy.

USAGE
  $ ccc-deploy plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]

ARGUMENTS
  PLUGIN...  Plugin to install.

FLAGS
  -f, --force    Force npm to fetch remote resources even if a local copy exists on disk.
  -h, --help     Show CLI help.
  -s, --silent   Silences npm output.
  -v, --verbose  Show verbose npm output.

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Installs a plugin into ccc-deploy.

  Uses npm to install plugins.

  Installation of a user-installed plugin will override a core plugin.

  Use the CCC_DEPLOY_NPM_LOG_LEVEL environment variable to set the npm loglevel.
  Use the CCC_DEPLOY_NPM_REGISTRY environment variable to set the npm registry.

ALIASES
  $ ccc-deploy plugins add

EXAMPLES
  Install a plugin from npm registry.

    $ ccc-deploy plugins install myplugin

  Install a plugin from a github url.

    $ ccc-deploy plugins install https://github.com/someuser/someplugin

  Install a plugin from a github slug.

    $ ccc-deploy plugins install someuser/someplugin

See code: @oclif/plugin-plugins

ccc-deploy plugins link PATH

Links a plugin into the CLI for development.

USAGE
  $ ccc-deploy plugins link PATH [-h] [--install] [-v]

ARGUMENTS
  PATH  [default: .] path to plugin

FLAGS
  -h, --help          Show CLI help.
  -v, --verbose
      --[no-]install  Install dependencies after linking the plugin.

DESCRIPTION
  Links a plugin into the CLI for development.

  Installation of a linked plugin will override a user-installed or core plugin.

  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
  command will override the user-installed or core plugin implementation. This is useful for development work.


EXAMPLES
  $ ccc-deploy plugins link myplugin

See code: @oclif/plugin-plugins

ccc-deploy plugins remove [PLUGIN]

Removes a plugin from the CLI.

USAGE
  $ ccc-deploy plugins remove [PLUGIN...] [-h] [-v]

ARGUMENTS
  PLUGIN...  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ ccc-deploy plugins unlink
  $ ccc-deploy plugins remove

EXAMPLES
  $ ccc-deploy plugins remove myplugin

ccc-deploy plugins reset

Remove all user-installed and linked plugins.

USAGE
  $ ccc-deploy plugins reset [--hard] [--reinstall]

FLAGS
  --hard       Delete node_modules and package manager related files in addition to uninstalling plugins.
  --reinstall  Reinstall all plugins after uninstalling.

See code: @oclif/plugin-plugins

ccc-deploy plugins uninstall [PLUGIN]

Removes a plugin from the CLI.

USAGE
  $ ccc-deploy plugins uninstall [PLUGIN...] [-h] [-v]

ARGUMENTS
  PLUGIN...  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ ccc-deploy plugins unlink
  $ ccc-deploy plugins remove

EXAMPLES
  $ ccc-deploy plugins uninstall myplugin

See code: @oclif/plugin-plugins

ccc-deploy plugins unlink [PLUGIN]

Removes a plugin from the CLI.

USAGE
  $ ccc-deploy plugins unlink [PLUGIN...] [-h] [-v]

ARGUMENTS
  PLUGIN...  plugin to uninstall

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Removes a plugin from the CLI.

ALIASES
  $ ccc-deploy plugins unlink
  $ ccc-deploy plugins remove

EXAMPLES
  $ ccc-deploy plugins unlink myplugin

ccc-deploy plugins update

Update installed plugins.

USAGE
  $ ccc-deploy plugins update [-h] [-v]

FLAGS
  -h, --help     Show CLI help.
  -v, --verbose

DESCRIPTION
  Update installed plugins.

See code: @oclif/plugin-plugins

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •