bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 56쪽 중 12쪽
ETH needs to be wrapped at all, check out this [article](https://ethereum.org/en/wrapped-eth/#why-do-we-need-to-wrap-eth).
{% endhint %}
1. Go to <https://bridge.arbitrum.io/?destinationChain=xai&sourceChain=arbitrum-one>
2. Click XAI in the currency dropdown.
3. Type in WETH.
{% hint style="info" %}
These are the two WETH contracts depending on the chain:
* WETH on Xai: 0xbee82cfdaff4a6aa4e4793cb81eb1c2e79ac463c
* WETH on Arb: 0x82af49447d8a07e3bd95bd0d56f35241523fbab1
{% endhint %}
4. Enter an amount to bridge.
5. Click "Move funds to Xai"
6. Wait at least 10 minutes for the bridging process to complete.
<figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FwRwNVO4fQWxCVU1dLstM%2FScreenshot%202024-06-18%20at%207.48.49%E2%80%AFAM.png?alt=media&token=06781767-a232-473f-98c7-019e2b414143" alt="" width="375"><figcaption><p>Arbitrum Bridge to move XAI into Xai mainnet</p></figcaption></figure>
## Wrap ETH to get WETH on Arbitrum
1. Go to <https://app.camelot.exchange/>
2. Connect your wallet on the top right
3. Select To currency as WETH
4. Click Wrap
<figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FEA224UWcYvsXj0MBFOnh%2FScreenshot%202024-06-18%20at%204.31.26%E2%80%AFPM.png?alt=media&token=21321a1f-875c-4710-a43a-d7aeedae2ed0" alt="" width="375"><figcaption><p>Camelot DEX UI to wrap ETH</p></figcaption></figure>
# Connect to Xai Testnet (Sepolia)
Follow the steps below to connect to the Xai Testnet as a developer
***
### Chain Details
* Chain Type: AnyTrust
* Network Name: Xai Testnet v2
* RPC URL: <https://testnet-v2.xai-chain.net/rpc>
* Chain ID: 37714555429
* Currency Symbol: sXAI
* Block Explorer URL: <https://sepolia.xaiscan.io/>
Arb Sepolia Addresses:
* Batch poster: 0xd154C1532449D65eda18a7Ad36a122e2ecF2B891 
* Validator: 0x4eE5549E6d77Db5529EbE0b8e8Fe9f833aca2ED2 
* Custom fee token: 0x4e6f41acbfa8eb4a3b25e151834d9a14b49b69d2 
* Owner: 0x71B61c2E250AFa05dFc36304D6c91501bE0965D8
If you need Testnet XAI let us know on our Discord.
# Bridge to Xai Testnet
You can bridge Sepolia XAI (sXAI) to Xai Testnet from Arbitrum Sepolia using the steps below:
1. Go to <https://bridge.arbitrum.io/?destinationChain=xai-testnet&sourceChain=arbitrum-sepolia>
2. Depending on the direction of the bridge (Xai -> Arb **or** Arb -> Xai), click the up/down arrow button.
3. Enter the amount of SXAI you want to bridge.
<figure><img src="https://2248955668-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhE4weeNpCJSNUXnecN1R%2Fuploads%2FVfyQlB1MqKaveKT2qqyM%2Fimage.png?alt=media&token=172efdfa-5eae-41dd-b40b-5ec00c634f69" alt="" width="375"><figcaption></figcaption></figure>
4. Click "Move funds to Xai Testnet"
5. Wait at least 10 minutes for the bridging process to complete.
{% hint style="info" %}
If this is your first time connecting your wallet to Xai testnet, you must add Xai testnet manually using [this information](/xai-network/build-on-xai/xai-chains-and-parameters/connect-to-xai-testnet-sepolia).
{% endhint %}
# Bridged Token Addresses
Various ERC-20 tokens originally deployed to Ethereum also have corresponding "bridged" representations on Xai Mainnet.
{% hint style="info" %}
The presence of a token on this page does not imply any endorsement of the token or its minter
{% endhint %}
## Xai Mainnet
| Name | Symbol | L2 Token (ArbOne) | L3 Token (Xai) |
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
| XAI | XAI | [0x4cb9a7ae498cedcbb5eae9f25736ae7d428c9d66](https://arbiscan.io/token/0x4cb9a7ae498cedcbb5eae9f25736ae7d428c9d66) | Native token |
| Wrapped XAI | wXAI | N/A | [0x3fB787101DC6Be47cfe18aeEe15404dcC842e6AF](https://xaiscan.io/address/0x3fB787101DC6Be47cfe18aeEe15404dcC842e6AF) |
| esXAI | esXAI | [0x4C749d097832DE2FEcc989ce18fDc5f1BD76700c](https://arbiscan.io/token/0x4C749d097832DE2FEcc989ce18fDc5f1BD76700c) | |
| USD Coin | USDC | [0xaf88d065e77c8cc2239327c5edb3a432268e5831](https://arbiscan.io/token/0xaf88d065e77c8cc2239327c5edb3a432268e5831) | [0x1E3769Bd5fB2e9e9e7D4ED8667c947661F9A82E3](https://xaiscan.io/address/0x1E3769Bd5fB2e9e9e7D4ED8667c947661F9A82E3) |
| Wrapped Ether | wETH | [0x82af49447d8a07e3bd95bd0d56f35241523fbab1](https://arbiscan.io/token/0x82af49447d8a07e3bd95bd0d56f35241523fbab1) | [0xBeE82CfdAff4a6AA4E4793cb81eb1C2E79aC463C](https://xaiscan.io/address/0xBeE82CfdAff4a6AA4E4793cb81eb1C2E79aC463C) |
# Contract Addresses
The following information may be useful to those building on Xai. We list the addresses of the smart contracts related to the protocol.
## Core contracts
The following contracts are deployed on Arbitrum One (L2)
<table><thead><tr><th width="272"></th><th>Xai</th><th data-hidden>Sepolia</th></tr></thead><tbody><tr><td>Rollup</td><td><a href="https://arbiscan.io/address/0xC47DacFbAa80Bd9D8112F4e8069482c2A3221336"><code>0xC47DacFbAa80Bd9D8112F4e8069482c2A3221336</code></a></td><td></td></tr><tr><td>Sequencer</td><td><a href="https://arbiscan.io/address/0x995a9d3ca121D48d21087eDE20bc8acb2398c8B1"><code>0x995a9d3ca121D48d21087eDE20bc8acb2398c8B1</code></a></td><td></td></tr><tr><td>CoreProxyAdmin</td><td><a href="https://arbiscan.io/address/0x041f85dd87c46b941dc9b15c6628b19ee5358485#code"><code>0x041F85dD87c46B941dc9b15c6628B19ee5358485</code></a></td><td></td></tr></tbody></table>
## Cross-chain messaging contracts
The following contracts are deployed on Arbitrum One (L2)
<table><thead><tr><th width="208"></th><th>Xai</th></tr></thead><tbody><tr><td>Delayed Inbox</td><td><a href="https://arbiscan.io/address/0xaE21fDA3de92dE2FDAF606233b2863782Ba046F9"><code>0xaE21fDA3de92dE2FDAF606233b2863782Ba046F9</code></a></td></tr><tr><td>Bridge</td><td><a href="https://arbiscan.io/address/0x7dd8A76bdAeBE3BBBaCD7Aa87f1D4FDa1E60f94f"><code>0x7dd8A76bdAeBE3BBBaCD7Aa87f1D4FDa1E60f94f</code></a></td></tr><tr><td>Outbox</td><td><a href="https://arbiscan.io/address/0x7dd8A76bdAeBE3BBBaCD7Aa87f1D4FDa1E60f94f"><code>0x1E400568AD4840dbE50FB32f306B842e9ddeF726</code></a></td></tr><tr><td>Challenge Manager</td><td><a href="https://arbiscan.io/address/0x3a3f62034a42a35eA1686B199bB73006aa525eE4"><code>0x3a3f62034a42a35eA1686B199bB73006aa525eE4</code></a></td></tr></tbody></table>
# How to run a full node for Xai chain
{% hint style="info" %}
Note: For steps on how to run a Xai Sentry Node (unrelated to running a full node for Xai chain), go [here](/xai-network/about-xai/sentry-key-setup).
{% endhint %}
This how-to provides step-by-step instructions for running a full Xai node on your local machine.
## Prerequisites[](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#prerequisites) <a href="#prerequisites" id="prerequisites"></a>
Latest Docker Image: `offchainlabs/nitro-node:v2.3.3-6a1c1a7`
| Minimum Hardware Configuration |
| ------------------------------ |
| **RAM**: 16 GB |
| **CPU**: 4 core CPU |
| **Storage**: 1 TB |
## Required parameters[](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#required-parameters) <a href="#required-parameters" id="required-parameters"></a>
### 1. Parent chain parameters[](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#1-parent-chain-parameters) <a href="#id-1-parent-chain-parameters" id="id-1-parent-chain-parameters"></a>
The `parent-chain` argument needs to provide a standard RPC endpoint for an EVM node, whether self-hosted or obtained from a node service provider:
```
--parent-chain.connection.url=<Parent chain RPC URL>
```
NOTE
[Public Xai RPC endpoints](/xai-network/build-on-xai/developer-tools/rpc) rate-limit connections. To avoid hitting a bottleneck, you can run a local node for the parent chain (Arbitrum) or rely on third-party RPC providers.
### 2. Child chain parameters[](https://docs.arbitrum.io/node-running/how-tos/running-an-orbit-node#2-child-chain-parameters) <a href="#id-2-child-chain-parameters" id="id-2-child-chain-parameters"></a>
Xai is the child chain and the required parameters are `chain.info-json` and `chain.name`
**1. `chain.info-json`**[****](https://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프로젝트로 돌아가기