Giter VIP home page Giter VIP logo

hthbridge's Introduction

Bridgel - Centralized Bridge for Swapping Tokens Between Blockchains

This is a centralized bridge to transfer tokens between EVM-based blockchains. It supports to charge fee in bridging transactions.

image

How to install?

  1. Fork this repository.
  2. Run npm install command to install libraries.
  3. Edit config.js (see below) file.
  4. Start the app with node app.js command.
  5. Set up a cron that sends request to https://website.com/api/cron url regularly (every 15-30 seconds).

How to edit the config file?

First of all, you need to deploy Bridge contracts (contracts/bridge.sol) to all blockchains you will serve. After that, open config.js file and set the bridge contract address for all chains. You can add or remove chains by editing the array. (image)

In the second step, you should define the tokens. Set the token address for all chains. (image)

Edit pairs array to set allowed pairs for swapping. You can edit feeMultiplier if you want to set a transaction fee. (image)

Lastly, you should enter the private key of (bridge contract) deployer address. Always there should be some funds in that account to cover network fees.

Author's note:

I used pure JS (for frontend) because I don't have any experience with external UI libraries. It may cause some confusion, in that case feel free to open an issue from Github.

Disclaimer:

The author is not responsible for any problems you encounter with the code. Do your own tests and audit before using the software in production mode.

hthbridge's People

Contributors

michaelhdesigns avatar

Watchers

Altcoin Cash  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.