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

@lilnounsdao/contracts

v0.3.5

Published

Lil Nouns solidity contracts & artifacts

Downloads

95

Readme

@lilnounsdao/contracts

Usage

This package contains the suite of Solidity contracts powering Lil Nouns DAO.

Contracts

| Contract | Description | Address | | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | | NounsToken | This is the Nouns ERC721 Token contract. Unlike other Nouns contracts, it cannot be replaced or upgraded. Beyond the responsibilities of a standard ERC721 token, it is used to lock and replace periphery contracts, store checkpointing data required by our Governance contracts, and control Noun minting/burning. This contract contains two main roles - minter and owner. The minter will be set to the Nouns Auction House in the constructor and ownership will be transferred to the Nouns DAO following deployment. | 0x4b10701Bfd7BFEdc47d50562b76b436fbB5BdB3B | | NounsSeeder | This contract is used to determine Noun traits during the minting process. It can be replaced to allow for future trait generation algorithm upgrades. Additionally, it can be locked by the Nouns DAO to prevent any future updates. Currently, Noun traits are determined using pseudo-random number generation: keccak256(abi.encodePacked(blockhash(block.number - 1), nounId)). Trait generation is not truly random. Traits can be predicted when minting a Noun on the pending block. | 0xCC8a0FB5ab3C7132c1b2A0109142Fb112c4Ce515 | | NounsDescriptor | This contract is used to store/render Noun artwork and build token URIs. Noun 'parts' are compressed in the following format before being stored in their respective byte arrays: Palette Index, Bounds [Top (Y), Right (X), Bottom (Y), Left (X)] (4 Bytes), [Pixel Length (1 Byte), Color Index (1 Byte)][]. When tokenURI is called, Noun parts are read from storage and converted into a series of SVG rects to build an SVG image on-chain. Once the entire SVG has been generated, it is base64 encoded. The token URI consists of base64 encoded data URI with the JSON contents directly inlined, including the SVG image. | 0x11fb55d9580cdbfb83de3510ff5ba74309800ad1 | | NounsAuctionHouse | This contract acts as a self-sufficient noun generation and distribution mechanism, auctioning one noun every 24 hours, forever. 100% of auction proceeds (ETH) are automatically deposited in the Nouns DAO treasury, where they are governed by noun owners. Each time an auction is settled, the settlement transaction will also cause a new noun to be minted and a new 24 hour auction to begin. While settlement is most heavily incentivized for the winning bidder, it can be triggered by anyone, allowing the system to trustlessly auction nouns as long as Ethereum is operational and there are interested bidders. | 0x5B2003cA8FE9FfB93684cE377f52B415C7dC0216 | | NounsDAOExecutor | This contract is a fork of Compound's Timelock. It acts as a timelocked treasury for the Nouns DAO. This contract is controlled by the governance contract (NounsDAOProxy). | 0xd5f279ff9EB21c6D40C8f345a66f2751C4eeA1fB | | NounsDAOProxy | This contract is a fork of Compound's GovernorBravoDelegator. It can be used to create, vote on, and execute governance proposals. | 0x5d2C31ce16924C2a71D317e5BbFd5ce387854039 | | NounsDAOLogicV1 | This contract is a fork of Compound's GovernorBravoDelegate. It's the logic contract used by the NounsDAOProxy. | 0x8b20b261BDF0f97cfc6D3bD4903beb9D17794Ed8 |

Development

Install dependencies

yarn

Compile typescript, contracts, and generate typechain wrappers

yarn build

Run tests

yarn test

Environment Setup

Copy .env.example to .env and fill in fields

Commands

# compiling
npx hardhat compile

# deploying
npx hardhat run --network rinkeby scripts/deploy.js

# verifying on etherscan
npx hardhat verify --network rinkeby {DEPLOYED_ADDRESS}

# replace `rinkeby` with `mainnet` to productionize

Automated Testnet Deployments

The contracts are deployed to Rinkeby on each push to master and each PR using the account 0x387d301d92AE0a87fD450975e8Aef66b72fBD718. This account's mnemonic is stored in GitHub Actions as a secret and is injected as the environment variable MNEMONIC. This mnemonic shouldn't be considered safe for mainnet use.