Coder Social home page Coder Social logo

public's Introduction

Solend Public

Solend public is a monorepo of public reposititories meant to benefit from a yarn workspace setup. This includes:

  • Solend SDK, a Typescript SDK for interacting with the Solend program
  • Solend LITE, a lightweight open-source Solend client, powered by and developed alongside the Solend SDK
  • Solend Liquidator, a starting point for the Solend community to build their liquidator bots

public's People

Contributors

0xcactus avatar 0xdhu avatar 0xkiplet avatar 0xodia avatar 0xripleys avatar 0xtailsoup avatar aaronovz1 avatar after-the-sunrise avatar andreihrs avatar billythedummy avatar dasichuan avatar haoqian-zheng avatar janvinsha avatar joemccann avatar johnnycus avatar nope-finance avatar peroxy avatar radiantaeon avatar solendvega avatar tahsintunan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

public's Issues

Add ability to use custom `lendingMarket`

I'm developing a product using localnet that requires interaction with solend and unfortunately I can't use it locally because when copying accounts, pyth's slots manage to run ahead.
So I only see a way to create my own market with a reserve and use local pyth oracle

But now there is no such option, because a request is made to your API and the market is taken from the response.
I would like to be able to pass the market when calling methods

don't work on devnet

index.js:1127 Uncaught (in promise) RangeError: Trying to access beyond buffer length
    at checkOffset (index.js:1127:36)
    at Uint8Array.readUInt32LE (index.js:1187:18)
    at parsePriceData (index.js:170:22)
    at eval (prices.ts:36:64)
    at Array.reduce (<anonymous>)
    at fetchPrices (prices.ts:24:25)
    at async getReservesFromChain (pools.ts:235:18)
    at async fetchPools (pools.ts:19:5)
    at async Object.eval [as write] (pools.ts:83:7)
    at async Promise.all (:3001/index 0)
    at async eval (RefreshDataButton.tsx:58:7)

parsePriceData not properly parsing account data

Code in question

  const pricePublicKey = new PublicKey(oracle.priceAddress);
    const result = await connection.getAccountInfo(pricePublicKey);
    if (result !== null) {
      let { price, previousPrice } = parsePriceData(result.data);
      priceData = price || previousPrice;
          }

Error

Error: The value of "offset is out of range. It must be >= 0 and <= 126. Received 176
    at ERR_OUT_OF_RANGE (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:287:3)
    at boundsError (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:283:9)
    at readBigUInt64LE (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:247:5)
    at parsePriceData (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:162:24)
    at getTokenOracleData (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:56:38)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at getTokensOracleData (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\libs\pyth.ts:104:16)
    at runLiquidator (c:\Users\dedaq\Documents\SolendLiquidator\dans-liquidator\src\liquidate.ts:49:28)

Node.js v20.10.0

I'm not sure why it's not able to parse the oracles data anymore.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.