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

badger-contracts

v0.1.0

Published

![Badger Logo](./images/badger-logo.png)

Downloads

31

Readme

Badger Logo

Badger Finance

Badger Finance is a community DAO, focused on bringing Bitcoin to DeFi. The DAO's debut products are Sett, a yield aggregator, and Digg, a BTC-pegged elastic supply currency.

Visit our GitBook for more detailed documentation.

Build

The Badger contracts & tests are built around the Eth-Brownie Python framework.

If you're not familiar with brownie, see the quickstart guide.

Dependencies

  • Python 3.9
  • Node.js 10.x development environment (for Ganache).
  • Eth-Brownie
  • Ganache (v6.12.1)

Install

This repository is currently only supported on Linux based systems. For Windows 10 users, it is recommended to use the Windows Subsystem for Linux 2 (WSL2) in order to run Linux executables natively and interact with the system in a convenient way. Instructions on how to quickly setup WSL2 can be found here.

For Ubuntu, you can install the prerequisite packages with the following command:

sudo apt-get install -y python3 python3-virtualenv python3-pip

For other systems, install Python 3.9, Pip, and use pip to install virtualenv with

pip install virtualenv

To install NodeJS and yarn on UNIX based systems, it is recommended to use the following commands:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
nvm install v14.16.1
npm install -g yarn

With prerequisites installed, install the project with:

git clone https://github.com/Badger-Finance/badger-system
cd badger-system
yarn install --lock-file
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

Compile

source venv/bin/activate
brownie compile

Test

source venv/bin/activate
brownie test

Add coverage and gas profiling

source venv/bin/activate
brownie test --coverage --gas

Local Instance

Run a local ganache instance connected to badger contracts, with all Sett-related assets distributed to a test account specified in the TEST_ACCOUNT env variable. Assumes the default network is mainnet-fork in the brownie config and uses Alchemy as a web3 provider through the ALCHEMYAPI_TOKEN env variable. Ganache will continue to run until the process is closed.

source venv/bin/activate
export TEST_ACCOUNT=<enter your account here>
export ALCHEMYAPI_TOKEN=<enter Alchemy key here>
brownie run scripts/local_instance.py

Running Scripts on non-Ethereum chains

The included brownie-config.yaml has configurations for running forked environments on non-ethereum chains where Badger contracts are deployed. To run scripts against another chain, append the appropriate --network parameter to any brownie run or brownie test command.

The appropriate live Badger deploy for that chain will automatically be read.

As an example, bsc-fork is the networkID for a Binance Smart Chain forked environment.

brownie run scripts/local_instance.py --network bsc-fork

Badger Deploy Files

These files maintain a registry of all live Badger contracts on a given chain.

Documentation

You can read more about Badger at our GitBook.

Discussion

To join the community, head over to the Discord server.