Giter VIP home page Giter VIP logo

venus-js's People

Contributors

coreyar avatar gryincent avatar kkirka avatar superdev810 avatar z-th-btc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

venus-js's Issues

This lib is not working

It's using outdated URLs, I'm trying to use it to fetch my borrow limit usage, but it gives a 404 error.

Mainnet API has changed URLs, but even if I update the base api url it still doesn't work, is this lib deprecated? Is there a new one?

RedeemUnderlying does not redeem the entire balance

Hi,

When I call the redeem method (redeem underlying) to redeem the max balance it seems that very small amount of vTokens still stay in the venus protocol. I think that this amount is the interest rate generated from the last block after I called the redeem method.
How can I redeem tokens incl. the interest so that the vToken amount is 0?

example:

  1. I supply 1 SXP to the protocol
  2. after 1 min I redeem the max supplied amount which in this example is 1.0000001326 SXP.
  3. after the redeeming, the protocol still has a very small amount of SXP.

On the main site app.venus.io the redeem (withdraw) function works perfectly.

Thank you.

Need some help : Cannot read properties of undefined (reading 'vUSDT')

`const Venus = require('@swipewallet/venus-js');

let main = async function () {
let venus = new Venus('https://bsc-dataseed1.binance.org',{privateKey});
console.log('Supplying usdt to the Venus Protocol...');
const trxOptions = {gasPrice: 5, gasLimit: 40000, mantissa: false};
const trx = await venus.supply(Venus.USDT, 5, true, trxOptions);
console.log('Ethers.js transaction object', trx);
}`

TypeError: Cannot read properties of undefined (reading 'vUSDT') at Object.<anonymous> (/Users/buyu/Documents/BlockChainDemo/node_modules/@swipewallet/venus-js/src/vToken.ts:60:52) at step (/Users/buyu/Documents/BlockChainDemo/node_modules/@swipewallet/venus-js/dist/nodejs/vToken.js:49:23) at Object.next (/Users/buyu/Documents/BlockChainDemo/node_modules/@swipewallet/venus-js/dist/nodejs/vToken.js:30:53) at fulfilled (/Users/buyu/Documents/BlockChainDemo/node_modules/@swipewallet/venus-js/dist/nodejs/vToken.js:21:58) at processTicksAndRejections (node:internal/process/task_queues:96:5)

I can't find code error ,help me!

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.