npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@turbo-eth/erc20-wagmi

v0.0.0-beta.14

Published

![CI](https://github.com/turbo-eth/erc20-wagmi/actions/workflows/main.yml/badge.svg) ![TS](https://badgen.net/badge/-/TypeScript?icon=typescript&label&labelColor=blue&color=555555) [![GPLv3 license](https://img.shields.io/badge/License-MIT-blue.svg)](http

Downloads

8

Readme

ERC20 WAGMI

CI TS GPLv3 license Version Downloads/week

💾  Installation

npm install @turbo-eth/erc20-wagmi
yarn add @turbo-eth/erc20-wagmi
pnpm add @turbo-eth/erc721-wagmi
git clone https://github.com/turbo-eth/erc20-wagmi

📚Information

The @turbo-eth/erc20-wagmi module exports core ERC20 hooks and components for React application.

Hooks

The WAGMI CLI @wagmi/cli is used to auto-generate hooks and other core frontend application primitives.

Components

The @turbo-eth/erc20-wagmi module also includes ERC20 primitive components.

  • ERC20Allowance
  • ERC20Balance
  • ERC20Decimals
  • ERC20Name
  • ERC20Symbol
  • WalletERC20Balance

Components have no initial styling or design.

⚡️ Quickstart

Use existing ERC20 components or add ERC20 hooks to easily build new components.

import * as React from 'react';
import classNames from 'clsx';
import { ERC20Decimals, ERC20Name, ERC20Symbol, useErc20BalanceOf } from '@turbo-eth/erc20-wagmi'

interface TokenInformationProps {
 className?: string;
 address: `0x${string}`;
}

export const TokenInformation = ({ className, address }: TokenInformationProps) => { 
 const classes = classNames(className, 'TokenInformation'); 
  const { address: accountAddress } = useAccount()

  const { data, isError, isLoading } = useErc20BalanceOf({
    address,
    args: [ accountAddress ],
  });

 return(
  <div className={classes}>
    <ERC20Name address={address} />
    <ERC20Symbol address={address} />
    <ERC20Decimals address={address} />
    {
      isError ? null : (
        <span className={classes}>
          {formatUnits(data as unknown as bigint, (decimals as number) || 18)}
        </span>
      )
    }
  </div>
)}

export default TokenInformation;

💻 Developer Experience

The module uses a combination of DTS and Microbundle to manage the development workflow.

🐕 What is husky

Husky improves your git commits.

You can use it to lint your commit messages, run tests, lint code, etc... when you commit or push. Husky supports all Git hooks.

🪝 Hooks

  • pre-commit: lint code by applying eslint
  • commit-msg: force commintlint rules

📋 What is commitlint

commitlint checks if your commit messages meet the conventional commit format.

In general the pattern mostly looks like this:

type(scope?): subject  #scope is optional; multiple scopes are supported (current delimiter options: "/", "\" and ",")

Real world examples can look like this:

chore: run tests on travis ci
fix(server): send cors headers
feat(blog): add comment section

Common types according to commitlint-config-conventional (based on the Angular convention) can be:

  • build
  • chore
  • ci
  • docs
  • feat
  • fix
  • perf
  • refactor
  • revert
  • style
  • test

Sponsors & Maintainers

The TurboETH Web3 Build System development is (currently) sponsored (and maintained) by District Labs.

Interested in sponsoring the development and maintenance of the TurboETH - Web3 Build System templates, utilities and modules?

Contact us today at District Labs or collect (coming soon) the TurboETH Mirror Collection.

Copyright 2022 Kames Geraghty