38 min read
Overview
Hyperliquid pairs two layers under one unified state: HyperCore, an ultra-low-latency order-book engine accessed via signed actions, and HyperEVM, a fully EVM-compatible network for standard Solidity development.
Chainlink CCIP enables bridging assets between chains using a burn-and-mint mechanism. Within Hyperliquid, conversions between HyperCore (HIP-1) assets and their HyperEVM representations are handled by native protocol flows.
In this guide, you’ll use Foundry to wrap a HyperEVM token that corresponds to a HIP-1 asset and bridge that token between HyperEVM and BNB Smart Chain (BSC) using CCIP.
What You Will Do
- Create a wrapper contract for a HyperEVM token linked to a HIP-1 asset
- Deploy and configure CCIP token pools on HyperEVM and BSC
- Verify our deployed token and pool contracts on-chain
- Execute CCIP transfers between HyperEVM and BSC with Foundry scripts
What You Will Need
- Node.js v22+ and a package manager (npm, yarn, or pnpm) installed
- MetaMask with the HyperEVM Mainnet and Binance Smart Chain Mainnet networks added
- Quicknode endpoints for HyperEVM and Binance Smart Chain
- Prior experience with Solidity and Foundry
We are using the MAINNETS of each chain in this guide. This is due to Chainlink CCIP not being available on HyperEVM Testnet at the time of writing. Please exercise caution and only use funds you can afford to lose.
Setting up the Development Environment
We will use Foundry to compile, deploy, and interact with our smart contracts. If you haven't installed Foundry yet, you can do so by running the following command in your terminal:
curl -L https://foundry.paradigm.xyz | bash
Follow the on-screen instructions and afterwards, you will be able to use the foundryup command to install Foundry. Ensure you execute this command in a new terminal session which accounts for the changes to your PATH variable.
foundryup
We will need a new folder locally where our project for this guide will live. We will name ours hyperevm_ccip, but you can call it anything you like. Run these commands in your terminal to create the folder and navigate into it with your code editor. In this guide, we will be using VS Code.
forge init hyperevm_ccip
cd hyperevm_ccip
code .
At this point, your setup should look something like this:

Great! Our Foundry project structure is now setup. Next create an .env file in the root of your project folder. This is where we will store our environment variables, such as our private key and RPC URLs. Here is what the format of the .env file should look like:
HYPEREVM_RPC="your_hyperevm_rpc_url"
BSC_RPC="your_bsc_rpc_url"
PRIVATE_KEY="your_private_key"
ETHERSCAN_API_KEY="your_etherscan_api_key"
We will discuss what each of these variables are shortly and how to obtain them. The next step is to delete the default src/Counter.sol contract and script/Counter.s.sol script that Foundry generates for us. We will not be using these in this guide. Alternatively, you can run the following commands in your terminal to remove these files:
rm src/Counter.sol
rm script/Counter.s.sol
You will also need to configure the foundry.toml file in the root of your project folder to include important settings for the Solidity compiler and remappings for the import statements we will be using. Here is what your foundry.toml file should look like:
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
optimizer = true
optimizer_runs = 200
remappings = [
'@chainlink/contracts-ccip/=node_modules/@chainlink/contracts-ccip/',
'@chainlink/contracts/=node_modules/@chainlink/contracts/',
]
fs_permissions = [{ access = "read-write", path = "./" }]
In this file, we added optimizer settings to optimize our smart contracts for deployment. The fs_permissions entry allows Foundry to read and write files in the project directory. The remappings entries are the paths of the Chainlink contracts packages that we will be using in this guide. We will install these packages next.