# wallet\_addEthereumChain

Creates a confirmation asking the user to add the specified chain to the wallet application. The caller must specify a chain ID and some chain metadata. The wallet application may refuse or accept the request. `null` is returned if the chain is added, and an error otherwise. Introduced by [EIP-3085](https://eips.ethereum.org/EIPS/eip-3085).

## Params

```typescript
interface AddEthereumChainParameters {
  chainId: string; // a 0x-prefixed hexadecimal string
  chainName: string; // A human-readable name for the chain.
  rpcUrls: string[]; // One or more URLs pointing to RPC endpoints that can be used to communicate with the chain. At least one item is required, and only the first item is used.
  nativeCurrency: { // Describes the native currency of the chain using the name, symbol, and decimals fields.
    symbol: string; // A human-readable symbol.
    decimals: number; // A non-negative integer.
    name?: string; // A human-readable name.
  },
  blockExplorerUrls?: string[] // One or more URLs pointing to block explorer sites for the chain
}
```

## Example

### Request

```javascript
await window.NEOLineNeoX.request({
  "method": "wallet_addEthereumChain",
  "params": [
    {
      "chainId": "0x1",
      "chainName": "Ethereum LlamaNodes",
      "rpcUrls": ["https://eth.llamarpc.com"],
      "nativeCurrency": {
        "name": "ETH",
        "symbol": "ETH",
        "decimals": 18
      },
      "blockExplorerUrls": ["https://etherscan.io"]
    }
  ]
});
```

### Result

```
"null"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tutorial.neoline.io/reference/json-rpc-api/wallet_addethereumchain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
