The Holograph CLI enables you to interact with Holograph Protocol, in addition to participating as an operator in the Operator Network.
$ npm install -g @holographxyz/cli
$ holograph COMMAND
running command...
$ holograph (--version)
@holographxyz/cli/0.0.12 darwin-arm64 node-v18.9.0
$ holograph --help [COMMAND]
USAGE
$ holograph COMMAND
...
- Overview
- Usage
- Commands
holograph bridge
holograph bridge:contract
holograph bridge:nft
holograph config
holograph config:networks
holograph config:user
holograph config:view
holograph create
holograph create:contract
holograph create:nft
holograph faucet
holograph help [COMMAND]
holograph operator
holograph operator:bond
holograph operator:recover
holograph operator:unbond
holograph status
holograph status:contract
holograph status:nft
- Developing
- Contributing
- Official Links
Make a bridge request.
USAGE
$ holograph bridge [--env mainnet|testnet|develop|experimental]
FLAGS
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
DESCRIPTION
Make a bridge request.
EXAMPLES
Learn how to bridge a Holographable contract
$ holograph bridge:contract --help --env mainnet|testnet|develop|experimental
Learn how to bridge a Holographable NFT
$ holograph bridge:nft --help --env mainnet|testnet|develop|experimental
See code: dist/commands/bridge/index.ts
Bridge a Holographable contract from source chain to destination chain. You need to have a deployment config JSON file. Use the "contract:create" command to create or extract one.
USAGE
$ holograph bridge:contract [--sourceNetwork goerli|mumbai|fuji] [--destinationNetwork
goerli|mumbai|fuji] [--deploymentConfig <value>] [--env mainnet|testnet|develop|experimental]
FLAGS
--deploymentConfig=<value> The config file to use
--destinationNetwork=<option> The network on which the contract will be deployed
<options: goerli|mumbai|fuji>
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--sourceNetwork=<option> The network from which contract deploy request will be sent
<options: goerli|mumbai|fuji>
DESCRIPTION
Bridge a Holographable contract from source chain to destination chain. You need to have a deployment config JSON
file. Use the "contract:create" command to create or extract one.
EXAMPLES
$ holograph bridge:contract --sourceNetwork="goerli" --destinationNetwork="fuji" --deploymentConfig="./MyContract.json" --env mainnet|testnet|develop|experimental
See code: dist/commands/bridge/contract.ts
Bridge a Holographable NFT from one network to another.
USAGE
$ holograph bridge:nft [--collectionAddress <value>] [--tokenId <value>] [--sourceNetwork
goerli|mumbai|fuji] [--destinationNetwork goerli|mumbai|fuji] [--env
mainnet|testnet|develop|experimental]
FLAGS
--collectionAddress=<value> The address of the collection smart contract
--destinationNetwork=<option> The destination network which to bridge to
<options: goerli|mumbai|fuji>
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--sourceNetwork=<option> The source network from which to bridge
<options: goerli|mumbai|fuji>
--tokenId=<value> The token ID of the NFT to bridge
DESCRIPTION
Bridge a Holographable NFT from one network to another.
EXAMPLES
$ holograph bridge:nft --sourceNetwork="goerli" --destinationNetwork="fuji" --collectionAddress="0x1318d3420b0169522eB8F3EF0830aceE700A2eda" --tokenId="0x01" --env mainnet|testnet|develop|experimental
See code: dist/commands/bridge/nft.ts
Initialize the Holograph CLI with a config file. If no flags are passed, the CLI will prompt you for the required information.
USAGE
$ holograph config [--url <value> --network goerli|mumbai|fuji] [--privateKey <value>] [--fromFile
<value>] [--fromJson <value>]
FLAGS
--fromFile=<value> Path to the config file to load
--fromJson=<value> JSON object to use as the config
--network=<option> Network to set
<options: goerli|mumbai|fuji>
--privateKey=<value> Default account to use when sending all transactions
--url=<value> Provider URL of network to set
DESCRIPTION
Initialize the Holograph CLI with a config file. If no flags are passed, the CLI will prompt you for the required
information.
EXAMPLES
$ holograph config --privateKey abc...def
$ holograph config --fromFile ./config.json
$ holograph config --fromJson '{"version": "beta3", ...}
See code: dist/commands/config/index.ts
View the current network config.
USAGE
$ holograph config:networks [--output clean|json|yaml] [--env mainnet|testnet|develop|experimental]
FLAGS
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--output=<option> Output format
<options: clean|json|yaml>
DESCRIPTION
View the current network config.
EXAMPLES
$ holograph config:networks --env mainnet|testnet|develop|experimental
$ holograph config:networks --output json --env mainnet|testnet|develop|experimental
$ holograph config:networks --output yaml --env mainnet|testnet|develop|experimental
$ holograph config:networks --output clean --env mainnet|testnet|develop|experimental
See code: dist/commands/config/networks.ts
View the current user information.
USAGE
$ holograph config:user [--output clean|json|yaml] [--env mainnet|testnet|develop|experimental]
FLAGS
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--output=<option> Output format
<options: clean|json|yaml>
DESCRIPTION
View the current user information.
EXAMPLES
$ holograph config:user --env mainnet|testnet|develop|experimental
$ holograph config:user --output json --env mainnet|testnet|develop|experimental
$ holograph config:user --output yaml --env mainnet|testnet|develop|experimental
$ holograph config:user --output clean --env mainnet|testnet|develop|experimental
See code: dist/commands/config/user.ts
View the current config state of the Holograph CLI.
USAGE
$ holograph config:view [--output clean|json|yaml] [--env mainnet|testnet|develop|experimental]
FLAGS
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--output=<option> Output format
<options: clean|json|yaml>
DESCRIPTION
View the current config state of the Holograph CLI.
EXAMPLES
$ holograph config:view --env mainnet|testnet|develop|experimental
$ holograph config:view --output json --env mainnet|testnet|develop|experimental
$ holograph config:view --output yaml --env mainnet|testnet|develop|experimental
$ holograph config:view --output clean --env mainnet|testnet|develop|experimental
See code: dist/commands/config/view.ts
Create Holographable contracts and NFTs.
USAGE
$ holograph create [--env mainnet|testnet|develop|experimental]
FLAGS
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
DESCRIPTION
Create Holographable contracts and NFTs.
EXAMPLES
$ holograph create --env mainnet|testnet|develop|experimental
$ holograph create:contract --env mainnet|testnet|develop|experimental
$ holograph create:nft --env mainnet|testnet|develop|experimental
See code: dist/commands/create/index.ts
Deploy a Holographable contract.
USAGE
$ holograph create:contract [--tx <value>] [--txNetwork goerli|mumbai|fuji] [--targetNetwork
goerli|mumbai|fuji] [--deploymentType deployedTx|deploymentConfig|createConfig] [--deploymentConfig <value>]
[--env mainnet|testnet|develop|experimental]
FLAGS
--deploymentConfig=<value> The config file to use
--deploymentType=<option> The type of deployment to use
<options: deployedTx|deploymentConfig|createConfig>
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--targetNetwork=<option> The network on which the contract will be executed
<options: goerli|mumbai|fuji>
--tx=<value> The hash of transaction that deployed the original contract
--txNetwork=<option> The network on which the transaction was executed
<options: goerli|mumbai|fuji>
DESCRIPTION
Deploy a Holographable contract.
EXAMPLES
$ holograph create:contract --deploymentType="deployedTx" --tx="0xdb8b393dd18a71b386c8de75b87310c0c8ded0c57cf6b4c5bab52873d54d1e8a" --txNetwork="goerli" --env mainnet|testnet|develop|experimental
See code: dist/commands/create/contract.ts
Mint a Holographable NFT.
USAGE
$ holograph create:nft [--collectionAddress <value>] [--tokenId <value>] [--uriType ipfs|https|arweave]
[--uri <value>] [--network goerli|mumbai|fuji] [--env mainnet|testnet|develop|experimental]
FLAGS
--collectionAddress=<value> The address of the collection smart contract
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--network=<option> Name of network to use
<options: goerli|mumbai|fuji>
--tokenId=<value> [default: 0] The token id to mint. By default the token id is 0, which mints the next
available token id
--uri=<value> The uri of the token, minus the prepend (ie "ipfs://")
--uriType=<option> The token URI type
<options: ipfs|https|arweave>
DESCRIPTION
Mint a Holographable NFT.
EXAMPLES
$ holograph create:nft --network="goerli" --collectionAddress="0xf90c33d5ef88a9d84d4d61f62c913ba192091fe7" --tokenId="0" --uriType="ipfs" --uri="QmfQhPGMAbHL31qcqAEYpSP5gXwXWQa3HZjkNVzZ2mRsRs/metadata.json" --env mainnet|testnet|develop|experimental
See code: dist/commands/create/nft.ts
Request Testnet HLG from a faucet.
USAGE
$ holograph faucet [--network goerli|mumbai|fuji] [--env mainnet|testnet|develop|experimental]
FLAGS
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--network=<option> Name of network to use
<options: goerli|mumbai|fuji>
DESCRIPTION
Request Testnet HLG from a faucet.
EXAMPLES
$ holograph faucet --network="goerli" --env mainnet|testnet|develop|experimental
See code: dist/commands/faucet/index.ts
Display help for holograph.
USAGE
$ holograph help [COMMAND] [-n] [--env mainnet|testnet|develop|experimental]
ARGUMENTS
COMMAND Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
DESCRIPTION
Display help for holograph.
See code: @oclif/plugin-help
Listen for jobs and execute jobs.
USAGE
$ holograph operator [-m listen|manual|auto] [--sync] [--unsafePassword <value>] [--networks
goerli|mumbai|fuji] [--healthCheckPort <value> --healthCheck] [--env mainnet|testnet|develop|experimental]
FLAGS
-m, --mode=<option> The mode in which to run the operator
<options: listen|manual|auto>
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--healthCheck Launch server on http://localhost:6000 to make sure command is still running
--healthCheckPort=<value> This flag allows you to choose what port the health check sever is running on.
--networks=<option>... Space separated list of networks to use
<options: goerli|mumbai|fuji>
--sync Start from last saved block position instead of latest block position
--unsafePassword=<value> Enter the plain text password for the wallet in the holograph cli config
DESCRIPTION
Listen for jobs and execute jobs.
EXAMPLES
$ holograph operator --networks goerli fuji mumbai --mode=auto --sync --env mainnet|testnet|develop|experimental
See code: dist/commands/operator/index.ts
Bond in to a pod.
USAGE
$ holograph operator:bond [--network goerli|mumbai|fuji] [--pod <value>] [--amount <value>] [--env
mainnet|testnet|develop|experimental]
FLAGS
--amount=<value> Amount of tokens to deposit
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--network=<option> Name of network to use
<options: goerli|mumbai|fuji>
--pod=<value> Pod number to join
DESCRIPTION
Bond in to a pod.
EXAMPLES
$ holograph operator:bond --network <string> --pod <number> --amount <number> --env mainnet|testnet|develop|experimental
See code: dist/commands/operator/bond.ts
Attempt to re-run/recover a specific job.
USAGE
$ holograph operator:recover [--host http://localhost:4000] [--network goerli|mumbai|fuji] [--tx <value>] [--healthCheckPort <value>
--healthCheck] [--env mainnet|testnet|develop|experimental]
FLAGS
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--healthCheck Launch server on http://localhost:6000 to make sure command is still running
--healthCheckPort=<value> This flag allows you to choose what port the health check sever is running on.
--network=<option> The network on which the transaction was executed
<options: goerli|mumbai|fuji>
--tx=<value> The hash of transaction that we want to attempt to execute
--host The host to send data to
DESCRIPTION
Attempt to re-run/recover a specific job.
EXAMPLES
$ holograph operator:recover --network="ethereumTestnetGoerli" --tx="0x..." --env mainnet|testnet|develop|experimental
See code: dist/commands/operator/recover.ts
Un-bond an operator from a pod
USAGE
$ holograph operator:unbond [--env mainnet|testnet|develop|experimental]
FLAGS
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
DESCRIPTION
Un-bond an operator from a pod
EXAMPLES
$ holograph operator:unbond --env mainnet|testnet|develop|experimental
See code: dist/commands/operator/unbond.ts
Get the status of a contract or NFT.
USAGE
$ holograph status [--env mainnet|testnet|develop|experimental]
FLAGS
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
DESCRIPTION
Get the status of a contract or NFT.
EXAMPLES
Learn how to get the status of a contract
$ holograph status:contract --help --env mainnet|testnet|develop|experimental
Learn how to get the status of an NFT
$ holograph status:nft --help --env mainnet|testnet|develop|experimental
See code: dist/commands/status/index.ts
Check the status of a contract across all networks defined in the config.
USAGE
$ holograph status:contract [--address <value>] [--output csv|json|yaml|] [--env
mainnet|testnet|develop|experimental]
FLAGS
--address=<value> The address of contract to check status of
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--output=<option> [default: yaml] Define table output type
<options: csv|json|yaml|>
DESCRIPTION
Check the status of a contract across all networks defined in the config.
EXAMPLES
$ holograph status:contract --address="0x5059bf8E4De43ccc0C27ebEc9940e2310E071A78" --env mainnet|testnet|develop|experimental
See code: dist/commands/status/contract.ts
Check the status of an NFT across all networks defined in the config.
USAGE
$ holograph status:nft [--address <value>] [--id <value>] [--output csv|json|yaml|] [--env
mainnet|testnet|develop|experimental]
FLAGS
--address=<value> The address of contract to check status of
--env=<option> [default: testnet] Holograph environment to use
<options: mainnet|testnet|develop|experimental>
--id=<value> Token ID to check
--output=<option> [default: yaml] Define table output type
<options: csv|json|yaml|>
DESCRIPTION
Check the status of an NFT across all networks defined in the config.
EXAMPLES
$ holograph status:nft --address="0x5059bf8E4De43ccc0C27ebEc9940e2310E071A78" --id=1 --env mainnet|testnet|develop|experimental
See code: dist/commands/status/nft.ts
If you want to build the package directly, or if you want to help contribute, please do the following:
The required versions of node
and yarn
are in the .tool-version
file.
- This project uses asdf for language/binary versions management. Install following plugins
- Install asdf Node plugin:
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
- Install asdf yarn plugin:
asdf plugin-add yarn
- Run
asdf install
to get the requirednode
andyarn
version in the .tool-versions file. - Install dependencies with
yarn install
.
Once everything is installed, you can run ./bin/dev COMMAND
and the respective command in the /src/commands
file will be run. For example the command ./bin/dev status:nft
will run the file ./src/commands/status/nft.ts
src
├── abi
│ ├── develop: ABI for development purposes
│ ├── experimental: ABI for breaking changes
│ └── testnet: ABI for public testnets
├── commands
│ ├── bridge: Bridge commands
│ ├── config: Config commands
│ ├── operator: Operator commands
│ └── status: Status command
└── utils: General utility functions
Branch | Status |
---|---|
mainnet | Accepts PRs from testnet or release/x.x.x when we intend to deploy to mainnet. |
testnet | Accepts PRs from develop that are ready to be deployed to testnet. |
develop | Accepts PRs from feature/xyz branches that are experimental or in testing stage. |
experimental | Accepts PRs from feature/xyz |
We generally follow this Git branching model. Please read the linked post if you're planning to make frequent PRs into this repository.
The mainnet
branch contains the code for our latest "stable" mainnet releases.
Updates from mainnet
always come from the testnet
branch.
We only ever update the mainnet
branch when we intend to deploy code that has been tested on testnets to all mainnet networks supported by Holograph protocol.
Our update process takes the form of a PR merging the testnet
branch into the mainnet
branch.
The testnet
branch contains the code that is the latest stable testnet release for all supported testnet networks. This branch is deployed and circulated for beta users of the protocol. Updates are merged in from the develop
branch once they're ready for broad usage.
Our primary development branch is develop
.
develop
contains the most up-to-date software that is being tested via experimental network deployments.
This branch is used for deep internal features experimental
.
experimetnal
contains experimental features.
If you found a bug please create an issue and provide the required information. Please label your issue with the tag "Bug". We will triage the issues and incorporate fixes.
We love that you have ideas! So do we! You can make a ticket in the issues tab and label it as 'enhancement'. You can also join our discord and talk to us directly.
If you do write code and want it integrated in, we ask that you make all PRS into the develop branch. Please review the branch structure section to understand how features make move up the stack.