Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
badger-contracts
Advanced tools
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.
The Badger contracts & tests are built around the Eth-Brownie Python framework.
If you're not familiar with brownie, see the quickstart guide.
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
source venv/bin/activate
brownie compile
source venv/bin/activate
brownie test
source venv/bin/activate
brownie test --coverage --gas
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
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
These files maintain a registry of all live Badger contracts on a given chain.
You can read more about Badger at our GitBook.
To join the community, head over to the Discord server.
FAQs
![Badger Logo](./images/badger-logo.png)
We found that badger-contracts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.