Giter VIP home page Giter VIP logo

decent-bridge's Introduction

Decent Bridge

This project hosts the contracts that power the Decent bridge. It's built using LayerZero's OFT contracts.

Setup

  1. Install Foundry.
  2. Install packages:
forge install
  1. Install node packages:
pnpm i

Tests

forge test

Hardhat Tasks

Just like houndry-toolkit, this project uses tons of hardhat tasks. In fact it uses houndry-toolkit as a dependency, so it inherits all the HH (Hardhat) tasks that houndry-toolkit exports.

Run

npx hardhat --help

and you'll see:

AVAILABLE TASKS:

  add-liquidity
  bridge
  check               	Check whatever you need
  clean               	Clears the cache and deletes all artifacts
  compile             	Compiles the entire project, building all artifacts
  console             	Opens a hardhat console
  deploy-decent-bridge
  flatten             	Flattens and prints contracts and their dependencies. If no file is passed, all the contracts in the project will be flattened.
  full-setup
  help                	Prints this message
  list-forks          	lists all running forks
  node                	Starts a JSON-RPC server on top of Hardhat Network
  run                 	Runs a user-defined script after compiling the project
  start-fork          	starts a fork of a chain
  start-forknets
  start-forks         	starts forks of multiple chains
  start-glue          	starts the glue service
  stop-all-forks      	lists all running forks
  stop-fork
  stop-glue           	starts the glue service
  test                	Runs mocha tests
  watch-logs
  wire-up
  wire-up-src-to-dst

The new tasks are as follows:

start-forknets

A utility task for running a whole bunch of forknets at the standardized ports that we have defined in box-common.

These are the chains that it starts.

deploy-decent-bridge

Deploys the decent bridge.

pnpm task deploy-decent-bridge --chain polygon --runtime forknet

wire-up

Wires up the contracts from a source chain to a dst chain:

pnpm task wire-up --src arbitrum --dst optimism

add-liquidity

pnpm task wire-up --chain arbitrum --amount 1.2 --runtime mainnet

Testnet Faucets

When developing, previously we deployed these contracts to Sepolia and FTM. Here are two generous faucets for this:

  1. Alchemy's Sepolia Faucet
  2. Fantom's testnet faucet

(Optional) running make scripts

(On Mac OS) Sometimes, MacOS by default has some wack version of make installed. You can easily install the correct version with:

brew install make # binary's called gmake

Then you have to alias it in your rc file. Add this line to the bottom of your rcfile: That's ~/.zshrc if you're using zsh, and it's ~/.bashrc if you're using bash. You can check which shell you're using with echo $SHELL.

alias make="gmake"

decent-bridge's People

Contributors

arshankhanifar avatar znevo avatar wkantaros 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.