Create a Cross-EVM bridge using Solidity, Typescript, Hardhat & ethers.js
Create your own bridge in 30 minutes!
If you’re reading this I assume you know what EVM, bridging, smart contracts and bots are. So without wasting time, I would like to get straight into the weeds. For this tutorial, we will be using sepolia
and mumbai
testnets. A prerequisite for you to follow along is that you have installed Node.js and npm on your computer.
This is how our Bridging infrastructure will look like:
If you know what you’re doing and would like to get straight to the source code, you can find it here: https://github.com/AngSin/cross-evm-bridge. But if you would like to follow along step by step, let’s get to it!
Project Set Up
Let’s create the directory we will be working in:
mkdir cross-evm-bridge
cd cross-evm-bridge
npm init -y
npm install --save-dev hardhat
Then we can initialize the hardhat project by:
npx hardhat init
Go down and pick the Create a TypeScript Project
option, because we love TypeScript😄.