When I send a transaction from remix, how does it set the gas price for the transaction (not gas cost / limit)?
2 Answers
This depends on client you are using to broadcast your transaction. Most of them choose the standard gas price at the time the transaction is about to be sent. MyCrypto and Metamask do this, for example.
-
ok that's helpful - how do they retrieve the 'standard gas price at the time the transaction is sent' ? Aug 24, 2018 at 7:06
-
1ethgasstation.info has an API that provides this number based on the current network Aug 24, 2018 at 7:23
-
and which software part is querying this api? geth? or remix? Aug 24, 2018 at 7:25
Remix in particularly uses ethgasstation.info, but many wallets such as metamask will use eth_gasPrice
from the node they are connected to
-
now I'm confused - the other answer stated it's the client that choses it (I thought in this case the client would be geth, not remix?) Aug 24, 2018 at 7:08
-
ethgasstation and geth would both provide an estimated gas price, but the client is free to update it Aug 24, 2018 at 7:11