Skip to main content
This guide shows how to transfer USDC from HyperEVM to HyperCore using the CoreDepositWallet contract.
Tip: The CoreDepositWallet contract provides deposit, depositFor, and depositWithAuth methods. This guide uses deposit. All methods accept a destinationDex parameter (0 for perps, 4294967295 for spot). See the CoreDepositWallet contract interface for detailed information.

Prerequisites

Before you begin, ensure that you’ve:
  • Installed Node.js v22.6+
  • Prepared an EVM testnet wallet with the private key available
  • Funded your wallet with HyperEVM testnet USDC from the Circle Faucet
  • Created a new Node project and installed dependencies:
  • Created a .env file with required environment variable:

Steps

Use the following steps to transfer USDC from HyperEVM to HyperCore.

Step 1. Approve the CoreDepositWallet to spend USDC

Approve the CoreDepositWallet contract to transfer USDC on your behalf:
TypeScript

Step 2. Call the deposit function

Call the deposit function with your desired amount and destination:
TypeScript
The deposit function transfers USDC from your account to the CoreDepositWallet and credits your HyperCore balance.

Full example code

The following is a complete example of how to transfer USDC from HyperEVM to HyperCore.
script.ts
Run the script: