# Class EvmAutomaticTokenBridge<N, C>

#### Type Parameters

- #### N extends Network

- #### C extends EvmChains

#### Hierarchy

- EvmAutomaticTokenBridge

#### Implements

- AutomaticTokenBridge<N, EvmPlatformType, C>

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

#####
Index

### Constructors

constructor

### Properties

chain
chainId
contracts
network
provider
tokenBridge
tokenBridgeRelayer

### Methods

createUnsignedTx
getRegisteredTokens
getRelayerFee
isRegisteredToken
maxSwapAmount
nativeTokenAmount
redeem
transfer
fromRpc

## Constructors

### `Private` constructor

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

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

## Properties

### `Readonly` chain

chain: C

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

### `Readonly` chainId

chainId: bigint

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

### `Readonly` contracts

contracts: Contracts

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

### `Readonly` network

network: N

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

### `Readonly` provider

provider: Provider

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

### `Readonly` tokenBridge

tokenBridge: TokenBridgeContract

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

### `Readonly` tokenBridgeRelayer

tokenBridgeRelayer: ethers_contracts.TokenBridgeRelayer

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

## Methods

### `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/automaticTokenBridge.ts:241

### getRegisteredTokens

- getRegisteredTokens(): Promise<NativeAddress<C>[]>

- #### Returns Promise<NativeAddress<C>[]>

  Implementation of AutomaticTokenBridge.getRegisteredTokens

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

### getRelayerFee

- getRelayerFee(sender, recipient, token): Promise<bigint>

- #### Parameters

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

  - ##### recipient: ChainAddress

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

  #### Returns Promise<bigint>

  Implementation of AutomaticTokenBridge.getRelayerFee

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

### isRegisteredToken

- isRegisteredToken(token): Promise<boolean>

- #### Parameters

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

  #### Returns Promise<boolean>

  Implementation of AutomaticTokenBridge.isRegisteredToken

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

### maxSwapAmount

- maxSwapAmount(token): Promise<bigint>

- #### Parameters

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

  #### Returns Promise<bigint>

  Implementation of AutomaticTokenBridge.maxSwapAmount

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

### nativeTokenAmount

- nativeTokenAmount(token, amount): Promise<bigint>

- #### Parameters

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

  - ##### amount: bigint

  #### Returns Promise<bigint>

  Implementation of AutomaticTokenBridge.nativeTokenAmount

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

### redeem

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

- #### Parameters

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

  - ##### vaa: VAA<"AutomaticTokenBridge:TransferWithRelay">

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

  Implementation of AutomaticTokenBridge.redeem

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

### transfer

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

- #### Parameters

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

  - ##### recipient: ChainAddress

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

  - ##### amount: bigint

  - ##### `Optional` nativeGas: bigint

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

  Implementation of AutomaticTokenBridge.transfer

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

### `Static` fromRpc

- fromRpc<N>(provider, config): Promise<EvmAutomaticTokenBridge<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, "Evm">

  #### Returns Promise<EvmAutomaticTokenBridge<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/automaticTokenBridge.ts:89

Generated using TypeDoc