Network
Networks & RPC

GOAT Networks and Public RPC Endpoints

This reference guide provides configuration details for connecting to both GOAT Testnet3 and Alpha Mainnet. Ensure you have the correct settings for your development environment or wallet to interact seamlessly with the GOAT Network.

Need testnet BTC? Visit the GOAT Testnet3 Faucet (opens in a new tab) to get started.

Get Connected

MetaMask Configuration

You can add both Testnet3 and Alpha Mainnet to MetaMask programmatically using the following code snippets.

Add GOAT Testnet3 to MetaMask

async function addGoatTestnet3() {
  try {
    await window.ethereum.request({
      method: 'wallet_addEthereumChain',
      params: [{
        chainId: '0xBEB0', // 48816 in hexadecimal
        chainName: 'GOAT Testnet3',
        nativeCurrency: {
          name: 'Bitcoin',
          symbol: 'BTC',
          decimals: 18
        },
        rpcUrls: ['https://rpc.testnet3.goat.network'],
        blockExplorerUrls: ['https://explorer.testnet3.goat.network']
      }]
    });
    console.log('GOAT Testnet3 successfully added to MetaMask!');
  } catch (error) {
    console.error('Failed to add GOAT Testnet3:', error);
  }
}

Add GOAT Alpha Mainnet to MetaMask

async function addGoatAlphaMainnet() {
  try {
    await window.ethereum.request({
      method: 'wallet_addEthereumChain',
      params: [{
        chainId: '0x929', // 2345 in hexadecimal
        chainName: 'GOAT Network Alpha Mainnet',
        nativeCurrency: {
          name: 'Bitcoin',
          symbol: 'BTC',
          decimals: 18
        },
        rpcUrls: ['https://rpc.goat.network'],
        blockExplorerUrls: ['https://explorer.goat.network']
      }]
    });
    console.log('GOAT Alpha Mainnet successfully added to MetaMask!');
  } catch (error) {
    console.error('Failed to add GOAT Alpha Mainnet:', error);
  }
}

JavaScript (ethers.js v6)

Below are the configurations for both Testnet3 and Alpha Mainnet using ethers.js v6.

Testnet3 Configuration

const testnet3Network = {
  name: 'GOAT Testnet3',
  chainId: 48816,
  network: 'goat-testnet3',
  rpc: 'https://rpc.testnet3.goat.network',
  explorer: 'https://explorer.testnet3.goat.network'
};

// Initialize provider for Testnet3
const providerTestnet3 = new ethers.JsonRpcProvider(testnet3Network.rpc);

Alpha Mainnet Configuration

const alphaMainnet = {
  name: 'GOAT Network Alpha Mainnet',
  chainId: 2345,
  network: 'goat-alpha-mainnet',
  rpc: 'https://rpc.goat.network',
  explorer: 'https://explorer.goat.network'
};

// Initialize provider for Alpha Mainnet
const providerAlpha = new ethers.JsonRpcProvider(alphaMainnet.rpc);

Python (web3.py)

Configure web3.py for both Testnet3 and Alpha Mainnet.

Testnet3 Configuration

from web3 import Web3

testnet3_rpc = 'https://rpc.testnet3.goat.network'
web3_testnet3 = Web3(Web3.HTTPProvider(testnet3_rpc))

if web3_testnet3.isConnected():
    print("Connected to GOAT Testnet3")
else:
    print("Failed to connect to GOAT Testnet3")

Alpha Mainnet Configuration

from web3 import Web3

alpha_rpc = 'https://rpc.goat.network'
web3_alpha = Web3(Web3.HTTPProvider(alpha_rpc))

if web3_alpha.isConnected():
    print("Connected to GOAT Alpha Mainnet")
else:
    print("Failed to connect to GOAT Alpha Mainnet")

Wallet Connection (MetaMask)

Provide the JSON configuration for both networks when adding them to MetaMask manually.

Testnet3 Configuration

{
  "chainId": "0xBEB0", // 48816 in hexadecimal
  "chainName": "GOAT Testnet3",
  "nativeCurrency": {
    "name": "Bitcoin",
    "symbol": "BTC",
    "decimals": 18
  },
  "rpcUrls": ["https://rpc.testnet3.goat.network"],
  "blockExplorerUrls": ["https://explorer.testnet3.goat.network"]
}

Alpha Mainnet Configuration

{
  "chainId": "0x929", // 2345 in hexadecimal
  "chainName": "GOAT Network Alpha Mainnet",
  "nativeCurrency": {
    "name": "Bitcoin",
    "symbol": "BTC",
    "decimals": 18
  },
  "rpcUrls": ["https://rpc.goat.network"],
  "blockExplorerUrls": ["https://explorer.goat.network"]
}

Hardhat Configuration (Solidity Development)

Update your Hardhat configuration to support both Testnet3 and Alpha Mainnet.

require('@nomiclabs/hardhat-ethers');

module.exports = {
  defaultNetwork: 'testnet3',
  networks: {
    testnet3: {
      url: 'https://rpc.testnet3.goat.network',
      chainId: 48816,
      accounts: ['YOUR_PRIVATE_KEY'],
    },
    alphaMainnet: {
      url: 'https://rpc.goat.network',
      chainId: 2345,
      accounts: ['YOUR_PRIVATE_KEY'],
    },
  },
  solidity: {
    version: '0.8.0',
  },
};

Usage Example with ethers.js

Demonstrate how to interact with both Testnet3 and Alpha Mainnet using ethers.js.

Testnet3 Example

import { ethers } from 'ethers';

const providerTestnet3 = new ethers.JsonRpcProvider('https://rpc.testnet3.goat.network');

async function getBlockNumberTestnet3() {
  const blockNumber = await providerTestnet3.getBlockNumber();
  console.log('Current block number on Testnet3:', blockNumber);
}

getBlockNumberTestnet3();

Alpha Mainnet Example

import { ethers } from 'ethers';

const providerAlpha = new ethers.JsonRpcProvider('https://rpc.goat.network');

async function getBlockNumberAlpha() {
  const blockNumber = await providerAlpha.getBlockNumber();
  console.log('Current block number on Alpha Mainnet:', blockNumber);
}

getBlockNumberAlpha();

GOAT Network Configurations

Alpha Mainnet

ParameterValue
Network NameGOAT Network
Chain ID0x929 (2345)
Currency SymbolBTC
Currency Decimals18
RPC URLhttps://rpc.goat.network
RPC Backuphttps://rpc.ankr.com/goat_mainnet
Block Explorer URLhttps://explorer.goat.network
Bridge Interfacehttps://bridge.goat.network
LayerL2
StackEthereum (Arbitrum/Optimism/zksync)
GistReleases (opens in a new tab)

Testnet3

ParameterValue
Network NameGOAT Testnet3
Chain ID0xBEB0 (48816)
Currency SymbolBTC
Currency Decimals18
RPC URLhttps://rpc.testnet3.goat.network
Block Explorer URLhttps://explorer.testnet3.goat.network
Bridge Interfacehttps://bridge.testnet3.goat.network
GistReleases (opens in a new tab)

Deprecated Testnet

ParameterValue
Network NameGOAT Testnet
Chain ID48818
RPC URL(Deprecated)
Block Explorer URL(Deprecated)
⚠️

The previous Testnet (Chain ID: 48818) is deprecated and no longer supported. Please migrate to Testnet3 for the latest features and support.

The public RPC endpoints are rate-limited. For production applications, consider using a dedicated node or professional RPC provider.

GOAT Mainnet

Alpha Mainnet is Live!
GOAT Network Alpha Mainnet is now available. See the configuration details above and visit our Bridge Interface (opens in a new tab) to get started.

For mainnet contract addresses and integrations, visit our Contracts Reference.

Alpha Mainnet Core Protocol Contracts

Pre-Deployed Contracts

Contract NameAddressDescription
WGBTC (Wrapped GOAT Bitcoin)0xbC10000000000000000000000000000000000000 (opens in a new tab)Native wrapped Bitcoin token
Multicall30xcA11bde05977b3631167028862bE2a173976CA11 (opens in a new tab)Multicall aggregator
Permit20x000000000022D473030F116dDEE9F6B43aC78BA3 (opens in a new tab)Gasless approvals
Bridge0xBC10000000000000000000000000000000000003 (opens in a new tab)Cross-chain bridge
Locking0xbC10000000000000000000000000000000000004 (opens in a new tab)Token locking mechanism
GOAT Token0xbC10000000000000000000000000000000000001 (opens in a new tab)Native utility token

For the latest updates and detailed documentation, visit our official documentation (opens in a new tab).

Make sure your wallet is connected to the correct network when interacting with the GOAT Network Bridge to avoid any loss of funds.