A Transaction Relayer Blueprint for Tangle Network implementing EIP-712 permit functionality
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:
- CallPermit Precompile Contract: Implements the EIP-712 standard for permitting and dispatching calls on behalf of users.
- Gas-less transaction execution using EIP-712 permits
- Secure message signing and verification
- Configurable Allowlist for permitted contracts and functions.
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
cargo build
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.
{
"port": 3000,
"allowed_calls": {
"0x0000000000000000000000000000000000000822": [
"0xb3c11395",
"0xa12de0ba"
]
}
}
See API.md for a list of available API endpoints and their descriptions.
See the tests directory for examples on how to use the blueprint.
Deploy the blueprint to the Tangle network:
cargo tangle blueprint deploy
- Address:
0x0000000000000000000000000000000000000805
- Implements EIP-712 standard for gas-less transactions
- Provides nonce management and domain separation
- Handles permit verification and call dispatching
Licensed under either:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
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.