GithubHelp home page GithubHelp logo

constantinp2022 / relayer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webb-tools/relayer

0.0 0.0 0.0 48.52 MB

πŸ•ΈοΈ The Webb Relayer Network

Home Page: https://docs.webb.tools/relayer/

License: Apache License 2.0

Shell 1.89% Rust 72.95% JavaScript 4.03% TypeScript 20.76% Dockerfile 0.36%

relayer's Introduction

Webb Relayer

πŸ•ΈοΈ The Webb Relayer πŸ§‘β€βœˆοΈ
⚠️ Beta Software ⚠️


Install ⛹️

Unix (Linux, macOS, WSL2, ..)

git clone https://github.com/webb-tools/relayer.git

cargo build --release

Local Substrate Mixer

Ideal for development, Run a relayer for a local substrate node that integrates our pallets: webb-standalone-node

Run the relayer with our preset configuration like so:

./target/release/webb-relayer -c config/local-substrate -vvvv

Running and Configuring πŸš€

Webb Relayer is easy to run and with flexible config πŸ‘Œ, to test it out first you have to create a config file

Example:

  • Create a .env file with the following values for the networks you wish to support
WEBB_EVM_<network>_ENABLED=true
WEBB_EVM_<network>_PRIVATE_KEY=<0X_PREFIXED_PRIVATE_KEY>

WEBB_EVM_<network>_BENEFICIARY=<0X_PREFIXED_ADDRESS>

Checkout config for useful default configurations for many networks. These config files can be changed to your preferences, and are enabled with the .env configuration listed above.

Then Simply run

webb-relayer -vvv -c ./config

Hot Tip 🌢️: you could also use the json format for the config files if you prefer that, and it would work!

Using Docker 🐳

To Use Docker in and to run the relayer on any cloud provider, all you need is to create your configuration and .env files as it is shown above, save it into a config directory then you run the following command:

docker run --rm -v "<ABSOLUTE_PATH_TO_CONFIGS_DIRECTORY>:/config" --env-file .env -p 9955:9955 ghcr.io/webb-tools/relayer:edge

Note: this uses the latest and pre-released version deployed from main branch, change edge to the latest stable release version.

This will mount a configuration files at the /config directory inside the container so it would allow it to read the configuration you added.

Overview

- src/
    - events_watcher/: Sync to different network types (EVM, Substrate), and act on different events. 
    - store/: Logic for storing information with different backends.
    - config.rs: Functionality related to parsing of configurable values.
    - context.rs: Access the parsed configuration and generate providers and wallets.
    - handler.rs: Logic for what to do when a client is interacting with this relayer.
    - main.rs: Build and start the relayer.
    - service.rs: The entry for tasks once the relayer is operating.
    - tx_queue.rs: A transaction queue for orderly handling of transactions.

Safety ⚑

This crate uses #![deny(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.

Contributing πŸ§‘β€πŸ€β€πŸ§‘

Want to join us? take a look at some of these issues:

License

Licensed under Apache 2.0 license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache 2.0 license, shall be licensed as above, without any additional terms or conditions.

relayer's People

Contributors

ahmedkorim avatar dharjeezy avatar drewstone avatar dutterbutter avatar jim4067 avatar nepoche 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.