cbcli

package
v0.0.0-...-1b15b10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2022 License: LGPL-3.0 Imports: 6 Imported by: 0

README

cb-sol-cli Documentation

This CLI supports on-chain interactions with components of ChainBridge.

Installation

Usage requires the ABI files from the contracts which will be fetched and built from the chainbridge-solidity repo.

$ make rebuild-contracts

Then run

$ make install

and start using cli with

$ chainbridge-celo cli help

Usage

The root command (cb-sol-cli) has some options:

--url <value>                 URL to connect to
--gasLimit <value>            Gas limit for transactions 
--gasPrice <value>            Gas price for transactions 
--networkId <value>	      Network id

The keypair used for interactions can be configured with:

--privateKey <value>           Private key to use

or

--jsonWallet <path>           Encrypted JSON wallet
--jsonWalletPassword <value>  Password for encrypted JSON wallet

There are multiple subcommands provided:

  • deploy: Deploys contracts via RPC
  • bridge: Interactions with the bridge contract such as registering resource IDs and handler addresses
  • admin: Interactions with the bridge contract for administering relayer set, relayer threshold, fees and more.
  • erc20: Interactions with ERC20 contracts and handlers
  • erc721: Interactions with ERC721 contracts and handler

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CLICMD = &cli.Command{
	Name:        "cli",
	Description: "This CLI supports on-chain interactions with components of ChainBridge",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:  "url",
			Value: "ws://localhost:8545",
			Usage: "RPC url of blockchain node",
		},
		&cli.Uint64Flag{
			Name:  "gasLimit",
			Value: 6721975,
			Usage: "gasLimit used in transactions",
		},
		&cli.Uint64Flag{
			Name:  "gasPrice",
			Value: 20000000000,
			Usage: "gasPrice used for transactions",
		},
		&cli.Uint64Flag{
			Name:  "networkID",
			Value: 0,
			Usage: "networkID",
		},
		&cli.StringFlag{
			Name:  "privateKey",
			Value: "",
			Usage: "Private key to use",
		},
		&cli.PathFlag{
			Name:  "jsonWallet",
			Value: "",
			Usage: "Encrypted JSON wallet",
		},
		&cli.StringFlag{
			Name:  "jsonWalletPassword",
			Value: "",
			Usage: "Password for encrypted JSON wallet",
		},
	},
	Subcommands: []*cli.Command{
		deploy.DeployCMD,
		bridge.BridgeCLICMDS,
		admin.AdminCLICMDS,
		erc20.ERC20CLICMDS,
		erc721.ERC721CLICMDS,
	},
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL