1inchProtocol
1inchProtocol copied to clipboard
Swap of DAI to USDT, DAI to USDC results in - Fail with error 'SafeERC20: low-level call failed'
Hello,
I am trying to use the Swap function from OneSplit Contract - 0xC586BeF4a0992C495Cf22e1aeEE4E446CECDee0E
I was able to successfully perform the swap from DAI to TUSD and from TUSD back to DAI. Both have 18 decimal places.
However, the same does not work for DAI to USDT, or DAI to USDC. (USDT, USDC has got 6 decimal places and I have accounted for 6 decimal places in the code in JS file).
I have tested on testnet using ganache (live fork) and truffle. I get the follow error in this setup.
VM Exception while processing transaction: revert
I tried this on the mainnet too. On the mainnet, I get the following error.
Fail with error 'SafeERC20: low-level call failed'
What am I doing wrong? Hope get this this solved.
Regards, Harish
@aries1504 I've tried with OneSplitAudit
at 0x50FDA034C0Ce7a8f7EFDAebDA7Aa7cA21CC1267e
, same errors
Just conjecture but maybe this branch might hae some fixes as it is closer to the final product: https://github.com/1inch-exchange/1inchProtocol/pull/39 s closer
Did you manage to solve this? Having the exactly same problem, but I am unable to make any swap, it always says SafeERC20: low-level call failed
I solved it by just approving OneSplitAudit to spend my coins, and it worked with 0x50FDA034C0Ce7a8f7EFDAebDA7Aa7cA21CC1267e
Hello,
I am trying to use the Swap function from OneSplit Contract - 0xC586BeF4a0992C495Cf22e1aeEE4E446CECDee0E
I was able to successfully perform the swap from DAI to TUSD and from TUSD back to DAI. Both have 18 decimal places.
However, the same does not work for DAI to USDT, or DAI to USDC. (USDT, USDC has got 6 decimal places and I have accounted for 6 decimal places in the code in JS file).
I have tested on testnet using ganache (live fork) and truffle. I get the follow error in this setup.
VM Exception while processing transaction: revert
I tried this on the mainnet too. On the mainnet, I get the following error.
Fail with error 'SafeERC20: low-level call failed'
What am I doing wrong? Hope get this this solved.
Regards, Harish
I HAVE THE SAME PROBLEM PLEASE CAN ANYONE HELP ME TO SOLVE.? THANKS