bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 56쪽 중 49쪽
://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#1-chaininfo-json)
`--chain.info-json` is a JSON string that contains required information about Xai chain.
```
--chain.info-json=<Xai Chain's chain info>
```
An example of `chain.info-json` is available in the next section.
**2. `chain.name`**[****](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#2-chainname)
`--chain.name` is a mandatory flag that needs to match the chain name used in `--chain.info-json`:
```
--chain.name=<My Xai Chain>
```
**3. AnyTrust chains**[****](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#3-anytrust-chains)
For Anytrust chains, you need to to add the following flags to the command or configuration:
```
--node.data-availability.enable
```
And:
```
--node.data-availability.rest-aggregator.urls=<A list of DAS REST endpoints>
```
Or:
```
--node.data-availability.rest-aggregator.online-url-list=<A url that returns a list of the DAS REST endpoints>
```
### 3. Important ports[](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#3important-ports) <a href="#id-3important-ports" id="id-3important-ports"></a>
| Protocol | Port |
| ----------------- | ------ |
| `RPC`/`http` | `8547` |
| `RPC`/`websocket` | `8548` |
| `Sequencer Feed` | `9642` |
* Please note: the `RPC`/`websocket` protocol requires some ports to be enabled, you can use the following flags:
* `--ws.port=8548`
* `--ws.addr=0.0.0.0`
* `--ws.origins=\*`
### 4. Putting it all together[](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#4-putting-it-all-together) <a href="#id-4-putting-it-all-together" id="id-4-putting-it-all-together"></a>
* When running a Docker image, an external volume should be mounted to persist the database across restarts. The mount point inside the Docker image should be `/home/user/.arbitrum`
* Example:
```
docker run --rm -it -v /some/local/dir/arbitrum:/home/user/.arbitrum -p 0.0.0.0:8547:8547 -p 0.0.0.0:8548:8548 offchainlabs/nitro-node:v2.3.3-6a1c1a7 --parent-chain.connection.url=<Parent chain RPC URL> --chain.id=<XaiChainId> --chain.name=<My Xai Chain> --http.api=net,web3,eth --http.corsdomain=* --http.addr=0.0.0.0 --http.vhosts=* --chain.info-json=<Xai Chain's chain info>
```
* Ensure that `/some/local/dir/arbitrum` already exists otherwise the directory might be created with `root` as owner, and the Docker container won't be able to write to it
* When using the flag `--chain.info-json=<Xai Chain's chain info>`, replace `<Xai Chain's chain info>` with the specific `chain info` JSON string of the Xai chain for which you wish to run the node:
* Example:
```
--chain.info-json="[{\"chain-id\":94692861356,\"parent-chain-id\":421614,\"chain-name\":\"My Xai Chain\",\"chain-config\":{\"chainId\":94692861356,\"homesteadBlock\":0,\"daoForkBlock\":null,\"daoForkSupport\":true,\"eip150Block\":0,\"eip150Hash\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"eip155Block\":0,\"eip158Block\":0,\"byzantiumBlock\":0,\"constantinopleBlock\":0,\"petersburgBlock\":0,\"istanbulBlock\":0,\"muirGlacierBlock\":0,\"berlinBlock\":0,\"londonBlock\":0,\"clique\":{\"period\":0,\"epoch\":0},\"arbitrum\":{\"EnableArbOS\":true,\"AllowDebugPrecompiles\":false,\"DataAvailabilityCommittee\":false,\"InitialArbOSVersion\":10,\"InitialChainOwner\":\"0xAde4000C87923244f0e95b41f0e45aa3C02f1Bb2\",\"GenesisBlockNum\":0}},\"rollup\":{\"bridge\":\"0xde835286442c6446E36992c036EFe261AcD87F6d\",\"inbox\":\"0x0592d3861Ea929B5d108d915c36f64EE69418049\",\"sequencer-inbox\":\"0xf9d77199288f00440Ed0f494Adc0005f362c17b1\",\"rollup\":\"0xF5A42aDA664E7c2dFE9DDa4459B927261BF90E09\",\"validator-utils\":\"0xB11EB62DD2B352886A4530A9106fE427844D515f\",\"validator-wallet-creator\":\"0xEb9885B6c0e117D339F47585cC06a2765AaE2E0b\",\"deployed-at\":1764099}}]"
```
* When shutting down the Docker image, it is important to allow a graceful shutdown so that the current state can be saved to disk. Here is an example of how to do a graceful shutdown of all Docker images currently running
```
docker stop --time=300 $(docker ps -aq)
```
#### Note on permissions[](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#note-on-permissions) <a href="#note-on-permissions" id="note-on-permissions"></a>
* The Docker image is configured to run as non-root `UID 1000`. If you are running Linux or macOS and you are getting permission errors when trying to run the Docker image, run this command to allow all users to update the persistent folders:
```
mkdir /data/arbitrum
chmod -fR 777 /data/arbitrum
```
#### Note on Sequencer feed[](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#note-on-sequencer-feed) <a href="#note-on-sequencer-feed" id="note-on-sequencer-feed"></a>
Nitro nodes can be configured to receive real time ordered transactions from the sequencer feed. If you don't set the feed input url, your node will listen to the parent chain's inbox contract to get the ordered transactions, which will cause your node to be unable to synchronize the latest state.
Set the following configurations to your fullnode to make it can receive the sequencer feed:
```
--node.feed.input.url=<Sequencer feed url>
```
After that, your node can synchronize the latest state from the sequencer feed.
(Chain owners only) In order for a node to read the sequencer feed, the chain's sequencer needs to be configured with the following parameters:
```
--node.feed.output.enable=true --node.feed.output.addr=<Sequencer feed url> --node.feed.output.port=<Sequencer feed port>
```
## Optional parameters[](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#optional-parameters) <a href="#optional-parameters" id="optional-parameters"></a>
We show here a list of the parameters that are most commonly used when running your Xai node. You can also use the flag `--help` for a full comprehensive list of the available parameters.
| Flag | Description |
| ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--execution.rpc.classic-redirect=<RPC>` | Redirects archive requests for pre-nitro blocks to this RPC of an Arbitrum Classic node with archive database. Only for Arbitrum One. |
| `--http.api` | Offered APIs over the HTTP-RPC interface. Default: `net,web3,eth,arb`. Add `debug` for tracing. |
| `--http.corsdomain` | Accepts cross origin requests from these comma-separated domains (browser enforced). |
| `--http.vhosts` | Accepts requests from these comma-separated virtual hostnames (server enforced). Default: `localhost`. Accepts `*`. |
| `--http.addr` | Address to bind RPC to. May require `0.0.0.0` for Docker networking. |
| `--execution.caching.archive` | Retains past block state. For archive nodes. |
| `--node.feed.input.url=<feed address>` | Default: `wss://<chainName>.arbitrum.io/feed`. ⚠️ One feed relay per datacenter is advised. See [feed relay guide](https://docs.arbitrum.io/run-arbitrum-node/sequencer/run-feed-relay). |
| `--execution.forwarding-target=<RPC>` | Defaults to the L2 Sequencer RPC based on provided L1 and L2 chain IDs. |
| `--execution.rpc.evm-timeout` | Default: `5s`. Timeout for `eth_call`. (0 == no timeout). |
| `--execution.rpc.gas-cap` | Default: `50000000`. Gas cap for `eth_call`/`estimateGas`. (0 = no cap). |
| `--execution.rpc.tx-fee-cap` | Default: `1`. Transaction fee cap (in ether) for RPC APIs. (0 = no cap). |
| `--ipc.path` | Filename for IPC socket/pipe within datadir. 🔉 Not supported on macOS. Note the path is within the Docker container. |
| `--init.prune` | Prunes database before starting the node. Can be "full" or "validator". |
| `--init.url="<snapshot file>"` | (Non-Orbit Nitro nodes only) URL to download the genesis database from. Required only for the first startup of an Arbitrum One node. Reference to [snapshots](https://snapshot.arbitrum.foundation/index.html) and [archive node guide](https://docs.arbitrum.io/run-arbitrum-node/more-types/run-archive-node). |
| `--init.download-path="/path/to/dir"` | (Non-Orbit Nitro nodes only) Temporarily saves the downloaded database snapshot. Defaults to `/tmp/`. Used with `--init.url`. |
| `--node.batch-poster.post-4844-blobs` | Boolean. Default: `false`. Used to enable or disable the posting of transaction data using Blobs to L1 Ethereum. If using calldata is more expensive and if the parent chain supports EIP4844 blobs, the batch poster will use blobs when this flag is set to `true`. Can be `true` or `false`. |
| `--node.batch-poster.ignore-blob-price` | Boolean. Default: `false`. If the parent chain supports EIP4844 blobs and `ignore-blob-price` is set to `true`, the batch poster will use EIP4844 blobs even if using calldata is cheaper. Can be `true` or `false`. |
# How to get $XAI
# Centralized Exchanges
## Centralized Exchange (CEX)
Some popular platforms for buying $XAI that provide detailed steps include [Binance](https://www.binance.com/en/how-to-buy/xai-games), [KuCoin](https://www.kucoin.com/how-to-buy/xai) and [MEXC](https://www.mexc.com/how-to-buy/XAI?utm_source=mexc\&utm_medium=tokenifoXAI\&utm_campaign=tokeninfo). It's important to do research and compare fees, security features, and supported currencies before choosing an exchange. Here's a longer list of exchanges where $XAI can be purchased:
* Binance: <https://binance.com>
* Bithumb [https://www.bithumb.com](https://www.bithumb.com/react/)
* Gate.io: <https://gate.io/>
* KuCoin: [https://www.kucoin.com](https://www.kucoin.com/)
* MEXC: <https://www.mexc.com/>
* Bitget: [https://www.bitget.com](https://www.bitget.com/)
* Crypto.com: <https://crypto.com/exchange>
* BingX: <https://www.bingx.com/>
* Bitunix: [https://www.bitunix.com](https://www.bitunix.com/)
This list is not all inclusive and more CEXs may list Xai over time. Please check Coinmarketcap: <https://coinmarketcap.com/currencies/xai-games/> for the latest exchanges that list Xai. It's a best practice that you always check the liquidity and confidence score of any centralized exchange you transact on.
# Decentralized Exchanges
## Decentralized Exchange (DEX)
On Decentralized Exchanges (DEXs), trading works differently compared to traditional centralized exchanges. Here's how trading works on DEXs:
1. No Intermediaries: DEXs operate on blockchain technology, which means there is no central authority or intermediary controlling the exchange. Users directly interact with the smart contracts powering the DEX.
2. Wallet Integration: To trade on a DEX, users need to connect their digital wallets (such as [Uniswap](https://wallet.uniswap.org/)) to the exchange. This allows them to securely manage their funds and interact with the DEX smart contracts.
3. Order Book vs. Automated Market Maker (AMM): There are two common types of DEXs. Some DEXs use an order book model, where buyers and sellers place orders that are matched by the exchange. Other DEXs use an AMM model, where liquidity pools are used to facilitate trades automatically based on predefined algorithms.
Popular DEX's that you can trade $XAI are on:
* Uniswap: <https://app.uniswap.org/explore/tokens/arbitrum/0x4cb9a7ae498cedcbb5eae9f25736ae7d428c9d66>
* Camelot: <https://app.camelot.exchange/>
# Camelot
Camelot is a decentralized exchange (DEX) that enables users to trade tokens, provide liquidity, and participate in the decentralized finance (DeFi) ecosystem. This section provides step-by-step guides on how to buy tokens on Camelot and how to set up a liquidity pool.
**Overview of Camelot**
Camelot is designed to offer a seamless and secure trading experience for users. It provides a range of DeFi functionalities, including token swaps, liquidity provision, and yield farming. By integrating with Camelot, developers on Xai can leverage these capabilities to enhance their projects and offer more value to their users.
**How to Buy Tokens on Camelot**
Follow these steps to buy tokens on Camelot:
1. **Connect Your Wallet:**
* Visit [Camelot Exchange](https://camelot.exchange/).
* Click on the "Connect Wallet" button in the top-right corner.
* Select your preferred wallet (e.g., MetaMask, WalletConnect) and follow the prompts to connect.
2. **Select the Trading Pair:**
* On the Camelot homepage, navigate to the "Swap" section.
* Select the token you want to trade from the dropdown menu in the "From" field.
* Select the token you want to buy from the dropdown menu in the "To" field.
3. **Enter the Trade Amount:**
* Enter the amount of the token you want to trade in the "From" field.
* The corresponding amount of the token you want to buy will automatically be displayed in the "To" field.
4. **Review and Confirm the Trade:**
* Review the details of your trade, including the exchange rate and any fees.
* Click the "Swap" button to initiate the trade.
* Confirm the transaction in your connected wallet.
5. **Transaction Confirmation:**
* Wait for the transaction to be confirmed on the blockchain.
* Once confirmed, the purchased tokens will appear in your wallet.
**Setting Up a Liquidity Pool on Camelot**
Providing liquidity on Camelot allows you to earn rewards from trading fees. Here’s a visual guide on how to set up a liquidity pool:
{% @supademo/embed demoId="cly4554z60cqjmb305mpcm9yx" url="<https://app.supademo.com/demo/cly4554z60cqjmb305mpcm9yx>" %}
1. **Connect Your Wallet:**
* Visit [Camelot Exchange](https://camelot.exchange/).
* Click on the "Connect Wallet" button in the top-right corner.
* Select your preferred wallet and connect it to Camelot.
2. **Navigate to the Liquidity Section:**
* Click on the "Liquidity" tab in the main menu.
3. **Add Liquidity:**
* Click on the "Add Liquidity" button.
* Select the token pair you want to provide liquidity for.
* Enter the amount of each token you want to add to the pool.
* Ensure that you have an equal value of both tokens.
4. **Approve Tokens:**
* Click the "Approve" button for each token to allow Camelot to access your tokens.
* Confirm the approval transactions in your connected wallet.
5. **Supply Liquidity:**
* After approving the tokens, click the "Supply" button.
* Review the details of the liquidity provision, including the pool share and potential earnings.
* Confirm the supply transaction in your connected wallet.
6. **Receive LP Tokens:**
* After the transaction is confirmed, you will receive Liquidity Provider (LP) tokens representing your share in the liquidity pool.
* These LP tokens can be staked to earn additional rewards or withdrawn to retrieve your initial tokens along with any earned fees.
**Additional Resources**
* **Website:** [Camelot Exchange](https://camelot.exchange/)
* **Documentation:** [Camelot Docs](https://docs.camelot.exchange/)
* **Support:** Access support through Camelot’s documentation and community channels for assistance with trading and liquidity provision.
Integrating Camelot into your project on Xai provides robust DeFi functionalities, including token trading and liquidity provision. By following the step-by-step guides provided, developers can easily leverage Camelot's features to enhance their applications and offer more value to their users.
# Developer Tools
# Block Explorers
Block explorers are essential tools for developers and users to interact with and monitor blockchain data. Xai currently supports three robust block explorers: Etherscan, Blockscout and Dora. These explorers provide comprehensive insights into blockchain transactions, smart contracts, and overall network health, ensuring transparency and ease of use for developers building on Xai.
## Xaiscan
**Overview:** Xaiscan is a state-of-the-art block explorer leveraging the Explorer-As-A-Service offering from Etherscan to offer a complete, fully-hosted and fully-managed block explorer solution.
**Key Features:**
* **Block Explorer:** A search engine providing users with simple, easy access to a wealth of blockchain data.
* **API Service:** Block explorer data shared externally, powering dApps and websites in your ecosystem.
* **Analytics:** Tools, charts and dashboards for unearthing insights on your blockchain.
* **Token Info, Labels & Name Tags:** Off-chain metadata providing human context to blockchain hashes.
* **Read & Write Contract Interface:** An independent interface for interacting with smart contracts.
* **Verify Contracts:** Ensure deployed contract code matches those published by projects.
**Getting Started with Xaiscan:**
* **Access xaiscan:** Visit [xaiscan](https://xaiscan.io/) for Xai
* **Search Transactions:** Use the search bar to enter transaction hashes, addresses, or block numbers to retrieve detailed transaction information.
* **Explore Accounts:** Navigate to the accounts section to view balance and transaction history for specific addresses.
* **Interact with Contracts:** Use the contracts tab to view and interact with deployed smart contracts, including reading and writing to contract functions.
## Blockscout
**Overview:** Blockscout is an open-source blockchain explorer that provides detailed information about the Xai blockchain. It allows users to search for and verify transactions, view account balances, explore smart contracts, and more.
**Key Features:**
* **Transaction Search:** Easily search for transactions using transaction hashes, addresses, or block numbers.
* **Account Information:** View detailed information about account balances, transaction history, and token holdings.
* **Smart Contract Interaction:** Explore and interact with deployed smart contracts, including viewing source code and verifying contract details.
* **Network Statistics:** Access real-time data on block production, network health, and more.
**Getting Started with Blockscout:**
* **Access Blockscout:** Visit [Blockscout for Xai](https://explorer.xai-chain.net/)
* **Search Transactions:** Use the search bar to enter transaction hashes, addresses, or block numbers to retrieve detailed transaction information.
* **Explore Accounts:** Navigate to the accounts section to view balance and transaction history for specific addresses.
* **Interact with Contracts:** Use the contracts tab to view and interact with deployed smart contracts, including reading and writing to contract functions.
## Dora
**Overview:** Dora is another powerful block explorer that offers a user-friendly interface and comprehensive blockchain data for the Xai network. It provides insights into transactions, smart contracts, and network interactions, making it a valuable tool for developers and users alike.
**Key Features:**
* **User-Friendly Interface:** Navigate the explorer with ease, thanks to its intuitive design.
* **Detailed Transaction Data:** Access complete transaction details, including gas fees, block confirmations, and status.
* **Smart Contract Analytics:** Explore detailed analytics for smart contracts, including function calls and event logs.
* **Network Interactions:** Monitor network interactions and overall blockchain activity with real-time updates.
**Getting Started with Dora:**
* **Access Dora:** Visit [Dora for Xai](https://www.ondora.xyz/network/xai/interactions)
* **Search Transactions:** Use the search functionality to find transactions by hashes, addresses, or block numbers.
* **Analyze Contracts:** Explore the smart contracts section to view detailed analytics and interact with contract functions.
* **Monitor Network:** Use the network tab to monitor real-time blockchain activity and network health statistics.
#### Choosing the Right Explorer
Xaiscan, Blockscout and Dora offer robust tools and features for exploring the Xai blockchain. Depending on your needs, you may find one expl프로젝트로 돌아가기