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/apps-token-request

v2.0.0

Published

[![CircleCI](https://circleci.com/gh/1Hive/token-request-app.svg?style=svg)](https://circleci.com/gh/1Hive/token-request-app) [![Coverage Status](https://coveralls.io/repos/github/1Hive/token-request-app/badge.svg?branch=master&service=github)](https://co

Downloads

16

Readme

Token Request

CircleCI Coverage Status

1Hive's Token Request app allows users to create a vote which requests an Organization's tokens in exchange for payment. For example a user may request minting 100 organization tokens in exchange for 100 DAI. The request would require a vote to approve, if the vote is rejected the user would receive their payment back and if it is approved the payment would be deposited in the organization's vault.

🚨 Security review status: Contracts updated for audit as of commit 5ae77ee154383ff01db3215dc5c8e6ad7786c761

The code in this repo has not been audited.

How does it work

The Token Request App should be granted the Create Votes permission on an instance of the Aragon Voting app. When a user makes a request they should transfer the payment to the Token Request app which will hold them in escrow while the vote is created and executed. If the vote duration passes and the payment is still in the Token Request app, the user should be able to claim their tokens. If the vote passes then executing the vote should transfer the users tokens from the Token Request app to the organizations vault, and mint tokens from the token manager for the user.

Initialization

The token request app is initialized by passing the address of a token manager instance, the address of a _vault instance, and an array of addresses _acceptedDepositTokens. The _acceptedDepositTokens array must be less than the MAX_ACCEPTED_DEPOSIT_TOKENS variable which is set to 100.

Roles

The Token Request application should implement the following roles:

  • Finalise token requests
  • Change Vault Address
  • Change Token Manager Address
  • Add/remove offered tokens to/from the accepted offered token list

Interface

We do not need to provide an interface for changing parameters as this can be done by power users using the aragonCLI.

The interface allows users to request tokens, where they would specify the amount and the associated payment. It also allows for withdrawing their requests at any time.

For a detailed view of the flow of the app check out our user-guide

How to run Token Request app locally

First make sure that you have node, npm, and the aragonCLI installed and working. Instructions on how to set that up can be found here. You'll also need to have Metamask or some kind of web wallet enabled to sign transactions in the browser.

Git clone this repo.

git clone https://github.com/1Hive/token-request-app.git

Navigate into the token-request-app directory.

cd token-request-app

Install npm dependencies.

npm i

Deploy a dao with Lock app installed on your local environment.

npm run start:template

How to deploy to an organization

Token Request app has been deployed to Rinkeby at token-request.open.aragonpm.eth

To deploy to an Aragon DAO you can use the Aragon CLI.

aragon dao install <dao-address> token-request.open.aragonpm.eth --app-init-args <vault-address> <token-manager-address>

Contributing

We welcome community contributions!

Please check out our open Issues to get started.

If you discover something that could potentially impact security, please notify us immediately. The quickest way to reach us is via the #dev channel in our team Keybase chat. Just say hi and that you discovered a potential security vulnerability and we'll DM you to discuss details.