Skip to content

JediFaust/JediBridge

Repository files navigation

JediBridge to swap tokens between blockchains

Language License


Solidity Smart contract for MultiChain JediBridge


📝 Table of Contents

🚀 Link on EtherScan

JediBridge:
https://rinkeby.etherscan.io/address/0xb6BA15f0484a14E6e28974938806500c281C05ff#code

🚀 Installing

  • Set validator address on scripts/deploy.ts file
  • Deploy four contracts running on console:
node scripts/deploy.ts
  • Copy address of deployed contract and paste to .env file as CONTRACT_ADDRESS_BRIDGE
  • Use swap and redeem functions

⛓️ Contract Functions

  • swap()

Swap ERC20 tokens to other chain

  • redeem()

Recieve swapped tokens

  • includeToken()

Add supported ERC20 Token

  • excludeToken()

Remove ERC20 Token from supported list

  • updateChainById()

Updates state of allowed chain between supported and unsupported

🎈 Deploy & Test Scripts

node scripts/deploy.js
npx hardhat test  --network hardhat

💡 HardHat Tasks

npx hardhat swap
npx hardhat redeem

About

CrossChain Bridge to swap ERC20 tokens

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published