Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getExpectedRateAfterFee with empty hint returns an exception #1096

Open
Samboy76 opened this issue Nov 9, 2022 · 0 comments
Open

getExpectedRateAfterFee with empty hint returns an exception #1096

Samboy76 opened this issue Nov 9, 2022 · 0 comments

Comments

@Samboy76
Copy link

Samboy76 commented Nov 9, 2022

Hello, when passing in an empty converted bytes array or empty string value in javascript into getExpectedRateAfterFee

const expectedRate = await kyber.functions.getExpectedRateAfterFee(
                                          srcToken.address,
                                          destToken.address, 
                                          querySrcAmount,
                                          bps,
                                          "" // empty hints

  );

or equally attempted to do the same from within solidity contract:

uint expectedRate = kyber.getExpectedRateAfterFee(ERC20(srcTokenAddress), ERC20(destTokenAddress), querySrcAmount, bps, bytes(""));

both of which returns the below same error message:

Failure message: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ](method="getExpectedRateAfterFee(address,address,uint256,uint256)", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)

Any ideas please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant