Coder Social home page Coder Social logo

backend-v2's Introduction

๐ŸฆŽ IguanaDEX Backend

Contracts for IguanaDEX - a cross-chain derivative exchange.

Docs at https://docs.iguanadex.com

Development

This project will work properly if you use Node.js version 16.x (Gallium LTS) or newer and NPM version 8+.

To setup the development environment, first clone the repo:

git clone https://github.com/iguana-dex/backend-v2.git && cd backend-v2

Install Dependencies

If npx is not installed yet: npm install -g npx

Install packages: npm i

Compile Contracts

npx hardhat compile

Run Tests

npx hardhat test

How to run the PingPong example

  1. Deploy both PingPong contracts:
npx hardhat --network bscTestnet deploy --tags PingPong
npx hardhat --network avalancheFujiTestnet deploy --tags PingPong
  1. Verify both contracts:
npx hardhat verify --network bscTestnet [Address of the contract] [Address of the LayerZero endpoint on BSC Testnet]
npx hardhat verify --network avalancheFujiTestnet [Address of the contract] [Address of the LayerZero endpoint on Fuji]
  1. Set the remote addresses, so each contract can receive messages:
npx hardhat --network bscTestnet setTrustedRemote --target-network avalancheFujiTestnet --contract PingPong
npx hardhat --network avalancheFujiTestnet setTrustedRemote --target-network bscTestnet --contract PingPong
  1. Send a cross chain message from bscTestnet to avalancheFujiTestnet !
npx hardhat --network bscTestnet ping --target-network avalancheFujiTestnet

References

Wrapped Asset Bridge repo by LayerZero: https://github.com/LayerZero-Labs/wrapped-asset-bridge

GMX Technical Overview: https://gmx-io.notion.site/gmx-io/GMX-Technical-Overview-47fc5ed832e243afb9e97e8a4a036353

GMX Risk Analysis by Chaos Labs: https://chaoslabs.xyz/resources/chaos_gmx_genesis_risk_framework_methodology.pdf

ERC20Base contract by thirdweb: https://github.com/thirdweb-dev/contracts/blob/main/contracts/base/ERC20Base.sol

StaderLabs documentation (Liquid Staking Tokens): https://www.staderlabs.com/docs-v1/polygon/stader-for-polygon

backend-v2's People

Contributors

styliann-eth avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.