Mint stablecoins and use it to mint native assets on another chain
const ETHEREUM_CHAIN = 1; const BERACHAIN_CHAIN = 80094; const PLUME_CHAIN = 98866; const ARBITRUM_CHAIN = 42161; const userAddress = "0xd8da6bf26964af9d7eed9e03e53415d37aa96045" as Address; /** * Bridges USDC from Ethereum via Stargate and mints HONEY on Berachain. * @returns The route and transaction objects. */ export async function mintHoneyFromUsdc() { const USDC: Address = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; const HONEY: Address = "0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590"; const amountIn = "100000000"; const routeParams: RouteParams = { fromAddress: userAddress, receiver: userAddress, chainId: ETHEREUM_CHAIN, destinationChainId: BERACHAIN_CHAIN, amountIn: [amountIn], tokenIn: [USDC], tokenOut: [HONEY], routingStrategy: "router", }; const route = await client.getRouteData(routeParams); await sendEoa(route.tx, route.gas); return route; }
Was this page helpful?