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

@portals-fi/galaxy-farmer

v1.2.0

Published

A template for TypeScript projects with pre-configured tooling

Downloads

195

Readme

Galaxy Farmer

unknown

Galaxy Farmer is a guide to farming the galaxy. Through the use of this library you can find the most profitable planets to farm, and the most profitable items to farm on those planets.

Galaxy Farmer provides a single programming interface to implement access any farming opportunity in DeFi. You can use the interface to stake/unstake LP tokens in farms, as well as to claim incentive rewards. You can also use it to aggregate data on the most profitable farms and discover the best farming opportunities.

Setup

  1. Clone the repo
  2. Install dependencies using npm install
  3. Generate typechain interfaces using npm run typechain:build
  4. Add a .env file to the root of the project with the following variables for RPC node URLs:
MAINNET_URL=
AVALANCHE_URL=
OPTIMISM_URL=
  1. Run the test suite using npm run test

Contributing to Galaxy Farmer

Galaxy Farmer is an open source project and we welcome contributions. If you have a favorite project that you would like to see added to Galaxy Farmer, please open an issue or submit a pull request.

Adding a new platform

Create a new folder in the src/platforms directory. The folder should be named after the protocol/platform. For example, if you are adding a new platform called MyPlatform, the folder should be named my-platform.

If the platform is a fork of an existing platform, you can copy the existing platform folder and rename it. For example, if you are adding a new platform called MyPlatform that is a fork of the Aave platform, you can copy the aave folder and rename it to my-platform.

If the farm is a fork of a common farming contract like MasterChef you can extend the class of that contract from src/common/platforms collection of common contracts.

The folder should contain the following:

  • index.ts - This file should export the MyPlatform class. The class should implement the IHandler interface from src/types/base/IHandler.ts. The class should be decorated with the @Platform decorator from src/common/decorators/platform.decorator.ts.
  • __tests__ - This folder should contain a test file for the MyPlatform class. The test file should be named MyPlatform.test.ts and should include meaningful tests for all of the functions in the MyPlatform class.

License

This repository is under the Business Source License 1.1

Disclaimer: Protocols supported by Galaxy Farmer are subject to change. Galaxy Farmer is not responsible for any losses incurred by using this library. Use at your own risk. Integration with Galaxy Farmer is not guaranteed to be bug-free. Galaxy Farmer is not responsible for any bugs in the library. Integration with Galaxy Farmer is not an endorsement of the subsequent protocol or its owners. Projects implemented in this library are risky and should be treated as such.