This guide walks you through how to run the full cross-chain staking and lending project locally, including:
●Downloading the codebase
●Setting up environment variables
●Compiling and deploying smart contracts
●Installing frontend dependencies and launching the UI
💡
Check out the full project code here: https://github.com/moonshotcommons/cross-chain-staking.git
1. Clone the Repository from GitHub
Open your terminal and run the following commands to clone the repo and navigate into the project folder:
2. Configure the .env File
At the root of the project, create a .env file and fill in the required values:
1
⚠️ Use test accounts only—do not use your real wallet keys in local development.
3. Compile & Deploy Smart Contracts
Navigate to the /contract directory. You’ll find two main contracts:
●CrossChainStaking
●LoanToken
You can compile and deploy them using Remix or Foundry.
After deployment, copy the contract addresses and paste them into /src/cross-chain-staking.ts:
1
4. Install Project Dependencies
From the project root:
5. Run the Project Locally
Start the development server:
Once it’s running, you should see output like this:
Now open your browser and visit:
1
You can test the entire cross-chain staking workflow locally, which is powered by Wormhole SDK. 🪐🔥
