Chain

Description

The chain object defines chains in a format supported by the Metafi SDK.

Structure

Field NameTypeDescription

name

String

Name of the chain, eg. "Ethereum mainnet"

currencySymbol

String

Symbol of the native currency of the chain, eg. "ETH"

isTestnet

boolean

Whether or not the chain is a testnet

blockExplorerURL

String

Link to the chain block explorer

chainKey

String

Key for the chain in the chains object that is accessible from our SDK. for eg. "goerli"

chainID

Number

Chain ID of the chain - only for EVM compatible chains

rpcURL

String

RPC node URL of the chain

Supported Chains

Currently, we support the following chains:

Mainnets

  • Ethereum Mainnet : chains.eth

  • Polygon Matic Mainnet : chains.matic

Testnets

  • Görli (Goerli testnet) : chains.goerli

  • Mumbai testnet : chains.mumbai

We are working on supporting more chains - feel free to reach out via Discord if you require support for a different chain.

Usage

import { chains } from '@metafi/metafi-react-package';

function displaySupportedChains() {
    return (
        <>
            {
                Object.keys(chains).forEach((chainKey) => {
                    return <p> chains[chainKey].name </p>
                });
            }
        </>
    );
};

Last updated