Open alinasir85 opened 9 months ago
Hi @alinasir85 The smart-order-router sdk expects you to use ethers v5.
Hi @alinasir85 The smart-order-router sdk expects you to use ethers v5.
You kidding? There's no even a workaroud?
You should open this issue in the smart-order-router sdk if this affects you @sbeben . The v3-sdk is a different package. Maybe there is a workaround that I am not aware of.
Hi,
In v6 of ether.js they have renamed Web3Provider with BrowserProvider
when I'm trying to use BrowserProvider provider with AlphaRouter like this
const provider = new ethers.BrowserProvider(config); const router = new AlphaRouter({ chainId, provider, });
its giving error
TS2740: Type BrowserProvider is missing the following properties from type BaseProvider : _networkPromise, _events, formatter, _emitted , and 36 more. alpha-router.d.ts(27, 5): The expected type comes from property provider which is declared here on type AlphaRouterParams
because Provider in the AlphaRouter is of type BaseProvider which comes from '@ethersproject/providers'