-
Notifications
You must be signed in to change notification settings - Fork 682
VM Exception when interfacing with Kyber contract #606
VM Exception when interfacing with Kyber contract #606
Comments
Looks like you are using a version of ganache-cli released over 1 year ago. Please update to latest ( If that doesn't fix it, I don't think there is anything on your side you can do at the moment, this is likely a bug in Ganache core itself. :-/ That said, if you don't have access to archive data at Infura, forking might not always behave as expected. It's not immediately apparent to me what could be going wrong, and I can't jump to fix this at the moment. If you have time to dive in and try to track down whats going wrong, all the forking-related code is contained within these two files: https://github.com/trufflesuite/ganache-core/blob/develop/lib/utils/forkedblockchain.js https://github.com/trufflesuite/ganache-core/blob/develop/lib/utils/forkedstoragetrie.js |
Troubleshooted with latest ganache version after posting this. Still facing same bug |
I'm experiencing a similar thing with uniswap when forking |
Hi, commenting to add that I am also facing the same problem with Kyber, and have had similar issues with 1inch and Curve. |
@michaelcohen716 @alonmuroch @bertmiller, any chance any of you can try reproducing the issue with the latest version? ganache-cli: https://github.com/trufflesuite/ganache-cli/releases/tag/v6.12.0 We fixed a handful of issues with storage that hopefully fixed this issue. Thanks! |
it's been awhile so probably won't be able to reproduce. good luck! |
@seesemichaelj so, I checked and I'm up to date on ganache-cli and ganache-core. On my 1st try I was able to compile and execute a smart contract that interfaced with 1inch. Success! |
Thanks for the info @bertmiller! I'm going to defer to @davidmurdoch on this one going forward due to a shift of priorities on my end |
Testing a contract that otherwise works against a ganache mainnet fork but when interfacing with the KyberProxy contract I get
VM Exception while processing transaction: revert
.Kyber address:
0x818E6FECD516Ecc3849DAf6845e3EC868087B755
The code is as simple as this
and the same code works on mainnet without issue. So we can safely rule out any issues related to contract code. Additionally, JS calls to the Kyber contract directly on ganache fork are working, so this bug is specific to interfacing with this contract from another contract on ganache.
Expected Behavior
Return two values from the
getExpectedRate
view functionCurrent Behavior
EVM Revert
Possible Solution
Not sure but I've tested with very high gasLimits and it wasn't any help.
Steps to Reproduce (for bugs)
ganache-cli --fork https://mainnet.infura.io/v3/<infura-token>
Context
Your Environment
The text was updated successfully, but these errors were encountered: