autonity / docs.autonity.org

Documentation for the Autonity Go Client (AGC)
https://docs.autonity.org
2 stars 5 forks source link

Add Guide on how to set EIP-1559 transaction fee options #184

Open cmjc opened 5 months ago

cmjc commented 5 months ago

Description

Documentation does not cover how to set EIP-1559 gas fee parameters and there is no Guide for how to do it.

If they are not set (gas, maxFeePerGas, maxPriorityFeePerGas, then they may be set by default in the library you are using or computed by the client you send the transaction to. So by default, they do not need to be specified.

The question has been rasied on Discord in the Community - https://discord.com/channels/753937111781998605/1067048920569610381/1227181780633784343

Where this reply ws given:

... if you are using aut, run aut tx make --help and you will see how to explicitly set gas fees as options in the CLI tool. Autonity is a geth fork and implements ethereum's EIP-1559 model. There is a super explainer on gas and fees in the geth docs - see https://ethereum.org/en/developers/docs/gas/. If you are using other tooling, see the docs for how to set it. If you are writing your own scripts, see their docs on setting parameters on sending transactions. For example for Python https://web3py.readthedocs.io/en/stable/web3.eth.html#web3.eth.Eth.send_transaction, or JavaScript ethers.js https://docs.ethers.org/v5/api/utils/transactions/ or JavaScript web3.js https://web3js.readthedocs.io/en/v1.5.0/web3-eth.html#id85. You don't have to explicitly set the gas parameters, they are optional and it's up to you to decide your gas pricing strategy.

Rationale

Setting gas fees is a user facing function that should be documented.

Implementation

Useful References