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

sol-tcr

v0.0.2

Published

A generic, string-keyed TCR in Solidity

Downloads

4

Readme

Token-Curated Registry

Codeship Status for skmgoldin/tcr

A hash-keyed token-curated registry (TCR). Owner's Manual available.

Mainnet factory: 0xcc0df91b86795f21c3d43dbeb3ede0dfcf8dccaf

Rinkeby factory: 0x822415a1e4d0d7f99425d794a817d9b823bdcd0c

EPM: tcr

Initialize

The only environmental dependency you need is Node. Presently we can guarantee this all works with Node 8.

npm install
npm run compile

Tests

The repo has a comprehensive test suite. You can run it with npm run test. To run the tests with the RPC logs, use npm run test gas.

Composition of the repo

The repo is composed as a Truffle project, and is largely idiomatic to Truffle's conventions. The tests are in the test directory, the contracts are in the contracts directory and the migrations (deployment scripts) are in the migrations directory. Furthermore there is a conf directory containing json files where deployments can be parameterized.

Deploying your own TCR

To deploy your own TCR, first open up conf/config.json. The paramDefaults object in the config JSON will specify the starting parameters your TCR is deployed with. In the token object, set deployToken to true if you want to deploy this TCR's token as part of the TCR deployment. You can specifiy initial recipients of the token in the tokenHolders array. If you have already deployed a token, set deployToken to false and provide the token's address in the address property. The token should be EIP20.

The package.json includes scripts for deploying to rinkeby and mainnet. Modify truffle.js and package.json if you need other networks. You'll need a secrets.json file with a funded mnemonic on the m/44'/60'/0'/0/0 HD path in the root of the repo to deploy. Your secrets.json should look like this:

{
  "mnemonic": "my good mnemonic ..."
}

If you prefer to use an environment variable, your .bashrc or .bash_profile should look something like:

export MNEMONIC='my good mnemonic ...'

You can use https://iancoleman.io/bip39/ to generate a mnemonic and derive its m/44'/60'/0'/0/0 address.

Packages

The repo consumes several EPM packages. dll and attrstore are libraries used in PLCRVoting's doubly-linked list abstraction. tokens provides an ERC20-comaptible token implementation. All packages are installed automatically when running npm install.