This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10078|Reply: 2

What is gas, what is gas price, and data?

[Copy link]
Posted on 2/22/2018 1:39:13 PM | | | |

On Ethereum, sending tokens or calling smart contracts to perform write operations on the blockchain requires miner computational fees, and billing is calculated according to gas, which is paid in ETH. Regardless of whether your call method succeeds or fails, you will be charged for compute. Even if it fails, the miner verifies and executes your transaction (calculation), so gas fees must be paid just like successful transactions.

Simply put, gas limit is equivalent to how much gasoline a car needs to add, and gas price is equivalent to the price per liter of gasoline.

Gas limit is called limit because it is the maximum amount of gas you are willing to spend in a single transaction. The gas required for a transaction is defined by how much code is executed by calling the smart contract. If you don't want to spend too much gas, lowering the gas limit won't help much. Because you must include enough gas to pay for the compute resources, otherwise an error will be reported due to insufficient gas. All unused gas will be returned to you at the end of the transfer. So use imToken to send 1 ETH, set the gas limit to 400,000, and you will receive 400,000 - 21,000 gas refund after the transfer is over.

Reducing gas prices can save miners, but it also slows down miner packaging. Miners prioritize transactions with high gas price settings, and if you want to speed up transfers, you can set the gas price higher so you can stay high in line. If you're not in a hurry, you just need to set a secure gas price, and the miner will package your transactionSee the minimum gas price that miners can accept: http://ethgasstation.info/




Data is optional and is used to call the contract. You need to convert the corresponding string to hexadecimal, tool: http://string-functions.com/string-hex.aspx, and fill in the hexadecimal data (starting with 0x) for example, makoshan to hexadecimal is 0x6d616b6f7368616e
 Landlord| Posted on 10/18/2025 5:40:55 PM |
Ethereum Gas Real-Time Fees:The hyperlink login is visible.
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com