dappuniversity / price-bot

397 stars 392 forks source link

upgrade to new KyberNetworkProxy contract, fixes #12 #13

Open mohamedalichelbi opened 3 years ago

jordanmcdougall commented 3 years ago

This PR fixed #13 for me - thanks @mohamedalichelbi!

AngelLozan commented 3 years ago

Excellent thank you! This was a great fix @mohamedalichelbi

I appreciate you putting this out there. How did you discover this? I'd love to know your thought process.

ccoop1 commented 2 years ago

Just wanted to confirm this also fixed my issue. There were so many others from the start I was able to walk myself through but this one was tricky. Several places to edit. Thanks again! Working like a charm after about 15 edits haha!!

KingEriic commented 2 years ago

Hi, Devs!!

In order to complement the solution, it is also necessary to update the ABI, so as not to receive the error "Error: Invalid number of parameters for "getExpectedRate". Got 3 expected 4!". Then go to etherscan, search for the updated contract, go to the contract tab and find the "Contract ABI" below and update the code.

Asthay97 commented 2 years ago

I was getting error : execution reverted for all tokens except MKR. This commit has resolved the error. Thanks :)

anibaljasin commented 2 years ago

This also solve the issue for me

loekTheDreamer commented 2 years ago

Thanks a million dollars!

krdiamond commented 2 years ago

thanks so much for putting in the time to fix this!!

ccoop1 commented 1 year ago

Oh yea definitely many better ways. Especially now. When this was created - not so much. I’ve actually spent the last year and a half trying to make this thing run better, smoother, faster, and actually run (when I first received this project it was completely unusable) I have to say - I have better price bots and there are better ones available. With this one I actually spent the extra time programming it to call a flash loan or really any other contract. That was a nightmare because there are better ways to do this now simply due to the fact this this software is approximately 3 years old. Most of Greg’s gear is basic and flawed at best. He mostly just throws stuff together to do his videos on YouTube but doesn’t make sure the projects are of quality. That’s for the user to do I guess. It’s only an issue because you know 90% of people who watch have no programming experience and giving them a broken package with no training on how to use it is stealing their time. It’s stealing because he got paid through ads, they sacrificed their time to watch, so that’s how they paid, and the end result is useless lol. I don’t consider that ethical programming. But to your question the whole process can be done better now.

On Sun, Apr 10, 2022 at 7:13 AM Serge Jabo Byusa @.***> wrote:

@.**** approved this pull request.

In index.js https://github.com/dappuniversity/price-bot/pull/13#discussion_r846770022 :

console.table([{ 'Input Token': inputTokenSymbol, 'Output Token': outputTokenSymbol, 'Input Amount': web3.utils.fromWei(inputAmount, 'Ether'), 'Uniswap Return': web3.utils.fromWei(uniswapResult, 'Ether'), 'Kyber Expected Rate': web3.utils.fromWei(kyberResult.expectedRate, 'Ether'),

  • 'Kyber Min Return': web3.utils.fromWei(kyberResult.slippageRate, 'Ether'),
  • 'Kyber Min Return': web3.utils.fromWei(kyberResult.worstRate, 'Ether'),

Does mean that it will just pick the worst price instead of slippageRate as before? Is there a better way of doing this?

— Reply to this email directly, view it on GitHub https://github.com/dappuniversity/price-bot/pull/13#pullrequestreview-937257736, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVAJNT5T6A4TKEEGKIAGMNTVELAW3ANCNFSM4VYNKLSA . You are receiving this because you commented.Message ID: @.***>