# Class EvmTokenBridge<N, C>

#### Type Parameters

- #### N extends Network

- #### C extends EvmChains

#### Hierarchy

- EvmTokenBridge

#### Implements

- TokenBridge<N, EvmPlatformType, C>

- Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:42

#####
Index

### Constructors

constructor

### Properties

chain
chainId
contracts
network
provider
tokenBridge
tokenBridgeAddress

### Methods

createAttestation
createUnsignedTx
getOriginalAsset
getWrappedAsset
getWrappedNative
hasWrappedAsset
isTransferCompleted
isWrappedAsset
redeem
submitAttestation
transfer
fromRpc

## Constructors

### `Private` constructor

- new EvmTokenBridge<N, C>(network, chain, provider, contracts): EvmTokenBridge<N, 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

  - ##### provider: Provider

  - ##### contracts: Contracts

  #### Returns EvmTokenBridge<N, C>

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:49

## Properties

### `Readonly` chain

chain: C

- Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:51

### `Readonly` chainId

chainId: bigint

- Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:47

### `Readonly` contracts

contracts: Contracts

- Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:53

### `Readonly` network

network: N

- Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:50

### `Readonly` provider

provider: Provider

- Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:52

### `Readonly` tokenBridge

tokenBridge: TokenBridgeContract

- Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:45

### `Readonly` tokenBridgeAddress

tokenBridgeAddress: string

- Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:46

## Methods

### createAttestation

- createAttestation(token): AsyncGenerator<EvmUnsignedTransaction<N, C>, any, unknown>

- #### Parameters

  - ##### token: TokenAddress<C>

  #### Returns AsyncGenerator<EvmUnsignedTransaction<N, C>, any, unknown>

  Implementation of TokenBridge.createAttestation

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:142

### `Private` createUnsignedTx

- createUnsignedTx(txReq, description, parallelizable?): EvmUnsignedTransaction<N, C>

- #### Parameters

  - ##### txReq: TransactionRequest

  - ##### description: string

  - ##### parallelizable: boolean = false

  #### Returns EvmUnsignedTransaction<N, C>

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:295

### getOriginalAsset

- getOriginalAsset(token): Promise<TokenId>

- #### Parameters

  - ##### token: TokenAddress<C>

  #### Returns Promise<TokenId>

  Implementation of TokenBridge.getOriginalAsset

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:90

### getWrappedAsset

- getWrappedAsset(token): Promise<NativeAddress<C>>

- #### Parameters

  - ##### token: TokenId<"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 Promise<NativeAddress<C>>

  Implementation of TokenBridge.getWrappedAsset

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:114

### getWrappedNative

- getWrappedNative(): Promise<GetNativeAddress<(C extends bigint
  ? `bigint(${C})`
  : C extends boolean
  ? `boolean(${C})`
  : C) extends "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"
  ? {
  Acala: "Evm";
  Algorand: "Algorand";
  Aptos: "Aptos";
  Arbitrum: "Evm";
  ArbitrumSepolia: "Evm";
  Aurora: "Evm";
  Avalanche: "Evm";
  Base: "Evm";
  BaseSepolia: "Evm";
  Bsc: "Evm";
  Btc: "Btc";
  Celo: "Evm";
  Cosmoshub: "Cosmwasm";
  Ethereum: "Evm";
  Evmos: "Cosmwasm";
  Fantom: "Evm";
  Gnosis: "Evm";
  Holesky: "Evm";
  Injective: "Cosmwasm";
  Karura: "Evm";
  Klaytn: "Evm";
  Kujira: "Cosmwasm";
  Moonbeam: "Evm";
  Near: "Near";
  Neon: "Evm";
  Oasis: "Evm";
  Optimism: "Evm";
  OptimismSepolia: "Evm";
  Osmosis: "Cosmwasm";
  Polygon: "Evm";
  Pythnet: "Solana";
  Rootstock: "Evm";
  Sei: "Cosmwasm";
  Sepolia: "Evm";
  Solana: "Solana";
  Sui: "Sui";
  Terra: "Cosmwasm";
  Terra2: "Cosmwasm";
  Wormchain: "Cosmwasm";
  Xpla: "Cosmwasm";
  }[Object] extends {
  [key: string]: unknown;
  }
  ? {
  Acala: "Evm";
  Algorand: "Algorand";
  Aptos: "Aptos";
  Arbitrum: "Evm";
  ArbitrumSepolia: "Evm";
  Aurora: "Evm";
  Avalanche: "Evm";
  Base: "Evm";
  BaseSepolia: "Evm";
  Bsc: "Evm";
  Btc: "Btc";
  Celo: "Evm";
  Cosmoshub: "Cosmwasm";
  Ethereum: "Evm";
  Evmos: "Cosmwasm";
  Fantom: "Evm";
  Gnosis: "Evm";
  Holesky: "Evm";
  Injective: "Cosmwasm";
  Karura: "Evm";
  Klaytn: "Evm";
  Kujira: "Cosmwasm";
  Moonbeam: "Evm";
  Near: "Near";
  Neon: "Evm";
  Oasis: "Evm";
  Optimism: "Evm";
  OptimismSepolia: "Evm";
  Osmosis: "Cosmwasm";
  Polygon: "Evm";
  Pythnet: "Solana";
  Rootstock: "Evm";
  Sei: "Cosmwasm";
  Sepolia: "Evm";
  Solana: "Solana";
  Sui: "Sui";
  Terra: "Cosmwasm";
  Terra2: "Cosmwasm";
  Wormchain: "Cosmwasm";
  Xpla: "Cosmwasm";
  }[Object]
  : {
  Acala: "Evm";
  Algorand: "Algorand";
  Aptos: "Aptos";
  Arbitrum: "Evm";
  ArbitrumSepolia: "Evm";
  Aurora: "Evm";
  Avalanche: "Evm";
  Base: "Evm";
  BaseSepolia: "Evm";
  Bsc: "Evm";
  Btc: "Btc";
  Celo: "Evm";
  Cosmoshub: "Cosmwasm";
  Ethereum: "Evm";
  Evmos: "Cosmwasm";
  Fantom: "Evm";
  Gnosis: "Evm";
  Holesky: "Evm";
  Injective: "Cosmwasm";
  Karura: "Evm";
  Klaytn: "Evm";
  Kujira: "Cosmwasm";
  Moonbeam: "Evm";
  Near: "Near";
  Neon: "Evm";
  Oasis: "Evm";
  Optimism: "Evm";
  OptimismSepolia: "Evm";
  Osmosis: "Cosmwasm";
  Polygon: "Evm";
  Pythnet: "Solana";
  Rootstock: "Evm";
  Sei: "Cosmwasm";
  Sepolia: "Evm";
  Solana: "Solana";
  Sui: "Sui";
  Terra: "Cosmwasm";
  Terra2: "Cosmwasm";
  Wormchain: "Cosmwasm";
  Xpla: "Cosmwasm";
  }[Object]
  : never>>

- #### Returns Promise<GetNativeAddress<(C extends bigint
  ? `bigint(${C})`
  : C extends boolean
  ? `boolean(${C})`
  : C) extends "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"
  ? {
  Acala: "Evm";
  Algorand: "Algorand";
  Aptos: "Aptos";
  Arbitrum: "Evm";
  ArbitrumSepolia: "Evm";
  Aurora: "Evm";
  Avalanche: "Evm";
  Base: "Evm";
  BaseSepolia: "Evm";
  Bsc: "Evm";
  Btc: "Btc";
  Celo: "Evm";
  Cosmoshub: "Cosmwasm";
  Ethereum: "Evm";
  Evmos: "Cosmwasm";
  Fantom: "Evm";
  Gnosis: "Evm";
  Holesky: "Evm";
  Injective: "Cosmwasm";
  Karura: "Evm";
  Klaytn: "Evm";
  Kujira: "Cosmwasm";
  Moonbeam: "Evm";
  Near: "Near";
  Neon: "Evm";
  Oasis: "Evm";
  Optimism: "Evm";
  OptimismSepolia: "Evm";
  Osmosis: "Cosmwasm";
  Polygon: "Evm";
  Pythnet: "Solana";
  Rootstock: "Evm";
  Sei: "Cosmwasm";
  Sepolia: "Evm";
  Solana: "Solana";
  Sui: "Sui";
  Terra: "Cosmwasm";
  Terra2: "Cosmwasm";
  Wormchain: "Cosmwasm";
  Xpla: "Cosmwasm";
  }[Object] extends {
  [key: string]: unknown;
  }
  ? {
  Acala: "Evm";
  Algorand: "Algorand";
  Aptos: "Aptos";
  Arbitrum: "Evm";
  ArbitrumSepolia: "Evm";
  Aurora: "Evm";
  Avalanche: "Evm";
  Base: "Evm";
  BaseSepolia: "Evm";
  Bsc: "Evm";
  Btc: "Btc";
  Celo: "Evm";
  Cosmoshub: "Cosmwasm";
  Ethereum: "Evm";
  Evmos: "Cosmwasm";
  Fantom: "Evm";
  Gnosis: "Evm";
  Holesky: "Evm";
  Injective: "Cosmwasm";
  Karura: "Evm";
  Klaytn: "Evm";
  Kujira: "Cosmwasm";
  Moonbeam: "Evm";
  Near: "Near";
  Neon: "Evm";
  Oasis: "Evm";
  Optimism: "Evm";
  OptimismSepolia: "Evm";
  Osmosis: "Cosmwasm";
  Polygon: "Evm";
  Pythnet: "Solana";
  Rootstock: "Evm";
  Sei: "Cosmwasm";
  Sepolia: "Evm";
  Solana: "Solana";
  Sui: "Sui";
  Terra: "Cosmwasm";
  Terra2: "Cosmwasm";
  Wormchain: "Cosmwasm";
  Xpla: "Cosmwasm";
  }[Object]
  : {
  Acala: "Evm";
  Algorand: "Algorand";
  Aptos: "Aptos";
  Arbitrum: "Evm";
  ArbitrumSepolia: "Evm";
  Aurora: "Evm";
  Avalanche: "Evm";
  Base: "Evm";
  BaseSepolia: "Evm";
  Bsc: "Evm";
  Btc: "Btc";
  Celo: "Evm";
  Cosmoshub: "Cosmwasm";
  Ethereum: "Evm";
  Evmos: "Cosmwasm";
  Fantom: "Evm";
  Gnosis: "Evm";
  Holesky: "Evm";
  Injective: "Cosmwasm";
  Karura: "Evm";
  Klaytn: "Evm";
  Kujira: "Cosmwasm";
  Moonbeam: "Evm";
  Near: "Near";
  Neon: "Evm";
  Oasis: "Evm";
  Optimism: "Evm";
  OptimismSepolia: "Evm";
  Osmosis: "Cosmwasm";
  Polygon: "Evm";
  Pythnet: "Solana";
  Rootstock: "Evm";
  Sei: "Cosmwasm";
  Sepolia: "Evm";
  Solana: "Solana";
  Sui: "Sui";
  Terra: "Cosmwasm";
  Terra2: "Cosmwasm";
  Wormchain: "Cosmwasm";
  Xpla: "Cosmwasm";
  }[Object]
  : never>>

  Implementation of TokenBridge.getWrappedNative

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:290

### hasWrappedAsset

- hasWrappedAsset(token): Promise<boolean>

- #### Parameters

  - ##### token: TokenId

  #### Returns Promise<boolean>

  Implementation of TokenBridge.hasWrappedAsset

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:106

### isTransferCompleted

- isTransferCompleted(vaa): Promise<boolean>

- #### Parameters

  - ##### vaa: VAA<"TokenBridge:Transfer"> | VAA<"TokenBridge:TransferWithPayload">

  #### Returns Promise<boolean>

  Implementation of TokenBridge.isTransferCompleted

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:126

### isWrappedAsset

- isWrappedAsset(token): Promise<boolean>

- #### Parameters

  - ##### token: TokenAddress<C>

  #### Returns Promise<boolean>

  Implementation of TokenBridge.isWrappedAsset

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:86

### redeem

- redeem(sender, vaa, unwrapNative?): AsyncGenerator<EvmUnsignedTransaction<N, C>, any, unknown>

- #### Parameters

  - ##### sender: AccountAddress<C>

  - ##### vaa: VAA<"TokenBridge:Transfer"> | VAA<"TokenBridge:TransferWithPayload">

  - ##### unwrapNative: boolean = true

  #### Returns AsyncGenerator<EvmUnsignedTransaction<N, C>, any, unknown>

  Implementation of TokenBridge.redeem

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:251

### submitAttestation

- submitAttestation(vaa): AsyncGenerator<EvmUnsignedTransaction<N, C>, any, unknown>

- #### Parameters

  - ##### vaa: VAA<"TokenBridge:AttestMeta">

  #### Returns AsyncGenerator<EvmUnsignedTransaction<N, C>, any, unknown>

  Implementation of TokenBridge.submitAttestation

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:155

### transfer

- transfer(sender, recipient, token, amount, payload?): AsyncGenerator<EvmUnsignedTransaction<N, C>, any, unknown>

- #### Parameters

  - ##### sender: AccountAddress<C>

  - ##### recipient: ChainAddress

  - ##### token: TokenAddress<C>

  - ##### amount: bigint

  - ##### `Optional` payload: Uint8Array

  #### Returns AsyncGenerator<EvmUnsignedTransaction<N, C>, any, unknown>

  Implementation of TokenBridge.transfer

  - Defined in platforms/evm/protocols/tokenBridge/src/tokenBridge.ts:169

### `Static` fromRpc

- fromRpc<N>(provider, config): Promise<EvmTokenBridge<N, "Ethereum" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Moonbeam" | "Neon" | "Arbitrum" | "Optimism" | "Gnosis" | "Base" | "Rootstock" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky">>

- #### Type Parameters

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

  #### Parameters

  - ##### provider: Provider

  - ##### config: ChainsConfig<N, "Solana" | "Algorand" | "Near" | "Sui" | "Aptos" | "Btc" | "Evm" | "Cosmwasm">

  #### Returns Promise<EvmTokenBridge<N, "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/protocols/tokenBridge/src/tokenBridge.ts:73

Generated using TypeDoc