- I wrote a scripts to copy and generate all commands missing in iris from fig repo: https://github.com/withfig/autocomplete - Add a new script to generate commands docs about which commands currently are inside commands folder 377d4aac663590e504fe39a92eb4dac4cbd333b2 - Add more icons e64d4e70a1db61e62053460a882e093bd6373ab1
93 lines
6.1 KiB
Go
93 lines
6.1 KiB
Go
package sys
|
|
|
|
import (
|
|
"github.com/versenilvis/iris/commands/core"
|
|
)
|
|
|
|
func init() {
|
|
core.Register(&core.Spec{
|
|
Name: "starkli",
|
|
Description: "Starkli, a ⚡ blazing ⚡ fast ⚡ CLI tool for Starknet powered by 🦀 starknet-rs 🦀",
|
|
Subcommands: []core.Subcommand{
|
|
{Name: "account", Description: "Account management commands"},
|
|
{Name: "fetch", Description: "Fetch account config from an already deployed account contract"},
|
|
{Name: "ADDRESS", Description: "Contract address"},
|
|
{Name: "deploy", Description: "Deploy account contract with a DeployAccount transaction"},
|
|
{Name: "FILE", Description: "Path to the account config file"},
|
|
{Name: "oz", Description: "Create and manage OpenZeppelin account contracts"},
|
|
{Name: "init", Description: "Create a new account configuration without actually deploying"},
|
|
{Name: "block", Description: "Get Starknet block"},
|
|
{Name: "BLOCK_ID", Description: "Block number, hash, or tag (latest/pending)"},
|
|
{Name: "block-hash", Description: "Get latest block hash"},
|
|
{Name: "block-number", Description: "Get latest block number"},
|
|
{Name: "block-time", Description: "Get Starknet block timestamp only"},
|
|
{Name: "call", Description: "Call contract functions without sending transactions"},
|
|
{Name: "CONTRACT_ADDRESS", Description: "Contract address"},
|
|
{Name: "SELECTOR", Description: "Name of the function being called"},
|
|
{Name: "CALLDATA", Description: "Raw function call arguments"},
|
|
{Name: "chain-id", Description: "Get Starknet network ID"},
|
|
{Name: "class-at", Description: "Get contract class deployed at a certain address"},
|
|
{Name: "class-by-hash", Description: "Get contract class by hash"},
|
|
{Name: "HASH", Description: "Class hash"},
|
|
{Name: "class-hash", Description: "Calculate class hash from any contract artifacts (Sierra, casm, legacy)"},
|
|
{Name: "class-hash-at", Description: "Get contract class hash deployed at a certain address"},
|
|
{Name: "completions", Description: "Generate shell completions script"},
|
|
{Name: "declare", Description: "Declare a contract class"},
|
|
{Name: "CLASS_HASH", Description: "Class hash"},
|
|
{Name: "CTOR_ARGS", Description: "Raw constructor arguments"},
|
|
{Name: "invoke", Description: "Send an invoke transaction from an account contract"},
|
|
{Name: "CALLS", Description: "One or more contract calls. See documentation for more details"},
|
|
{Name: "mont", Description: "Print the montgomery representation of a field element"},
|
|
{Name: "FELT", Description: "Encoded string value in felt, in decimal or hexadecimal representation"},
|
|
{Name: "nonce", Description: "Get nonce for a certain contract"},
|
|
{Name: "parse-cairo-string", Description: "Decode string from felt with the Cairo short string representation"},
|
|
{Name: "selector", Description: "Calculate selector from name"},
|
|
{Name: "NAME", Description: "Selector name"},
|
|
{Name: "signer", Description: "Signer management commands"},
|
|
{Name: "keystore", Description: "Keystore management commands"},
|
|
{Name: "new", Description: "Randomly generate a new keystore"},
|
|
{Name: "from-key", Description: "Create a keystore file from an existing private key"},
|
|
{Name: "inspect", Description: "Check the public key of an existing keystore file"},
|
|
{Name: "inspect-private", Description: "Check the private key of an existing keystore file"},
|
|
{Name: "gen-keypair", Description: "Randomly generate a new key pair"},
|
|
{Name: "state-update", Description: "Get state update from a certain block"},
|
|
{Name: "storage", Description: "Get storage value for a slot at a contract"},
|
|
{Name: "KEY", Description: "Storage key"},
|
|
{Name: "syncing", Description: "Get node syncing status"},
|
|
{Name: "to-cairo-string", Description: "Encode string into felt with the Cairo short string representation"},
|
|
{Name: "TEXT", Description: "Text to be encoded in felt"},
|
|
{Name: "transaction", Description: "Get Starknet transaction by hash"},
|
|
{Name: "transaction-receipt", Description: "Get transaction receipt by hash"},
|
|
},
|
|
Options: []core.Option{
|
|
{Name: "--rpc", Description: "Starknet JSON-RPC endpoint"},
|
|
{Name: "--network", Description: "Starknet network"},
|
|
{Name: "--force", Description: "Overwrite the file if it already exists"},
|
|
{Name: "--output", Description: "Path to save the account config file"},
|
|
{Name: "--log-traffic", Description: "Log raw request/response traffic of providers"},
|
|
{Name: "-h", Description: "Print help"},
|
|
{Name: "--keystore", Description: "Path to keystore JSON file"},
|
|
{Name: "--keystore-password", Description: "Supply keystore password from command line option instead of prompt"},
|
|
{Name: "--private-key", Description: "Private key in hex in plain text"},
|
|
{Name: "--max-fee", Description: "Maximum transaction fee in Ether (18 decimals)"},
|
|
{Name: "--max-fee-raw", Description: "Maximum transaction fee in Wei"},
|
|
{Name: "--estimate-only", Description: "Only estimate transaction fee without sending transaction"},
|
|
{Name: "--full", Description: "Fetch full transactions instead of hashes only"},
|
|
{Name: "--unix", Description: "Show block time in Unix timestamp format"},
|
|
{Name: "--rfc2822", Description: "Show block time in RFC 2822 format"},
|
|
{Name: "--no-decode", Description: "Do not show the decoded text"},
|
|
{Name: "--dec", Description: "Display the decimal instead of hexadecimal representation"},
|
|
{Name: "--compiler-version", Description: "Statically-linked Sierra compiler version"},
|
|
{Name: "--casm-hash", Description: "Override Sierra compilation and use CASM hash directly"},
|
|
{Name: "--account", Description: "Path to account config JSON file"},
|
|
{Name: "--watch", Description: "Wait for the transaction to confirm"},
|
|
{Name: "--not-unique", Description: "Do not derive contract address from deployer address"},
|
|
{Name: "--salt", Description: "Use the given salt to compute contract deploy address"},
|
|
{Name: "--hex", Description: "Emit array elements in hexadecimal format"},
|
|
{Name: "--password", Description: "Supply password from command line option instead of prompt"},
|
|
{Name: "--private-key-stdin", Description: "Take the private key from stdin instead of prompt"},
|
|
{Name: "--raw", Description: "Print the public key only"},
|
|
},
|
|
})
|
|
}
|