Lesson 4 why is the gas price included on a transaction call #1041
-
The fields on a transaction call are shown to be They are all rather logical as the information seems to be, the number of the transaction, how much are you willing to spend on gas, who are you sending the transaction to, what are you sending, and your credentials to perform the transaction. They all make sense to me, except for the Gas Price field. As I understand it, the gas price is automatically set based on the network usage when you send the transaction. The person making the call has 0 control over the gas price: So, I think I’m misunderstanding something because I don’t think they would add a field to specify something you cant control |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Quoting directly from Ethereum docs: A submitted transaction includes the following information: (These are the actual transaction fields - with definitions)
Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
@santiagoziel The miners will determine the price of gas at the time of transaction based on demand and supply, and as a transaction sender, it is own us how important is that transaction for us. The more the gasPrice we will be willing to pay as well as more gasLimit the more changes of our transaction to be mined by miners. It is on miners to select our transaction or not, that is the reason transactions also have maxPriority fee that is only for giving to miners so they should accept our transaction. |
Beta Was this translation helpful? Give feedback.
Quoting directly from Ethereum docs:
A submitted transaction includes the following information: (These are the actual transaction fields - with definitions)