{"id":19460108,"url":"https://github.com/offchainlabs/orbit-cli-tools","last_synced_at":"2025-08-02T08:03:58.628Z","repository":{"id":258585128,"uuid":"856331192","full_name":"OffchainLabs/orbit-cli-tools","owner":"OffchainLabs","description":"CLI tools to work with Orbit chains","archived":false,"fork":false,"pushed_at":"2024-11-21T13:44:25.000Z","size":129,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-07-21T12:35:25.836Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OffchainLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-12T11:59:21.000Z","updated_at":"2024-11-21T13:44:29.000Z","dependencies_parsed_at":"2024-11-21T14:38:17.917Z","dependency_job_id":null,"html_url":"https://github.com/OffchainLabs/orbit-cli-tools","commit_stats":null,"previous_names":["offchainlabs/orbit-cli-tools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OffchainLabs/orbit-cli-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OffchainLabs%2Forbit-cli-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OffchainLabs%2Forbit-cli-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OffchainLabs%2Forbit-cli-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OffchainLabs%2Forbit-cli-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OffchainLabs","download_url":"https://codeload.github.com/OffchainLabs/orbit-cli-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OffchainLabs%2Forbit-cli-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268350994,"owners_count":24236328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T17:35:37.920Z","updated_at":"2025-08-02T08:03:58.607Z","avatar_url":"https://github.com/OffchainLabs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Orbit CLI tools\n\nCLI tools to work with Orbit chains\n\nAvailable tools:\n\n- Find chains\n- Fetch chain information\n- Get chain\n- Calculate chains value\n- Get chains' client version\n- Get chain's fee information\n- Find cross-chain messages\n\n## Find chains\n\nThis tool searches new orbit chains that have been deployed on the specified parent chain. It does so by searching for `RollupInitialized` events, which are usually emitted by RollupCreator contracts whenever a new chain is created.\n\nOnce a chain has been found, it returns the following information:\n\n- chain id\n- hash of the transaction where the chain was created\n- block where the chain was created\n- rollup address\n- sequencerInbox address\n\nUsage:\n\n```shell\nyarn findChains --parentChainId \u003cchainId\u003e\n```\n\nAvailable options:\n\n- `--parentChainId` (required): id of the parent chain (it must be supported by the orbit SDK)\n- `--fromBlock` and `--toBlock`: blocks to limit the search range\n- `--parentChainRpc`: rpc to use (by default, the script will use the rpc provided by viem)\n- `--saveChainsInformation`: saves the information of the chain to the `orbit-chains.json` file (notice that information like the block explorer URL or the orbit chain RPC can't be found this way and won't be saved)\n\nExample:\n\n```shell\nyarn findChains --parentChainId 42161 --fromBlock 244716654\n```\n\n## Fetch chain information\n\nThis tool fetches the following information from an orbit chain:\n\n- chain id\n- core contracts\n- token bridge contracts\n\nAdditionally, this tool can save this information in a local json file `orbit-chains.json` (name by default).\n\nUsage:\n\n```shell\nyarn fetchChainInformation --rollup \u003crollup address\u003e --parentChainId \u003cparent chain id\u003e\n```\n\nAvailable options:\n\n- `--rollup` (required): address of the rollup contract\n- `--parentChainId` (required): id of the parent chain (it must be supported by the orbit SDK)\n- `--parentChainRpc`: parent chain RPC to use (by default, the script will use the RPC provided by viem)\n- `--rpc`: RPC of the orbit chain, it will be used to extract the chain id, and optionally to save it to the local JSON file\n- `--tokenBridgeCreator`: address of the TokenBridgeCreator contract used to create the token bridge of the chain (by default, the script will use the one set in the Orbit SDK)\n- `--saveChainInformation`: whether or not to save the information found in the local JSON file (if the chain id exists, it will not save the information) (by default, the script won't save the information)\n- `--updateInformation`: whether or not to update the information found in the local JSON file, even if the chain id already exists there. It must be used with `--saveChainInformation`.\n\nExample:\n\n```shell\nyarn fetchChainInformation --rollup 0xC47DacFbAa80Bd9D8112F4e8069482c2A3221336 --parentChainId 42161 --rpc https://xai-chain.net/rpc --saveChainInformation\n```\n\n## Get chain\n\nReturns the information of a chain that exists in the local JSON file.\n\nUsage:\n\n```shell\nyarn getChain --id \u003cchain id\u003e --rpc \u003cchain RPC\u003e --rollup \u003crollup address\u003e\n```\n\nAll parameters are optional, but at least one must be used.\n\n## Calculate chains value\n\nCalculates the following information of all the chains that exist in the `orbit-chains.json` file:\n\n- TVL of the chain: calculated as the amount of native tokens locked in the Bridge contract\n- Last block number reported by the sequencer\n\nThe TVL is calculated in both native token assets and USD. The USD value is obtained by calling Coingecko's API, so a DEMO api key is required for it to work. Otherwise, 0 USD will be returned.\n\nThe scripts yields the information of all chains in a table format, ordered by the amount of USD locked in the Bridge contract.\n\nAvailable options:\n\n- `--sortByActivity`: orders the information by last block number reported, instead of TVL\n- `--showFullTable`: shows all the information obtained (might not fit smaller screens)\n\nExample:\n\n```shell\nyarn calculateChainsValue\n```\n\n## Get chains' client version\n\nCalculates the following information of all the chains that exist in the `orbit-chains.json` file:\n\n- Client version run by the RPC\n- Last block number reported by the RPC\n\nThe scripts yields the information of all chains in a table format.\n\nAvailable options:\n\n- `--sortByClientVersion`: orders the information by the RPC's client version\n- `--sortByLastBlockDate`: orders the information by last block number reported by the RPC\n- `--showFullTable`: shows all the information obtained (might not fit smaller screens)\n\nExample:\n\n```shell\nyarn getChainsClientVersion\n```\n\n## Get chain's fee information\n\nCalculates the following information of the specified chain:\n\n- Batch poster address\n- Parent chain base fee collector address\n- Current estimated parent chain base fee\n- Parent chain surplus fee collector address\n- Parent chain surplus fee rate\n- Orbit chain base fee collector address\n- Minimum chain base fee\n- Orbit chain surplus fee collector address\n- Current chain surplus fee\n\nThe options available are the same as for the \"Get chain\" script.\n\nExample:\n\n```shell\nyarn getChainFeesInformation --id \u003cchain id\u003e --rpc \u003cchain RPC\u003e --rollup \u003crollup address\u003e\n```\n\n## Find cross-chain messages\n\nFinds all cross-chain messages created from a transaction on the parent chain. It shows the following information about them:\n\n- Parent chain transaction hash\n- Depost transaction on the orbit chain (if it's a deposit)\n- SubmitRetryable transaction (if it's a retryable ticket)\n- Retryable execution transaction (if it's a retryable ticket that was auto-redeemed)\n\nAvailable options:\n\n- One of `--id`, `--rpc`, `--rollup`: to find the chain in the `orbit-chains.json` file, just like in the \"Get chain\" script\n- `--transactionHash`: hash of the transaction on the parent chain, that potentially created the cross-chain messages\n\nExample:\n\n```shell\nyarn findCrosschainMessages --id \u003cchain id\u003e --rpc \u003cchain RPC\u003e --rollup \u003crollup address\u003e --transactionHash \u003ctransaction on parent chain\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffchainlabs%2Forbit-cli-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foffchainlabs%2Forbit-cli-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foffchainlabs%2Forbit-cli-tools/lists"}