Modify config/warp_tokens.ts using values from artifacts/addresses.json. In this configuration, we filled the contract addresses of WETH10, the token we would like to bridge from L1 to L2.
import { TokenType } from'@hyperlane-xyz/hyperlane-token';importtype { WarpRouteConfig } from'../src/warp/config';// A config for deploying Warp Routes to a set of chains// Not required for Hyperlane core deploymentsexportconstwarpRouteConfig:WarpRouteConfig= { base: {// Chain name must be in the Hyperlane SDK or in the chains.ts config chainName:'sepolia', type:TokenType.collateral,// TokenType.native or TokenType.collateral// If type is collateral, a token address is required: address:'0xe67abda0d43f7ac8f37876bbf00d1dfadbb93aaa',// WETH10 mailbox:'0xd51A3FBAC4424a2a0C330686020341FD70ADc9c5', interchainGasPaymaster:'0x65Ff5C940Dd9f11BE608e44602370B347f581B2b',// Optionally, specify owner, mailbox, and interchainGasPaymaster addresses// If not specified, the Permissionless Deployment artifacts or the SDK's defaults will be used }, synthetics: [ { chainName:'testnet', mailbox:'0x190c91b92c95DEDf09a954aC538CC926945d81Fb', interchainGasPaymaster:'0xe7A1f91B9049cC4D1a82C271aF4D6CCA9AFeB20e',// Optionally specify a name, symbol, and totalSupply// If not specified, the base token's properties will be used// Optionally, specify owner, mailbox, and interchainGasPaymaster addresses// If not specified, the Permissionless Deployment artifacts or the SDK's defaults will be used }, ],};
Run this command using the deployer private key to deploy the wrap contracts. This will deploy the HypERC20 contracts to L2. In this example, the HypERC20 contract will be WETH10 on L2.