# Class EvmPlatform<N>

#### Type Parameters

- #### N extends Network

#### Hierarchy

- PlatformContext<N, EvmPlatformType>
  - EvmPlatform

- Defined in platforms/evm/src/platform.ts:29

#####
Index

### Constructors

constructor

### Properties

config
network
_platform

### Methods

getChain
getProtocol
getRpc
parseWormholeMessages
utils
chainFromChainId
chainFromRpc
getBalance
getBalances
getDecimals
getLatestBlock
getLatestFinalizedBlock
getTokenImplementation
isNativeTokenId
isSupportedChain
nativeTokenId
sendWait

## Constructors

### constructor

- new EvmPlatform<N>(network, _config?): EvmPlatform<N>

- #### Type Parameters

  - #### N extends "Mainnet" | "Testnet" | "Devnet"

  #### Parameters

  - ##### network: N

  - ##### `Optional` _config: ChainsConfig<N, "Evm">

  #### Returns EvmPlatform<N>

  Overrides PlatformContext.constructor

  - Defined in platforms/evm/src/platform.ts:35

## Properties

### `Readonly` config

config: ChainsConfig<N, "Evm">

Inherited from PlatformContext.config

- Defined in core/definitions/dist/esm/platform.d.ts:24

### `Readonly` network

network: N

Inherited from PlatformContext.network

- Defined in core/definitions/dist/esm/platform.d.ts:23

### `Static` _platform

_platform: "Evm" = _platform

- Defined in platforms/evm/src/platform.ts:33

## Methods

### getChain

- getChain<C>(chain, rpc?): EvmChain<N, C>

- #### Type Parameters

  - #### C extends "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Arbitrum" | "Optimism" | "Gnosis" | "Base" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  #### Parameters

  - ##### chain: C

  - ##### `Optional` rpc: Provider

  #### Returns EvmChain<N, C>

  Overrides PlatformContext.getChain

  - Defined in platforms/evm/src/platform.ts:48

### getProtocol

- getProtocol<PN, T>(protocol, rpc): Promise<T>

- #### Type Parameters

  - #### PN extends "WormholeCore" | "TokenBridge" | "AutomaticTokenBridge" | "CircleBridge" | "AutomaticCircleBridge" | "Relayer" | "IbcBridge" | "NftBridge"

  - #### T

  #### Parameters

  - ##### protocol: PN

  - ##### rpc: any

  #### Returns Promise<T>

  Inherited from PlatformContext.getProtocol

  - Defined in core/definitions/dist/esm/platform.d.ts:29

### getRpc

- getRpc<C>(chain): Provider

- #### Type Parameters

  - #### C extends "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Arbitrum" | "Optimism" | "Gnosis" | "Base" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  #### Parameters

  - ##### chain: C

  #### Returns Provider

  Overrides PlatformContext.getRpc

  - Defined in platforms/evm/src/platform.ts:42

### parseWormholeMessages

- parseWormholeMessages<C>(chain, rpc, txid): Promise<WormholeMessageId[]>

- #### Type Parameters

  - #### C extends "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Arbitrum" | "Optimism" | "Gnosis" | "Base" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  #### Parameters

  - ##### chain: C

  - ##### rpc: any

  - ##### txid: string

  #### Returns Promise<WormholeMessageId[]>

  Inherited from PlatformContext.parseWormholeMessages

  - Defined in core/definitions/dist/esm/platform.d.ts:30

### utils

- utils(): PlatformUtils<N, "Evm">

- #### Returns PlatformUtils<N, "Evm">

  Inherited from PlatformContext.utils

  - Defined in core/definitions/dist/esm/platform.d.ts:26

### `Static` chainFromChainId

- chainFromChainId(eip155ChainId): ["Mainnet" | "Testnet" | "Devnet", "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Arbitrum" | "Optimism" | "Gnosis" | "Base" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"]

- #### Parameters

  - ##### eip155ChainId: string

  #### Returns ["Mainnet" | "Testnet" | "Devnet", "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Arbitrum" | "Optimism" | "Gnosis" | "Base" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"]

  - Defined in platforms/evm/src/platform.ts:154

### `Static` chainFromRpc

- chainFromRpc(rpc): Promise<["Mainnet" | "Testnet" | "Devnet", "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Arbitrum" | "Optimism" | "Gnosis" | "Base" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"]>

- #### Parameters

  - ##### rpc: Provider

  #### Returns Promise<["Mainnet" | "Testnet" | "Devnet", "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Arbitrum" | "Optimism" | "Gnosis" | "Base" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"]>

  - Defined in platforms/evm/src/platform.ts:167

### `Static` getBalance

- getBalance(chain, rpc, walletAddr, token): Promise<bigint>

- #### Parameters

  - ##### chain: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  - ##### rpc: Provider

  - ##### walletAddr: string

  - ##### token: AnyEvmAddress

  #### Returns Promise<bigint>

  - Defined in platforms/evm/src/platform.ts:92

### `Static` getBalances

- getBalances(chain, rpc, walletAddr, tokens): Promise<Balances>

- #### Parameters

  - ##### chain: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  - ##### rpc: Provider

  - ##### walletAddr: string

  - ##### tokens: AnyEvmAddress[]

  #### Returns Promise<Balances>

  - Defined in platforms/evm/src/platform.ts:107

### `Static` getDecimals

- getDecimals(chain, rpc, token): Promise<bigint>

- #### Parameters

  - ##### chain: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  - ##### rpc: Provider

  - ##### token: AnyEvmAddress

  #### Returns Promise<bigint>

  - Defined in platforms/evm/src/platform.ts:77

### `Static` getLatestBlock

- getLatestBlock(rpc): Promise<number>

- #### Parameters

  - ##### rpc: Provider

  #### Returns Promise<number>

  - Defined in platforms/evm/src/platform.ts:146

### `Static` getLatestFinalizedBlock

- getLatestFinalizedBlock(rpc): Promise<number>

- #### Parameters

  - ##### rpc: Provider

  #### Returns Promise<number>

  - Defined in platforms/evm/src/platform.ts:149

### `Static` getTokenImplementation

- getTokenImplementation(connection, address): TokenImplementation

- #### Parameters

  - ##### connection: Provider

  - ##### address: string

  #### Returns TokenImplementation

  - Defined in platforms/evm/src/platform.ts:172

### `Static` isNativeTokenId

- isNativeTokenId<N, C>(network, chain, tokenId): boolean

- #### Type Parameters

  - #### N extends "Mainnet" | "Testnet" | "Devnet"

  - #### C extends "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Arbitrum" | "Optimism" | "Gnosis" | "Base" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  #### Parameters

  - ##### network: N

  - ##### chain: C

  - ##### tokenId: TokenId

  #### Returns boolean

  - Defined in platforms/evm/src/platform.ts:62

### `Static` isSupportedChain

- isSupportedChain(chain): boolean

- #### Parameters

  - ##### chain: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  #### Returns boolean

  - Defined in platforms/evm/src/platform.ts:72

### `Static` nativeTokenId

- nativeTokenId<N, C>(network, chain): TokenId<C>

- #### Type Parameters

  - #### N extends "Mainnet" | "Testnet" | "Devnet"

  - #### C extends "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Arbitrum" | "Optimism" | "Gnosis" | "Base" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  #### Parameters

  - ##### network: N

  - ##### chain: C

  #### Returns TokenId<C>

  - Defined in platforms/evm/src/platform.ts:53

### `Static` sendWait

- sendWait(chain, rpc, stxns): Promise<string[]>

- #### Parameters

  - ##### chain: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  - ##### rpc: Provider

  - ##### stxns: any[]

  #### Returns Promise<string[]>

  - Defined in platforms/evm/src/platform.ts:124

Generated using TypeDoc