harmony-one / ethhmy-bridge.frontend

Ethereum<>Harmony two way bridge (trusted version) - frontend part
25 stars 62 forks source link

BSC bridge approve and lock tokens using way too much gas limit leading to too high fee estimate #91

Closed gupadhyaya closed 3 years ago

gupadhyaya commented 3 years ago

From BSC to Harmony transfer, the approve and lock tokens is using a gas limit of 4,712,388 instead of 150,000 (as done in Ethereum to Harmony), and this leads to a huge estimate of ~$125 for approve and lock tokens, whereas only $1 is charged for each approve and lock.

Example: Approve: https://testnet.bscscan.com/tx/0x3eb45b5f441ad3ec532aefc3baa0ff50e9a907410130662cf4d9c1e628b40f00 Lock: https://testnet.bscscan.com/tx/0xb848a00c4c8ae605d8cd4351717d26c6ed02e1b39fd3aefede3bc15666a6a853

Change the gas limits according to Ethereum (I believe it is 150K for both).

Screen Shot 2021-03-20 at 4 01 57 PM
potvik commented 3 years ago

Fixed