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

@1hive/hardhat-aragon

v0.1.4

Published

Aragon Hardhat plugin

Downloads

40

Readme

Aragon Hardhat plugin

Hardhat plugin for publishing Aragon apps to Aragon Package Manager.

Required plugins

This plugin requires:

Installation

yarn add --dev @1hve/hardhat-aragon @nomiclabs/hardhat-ethers ethers hardhat-deploy

And add the following statement to your hardhat.config.js:

require('@1hive/hardhat-aragon')
require('@nomiclabs/hardhat-ethers')
require('hardhat-deploy')

Or, if you are using TypeScript, add this to your hardhat.config.ts:

import '@1hive/hardhat-aragon'
import '@nomiclabs/hardhat-ethers'
import 'hardhat-deploy'

Tasks

This plugin provides the publish task, which allows you to publish an Aragon app to the Aragon Package Manager.

Usage

hardhat [GLOBAL HARDHAT OPTIONS] publish --contract <STRING> [--dry-run] [--only-content] [--skip-app-build] [--skip-validation] bump [...constructorArgs]

Options

  • --contract: Contract address previously deployed.
  • --dry-run: Output tx data without broadcasting.
  • --only-content: Prevents contract compilation, deployment, and artifact generation.
  • --skip-app-build: Skip application build.
  • --skip-validation: Skip validation of artifacts files.

Positional Arguments

  • bump: Type of bump (major, minor or patch) or semantic version

  • constructorArgs: Constructor arguments for the app contract. (default: [])

Config extensions

You need to add the following aragon config to your hardhat.config file:

module.exports = {
  networks: {
    mainnet: { ... }
  },
  aragon: {
    appEnsName: string // counter.open.aragonpm.eth
    appContractName: string // Counter
  }
};

Additionaly you can also configure the optional aragon and ipfs configs:

module.exports = {
  networks: {
    mainnet: { ... }
  },
  aragon: {
    appEnsName: string // counter.open.aragonpm.eth
    appContractName: string // Counter
    appRoles: Role[]
    appSrcPath: string // app/
    appBuildOutputPath: string // dist/
    appBuildScript: string  // build/
    ignoreFilesPath: string // .
  },
  ipfs: {
    url: string // https://ipfs.infura.io:5001/
    gateway: string // https://ipfs.io/
    pinata: {
      key: "YOUR_PINATA_API_KEY"
      secret: "YOUR_PINATA_API_SECRET_KEY"
    }
  }

Where Role has the interface:

interface Role {
  name: string // 'Create new payments'
  id: string // 'CREATE_PAYMENTS_ROLE'
  params: string[] //  ['Token address', ... ]
}

Finally the plugin also extend the hardhat network configuration to allow a custom appEnsName and ensRegistry per network:

networks: {
    hardhat: {
      ensRegistry: '0xaafca6b0c89521752e559650206d7c925fd0e530',
    },
    rinkeby: {
      appEnsName: 'counter.aragonpm.eth',
      ensRegistry: '0x98df287b6c145399aaa709692c8d308357bc085d',
      ...
    },
  },

Environment extensions

This plugins adds an ipfs object to the Hardhat Runtime Environment.

This object has the same API that ipfs-http-client.

This object is already initialized and ready to interact with the IPFS network. You can configure the node url to connect with on the hardhat.config file.

Note The plugin default url is http://localhost:5001/ assuming you have a local IPFS node at that endpoint running. You can configure a custom url node like https://ipfs.infura.io:5001/ if you don't want to run your own node.