Skip to content

A Transaction Relayer Blueprint for Tangle Network implementing EIP-712 permit functionality

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

tangle-network/txrelayer-blueprint

Repository files navigation

TX Relayer Blueprint 🌐

A Transaction Relayer Blueprint for Tangle Network implementing EIP-712 permit functionality

📚 Overview

This project implements a Transaction Relayer Blueprint for the Tangle Network, allowing for gas-less transactions through EIP-712 permits. The blueprint consists of two main components:

  1. CallPermit Precompile Contract: Implements the EIP-712 standard for permitting and dispatching calls on behalf of users.

🔑 Key Features

  • Gas-less transaction execution using EIP-712 permits
  • Secure message signing and verification
  • Configurable Allowlist for permitted contracts and functions.

📚 Prerequisites

Before running this project, ensure you have:

Install cargo-tangle using either:

# Via installer script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/tangle-network/gadget/releases/download/cargo-tangle-v0.1.2/cargo-tangle-installer.sh | sh

# Or via cargo
cargo install cargo-tangle --force

🛠️ Development

Building the Project

cargo build

Configuration

The blueprint can be configured using the config.toml or config.json file. The configuration file contains the following fields:

  • port: The port on which the relayer will run.
  • allowed_calls: A mapping of contract addresses to allowed function signatures.

Example config.json

{
  "port": 3000,
  "allowed_calls": {
    "0x0000000000000000000000000000000000000822": [
      "0xb3c11395",
      "0xa12de0ba"
    ]
  }
}

API Endpoints

See API.md for a list of available API endpoints and their descriptions.

Running Tests

See the tests directory for examples on how to use the blueprint.

Deployment

Deploy the blueprint to the Tangle network:

cargo tangle blueprint deploy

📖 Contract Details

CallPermit Contract

  • Address: 0x0000000000000000000000000000000000000805
  • Implements EIP-712 standard for gas-less transactions
  • Provides nonce management and domain separation
  • Handles permit verification and call dispatching

📜 License

Licensed under either:

📬 Contributing

Contributions are welcome! Please feel free to submit issues and pull requests on our GitHub repository.

Unless explicitly stated otherwise, contributions will be dual licensed as above without additional terms or conditions.

About

A Transaction Relayer Blueprint for Tangle Network implementing EIP-712 permit functionality

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published