Comments (3)
The failed tx:
https://etherscan.io/tx/0x7d9860f50f3a0ebc32f3fb72d693da74472adb1723583d2edac698c791a2a4bf
@colourful-land your rejected transaction was for withdrawal and I get a higher gas limit set when I click on the withdraw prompt, are you referencing the wrong screenshot?
from cofix-web-user-interface-v2.0.
Currently, gas limit calculation is done the following way:
gasLmit = contract.estimateGas
* 1.2
- contract.estimateGas is a
web3 method
which will estimate gas needed for execution. - if this estimation could not be gotten, 700000 will be used. Then gas limit = 700000 * 1.2 = 840000.
Also, this value is dynamic not a fixed value. Sometimes, the gas estimation returned may not be enough for method execution, that's why 1.2 times of it here.
I will keep my eyes on this issue, but I don't think it is very often and it should be rare.
To fix this, this simplest way is to use a bigger value than 1.2, such as 1.5.
from cofix-web-user-interface-v2.0.
When developing v1.1.0 , I met a similar issue. After digging code, I find there is no gas estimation for staking. Most of time, this is ok, but sometime staking will fail because of "out of gas".
So, I add gas estimation for staking (and other methods without gas estimation) and give it 200000 as a default value if the estimated value < 200000. Setting a default value is because I found some smart contract methods might fail because of "out of gas" sometime. All these failure is because the gas spent is greater than gas estimation (80000 ~ 100000+) but less than 200000.
This change will have no impact on existing gas estimation, because current estimation is always bigger than 200000.
This fix is included in v1.1.0 branch.
from cofix-web-user-interface-v2.0.
Related Issues (20)
- preloading data in other pages when first page is loaded.
- pre cache static resources to speed up page loading.
- Automation: ui e2e testing HOT 1
- Make the clickable area on the Pair button wider
- Rename the “claim CoFi token” button in dividend page
- https://stage.cofix.io/ and https://d1ussy340im9wf.cloudfront.net/#/swap data update slower than https://v110.cofix.io/ HOT 3
- CN in withdraw page
- EN withdraw page
- ETH dividend amount is keep loading in some Wallets: Huobi, MyKey, TokenPocket++, Status, Coinbase Wallet
- dapp monitor solution
- Need to add Np N'p and Npnok data in liquidity pool HOT 2
- Add New Liquidity Pool Pair HOT 2
- Add more tokens to Swap Tab
- Add Cofix Analytics
- Need a default token icon for the token inputted by user. HOT 2
- Should use the "To (estimated)" amount instead of "Minimum received"
- Add WalletConnect Support HOT 3
- make token list can be scrolled for any screen size. HOT 1
- UI design for WalletConnect HOT 3
- The data is not updated automatically when using WalletConnect
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cofix-web-user-interface-v2.0.