Home

Awesome

<div align="center"> <h1 align="center">ARKA</h1> </div> <div align="center"> <img src="https://public.etherspot.io/assets/etherspot.gif" width="200" height="200"> <p> <b> ARKA (Albanian for Cashier's case) is open source "Paymaster" as a service software. </b> </p> </div>

[!IMPORTANT] This repo/software is under active development.

💸 Arka

Arka paymaster is an open source piece of infrastructure which is a vital piece of the ERC-4337 stack.

Paymasters are what is needed to sponsor users transactions.

The flow is as follows:

🐳 How to run (a Docker image)

Prerequisites

docker compose up

This would spin up three services at once which will be available on these urls:

Local Configuration Changes

There is an option to run the code locally without using AWS and only using local SQLite. These are the following steps to follow for using local SQLite database for apiKey and frontend to sync up

API KEY VALIDATION

🔙 Arka Backend

This contains the full source code and implementation of Arka.

To run your own instance of this, please follow these steps.

You can see a list of available endpoints here.

Local - Setup

environment for backend

  1. Start Docker postgres database
cd local-setup
docker-compose up -d
docker ps -a
docker logs --follow local-setup-db-1
PostgreSQL init process complete; ready for start up.
2024-06-24 19:31:56.739 UTC [1] LOG:  starting PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1) on aarch64-unknown-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-06-24 19:31:56.740 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-06-24 19:31:56.740 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-06-24 19:31:56.741 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-06-24 19:31:56.744 UTC [66] LOG:  database system was shut down at 2024-06-24 19:31:56 UTC
2024-06-24 19:31:56.748 UTC [1] LOG:  database system is ready to accept connections
  1. create .env
cp .env.example .env
  1. populate these environment variables
LOG_LEVEL=
API_HOST=
API_PORT=
UNSAFE_MODE=true
SUPPORTED_NETWORKS=
CRON_PRIVATE_KEY=
DEFAULT_INDEXER_ENDPOINT=
FEE_MARKUP=0
MULTI_TOKEN_MARKUP=
ADMIN_WALLET_ADDRESS=
ETHERSCAN_GAS_ORACLES=""
DEFAULT_API_KEY=""
WEBHOOK_URL=
HMAC_SECRET=
DATABASE_URL=
DATABASE_USER=
DATABASE_PASSWORD=
DATABASE_NAME=
DATABASE_SCHEMA_NAME=arka
DATABASE_SSL_ENABLED=false
DATABASE_SSL_REJECT_UNAUTHORIZED=false
  1. start docker instance for backend, admin_frontend, frontend
docker-compose up --build -d
  1. Here we need to create a network and tag backend & postgres on same network
docker network create arka-network    
  1. add postgres instance to docker network
docker network connect arka-network local-setup-db-1
  1. add arka backend docker instance to docker-network
docker network connect arka-network arka-backend-1
  1. restart backend docker instance
docker-compose up -d
  1. verify backend logs
docker logs arka-backend-1

🖥 Arka Admin Frontend

This contains ability to change system configuration, apiKeys and apiKey-config that are available in database.

🖥 Arka Frontend

This is a basic frontend which let's a user interact with the Arka smart contract on various chains.

🔗 Important links

💬 Contact

If you have any questions or feedback about Arka, please feel free to reach out to us.

📄 License

Licensed under the MIT License.