> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monad.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Monad Testnet to Wallet

export const AddNetworkButton = ({network}) => {
  const NETWORK_CONFIGS = {
    mainnet: {
      chainId: "0x8F",
      chainName: "Monad Mainnet",
      rpcUrls: ["https://rpc.monad.xyz"],
      blockExplorerUrls: ["https://monadvision.com"],
      nativeCurrency: {
        name: "Monad",
        symbol: "MON",
        decimals: 18
      }
    },
    testnet: {
      chainId: "0x279F",
      chainName: "Monad Testnet",
      rpcUrls: ["https://testnet-rpc.monad.xyz"],
      blockExplorerUrls: ["https://testnet.monadvision.com"],
      nativeCurrency: {
        name: "Monad",
        symbol: "MON",
        decimals: 18
      }
    }
  };
  const config = NETWORK_CONFIGS[network];
  const label = network === "mainnet" ? "Mainnet" : "Testnet";
  const addNetwork = async () => {
    if (typeof window.ethereum === "undefined") {
      alert("No wallet detected. Please install a compatible wallet to continue.");
      return;
    }
    try {
      await window.ethereum.request({
        method: "wallet_addEthereumChain",
        params: [config]
      });
    } catch (error) {
      console.error("Error adding network:", error);
      alert(`Failed to add Monad ${label} to your wallet. Please try again.`);
    }
  };
  return <button onClick={addNetwork} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium border-none cursor-pointer bg-transparent">
      <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />
      <div className="mr-0.5 space-x-2.5 flex items-center">
        <span className="z-10 text-white">Add Monad {label} to Wallet</span>
        <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 rotate-0 overflow-visible text-white/90">
          <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
        </svg>
      </div>
    </button>;
};

export const CopyToClipboard = ({value, children}) => {
  const [copied, setCopied] = useState(false);
  const handleCopy = async () => {
    try {
      await navigator.clipboard.writeText(value);
      setCopied(true);
      setTimeout(() => setCopied(false), 1000);
    } catch {
      const textarea = document.createElement("textarea");
      textarea.value = value;
      textarea.style.position = "fixed";
      textarea.style.opacity = "0";
      document.body.appendChild(textarea);
      textarea.select();
      document.execCommand("copy");
      document.body.removeChild(textarea);
      setCopied(true);
      setTimeout(() => setCopied(false), 1000);
    }
  };
  return <span style={{
    display: "inline",
    whiteSpace: "nowrap"
  }}>
      {children}
      <button onClick={handleCopy} title={copied ? "Copied!" : "Copy to clipboard"} style={{
    background: "none",
    border: "none",
    cursor: "pointer",
    padding: "2px",
    display: "inline-flex",
    alignItems: "center",
    verticalAlign: "middle",
    marginLeft: "4px",
    opacity: copied ? 1 : 0.4,
    transition: "opacity 0.15s"
  }} onMouseEnter={e => {
    if (!copied) e.currentTarget.style.opacity = "0.8";
  }} onMouseLeave={e => {
    if (!copied) e.currentTarget.style.opacity = "0.4";
  }}>
        {copied ? <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#22c55e" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
            <polyline points="20 6 9 17 4 12" />
          </svg> : <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
            <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
          </svg>}
      </button>
    </span>;
};

Follow this quick guide to add Monad Testnet to your wallet.

<Tabs>
  <Tab title="Add Monad Testnet automatically">
    Click the button below to automatically add Monad Testnet to your wallet:

    <AddNetworkButton network="testnet" />
  </Tab>

  <Tab title="Add Monad Testnet manually">
    To manually add Monad Testnet to your wallet, navigate to your wallet's network settings and add a custom network with the following details:

    <div>
      <p><strong>Network Details:</strong></p>

      <ul>
        <li>
          <CopyToClipboard value="https://testnet-rpc.monad.xyz"><strong>RPC URL:</strong> `https://testnet-rpc.monad.xyz`</CopyToClipboard>
        </li>

        <li>
          <CopyToClipboard value="10143"><strong>Chain ID:</strong> `10143`</CopyToClipboard>
        </li>

        <li>
          <CopyToClipboard value="MON"><strong>Currency Symbol:</strong> `MON`</CopyToClipboard>
        </li>

        <li>
          <CopyToClipboard value="https://testnet.monadvision.com"><strong>Block Explorer:</strong> `https://testnet.monadvision.com`</CopyToClipboard>
        </li>
      </ul>
    </div>
  </Tab>
</Tabs>
