-
Notifications
You must be signed in to change notification settings - Fork 56
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
[WEB-1304-205] When calling deposit() tx throws a status 400 error #205
Comments
@carlomigueldy It looks like you're trying to send a transaction using alchemy as the provider, I think this should be something you're able to sign with, e.g. the |
Oh, that makes more sense. Thank you @jstashh ! |
I wasn't able to do it successfully, are you able to show me a Write provider example? I tried Signer but that doesn't work @jstashh |
@carlomigueldy you'll probably need to pass in metamask (there should be examples of how to connect ethers to Metamask) or a ethers Wallet object: |
I am struggling to find an example for that unfortunately, and I am looking at This is what I have in my code, and I couldn't get export const yearnSDKClient = new Yearn(chainId, {
provider: new JsonRpcProvider(env.ALCHEMY_API_ETHEREUM_MAINNET_HTTPS_URL),
disableAllowlist: true,
}) Then I tried what you suggested, to pass in MetaMask export const yearnSDKClient = new Yearn(chainId, {
provider: window.ethereum as any,
disableAllowlist: true,
}) But still couldn't get it to work and this is the exception I am getting Tried this one but didn't work and it throws the same exception const web3Provider = new ethers.providers.Web3Provider(window.ethereum as any)
export const yearnSDKClient = new Yearn(chainId, {
provider: web3Provider.provider as any,
disableAllowlist: true,
}) cc @xgambitox |
Hi, still need help on this -- Would appreciate guidance with code snippets 🙏 |
The text was updated successfully, but these errors were encountered: