0

I'm trying to call the exchange proxy 2 in truffle console with web3.js and i get a VM Exception while processing transaction: revert. My truffle console is pointing to a ganache-cli mainnet fork based off of infura. The balancer method returns a struct. Could that be the reason it fails? What else could I be doing wrong? Seems like a fairly straight forward thing but I can't for the life of me understand what I'm doing wrong. Passing those exact same arguments to the etherscan read contract page doesnt throw the error...

// abi retrieved from etherscan for this address
contract = new web3.eth.Contract(abi, "0x3e66b66fd1d0b02fda6c811da9e0547970db2f21");
contract.methods.viewSplitExactIn(
    "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", 
    "0x6B175474E89094C44Da98b954EedeAC495271d0F", 
    1000000, 4).call()
4
  • Could be that your input is wrong. Commented Sep 18, 2020 at 11:09
  • Passing those exact same arguments to the etherscan read contract page doesnt throw the error - but it doesn't show the output either, so most likely etherscan runs into the same problem. Commented Sep 18, 2020 at 11:10
  • @goodvibration but doesn't etherscan usually show VM Exception while processing transaction: revert when an error like that happens? Commented Sep 18, 2020 at 14:15
  • Well, maybe, but it also shows an actual result when an error doesn't happen. Commented Sep 18, 2020 at 14:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.