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

uniswap compatibility #8

Open
rolandpo opened this issue Aug 29, 2024 · 2 comments
Open

uniswap compatibility #8

rolandpo opened this issue Aug 29, 2024 · 2 comments

Comments

@rolandpo
Copy link

i've noticed the impersonator extension doesn't work with uniswap, wondering if this could be fixed or i'm doing something wrong

@Barabazs
Copy link
Contributor

Barabazs commented Oct 1, 2024

i've noticed the impersonator extension doesn't work with uniswap, wondering if this could be fixed or i'm doing something wrong

Do you have more information about the problem you have?
What does not work (be specific), do you have browser logs you can share etc?

@apoorvlathey
Copy link
Member

i've noticed the impersonator extension doesn't work with uniswap, wondering if this could be fixed or i'm doing something wrong

Do you have more information about the problem you have? What does not work (be specific), do you have browser logs you can share etc?

@rolandpo If you set the RPC for ETH Mainnet to https://cloudflare-eth.com in the impersonator extension, then it'll work on the Uniswap page as well.

The reason is that the Uniswap frontend is blocking the calls to the RPC unless it's from the following domains:

Content-Security-Policy: The page’s settings blocked the loading of a resource (connect-src) at https://eth.llamarpc.com/ because it violates the following directive: “connect-src 'self' 
blob: data: 
https://*.alchemy.com 
https://*.arbitrum.io 
https://*.base.org/ 
https://*.coinbase.com 
https://*.coingecko.com/ 
https://*.coinmarketcap.com/ 
https://*.drpc.org/ 
https://*.gemini.com 
https://*.googleapis.com 
https://*.infura.io 
https://*.nodereal.io 
https://*.optimism.io 
https://*.quiknode.pro 
https://*.twnodes.com 
https://*.uniswap.org 
https://*.walletconnect.com 
https://*.zerion.io 
https://alfajores-forno.celo-testnet.org 
https://api.avax.network/ext/bc/C/rpc 
https://api.moonpay.com/ 
https://api.opensea.io 
https://bsc-dataseed1.binance.org/ 
https://bsc-dataseed1.bnbchain.org 
https://buy.moonpay.com/ 
https://cdn.center.app/ 
https://celo-org.github.io 
https://cloudflare-eth.com 
https://ethereum-optimism.github.io/ 
https://forno.celo.org/ 
https://gateway.ipfs.io/ 
https://hardbin.com/ 
https://i.seadn.io/ 
https://images-country.meld.io 
https://invalid.rpki.cloudflare.com/ 
https://ipfs.io/ 
https://ipv4-check-perf.radar.cloudflare.com 
https://ipv6-check-perf.radar.cloudflare.com/ 
https://lh3.googleusercontent.com/ 
https://mainnet.base.org/ 
https://o1037921.ingest.sentry.io 
https://browser-intake-datadoghq.com 
https://openseauserdata.com/ 
https://performance.radar.cloudflare.com/ 
https://polygon-rpc.com/ 
https://raw.githubusercontent.com 
https://raw.seadn.io/ 
https://rpc-mainnet.maticvigil.com 
https://rpc-mumbai.maticvigil.com 
https://rpc.ankr.com 
https://rpc.blast.io/ 
https://rpc.degen.tips 
https://rpc.goerli.mudit.blog/ 
https://rpc.mevblocker.io/ 
https://rpc.scroll.io/ 
https://rpc.sepolia.org/ 
https://rpc.zora.energy/ 
https://sockjs-us3.pusher.com/ 
https://sparrow.cloudflare.com/ 
https://statsigapi.net 
https://trustwallet.com 
https://uniswap.org 
https://us-central1-uniswap-mobile.cloudfunctions.net/ 
https://valid.rpki.cloudflare.com 
https://vercel.com https://vercel.live/ 
https://wallet.crypto.com 
https://web3.1inch.io 
https://mainnet.era.zksync.io/ 
wss://*.uniswap.org 
wss://relay.walletconnect.com 
wss://relay.walletconnect.org 
wss://ws-us3.pusher.com/ 
wss://www.walletlink.org”

I think we'd need to modify the extension's working, so instead of the injected script directly making the RPC calls, we forward that to the background script and maybe it'll bypass this restriction.

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

6 participants
@apoorvlathey @Barabazs @rolandpo and others