alchemix-finance / alchemix-v2-frontend

Repository for v2 UI
https://alchemix.fi
ISC License
12 stars 22 forks source link

Fix wstETH deposit on Arbitrum #568

Closed hone1er closed 4 months ago

hone1er commented 4 months ago

This pull request updates the deposit function to use the alchemistInstance instead of the gatewayInstance. This change ensures that the correct instance is used for the deposit operation, fixing an error 'gatewayInstance.deposit is not a function'

vercel[bot] commented 4 months ago

@hone1er is attempting to deploy a commit to the Alchemix Finance Team on Vercel.

A member of the Team first needs to authorize it.

hone1er commented 4 months ago

Would like to do some more testing on this to make sure it doesn't impact other vaults

EDIT: Changed the solution so that other tokens are not impacted by the change. Can now deposit wstETH but still not able to deposit aArbUSDC on arbitrum

Below is the error for aArbUSDC on arbitrum

vaultActions.ts:186 [vaultActions/deposit]: Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (reason="execution reverted", method="estimateGas", transaction={"from":"0x54eB82E4Ec25eb173E1668dd5aB0943904d87331","to":"0x3e1ccc66c755Fdbc7fbf7D667aA843c062Daf304","data":"0xf45346dc000000000000000000000000248a431116c6f6fcd5fe1097d16d0597e24100f500000000000000000000000000000000000000000000000000000000007a944200000000000000000000000054eb82e4ec25eb173e1668dd5ab0943904d87331","accessList":null}, error={"code":3,"message":"execution reverted","data":"0xe7e40b5b000000000000000000000000724dc807b04555b71ed48a6896b6f41593b8c6370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000244e487b71000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000000000000000000"}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.7.2)