Skip to content

Latest commit

 

History

History
98 lines (56 loc) · 2.39 KB

File metadata and controls

98 lines (56 loc) · 2.39 KB

@tevm/decorators


@tevm/decorators / AddEthereumChainParameter

Type Alias: AddEthereumChainParameter

AddEthereumChainParameter = object

Defined in: eip1193/AddEthereumChainParameter.ts:27

Parameters for wallet_addEthereumChain RPC method (EIP-3085). Used to request that a wallet adds a specific blockchain network.

Example

import { AddEthereumChainParameter } from '@tevm/decorators'

const optimismChain: AddEthereumChainParameter = {
  chainId: '0xa',  // 10 in hex
  chainName: 'Optimism',
  nativeCurrency: {
    name: 'Ether',
    symbol: 'ETH',
    decimals: 18
  },
  rpcUrls: ['https://mainnet.optimism.io'],
  blockExplorerUrls: ['https://optimistic.etherscan.io']
}

Properties

blockExplorerUrls?

optional blockExplorerUrls: string[]

Defined in: eip1193/AddEthereumChainParameter.ts:39


chainId

chainId: string

Defined in: eip1193/AddEthereumChainParameter.ts:29

A 0x-prefixed hexadecimal string


chainName

chainName: string

Defined in: eip1193/AddEthereumChainParameter.ts:31

The chain name.


iconUrls?

optional iconUrls: string[]

Defined in: eip1193/AddEthereumChainParameter.ts:40


nativeCurrency?

optional nativeCurrency: object

Defined in: eip1193/AddEthereumChainParameter.ts:33

Native currency for the chain.

decimals

decimals: number

name

name: string

symbol

symbol: string


rpcUrls

rpcUrls: readonly string[]

Defined in: eip1193/AddEthereumChainParameter.ts:38