RPC

The JSON-RPC endpoint is https://testrpc.dinx.io. The chain ID inherited from ethereum is 1.

Add DINX RPC to MetaMask

You can add the DINX RPC endpoint in two ways: automatically or manually.

  1. Manual Setup via MetaMask:

    • Click on the MetaMask settings and add DINX as your RPC provider.

  2. Automatic Setup via URL:

Below is an example of how to add the DINX RPC programmatically:

try {
  await provider // Or window.ethereum if you don't support EIP-6963.
    .request({
      method: "wallet_switchEthereumChain",
      params: [{ chainId: "0x1" }],
    });
} catch (switchError) {
  // This error code indicates that the chain has not been added to MetaMask.
  if (switchError.code === 4902) {
    try {
      await provider // Or window.ethereum if you don't support EIP-6963.
        .request({
          method: "wallet_addEthereumChain",
          params: [
            {
              chainId: "0x1",
              chainName: "DINX",
              rpcUrls: ["https://testrpc.dinx.io"], // DINX RPC endpoint
            },
          ],
        });
    } catch (addError) {
      // Handle any "add" error.
    }
  }
  // Handle other "switch" errors.
}

Note: This process is just for switching your RPC provider and does not collect any personal information or introduce additional security risks.

Wallet support

Wallet
support
Link

Last updated