0

I'm trying to use Uniswap V2: Router 2 through Etherscan:

https://etherscan.io/address/0x7a250d5630b4cf539739df2c5dacb4c659f2488d#writeContract

As a test example I am looking to swap 10 RFI (contract address: 0xa1afffe3f4d611d252010e3eaf6f4d77088b0cd7) for YLD (contract address: 0xdcb01cc464238396e213a6fdd933e36796eaff9f).

I put the amountOutMin number very low so it would go through no matter what. Sadly I don't think I've input the swap route correctly? Any advice would be appreciated.

Writing contract swapExactTokensForTokensSupportingFeeOnTransferTokens

amountIn (uint256)
10000000000000000000

amountOutMin (uint256)
500000000000000

path (address[])
["0xa1afffe3f4d611d252010e3eaf6f4d77088b0cd7", "0xdcb01cc464238396e213a6fdd933e36796eaff9f"]

to (address)
0x[redacted]

deadline (uint256)
1611748800

Error thrown: invalid address (arg="path", coderType="

image of the error the contract throws

2
  • sorry for the noob problems... will look to do this on something like brownie via Vyper once I feel a bit more competent.
    – Alp
    Jan 27, 2021 at 11:30
  • 1
    resolved, address format was: 0xa1afffe3f4d611d252010e3eaf6f4d77088b0cd7,0xdcb01cc464238396e213a6fdd933e36796eaff9f
    – Alp
    Jan 27, 2021 at 11:56

1 Answer 1

0

Are you sure that there's a pool available containing those two tokens? One reason for failure is that a pool doesn't exist for the pair. Another might be that there isn't enough liquidity.

1
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
    – Julissa DC
    Jan 19, 2022 at 20:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.