This project serves as a starter base for creating a game on Monad using a relayer that enables blockchain transactions without requiring the user to sign them. Simply build your game, and you're ready to go!
- Transaction Relayer: Send transactions via a relayer - users play without gas fees or wallet interactions
- Transaction Queue Management: Sequential processing to prevent nonce issues
- Preconfigured Actions: Native support for click and submitScore actions
- Blockchain Abstraction: No manual configuration needed for smart contracts or Wagmi
- Next.js
- Viem
- Wagmi
- Relayer API
- NAD Domain Name
- Clone the repository:
git clone https://github.com/Veenoway/prebuilt-relayer.git
cd prebuilt-relayer
- Install dependencies:
npm install
# or
yarn install
-
Create a
.env.local
file following .env.exemple -
Start development server:
npm run dev
# or
yarn dev
Send POST requests to /api/relay
with payload:
{
"playerAddress": "0x76717dBB39075DE78B89AD71E2471DD8eC76d7eB",
"action": "click"
}
Or for submitting scores:
{
"playerAddress": "0x76717dBB39075DE78B89AD71E2471DD8eC76d7eB",
"action": "submitScore",
"score": 123
}
- API Route: Handles requests and queue management
- Nonce Management: Automatic synchronization with network
- Technical Abstraction: Hidden complexity for easier development
- Fork the repository
- Create feature branch (
git checkout -b feature/YourFeature
) - Commit changes (
git commit -am 'Add feature'
) - Push branch (
git push origin feature/YourFeature
) - Open Pull Request
MIT License