You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the same issue of "execution reverted", and the error starts from "self.router.functions". However, I know that Uniswap Base chain uses Universal Router (0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad). This router has different functions. Therefore, I think some new logic needs to be added into uniswap.py file.
Interesting. I am trying to do something similar with the official Typescript SDK, but I am running into a similar error.
In my case I am testing trying to get a quote. Does anyone know if the Universal Router is involved in quoting? At a glance, it does not appear to be involved.
I tried adding the data to constants.py in a fork but still get "execution reverted"
Any ideas on how to make it work?
my research is showing this:
SwapRouter02 and QuoterV2 | 0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a
on Base uses a single-struct approach for exactInputSingle, not the older multi-argument signature. By default, uniswap-python cannot call that function. You either:
Patch uniswap-python to handle the single struct.
Use a router contract that’s fully compatible with the old signature.
Write your own direct Web3.py calls to SwapRouter02.
Without one of these steps, you’ll see errors about “Could not transact with/call contract function” or “InsufficientDataBytes.”QuoterV2 0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a
Activity
nbilbeny commentedon Apr 2, 2024
here's my modified constants.py:
nbilbeny commentedon Apr 2, 2024
If anyone could please add compatibility to base it would be amazing. I've tried but to no avail.
woodychanjm commentedon Apr 10, 2024
Hi, do you have the solution already?
jhcdx9999 commentedon Apr 22, 2024
I have the same issue of "execution reverted", and the error starts from "self.router.functions". However, I know that Uniswap Base chain uses Universal Router (0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad). This router has different functions. Therefore, I think some new logic needs to be added into uniswap.py file.
LiangPG commentedon Apr 23, 2024
router: 0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24
factory: 0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6
jhcdx9999 commentedon Apr 26, 2024
Thanks! It works on swapping tokens on Uniswap V2, but do you also know the ROUTER of Uniswap V3 compiled with uniswap.py?
jfbloom22 commentedon May 8, 2024
Here are all the Uniswap Base deployed contracts for V3: https://docs.uniswap.org/contracts/v3/reference/deployments/base-deployments
woodychanjm commentedon May 9, 2024
I have set up all the contracts as below, but still getting 'execution reverted' error.
jfbloom22 commentedon May 9, 2024
Interesting. I am trying to do something similar with the official Typescript SDK, but I am running into a similar error.
In my case I am testing trying to get a quote. Does anyone know if the Universal Router is involved in quoting? At a glance, it does not appear to be involved.
Uniswap/examples#79
jfbloom22 commentedon May 23, 2024
Not sure if it will help, but I resolved the issue I was running into after I learned the contract I was targeting was a different version.
I discovered it my downloading the ABI directly from Etherscan and running a diff.
Here is what I changed just in case it helps you:
Uniswap/examples#79
FYI I found some updated examples from Uniswap here: https://discord.com/channels/597638925346930701/607978109089611786/948847107744333844
Hope it helps!
alekswoje commentedon Jun 6, 2024
How did you get this to work? Besides changing the constants.py I still get a execution reverted.
Cococroquette commentedon Jan 4, 2025
The guy invert addresses :
check here :
https://docs.uniswap.org/contracts/v2/reference/smart-contracts/v2-deployments
and should work for V2
snarflakes commentedon Jan 27, 2025
my research is showing this:
SwapRouter02 and QuoterV2 | 0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a
on Base uses a single-struct approach for exactInputSingle, not the older multi-argument signature. By default, uniswap-python cannot call that function. You either:
Patch uniswap-python to handle the single struct.
Use a router contract that’s fully compatible with the old signature.
Write your own direct Web3.py calls to SwapRouter02.
Without one of these steps, you’ll see errors about “Could not transact with/call contract function” or “InsufficientDataBytes.”QuoterV2 0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a