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

@bisonai/sbt-contracts

v0.5.0

Published

Solidity smart contracts, deployment and test scripts for Soulbound token (SBT)

Downloads

5

Readme

@bisonai/sbt-contracts

This repository defines Solidity smart contracts, deployment, and test scripts for Soulbound token (SBT). The implementation follows EIP-5192: Minimal Soulbound NFT.

Installation

yarn install

Prerequisites

  1. Generate mnemonic if you do not have any.
npx mnemonics
  1. Create .env from .env.example.
cp .env.example .env
  1. Fill in generated mnemonic to MNEMONIC environment variable.

Compilation

yarn compile

Predefined networks

hardhat.config.ts predefines several networks where SBT can be deployed. Currently, you can deploy your SBT to localhost, baobab or cypress networks. If you want to deploy to any other network, simply add connection information to hardhat.config.ts.

Deploy SBT

To deploy your SBT call yarn deploy command and set options --base-uri, --name and --symbol. If you want to deploy to specific network you can define it using --network option. To find more information about networks, go to Predefined networks section.

Hardhat version 2.10.1

Usage: hardhat [GLOBAL OPTIONS] deploy --base-uri <STRING> --name <STRING> --symbol <STRING>

OPTIONS:

  --base-uri    URI (must end with /) that will be used as prefix when returning tokenURI
  --name        SBT name
  --symbol      SBT symbol

deploy: Deploy SBT

For global options help run: hardhat help

Example of deploying SBT in localhost network

yarn deploy \
    --name MySBT \
    --symbol MSBT \
    --base-uri "http://localhost/" \
    --network localhost

Output

SBT was deployed to localhost network and can be interacted with at address 0xd65C849d9ADf21bc83cD8dEC377C4f0181dEcE6B

Mint SBT

When minting SBT, specify address of deployed SBT with --address option, address that will receive SBT token with --to option and ID of token with --token-id option. Do not forget that single account can hold only single SBT token and that ID of every token is unique and cannot be reused. After SBT token is minted to a specified account, it cannot be transferred to any other one.

Hardhat version 2.10.1

Usage: hardhat [GLOBAL OPTIONS] mint --address <STRING> --to <STRING> --token-id <STRING>

OPTIONS:

  --address     Address of deployed SBT
  --to          Address receiving SBT token
  --token-id    ID of SBT token that is being minted

mint: Mint SBT

For global options help run: hardhat help

Example of minting SBT in localhost network

yarn mint \
    --address 0xd65C849d9ADf21bc83cD8dEC377C4f0181dEcE6B \
    --to 0xeaeF3D4964F40924D3082CFcB6F7E1d9Fe5D299B \
    --token-id 123  \
    --network localhost

Output

SBT with tokenId 123 was minted for address 0xeaeF3D4964F40924D3082CFcB6F7E1d9Fe5D299B

Run test

Before running test, make sure you compile your smart contracts.

yarn test

Publish to registry

yarn clean
yarn compile
yarn build
yarn pub

License

Apache License 2.0