This is a Next.js project that demonstrates the creating and using of asession for gasless transaction. It allows you to interact with a smart contract on the Polygon Amoy test network and execute a transaction to increment count.
To get started with this project, follow these steps:
-
Clone this repository to your local machine:
git clone https://github.com/your-username/your-repo-name.git
-
Change to the project directory:
cd your-repo-name
-
Install the project dependencies:
npm install or yarn
-
Run the development server:
npm run dev # or yarn dev
-
Open http://localhost:3000 in your web browser to access the application.
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
- Next.js: A React framework for building web applications.
- Biconomy: A gas-free transaction infrastructure for Ethereum and other blockchains.
- Biconomy Sessions Key: Read about Sessions Keys and how they work.
- Ethers.js: A library for interacting with the Ethereum blockchain.
To learn more about the technologies used in this project, check out the following resources:
- Next.js Documentation: Learn about Next.js features and API.
- Biconomy Documentation: Explore Biconomy's capabilities and integration guides.
- Biconomy Session Keys Tutorial: Learn how to create and use a session for a sponsored transaction.
- Ethers.js Documentation: Explore the features and capabilities of Ethers.js.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.