• This repository has been archived on 06/Jun/2024
  • Stars
    star
    608
  • Rank 73,459 (Top 2 %)
  • Language
    TypeScript
  • Created about 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Slightly opinionated Next.js Web3 boilerplate built on ethers, web3-react, Typechain, and SWR.

Deploy with Vercel

This is a default Next.js project bootstrapped with create-next-app, customized as the default boilerplate for new Web3 projects.

Features

  • Separate packages from ethers.js for improved tree-shaking, often only ethers Contracts
  • Hooks-first approach to fetching and caching data from Contracts and memoization for performance with SWR
  • web3-react for ease of connecting to Web3 providers with a solid API
  • Auto-generates types for the contract ABIs in the /contracts folder via TypeChain

Auto Contract Type Generation

Note: After adding in your new contract ABIs (in JSON format) to the /contracts folder, run yarn compile-contract-types to generate the types.

You can import these types when declaring a new Contract hook. The types generated show the function params and return types of your functions, among other helpful types.

import MY_CONTRACT_ABI from "../contracts/MY_CONTRACT.json";
import type { MY_CONTRACT } from "../contracts/types";
import useContract from "./useContract";

export default function useMyContract() {
  return useContract<MY_CONTRACT>(CONTRACT_ADDRESS, MY_CONTRACT_ABI);
}

Previous Art

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

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.

More Repositories

1

unleaded

⛽️ The best way to see the current price of gas on Ethereum.
TypeScript
12
star
2

ens-autocomplete

Twitter like username autocomplete for ENS, Ethereum Name Service
JavaScript
8
star
3

refuge-worldwide

The refugeworldwide.com website.
TypeScript
6
star
4

jazzicon-ts

Typescript version of Jazzicon
TypeScript
6
star
5

reiner.systems

🌐 website
Astro
6
star
6

stakinghood

[Prototype] The "Robinhood" for Staking in Validators on the Cosmos network.
JavaScript
4
star
7

netlify-status-topic

βœ…πŸ”΄Set a Slack channel's topic with emojis based on your Netlify sites deploy statuses
JavaScript
4
star
8

matte

πŸ–Ό Give your photos that gallery quality aesthetic
TypeScript
3
star
9

orokodotlive

TypeScript
3
star
10

netlify-geoip

🌍 Proof of Concept Static Localization GeoIP API
JavaScript
3
star
11

pouch

age encryption based password manager
Shell
2
star
12

unleaded-api

TypeScript
2
star
13

gas-estimate-api

⛽️ A simple API to estimate the gas cost of common dApp Smart Contract function calls
TypeScript
2
star
14

thumbnailer

Spits out the URL for the thumbnail of a wistia video you give it!
JavaScript
2
star
15

gravegirl

The GitHub repo for the Gravegirl Advanced Topics class project.
C#
1
star
16

omit-ts

Absolutely teeny tiny TypeScript omit function.
TypeScript
1
star
17

donut

🍩 Wallet
JavaScript
1
star
18

netlify-photo-gallery

HTML
1
star
19

nft-gallery

JavaScript
1
star
20

componentboi-kitties

😻 my kitties
JavaScript
1
star
21

49friends.party

A collaborative party of creatives working to bring the future to you one friend at a time.
HTML
1
star