This repository contains a server implementation for gas fee delegation using Prisma and Node.js. Follow the steps below to set up and run the server.
Ensure you have the following installed on your system:
- Node.js (version 22)
- npm (comes with Node.js)
- SQLite (or any database supported by Prisma)
Run the following command to install the required Node.js packages:
npm install
Create a .env.local
file in the root directory: you can use a template.env file
Run the following command to initialize Prisma and create the SQLite database:
npx prisma migrate dev --name init
Generate the Prisma client with the command:
npx prisma generate
Run the server in development mode:
npm run dev
The server will start at http://localhost:3000
.
Your contract address should be registered via management UI
-
Header:
{ "Content-Type": "application/json", }
-
Body:
{ "userSignedTx": "<your-rlp-encoded-signed-transaction>" }
- Success:
{ "message": "Request was successful", "data": { /* transaction receipt details */ } }
- Error:
{ "message": "Error details", "data": "message" }
Contributions are welcome! Feel free to submit a pull request or open an issue for discussion.
This project is licensed under the MIT License.