VM Exception when interfacing with Kyber contract
See original GitHub issueTesting 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
function testFunc() public view returns(uint minConversionRate, uint slippageRate){
uint value = 1000000000000000;
(minConversionRate, slippageRate) = kyberNetworkProxy.getExpectedRate(ERC20(ETH_ADDRESS), ERC20(snxAddress), value);
}
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.
- I asked about this on gitter: [x ]
- Link to my question on gitter: https://gitter.im/ConsenSys/truffle?at=5ea31b31afa1f51d4e1a5b0c
Expected Behavior
Return two values from the getExpectedRate
view function
Current 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)
- run
ganache-cli --fork https://mainnet.infura.io/v3/<infura-token>
- run testFunc()
Context
Your Environment
- Version used: Ganache CLI v6.4.3 (ganache-core: 2.5.5)
- Version of Truffle/Remix/Other tools used:Truffle v5.0.7 (core: 5.0.7)
- Solidity - 0.5.0 (solc-js)
- NodeJS Version: Node v13.3.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Transaction "Revert" Error - solidity
To this: KyberNetworkProxyInterface KNPI = KyberNetworkProxyInterface(kyberAddress);. As it's not really clear why you are converting the ERC20 ...
Read more >Error: VM Exception while processing transaction: revert.
Run the failing function. Changes to try in your code: change the code, re-deploy it in Remix, and then run the failing function...
Read more >Error: call revert exception (Flashloan with dydx, Uniswap ...
I have therefore found all the Kovan addresses of the services used (dydx, kyber, the tokens to be exchanged etc.) and made a...
Read more >ConsenSys/truffle - Gitter
Testing a contract that otherwise works against a ganache mainnet fork but when interfacing with Kyber I get VM Exception while processing transaction: ......
Read more >Integrating the 0x API into your contracts - Solidity developer
How can you add 0x to your contracts to automatically convert between tokens? ... message a lot of times: Error: VM Exception while...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it’s been awhile so probably won’t be able to reproduce. good luck!
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