shuail0 / SyncSwapbot

24 stars 18 forks source link

scroll链上eth->usdc报错 #2

Closed vvsuperman closed 2 months ago

vvsuperman commented 3 months ago

https://stackoverflow.com/questions/78687570/how-to-do-swap-in-synswap-i-got-a-unpredictable-gas-limit-error 老哥帮忙看下

vvsuperman commented 3 months ago

合约地址错了,从链上找的地址不对 You are using manual for making a swap through SwapRouter, but then providing the SwapRouter02 contract address. SwapRouetr02 is an upgrade of SwapRouter and is not exactly the same. SwapRouter02 contract requires one more param in the "steps" part. You need to add "useVault" (true) at the end of "steps"(source code)

The other option will be to use SwapRouter (not SwapRouter02) contract - 0x80e38291e06339d10AAB483C65695D004dBD5C69

shuail0 commented 3 months ago

我明天看一下哈

vvsuperman commented 2 months ago

搞定了兄弟,close掉吧