This is a repo for quickly testing protocols and dApps on Etherlink Testnet and ensuring identical functionality to BNB Testnet.
You'll need to get gas tokens for both networks:
- BNB Testnet: https://www.bnbchain.org/en/testnet-faucet
- Etherlink Testnet: https://faucet.etherlink.com/
You'll also need to set your environment variables as in .env.example
. The easiest way to do this is to create a .env
file in which you can copy the variables from .env.example
.
First, to install dependencies and compile your contracts, you can run:
npm install
npx hardhat compile
Then, you can run whatever Typescript workflow you like under scripts/
using:
npx hardhat run scripts/<PARTNER_NAME>/<YOUR_SCRIPT> --network <`etherlinkTestnet` or `bscTestnet`>
TIP ✅
Refer to the README under the partner you want to test in
scripts/
to simply copy paste the run commands directly!
If you want to create a test for a new protocol or dApp deploying on Etherlink, consider following these steps:
- Create two folders with the same name representing the partner deployed to Etherlink, one under
contracts/
and one underscripts/
- Create smart contract(s) in the new
contracts/<PARTNER_NAME>/
dir to test the partner deployment - Create typescript scripts in the new
scripts/<PARTNER_NAME>/
dir to deploy your contracts and run tests