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

ten-hardhat-plugin

v0.0.12

Published

Obscuro Labs

Downloads

408

Readme

Ten Connection Plugin

This is the Ten protocol connection plugin for Hardhat, written in typescript. The plugin will automatically join and authenticate all accounts with Ten via the Ten Gateway, and thus these operations do not need to be performed manually prior to running. For more information on joining and authenticating against Ten see the user documentation to set up your wallet.

Setup

To use the plugin you can run the following command:

npm install ten-hardhat-plugin

Note that the plugin has minimum requirements for the hardhat peer dependency version as older versions do not have the ability to override the web3 provider. Once the dependency is installed you can just import it with:

import 'ten-hardhat-plugin'

This will add new options to the network config and run the plugin on startup to join and authenticate whenever the target network is Ten. Note that the plugin scans the URL automatically to determine if the network is Ten. If you want to stop this behaviour you should set the config parameter useGateway to False. If you want to force it to assume the network is Ten (e.g. when running against a local testnet), you should set useGateway to True. An example config is given below;

require("@nomicfoundation/hardhat-toolbox");
require("ten-hardhat-plugin")

const { PK } = process.env;

module.exports = {
  solidity:  "0.8.19",
  defaultNetwork: "ten",
  networks: {
  ten: {
    deploy: [ "scripts/" ],
    chainId: 443,
    url: `https://testnet.ten.xyz/v1/`,
    accounts: [ `0x${PK}` ]   
   }
}

Note in this instance useGateway does not need to be supplied as the plugin will scan the URL and determine you are connecting to Ten.

Installation

To start working on your project, just run

npm install

Testing the plugin during local development

First compile the plugin's typescript:

npm run build

And then go to the dist folder and create an npm sym link:

cd ./dist
npm link

Then in your project where you want to import the dev version of the plugin do:

npm link ../path/to/plugin/folder