Quick Start

Get up and running with MetaTx-Contracts in just a few minutes!

Prerequisites

Before you begin, make sure you have:

  • Node.js (v16 or higher)

  • npm or yarn package manager

  • Git for cloning the repository

  • A wallet with testnet tokens for deployment

Installation

1. Clone the Repository

git clone https://github.com/DINetworks/MetaTx-Contracts.git
cd MetaTx-Contracts

2. Install Dependencies

npm install

3. Environment Setup

Create a .env file in the root directory:

Compilation

Compile the smart contracts:

You should see output similar to:

Testing

Run the test suite to ensure everything works:

Expected output:

Deploy to Testnet

Deploy your first MetaTxGateway contract:

You'll see deployment information:

First Meta-Transaction

Let's execute your first gasless transaction:

1. Set Up Relayer Authorization

2. Create a Meta-Transaction

3. Sign the Batch (EIP-712)

4. Calculate Required Value

5. Execute the Meta-Transaction

What's Next?

Now that you have MetaTx-Contracts running:

  1. Learn about the contracts - Understand the architecture

  2. Deploy to mainnet - Production deployment guide

  3. Integrate with your frontend - Add gasless functionality

  4. Set up gas credits - Enable multi-token payments

Need Help?

  • πŸ“– Documentation: Browse this guide for detailed information

  • πŸ› Issues: Report bugs on GitHub Issues

  • πŸ’¬ Community: Join our community discussions

  • πŸ” Examples: Check out the test/ directory for working examples

Last updated