Skip to main content

chain

chain

Display information about the currently configured blockchain.

derand chain

chain add

Add a new blockchain configuration to the system.

Flags

ParameterTypeMeaningDefault
--namestringChain name""
--chain-idintChain ID0
--symbolstringChain native coin symbol""
--rpc[]stringHTTP/HTTPS RPC URLs[]
--ws-rpc[]stringWebSocket RPC URLs[]
--derandstringDeRand smart contract address""
--derand-txstringDeRand contract deployment transaction""
--hash-to-prime-128stringHashToPrime128 contract address""
--hash-to-prime-128-txstringHashToPrime128 contract deployment transaction""

Example

derand chain add --name "Sepolia" --chain-id 11155111 --symbol "ETH" \
--rpc "https://sepolia.infura.io/v3/YOUR_KEY" \
--derand 0x... --derand-tx 0x... --hash-to-prime-128 0x... --hash-to-prime-128-tx 0x...

chain add-contract

Add or update DeRand contract addresses for the current chain.

Flags

ParameterTypeMeaningDefault
--derandstringDeRand smart contract address""
--derand-txstringDeRand contract deployment transaction""
--derand-treasury-addressstringDeRand treasury address""
--derand-treasury-targetstringDeRand treasury target"0"
--hash-to-prime-128stringHashToPrime128 contract address""
--hash-to-prime-128-txstringHashToPrime128 contract deployment transaction""

Example

derand chain add-contract --derand 0x... --hash-to-prime-128 "0x..."

chain add-rpc

Add new RPC endpoints to the current chain configuration.

Flags

ParameterTypeMeaningDefault
--httpstringHTTP/HTTPS RPC endpoint""
--wsstringWebSocket RPC endpoint""

Example

derand chain add-rpc --http "https://rpc.example.com" --ws "wss://rpc.example.com"

chain delete

Delete the target chain configuration by index.

derand chain delete <index>

Example

derand chain delete 1

chain ls

List all configured chains.

derand chain ls

Example

derand chain ls

chain remove-contract

Remove a HashToPrime128 contract from the current chain configuration.

Flags

ParameterTypeMeaningDefault
--hash-to-prime-128-indexintIndex of HashToPrime128 contract to remove-1

Example

derand chain remove-contract --hash-to-prime-128-index 0

chain remove-rpc

Remove an RPC endpoint from the current chain configuration.

Flags

ParameterTypeMeaningDefault
--httpintIndex of HTTP/HTTPS RPC endpoint to remove-1
--wsintIndex of WebSocket RPC endpoint to remove-1

Example

derand chain remove-rpc --http 0

chain switch

Switch to a different configured chain by index.

derand chain switch <index>

Example

derand chain switch 1